Method, device and storage medium for switching performance mode of electronic device
Patent Information
- Application Number
- CN202110834280.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-20
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2041-07-20
AI Technical Summary
[0003]本申请提供了一种电子设备性能模式的切换方法、设备和存储介质,目的在于解决现有电子设备使用时卡顿的问题
[0108]本申请提供一种电子设备性能模式的切换方法、设备和存储介质,方法包括,检测触控面板正向的第一距离内是否有触控物体;触控面板正向为,垂直于触控面板且指向电子设备外侧的方向;当触控面板正向的第一距离内有触控物体时,将电子设备从第一性能模式切换至预设的性能模式;第一性能模式为触控面板正向的第一距离内无触控物体时电子设备的性能模式;预设的性能模式对应的电子设备处理效率高于第一性能模式对应的电子设备处理效率。本方案在第一距离内出现触控物体是将电子设备切换至处理效率较高的预设的性能模式,使电子设备在触控物体和触控面板接触后,以较高的处理效率迅速处理触控指令,达到缩短触控响应流程的时间,改善用户体验的效果。
Smart Images

Figure CN115639919B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to a method, device, and storage medium for switching performance modes of an electronic device. Background Technology
[0002] To reduce the power consumption of electronic devices, existing devices generally support switching between performance modes. They operate in low-performance mode for scenarios where high performance is not required (such as standby), and switch to high-performance mode for scenarios requiring high performance (such as responding to user actions and performing corresponding processing). When an electronic device cannot switch from low-performance mode to high-performance mode in a timely manner, problems such as lag and slow response times occur, affecting the user experience. Summary of the Invention
[0003] This application provides a method, device, and storage medium for switching performance modes of an electronic device, with the aim of solving the problem of lag when using existing electronic devices.
[0004] To achieve the above objectives, this application provides the following technical solution:
[0005] This application provides a method for switching performance modes of an electronic device, applied to an electronic device including a touch panel, the method comprising:
[0006] Detect whether there is a touch object within a first distance in the direction of the touch panel; the direction of the touch panel is perpendicular to the touch panel and points outward of the electronic device; the touch object is an object used to operate the touch panel;
[0007] When there is a touch object within a first distance in front of the touch panel, the electronic device is switched from a first performance mode to a preset performance mode; the first performance mode is the performance mode of the electronic device when there is no touch object within a first distance in front of the touch panel; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than the processing efficiency of the electronic device corresponding to the first performance mode.
[0008] The preset performance mode mentioned above can be the highest performance mode. The first distance can be 10 millimeters.
[0009] In some alternative embodiments, the first distance may include the first distance itself, or it may not include the first distance.
[0010] In some optional embodiments, switching the electronic device from a first performance mode to a preset performance mode includes:
[0011] As the distance between the touch object and the touch panel decreases, multiple mode switching operations are performed until the performance mode of the electronic device is switched to the preset performance mode. The processing efficiency of the electronic device corresponding to the performance mode after each mode switching operation is higher than the processing efficiency of the electronic device corresponding to the performance mode before the mode switching operation.
[0012] In some optional embodiments, the process of performing multiple mode switching operations as the forward distance between the touch object and the touch panel decreases until the electronic device switches to the preset performance mode includes:
[0013] When the forward distance between the touch object and the touch panel is within a preset first distance range, the electronic device is switched from the first performance mode to the fifth performance mode; the processing efficiency of the electronic device corresponding to the fifth performance mode is higher than that of the electronic device corresponding to the first performance mode; the upper limit of the first distance range is the second distance; the second distance is less than the first distance;
[0014] When the forward distance between the touch object and the touch panel is within a preset second distance range, the electronic device is switched from the fifth performance mode to the preset performance mode; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the fifth performance mode; the upper limit of the second distance range is the lower limit of the first distance range.
[0015] The first distance range can be from 1 mm to 3 mm, and the second distance range can be within 1 mm.
[0016] In some optional embodiments, switching the electronic device from a first performance mode to a preset performance mode includes:
[0017] When the distance between the touch object and the touch panel in the forward direction is within a second distance, a mode switching operation is performed to switch the electronic device from the first performance mode to the preset performance mode; the second distance is less than the first distance.
[0018] The second distance can be 3 millimeters.
[0019] In some optional embodiments, after switching the electronic device from a first performance mode to a preset performance mode, the method further includes:
[0020] When the electronic device is in the preset performance mode for a period of time that is greater than or equal to the duration corresponding to the preset performance mode, the electronic device is switched from the preset performance mode to the first performance mode.
[0021] In some optional embodiments, after switching the electronic device from the preset performance mode to the first performance mode, the method further includes:
[0022] The system will then detect again whether there is a touch object within a first distance in front of the touch panel;
[0023] When there is a touch object within a first distance in front of the touch panel, the electronic device is switched from the first performance mode to the preset performance mode again.
[0024] In some optional embodiments, after switching the electronic device from a first performance mode to a preset performance mode, the method further includes:
[0025] When the touch object comes into contact with the touch panel, a touch command is received;
[0026] The touch commands are processed in the preset performance mode.
[0027] In some optional embodiments, after processing the touch command according to the preset performance mode, the method further includes:
[0028] Determine the current business scenario of the electronic device;
[0029] During the duration corresponding to the current business scenario of the electronic device, the electronic device will be maintained in the preset performance mode.
[0030] In some alternative embodiments, the electronic device includes a display screen;
[0031] After obtaining the touch command, the process also includes:
[0032] Determine whether the touch command is a valid touch command;
[0033] If the touch command is a valid touch command, increase the refresh rate of the electronic device's display screen.
[0034] In some alternative embodiments, the electronic device includes a touch driving module;
[0035] The detection of whether there is a touch object within a first distance in the forward direction of the touch panel includes:
[0036] The touch driving module scans the capacitance sampling value of the touch panel;
[0037] When the touch driving module detects that the change in the capacitance sampling value of the touch panel is greater than or equal to a preset reporting threshold, the touch driving module detects a touch object within a first distance in the forward direction of the touch panel.
[0038] The reporting threshold can be 10%.
[0039] In some optional embodiments, the electronic device further includes a capacitance processing module and a resource scheduling module;
[0040] When the forward distance between the touch object and the touch panel is within a preset first distance range, the electronic device is switched from the first performance mode to the fifth performance mode; when the forward distance between the touch object and the touch panel is within a preset second distance range, the electronic device is switched from the fifth performance mode to the preset performance mode, including:
[0041] The touch driving module scans the capacitance sampling value of the touch panel;
[0042] The touch driving module sends a first capacitance value change message to the capacitance value processing module; the first capacitance value change message carries the change range of the capacitance sampling value of the touch panel;
[0043] The capacitance value processing module determines that the change range of the capacitance sample value carried by the first capacitance value change message is within a preset first change range; the first change range corresponds to the first distance range.
[0044] The tolerance processing module sends a first forecast point instruction to the resource scheduling module; the first forecast point instruction carries the identifier of the fifth performance mode corresponding to the first change range; the processing efficiency of the electronic device corresponding to the fifth performance mode is higher than that of the electronic device corresponding to the first performance mode.
[0045] In response to receiving the first forecast point instruction, the resource scheduling module switches the electronic device from the first performance mode to the fifth performance mode;
[0046] The touch driving module continues to scan the capacitance sampling value of the touch panel;
[0047] The touch driving module sends a second capacitance value change message to the capacitance value processing module; the second capacitance value change message carries the change range of the capacitance sampling value of the touch panel;
[0048] The capacitance value processing module determines that the change range of the capacitance sample value carried by the second capacitance value change message is within a preset second change range; the lower limit of the second change range is the upper limit of the first change range; the second change range corresponds to the second distance range;
[0049] The tolerance processing module sends a second forecast point instruction to the resource scheduling module; the second forecast point instruction carries an identifier of the preset performance mode corresponding to the second variation range; the electronic device processing efficiency corresponding to the preset performance mode is higher than the electronic device processing efficiency corresponding to the fifth performance mode.
[0050] In response to receiving the second forecast point instruction, the resource scheduling module switches the electronic device from the fifth performance mode to the preset performance mode.
[0051] The first range of variation can be 30% to 90%, and the second range of variation can be 90% to 100%. Specifically, the first range of variation can include endpoint values, i.e., including 30% and 90%, for example, [30% and 90%]. The first range of variation may also exclude endpoint values, such as including 30% but not including 90%, for example, [30% and 90%]; or excluding 30% but including 90%, for example, (30% and 90%); or excluding neither 30% nor 90%, for example, (30% and 90%).
[0052] In some optional embodiments, the electronic device further includes a capacitance processing module and a resource scheduling module;
[0053] When the distance between the touch object and the touch panel in the forward direction is within a second distance, a mode switching operation is performed to switch the electronic device from the first performance mode to the preset performance mode, including:
[0054] The touch driving module scans the capacitance sampling value of the touch panel;
[0055] The touch driving module sends a capacitance value change message to the capacitance value processing module; the capacitance value change message carries the change range of the capacitance sampling value of the touch panel;
[0056] The capacitance value processing module determines that the change in the capacitance sample value carried by the capacitance value change message is greater than or equal to a preset switching threshold.
[0057] The tolerance processing module sends a forecast point instruction carrying an identifier of the preset performance mode to the resource scheduling module; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the first performance mode.
[0058] In response to receiving the forecast point instruction, the resource scheduling module switches the electronic device to the preset performance mode.
[0059] The switching threshold can be 30%.
[0060] In some optional embodiments, the electronic device includes a CPU scheduling module, a GPU scheduling module, and a DDR scheduling module;
[0061] The resource scheduling module switches the electronic device from the first performance mode to the fifth performance mode, including:
[0062] The resource scheduling module sends the working parameters corresponding to the fifth performance mode to the CPU scheduling module, the GPU scheduling module and the DDR scheduling module;
[0063] The GPU scheduling module switches the operating parameters of the GPU of the electronic device from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the fifth performance mode.
[0064] The CPU scheduling module switches the operating parameters of the CPU of the electronic device from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the fifth performance mode.
[0065] The DDR scheduling module switches the DDR operating parameters of the electronic device from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the fifth performance mode.
[0066] In some alternative embodiments, the electronic device includes a touch messaging module and an application;
[0067] When the touch object comes into contact with the touch panel, a touch command is obtained, including:
[0068] The touch driving module scans the capacitance sampling value of the touch panel;
[0069] The touch driving module sends a third capacitance value change message to the capacitance value processing module; the third capacitance value change message carries the change range of the capacitance sampling value of the touch panel;
[0070] The capacitance processing module determines that the change in the capacitance sample value carried by the third capacitance value change message is greater than or equal to a preset touch threshold.
[0071] The capacitance processing module sends a touch command to the touch message module;
[0072] The process of processing the touch command in the preset performance mode includes:
[0073] In response to receiving the touch command, the touch message module determines whether the touch command is a valid touch command;
[0074] After the touch message module determines that the touch command is a valid touch command, the touch message module sends the valid touch command to the application.
[0075] The application processes the valid touch commands in the preset performance mode.
[0076] The touch threshold can be 99%.
[0077] In some optional embodiments, the touch command includes the contact time between the touch object and the contact panel;
[0078] The touch message module determines whether the touch command is a valid touch command, including:
[0079] The touch message module determines whether another touch command has been received within a preset time period before the contact time between the touch object and the contact panel;
[0080] If another touch command is received within a preset time period before the contact time between the touch object and the contact panel, the touch command is determined to be an invalid touch command.
[0081] If no other touch command is received within a preset time period before the contact time between the touch object and the contact panel, the touch command is determined to be a valid touch command.
[0082] In some optional embodiments, the electronic device includes a scene recognition module;
[0083] The step of determining the current business scenario of the electronic device and maintaining the electronic device in the preset performance mode for the duration corresponding to the current business scenario includes:
[0084] The application sends a scene message to the scene recognition module; the scene message includes the activity status, application category, and application package name.
[0085] The scene recognition module identifies the current business scene of the electronic device based on the scene message;
[0086] After the scene recognition module identifies the current business scenario of the electronic device, it sends a business scenario identifier corresponding to the current business scenario of the electronic device to the touch message module; the scene recognition module stores the correspondence between business scenarios and business scenario identifiers;
[0087] The touch message module sends the business scenario identifier to the resource scheduling module;
[0088] The resource scheduling module finds the duration corresponding to the identifier of the business scenario in a preset configuration file;
[0089] The resource scheduling module maintains the electronic device in the preset performance mode during the duration corresponding to the identifier of the business scenario.
[0090] In some optional embodiments, the scene recognition module identifies the current business scenario of the electronic device based on the scene message, including:
[0091] The scene recognition module reads the activity status, application category, and application package name of the scene message;
[0092] If the activity status is "created" and the application category is "game application", the scene recognition module identifies the current business scenario of the electronic device as a game application launch scenario;
[0093] If the activity status is "created" and the application category is a non-game application, the scene recognition module identifies the current business scenario of the electronic device as a non-game application launch scenario.
[0094] If the activity state is switching and the application category is system interface, the scene recognition module identifies the current business scene of the electronic device as the system interface drop-down scene.
[0095] In some alternative embodiments, the electronic device includes a frame rate adjustment module;
[0096] After the touch message module determines whether the touch command is a valid touch command, it also includes:
[0097] After the touch message module determines that the touch command is a valid touch command, the touch message module sends the valid touch command to the resource scheduling module;
[0098] In response to receiving the valid touch command, the resource scheduling module sends a refresh rate command to the frame rate adjustment module;
[0099] In response to receiving the refresh rate command, the frame rate adjustment module increases the refresh rate of the display screen of the electronic device.
[0100] In some optional embodiments, the upper limit of the first distance interval is 3 mm and the lower limit of the first distance interval is 1 mm. This can be understood as the first distance interval including or excluding 3 mm and including or excluding 1 mm. The upper limit of the second distance interval is 1 mm and the lower limit of the second distance interval is 0 mm. This can be understood as the second distance interval including or excluding 1 mm and the first distance interval including or excluding 0 mm.
[0101] In some optional embodiments, the first variation range is 30% to 90%; the second variation range is 90% to 100%.
[0102] This application also provides an electronic device, which includes: one or more processors, a memory, and a touch panel;
[0103] The memory is used to store one or more programs;
[0104] The one or more processors are used to execute the one or more programs, causing the electronic device to perform the following actions:
[0105] Detect whether there is a touch object within a first distance in the direction of the touch panel; the direction of the touch panel is perpendicular to the touch panel and points outward of the electronic device; the touch object is an object used to operate the touch panel;
[0106] When there is a touch object within a first distance in front of the touch panel, the electronic device is switched from a first performance mode to a preset performance mode; the first performance mode is the performance mode of the electronic device when there is no touch object within a first distance in front of the touch panel; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than the processing efficiency of the electronic device corresponding to the first performance mode.
[0107] This application provides another computer storage medium for storing a computer program, which, when executed, is specifically used to implement the electronic device performance mode switching method provided in any embodiment of this application.
[0108] This application provides a method, device, and storage medium for switching performance modes of an electronic device. The method includes detecting whether there is a touch object within a first distance in front of a touch panel; the front of the touch panel is defined as a direction perpendicular to the touch panel and pointing outwards from the electronic device; when there is a touch object within the first distance in front of the touch panel, the electronic device is switched from a first performance mode to a preset performance mode; the first performance mode is the performance mode of the electronic device when there is no touch object within the first distance in front of the touch panel; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the first performance mode. This solution switches the electronic device to a preset performance mode with higher processing efficiency when a touch object appears within the first distance, enabling the electronic device to quickly process touch commands with higher processing efficiency after the touch object contacts the touch panel, thereby shortening the touch response time and improving the user experience. Attached Figure Description
[0109] Figure 1 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application;
[0110] Figure 2 This is a schematic diagram and timing diagram of the touch response process of an electronic device disclosed in an embodiment of this application;
[0111] Figure 3 This is a schematic diagram of the structure of the capacitive touch panel disclosed in the embodiments of this application;
[0112] Figure 4 This is a schematic diagram of the capacitance value change curve of the touched area of the capacitive touch panel disclosed in the embodiments of this application;
[0113] Figure 5 This is a schematic diagram of the hardware and software layer structure of an electronic device disclosed in an embodiment of this application;
[0114] Figure 6 This is a schematic diagram of module interaction in the software layer of an electronic device disclosed in an embodiment of this application;
[0115] Figure 7 This is a timing diagram of a touch response process disclosed in an embodiment of this application;
[0116] Figure 8 This is a schematic diagram showing the curve of the capacitance value change of a touch panel and the distance to the touch object, as disclosed in an embodiment of this application.
[0117] Figure 9 This is a timing diagram of a method for switching performance modes of an electronic device disclosed in an embodiment of this application;
[0118] Figure 10 This is a flowchart illustrating a method for switching performance modes of an electronic device as disclosed in an embodiment of this application.
[0119] Figure 11 This is a flowchart of another method for switching performance modes of an electronic device disclosed in an embodiment of this application;
[0120] Figure 12 This is a flowchart illustrating another method for switching performance modes of an electronic device disclosed in an embodiment of this application. Detailed Implementation
[0121] The terms "first," "second," and "third," etc., used in this application specification, claims, and drawings are used to distinguish different objects, not to limit a specific order.
[0122] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0123] The method for switching performance modes of an electronic device provided in this application can be applied to any type of electronic device. The electronic device to which this method for switching performance modes is applied can have the following structure: Figure 1 As shown.
[0124] like Figure 1 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a touch sensor 180A, a pressure sensor 180B, etc.
[0125] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0126] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0127] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0128] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0129] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thus realizing the touch function of the electronic device.
[0130] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0131] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0132] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0133] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device's shooting function. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device's display function.
[0134] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0135] The external storage interface 120 can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0136] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. For example, in this embodiment, processor 110 can perform scene arrangement by executing instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phone book, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor.
[0137] USB port 130 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge the electronic device, or to transfer data between the electronic device and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0138] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0139] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0140] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0141] The wireless communication function of this electronic device can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0142] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in this electronic device can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0143] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to this electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0144] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0145] The wireless communication module 160 can provide solutions for wireless communication applications on this electronic device, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0146] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the electronic device to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).
[0147] This electronic device implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0148] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 194, where N is a positive integer greater than 1.
[0149] The display screen 194 of this electronic device can display a series of graphical user interfaces (GUIs), which serve as the main screen of the electronic device. Generally, the size of the display screen 194 is fixed, and only a limited number of controls can be displayed on it. A control is a GUI element, a software component contained within an application, controlling all data processed by the application and interactive operations related to that data. Users can interact with controls through direct manipulation to read or edit information related to the application. Generally, controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets. For example, in this embodiment, the display screen 194 can display virtual buttons.
[0150] The electronic device can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0151] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0152] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device may include one or N cameras 193, where N is a positive integer greater than 1.
[0153] Digital signal processors (DSPs) are used to process digital signals, including digital image signals and other digital signals. For example, when the electronic device is selecting a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0154] Video codecs are used to compress or decompress digital video. An electronic device can support one or more video codecs. Thus, the electronic device can play or record video in various encoded formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0155] An NPU (Neural Processing Unit) is a neural network (NN) computing processor that, by borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0156] This electronic device can achieve audio functions, such as music playback and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.
[0157] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0158] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. This electronic device can listen to music or make hands-free calls through the speaker 170A.
[0159] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When this electronic device answers a phone call or voice message, the receiver 170B can be brought close to the ear to hear the voice.
[0160] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. This electronic device can have at least one microphone 170C. In some embodiments, the electronic device can have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, the electronic device can have three, four, or more microphones 170C, enabling sound signal collection, noise reduction, sound source identification, and directional recording, among other functions.
[0161] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0162] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0163] Touch sensor 180A, also known as a "touch device," can be located on display screen 194. The touch sensor 180A and display screen 194 together form a touchscreen, also called a "touchscreen" or "touch panel." Touch sensor 180A detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor in the form of a touch command to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In some embodiments, touch sensor 180A can also be located on the surface of the electronic device, in a different position than display screen 194; in this case, touch sensor 180A itself can be considered a touch panel.
[0164] Pressure sensor 180B is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180B can be disposed on display screen 194. There are many types of pressure sensors 180B, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180B, the capacitance between the electrodes changes. The electronic device determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, the electronic device detects the intensity of the touch operation based on pressure sensor 180B. The electronic device can also calculate the touch position based on the detection signal from pressure sensor 180B. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example: when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0165] This electronic device implements display functions through a GPU, a display screen 130, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 130 and the application processor. The display screen 130 is used to display images, videos, etc. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0166] The display screen 130 of this electronic device can display a series of graphical user interfaces (GUIs), allowing users to interact with the electronic device by directly manipulating the GUI. For example, in this embodiment, the display screen 130 can display virtual buttons.
[0167] For example, internal memory 121 may store one or more computer programs, and processor 110 may execute one or more programs stored in internal memory to implement the electronic device performance mode switching method provided in the embodiments of this application.
[0168] In addition, an operating system runs on top of the aforementioned components. Examples include Apple's iOS, Google's Android open-source operating system, Microsoft's Windows operating system, and HarmonyOS. Applications can be installed and run on this operating system.
[0169] In electronic devices, various hardware components, such as CPUs, GPUs, and Double Data Rate (DDR) memory, are designed with different operating parameters, such as different frequencies and voltages. Higher frequencies and voltages result in better hardware performance, such as higher CPU processing efficiency and faster DDR read / write speeds, but also higher power consumption. Conversely, lower frequencies and voltages result in worse hardware performance, but lower power consumption.
[0170] For ease of explanation, in this application, a combination of operating parameters of various hardware components in an electronic device is denoted as the performance mode of the electronic device. For example, a performance mode may represent a specific combination of CPU frequency, GPU frequency, and DDR frequency.
[0171] For any two performance modes, if all the operating parameters of the first performance mode are higher than or not lower than the operating parameters of the second performance mode, then the processing efficiency of the electronic device in the first performance mode is higher than that in the second performance mode. That is, the performance of the electronic device in the first performance mode is better than that in the second performance mode. At the same time, the power consumption of the electronic device in the first performance mode is also higher than that in the second performance mode.
[0172] To ensure clarity and brevity in the description of the following embodiments, a brief explanation will first be given of the process by which an electronic device responds to user touch operations, and the working principle of a capacitive touch panel (commonly known as a capacitive screen).
[0173] Please refer to Figure 2 , Figure 2This diagram illustrates the touch response process of an electronic device. The touch driver detects whether a user has performed a touch operation by scanning the capacitance values of various areas on the touch panel. Once detected, the touch driver reports a touch command to the processor. The processor responds to this command by sequentially executing steps such as input event processing, user interface rendering, user interface composition, and display. Ultimately, the result of the user's touch operation is displayed on the electronic device's screen. For example, if the touch operation is clicking on an application, the displayed result could be the main interface of that application after it has been launched. The touch response process describes how an electronic device responds to a user's touch operation.
[0174] When the touch response process takes too long, electronic devices cannot provide timely feedback to the user's touch operations, resulting in problems such as device lag and slow response.
[0175] like Figure 2 As shown, to shorten the touch response time, after receiving a touch command, the processor's resource scheduling module can use Boost technology to switch the electronic device from standby performance mode to the highest performance mode. This improves the processing efficiency of the electronic device in handling touch commands, thereby reducing the touch response time. The highest performance mode is a combination of the highest or higher frequency supported by the CPU, the highest or higher frequency supported by the GPU, and the highest or higher frequency supported by the DDR. A higher frequency refers to a frequency higher than the frequency of the corresponding component when the electronic device is in standby mode.
[0176] The advantage of this solution is that electronic devices can remain in standby mode with lower power consumption, thus extending battery life. Simultaneously, when in use, the electronic device can quickly process user touch commands in its highest performance mode, ensuring a better user experience.
[0177] However, the above solution still has the following problems:
[0178] Please refer to Figure 2 The timing diagram of the touch response process in the above scheme shows that after the user completes the touch operation, the processor needs a period of time to perform a switching action to switch the electronic device from the standby performance mode to the highest performance mode before it can start processing touch commands and finally complete the display. It is evident that in the above scheme, the time consumed by the touch response process inevitably includes the time to switch from the standby performance mode to the highest performance mode, resulting in a still relatively long touch response process time.
[0179] To address the aforementioned problems, this application provides a method for switching performance modes of an electronic device. To facilitate understanding of the method for switching performance modes of an electronic device provided in this application, the working principle and characteristics of a capacitive touch panel will be explained below with reference to the accompanying drawings.
[0180] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a capacitive touch panel. Figure 3 The multiple rectangular grids represent several areas divided on the capacitive touch panel (these area divisions are generally not visible to the user). Under normal conditions, i.e., when no object is near the touch panel, each area generally has a relatively constant capacitance sampling value. Figure 3 In section 3a, the numbers -10, 16, etc., in each rectangular grid represent the capacitance sampling value of that region in the current state. R0, R1... and T0, T1... in the figure represent the position (or coordinates) of each region.
[0181] In this article, "touch object" refers to any object that can be used to perform touch operations on a capacitive touch panel. Common touch objects include a user's finger and a stylus specifically designed for operating a capacitive screen.
[0182] refer to Figure 3 In section 3b, when a touchable object comes into contact with the capacitive touch panel, the capacitance sampling values of one or more areas where the contact occurs will change significantly. As shown in the figure, the touched area within the dotted line is the area where the capacitive touch panel and the touchable object come into contact. It can be seen that the capacitance sampling values in this area change significantly, such as the capacitance sampling value in the (T0, R0) area changing from -10 to 2382.
[0183] Based on the aforementioned characteristics of the touch panel, the touch driver can scan the capacitance sampling values of each area of the touch panel in real time. When a change in the capacitance sampling value of one or more areas is detected, and the magnitude of the change is greater than the touch threshold, it can be determined that the user has performed a touch operation on the corresponding area, thereby generating a touch command and triggering subsequent processes. For example, the touch threshold can be set to 99%.
[0184] The aforementioned touch commands are primarily used to instruct the processor which areas of the touch panel will experience touch operations. On one hand, the touch commands can include a capacitance array of the touch panel (which contains the current capacitance sampling values for each area of the touch panel), allowing the processor to determine the areas where touch operations will occur. On the other hand, the touch commands can include the specific coordinates of the contact area on the touch panel.
[0185] Further research into the working principle of capacitive touch panels revealed that as a touch object approaches the capacitive touch panel, the capacitance sampling value in the corresponding area does not change drastically from the normal capacitance sampling value after the touch object and the touch panel come into contact. Instead, it changes gradually as the distance between the touch object and the touch panel decreases.
[0186] like Figure 4 The figure shown is a schematic diagram of the capacitance value change curve of the touched area of the capacitive touch panel disclosed in the embodiment of this application. The horizontal axis of the curve is the distance between the touched object and the touch panel, and the horizontal axis decreases from left to right. The vertical axis is the capacitance value change of the area on the touch panel and the area directly opposite the touched object.
[0187] In this application, the capacitance value change range refers to the change range of the capacitance sample value. The capacitance value change range can be expressed as a percentage of the actual change in the capacitance sample value to the peak value of the capacitance sample value change. The peak value of the capacitance sample value change refers to the difference between the capacitance sample value of the contact area when the touch object and the touch panel make contact and the capacitance sample value of the contact area under normal conditions.
[0188] In a specific example, suppose the touch driver detects that the capacitance sampling value of a certain area on the touch panel increases from the normal value of 30 to 286. The actual change in capacitance sampling value is 256, while the peak value of the change in capacitance sampling value in that area is 1024. Therefore, the change in capacitance value in that area is 256 divided by 1024, which is 25%.
[0189] Taking a stylus as an example of a touch-sensitive object. Figure 4 The following explanation is provided. When the stylus 401 is far from the touch panel 402, the capacitance sampling values of various areas of the touch panel are unaffected, and the corresponding capacitance value change is zero. When the stylus approaches the target distance in front of the touch panel, the capacitance sampling value of the area on the touch panel directly opposite the stylus changes. Subsequently, the capacitance sampling value of the area directly opposite the stylus gradually increases as the stylus gets closer to the touch panel, and the capacitance value change amplitude in this area also continuously increases until the stylus and touch panel are in complete contact, at which point the capacitance value change amplitude of the contact area reaches 100%. During the movement of the stylus towards the touch panel, the touch driver can output a touch command when it detects that the capacitance value change amplitude in any area of the touch panel is greater than or equal to the touch threshold.
[0190] The front of the touch panel refers to the direction perpendicular to the touch panel and pointing outwards from the electronic device to which the touch panel belongs. Figure 4 For example, Figure 4 The middle arrow points to the positive direction of touch panel 402.
[0191] The target distance refers to the maximum distance at which a touched object can cause a change in the capacitance of a touch panel. When the distance between the touched object and the touch panel exceeds the target distance, the touch panel will not show a change in capacitance sampling value due to the touched object. The target distance is determined by the sensitivity of the touch panel. Figure 4 In the example shown, the target distance can be 12 millimeters (mm).
[0192] According to the above Figure 4 As shown by the curve, the touch panel can detect the touch object by the change in capacitance value when the object is far away. At the same time, when the object enters this distance, it can be assumed that the object will make contact with the touch panel, that is, the user is about to perform a touch operation.
[0193] according to Figure 3 and Figure 4 As the principle described above shows, the processor can sense touch objects approaching but not yet in contact with the touch panel by detecting changes in the capacitance sampling value. When the capacitance sampling value of any area on the touch panel changes, and the change is less than the touch threshold, the resource scheduling module in the electronic device can predict that the user is about to perform a touch operation, and then initiate a performance mode switch, switching the electronic device from the poor performance mode of standby to the better performance mode. When the user actually performs a touch operation, the electronic device can immediately process the touch command in the better performance mode, thereby achieving optimal performance. Figure 2 The touch response process shown omits the process of switching performance modes, further shortening the touch response time and enabling faster response to user touch commands.
[0194] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the hardware and software layer structure of an electronic device provided in an embodiment of this application.
[0195] like Figure 5 As shown, the hardware layer of the electronic device includes memory, a touch panel, a CPU, a GPU, and DDR. The software layer includes an application layer, an application framework layer, a kernel layer, and a system layer. The application layer includes one or more applications; the application framework layer includes a touch message module, a resource scheduling module, a scene recognition module, and a frame rate adjustment module; the kernel layer includes a capacity processing module, a touch driver module, a CPU scheduling module, a GPU scheduling module, and a DDR scheduling module.
[0196] After the electronic device is powered on, the touch driver module can scan the capacitance sampling values of various areas on the touch panel in real time.
[0197] When the touch driver module detects a change in the capacitance sampling value of a portion of the touch panel, and the magnitude of this change is greater than or equal to a preset reporting threshold (e.g., 10%), the touch driver module sends a capacitance change message to the capacitance processing module. This message carries the location of the area where the capacitance sampling value changed, the magnitude of the change, the device type, the touch type, and a timestamp. The device type indicates whether the touch object is a hand or a stylus; touch types include click (Down), lift (Up), and move; and the timestamp indicates the time when the touch driver module detected the change in the capacitance sampling value of the touch panel. For example, the reporting threshold can be set to 10%.
[0198] Each time the capacitance value processing module receives a capacitance value change message, it first determines whether the capacitance value change amplitude carried in the capacitance value change message is greater than the touch threshold (the touch threshold can be 99% or 98%). If so, the capacitance value processing module sends a touch command (Touch Down) to the touch message module so that the touch command can be forwarded to the application layer application through the touch message module. If not, the capacitance value processing module determines the identifier of the target performance mode according to the pre-set correspondence between capacitance value change amplitude and performance mode, and then sends a forecast point command to the resource scheduling module.
[0199] Touch commands carry the following information:
[0200] The coordinates and time of the contact area, as well as the device type, touch type, and timestamp. The contact area refers to the region on the touch panel where the touch object makes contact, and the contact time refers to the duration of contact between the touch object and the touch panel. When multiple areas on the touch panel come into contact with a touch object, the touch command can be a list command containing the coordinates and time of each contact area.
[0201] Optionally, when the touch panel integrates a pressure sensor, the touch command can also carry a pressure value, which refers to the contact pressure when the touch object and the touch panel come into contact.
[0202] The forecast point command carries an identifier for the target performance mode. The target performance mode refers to the performance mode corresponding to the magnitude of the capacitance change carried in the capacitance change message.
[0203] After receiving the forecast point instruction, the resource scheduling module switches the electronic device to the target performance mode according to the target performance mode identifier carried in the forecast point instruction.
[0204] After receiving a touch command, the touch message module determines whether the touch command is valid. If the touch command is invalid, the touch message module deletes the touch command. If the touch command is valid, the touch message module sends the valid touch command to the resource scheduling module and the application respectively.
[0205] After receiving a valid touch command, the resource scheduling module sends a refresh rate command to the frame rate adjustment module. Upon receiving the refresh rate command, the frame rate adjustment module adjusts the refresh rate of the electronic device's display screen to the target refresh rate specified in the command.
[0206] After receiving a valid touch command, the application processes the valid touch command according to its own processing logic and sends a scene message to the scene recognition module during the processing. Figure 5 The applications shown can include system applications inherent to the operating system of electronic devices, such as system desktop applications and system UI applications, as well as third-party applications installed on the operating system, such as navigation applications, game applications, chat applications, etc.
[0207] The scene message carries the activity state, application package name, and application category. The activity state includes destruction, toggling, creation, etc. The application package name refers to the name of the application that handles the valid touch command; the application category refers to the type of application that handles the valid touch command, which can include navigation, chat, games, etc.
[0208] The scene recognition module identifies the current business scene based on the scene message, and after identifying the business scene, sends the corresponding business scene identifier to the touch message module.
[0209] The touch message module sends the business scenario identifier to the resource scheduling module, which then extends the duration of the highest performance mode based on the business scenario identifier.
[0210] The following is combined with Figure 6 ,right Figure 5 The interaction process of each module in the electronic device shown is explained. Figure 6 This is a schematic diagram of module interaction in the software layer of an electronic device disclosed in an embodiment of this application.
[0211] After the electronic device is started, the touch driver module executes step 601 in real time to scan the capacitance sampling value of the touch panel.
[0212] During the scanning process of the touch driver module, when a touch object approaches the touch panel, it causes a change in the capacitance sampling value of the corresponding area of the touch panel. After the touch driver module detects a change in the capacitance sampling value of any area on the touch panel, it executes step 602 and sends a capacitance value change message to the capacitance value processing module.
[0213] by Figure 3 For example, when the touch driver module scans... Figure 3 When the capacitance sample value in the (R1, T1) region changes by 30%, the touch driver module sends a capacitance change message to the capacitance processing module. This message includes the location (R1, T1) and the 30% change in capacitance. The message carries the location of the area where the capacitance sample value changed, the magnitude of the change, and may also include the device type, touch type, and timestamp. The device type indicates whether the touch object is a hand or a stylus; touch types include click (Down), lift (Up), and move (Move); and the timestamp indicates the time the touch driver module scanned and detected a change in the capacitance sample value on the touch panel.
[0214] After receiving the capacitance value change message, the capacitance value processing module executes step 603 to determine whether the capacitance value change is greater than the touch threshold.
[0215] Continuing with the example above, the capacitance change message carries a capacitance change range of 30%, which is less than the touch threshold of 99%. Therefore, the capacitance processing module determines that the capacitance change range is less than the touch threshold, executes step 604 to determine the target performance mode, and then executes step 605 to send a prediction point command, which carries an identifier of the target performance mode.
[0216] The target performance mode refers to the performance mode corresponding to the capacitance change magnitude carried in the capacitance change message. The correspondence between capacitance change magnitude and performance mode can be set in the electronic device's configuration file, which is stored in the electronic device's memory.
[0217] The correspondence between capacitance value variation ranges and performance modes can be stored in a configuration file in the form of a capacitance value variation range table. This table includes multiple variation range intervals and an identifier for the performance mode corresponding to each interval. In this correspondence, a larger variation range corresponds to a higher operating efficiency of the electronic device under the corresponding performance mode; in other words, a larger capacitance value variation range indicates better performance. The largest variation range corresponds to the highest performance mode.
[0218] In a specific example, the capacitance value variation can be shown in Table 1 below:
[0219] Table 1
[0220] Greater than or equal to 30%, less than 90% Fifth performance mode 5379 Greater than or equal to 90%, less than 100% Highest performance mode 4402
[0221] For example, the range of capacitance value variation corresponding to the fifth performance mode can also be greater than 30% and less than or equal to 90%. Optionally, if the capacitance value variation received by the capacitance value processing module does not correspond to a performance mode, the capacitance value processing module may not send a forecast point instruction.
[0222] The forecast point command carries an identifier of the target performance mode. The forecast point command can be sent from the tolerance processing module to the resource scheduling module via the Binder interface. Binder is an open-source inter-process communication mechanism, and the Binder interface is an interface implemented based on the Binder mechanism. In this embodiment, the resource scheduling module periodically searches for the forecast point command in the Binder interface. After the tolerance processing module writes the forecast point command into the Binder interface, the resource scheduling module can find the newly written forecast point command in the Binder interface, and then read the forecast point command, thereby completing the transmission of the forecast point command.
[0223] Continuing with the example above, after receiving a capacitance value change message indicating a 30% change in capacitance value, the capacitance value processing module determines the fifth performance mode as the target performance mode and sends a forecast point instruction carrying the identifier of the fifth performance mode to the resource scheduling module.
[0224] In this embodiment, the performance mode can specifically be a combination of the CPU frequency, the GPU frequency, and the DDR frequency.
[0225] After receiving the forecast point instruction, the resource scheduling module executes step 606, switching the electronic device to the target performance mode.
[0226] Continuing with the example above, the forecast point instruction received by the resource scheduling module carries an identifier for the fifth performance mode. Therefore, the resource scheduling module switches the electronic device from the first performance mode to the fifth performance mode. The first performance mode refers to the performance mode of the electronic device when it is in standby mode.
[0227] Each time the resource scheduling module switches performance modes, it can be called a mode switching operation. The specific implementation method for switching performance modes is as follows:
[0228] The configuration file of the electronic device stores the operating parameters of the CPU, GPU, and DDR for each performance mode. Upon receiving a forecast point instruction, the resource scheduling module reads the configuration file from the electronic device's memory based on the identifier of the target performance mode carried in the forecast point instruction. It then locates the pre-stored operating parameters of the CPU, GPU, and DDR for the target performance mode in the configuration file. Next, the resource scheduling module sends parameter instructions carrying the corresponding hardware operating parameters to the CPU scheduling module, GPU scheduling module, and DDR scheduling module, respectively, enabling these modules to configure the corresponding hardware according to the parameter instructions.
[0229] Furthermore, each performance mode in the configuration file can be configured with a corresponding duration. When the corresponding resource scheduling module executes 606, it can read the working parameters and duration of the target performance mode from the configuration file and send the working parameters and duration to the scheduling module of the corresponding hardware through parameter instructions.
[0230] After configuring the corresponding hardware parameters according to the parameter instructions, the CPU scheduling module, GPU scheduling module, and DDR scheduling module automatically reset the corresponding hardware's operating parameters back to the standby parameters of the electronic device if no new instructions are received within a certain period. This reduces the time the electronic device operates in the high-power target performance mode, thereby lowering its power consumption.
[0231] Optionally, the duration of each performance mode in the configuration file cannot be configured. In this case, the CPU scheduling module, GPU scheduling module, and DDR scheduling module can automatically adjust the corresponding hardware operating parameters back to the operating parameters of the first performance mode when the duration of the current performance mode reaches the maximum duration preset in the configuration file, such as the aforementioned 250ms.
[0232] After sending a capacitance change message, the touch object continues to approach the touch panel. The touch driver module scans again and detects that the capacitance sampling value of the touch panel has changed. Then, it executes step 602 and sends a second capacitance change message to the capacitance processing module.
[0233] It should be noted that this embodiment uses three capacitance value change messages sent from the touch driving module to the capacitance processing module for illustration. As the capacitance value of the touch panel gradually increases, the touch driving module can send multiple capacitance value change messages to the capacitance processing module. For example, between the first and second capacitance value change messages mentioned above, the touch driving module can also send multiple capacitance value change messages to the capacitance processing module.
[0234] After receiving the capacitance change message, the capacitance processing module performs step 603 again, determines that the capacitance variation amplitude carried in the capacitance change message is less than the touch threshold, and then performs step 604 and step 605 again, thereby sending a second prediction point instruction to the resource scheduling module.
[0235] Continuing from the above example, the capacitance variation amplitude of the second capacitance change message may be 90%. After receiving the second capacitance change message, the capacitance processing module determines the highest performance mode corresponding to the capacitance variation amplitude from 90% to 100% as the target performance mode, so the sent prediction point instruction carries the identifier of the highest performance mode.
[0236] After receiving the second prediction point instruction, the resource scheduling module performs step 606 again to switch the electronic device to the target performance mode indicated by the second prediction point instruction.
[0237] Continuing from the above example, after the resource scheduling module receives the second prediction point instruction, it switches the electronic device from the fifth performance mode to the highest performance mode.
[0238] The following describes the process of the resource scheduling module switching performance modes by taking the highest performance mode as an example:
[0239] The configuration file may store the working parameters corresponding to the highest performance mode in the following form:
[0240] <cmd id="4402"name="Tap Boost">
[0241] Duration: 50 milliseconds
[0242] Minimum frequency gear for small cores: gear 5;
[0243] Minimum frequency gear for large cores: gear 4;
[0244] Minimum frequency gear for extra-large cores: gear 5;
[0245] Minimum GPU gear: gear 6;
[0246] Minimum DDR gear: gear 5;
[0247]
[0248] Cmd id represents the identifier of a performance mode, 4402 is the identifier of the highest performance mode shown in Table 1, and "Tap Boost" is the name of the highest performance mode. Small cores, large cores, and extra-large cores are three types of cores in a CPU. The duration of 50 milliseconds is the preset duration of the highest performance mode.
[0249] The higher the minimum tier for CPU, GPU, and DDR, the higher the minimum operating frequency of the corresponding component, resulting in higher driving voltage, faster speed, and greater power consumption. In the example above, the minimum frequency corresponding to tier 5 for the small core is 1625000Hz, the minimum frequency corresponding to tier 4 for the large core is 2200000Hz, and the minimum frequency corresponding to tier 5 for the super-large core is 1632000Hz.
[0250] After receiving the forecast point instruction carrying identifier 4402, the resource scheduling module sends parameter instructions to the CPU scheduling module:
[0251] Lowest frequency setting for small cores: 5 levels;
[0252] Lowest frequency setting for large cores: Level 4;
[0253] Minimum core frequency setting for ultra-large cores: 5 levels;
[0254] Duration: 50 milliseconds.
[0255] After receiving the above parameter instructions, the CPU scheduling module sets the minimum frequency of the CPU's small core to the frequency corresponding to level 5; sets the minimum frequency of the CPU's large core to the frequency corresponding to level 4; and sets the minimum frequency of the CPU's super-large core to the frequency corresponding to level 5. If the CPU scheduling module does not receive any new instructions after receiving the above parameter instructions for a period of 50ms, it automatically sets the CPU's operating parameters back to the operating parameters when the electronic device is in standby mode.
[0256] The resource scheduling module also sends the following parameter instructions to the GPU scheduling module:
[0257] The lowest GPU setting is 6 levels.
[0258] Duration: 50 milliseconds.
[0259] After receiving the above instructions, the GPU scheduling module calls the GPU driver to set the minimum frequency of the GPU when it is working to the frequency corresponding to the 3rd level (such as 385MHz). The frequencies corresponding to the different levels of the GPU can be stored in the GPU scheduling module. If the GPU scheduling module does not receive any new instructions after receiving the above parameter instructions for a continuous period of 50ms, it will automatically set the GPU's working parameters back to the working parameters when the electronic device is in standby mode.
[0260] The resource scheduling module also sends the following parameter instructions to the DDR scheduling module:
[0261] DDR has a minimum of 5 levels;
[0262] Duration: 50 milliseconds.
[0263] After receiving the above instruction, the DDR scheduling module sets the minimum frequency of DDR operation to the frequency corresponding to level 5. The frequencies corresponding to different DDR levels can be stored in the DDR scheduling module. If the DDR scheduling module does not receive a new instruction after receiving the above parameter instruction for a continuous period of 50ms, it will automatically set the DDR operating parameters back to the operating parameters when the electronic device is in standby mode.
[0264] Setting the above operating parameters for the CPU scheduling module, GPU scheduling module, and DDR scheduling module is equivalent to switching the electronic device to its highest performance mode.
[0265] After sending the second capacitance value change message, the touch object comes into contact with the touch panel, the touch driver module scans the change in the capacitance sampling value of the touch panel, and executes step 602 to send the third capacitance value change message.
[0266] When the third capacitance change message is sent, the touched object has already contacted the touch panel, so the capacitance change carried by the third capacitance change message is 100%. Therefore, after the capacitance processing module executes step 603, it determines that the capacitance change carried by the third capacitance change message is greater than the touch threshold, and the capacitance processing module executes step 607 to send a touch command to the touch message module.
[0267] After receiving a touch command, the touch message module executes step 608 to determine whether the touch command is valid.
[0268] The touch message module can specifically identify whether a touch command is a valid touch command in the following ways:
[0269] First, determine whether this touch command conflicts with other touch commands. If so, the touch message module will identify this touch command as an invalid touch command; otherwise, the touch message module will identify this touch command as a valid touch command.
[0270] For example, after receiving a touch command, the touch message module determines whether there are other touch commands within a preset time period before the timestamp of the touch command. If there are other touch commands within the preset time period before the timestamp of the touch command, it is determined that the touch command conflicts with other touch commands, and thus the touch command is determined to be an invalid touch command. If there are no other touch commands within the preset time period before the timestamp of the touch command, it is determined that the touch command does not conflict with other touch commands, and thus the touch command is determined to be a valid touch command.
[0271] For example, the preset duration can be 20ms.
[0272] Second, determine whether the interface currently displayed on the screen supports this touch command. If it does, the touch command is a valid touch command; if it does not, the touch command is an invalid touch command.
[0273] For example, suppose that there is an area in the interface displayed on the screen that displays an inoperable image. If the user clicks on this area, the touch command generated by the click will not be supported by the interface displayed on the screen. Therefore, the touch message module determines that this touch command is invalid.
[0274] After the touch message module determines that the touch command is a valid touch command, it executes step 609, which sends the valid touch command to the resource scheduling module, and step 610, which sends the valid touch command to the application.
[0275] After receiving a valid touch command, the resource scheduling module executes step 611, sending a refresh rate command to the frame rate adjustment module. Upon receiving the refresh rate command, the frame rate adjustment module executes step 612, adjusting the refresh rate.
[0276] For example, the refresh rate instruction carries a target refresh rate of 120Hz. After receiving the refresh rate instruction, the frame rate adjustment module can increase the refresh rate of the display screen from 60Hz in standby mode to the target refresh rate of 120Hz.
[0277] Optionally, after receiving a touch command, the touch message module can also directly send the touch command to the resource scheduling module, which will then determine whether the received touch command is valid. If the resource scheduling module determines that the touch command is invalid, it will switch the electronic device from the highest performance mode back to the standby performance mode, thereby shortening the time the electronic device runs in the highest performance mode and reducing the power consumption of the electronic device. If the resource scheduling module determines that the touch command is valid, then step 612 will be executed.
[0278] After receiving a valid touch command, the application executes step 613 according to its own processing logic, processes the valid touch command, and invokes the electronic device's rendering process to present the operation result on the display screen. The operation result can be a specific interface of the application, or an image drawn by the application using the rendering process, etc.
[0279] The application needs to use hardware such as CPU, GPU and DDR in the process of processing valid touch commands. As can be seen from the above steps in this embodiment, before the tolerance processing module reports the touch command to the touch message module, the resource scheduling module has already adjusted the frequency of the hardware such as CPU, GPU and DDR to the working parameters corresponding to the highest performance mode. Therefore, after the tolerance processing module reports the touch command to the touch message module, the touch message module can identify the valid touch command more quickly, and the application can process the valid touch command and present the operation result more quickly in the highest performance mode.
[0280] During the processing of valid touch commands, the application can execute step 614 to send a scene message. After receiving the scene message, the scene recognition module executes step 615 to identify the business scene, and then, after identifying the business scene, executes step 616 to send a business scene identifier to the touch message module.
[0281] For example, if the activity state in the scene message is "created" and the application category is "game", the scene recognition module identifies the business scene as a game application launch scene; if the activity state in the scene message is "created" and the application category is not "game", the scene recognition module identifies the business scene as a non-game application launch scene; if the activity state in the scene message is "switched" and the application package name is "system UI", the scene recognition module identifies the business scene as a system UI pull-down scene.
[0282] After receiving the business scenario identifier, the touch message module executes step 617, sending the business scenario identifier to the resource scheduling module. After receiving the business scenario identifier, the resource scheduling module executes step 618, extending the duration of the highest performance mode.
[0283] The specific implementation of step 618 is as follows: The resource scheduling module looks up the duration corresponding to the business scenario identifier in the business scenario and duration correspondence table stored in the configuration file, and then sends the found duration to the CPU scheduling module, GPU scheduling module, and DDR scheduling module. The CPU scheduling module, GPU scheduling module, and DDR scheduling module can then control the corresponding hardware to continue running at the working parameters corresponding to the highest performance mode within the duration. The configuration file is stored in the memory. The electronic device can update the configuration file in the memory according to the server's push.
[0284] For example, the correspondence between business scenarios and durations can be Table 2 below:
[0285] Table 2
[0286]
[0287]
[0288] According to the example in Table 2, after the resource scheduling module receives the identifier of the game application startup scenario, it looks up the corresponding duration of 5000ms from Table 2 and sends 5000ms to the CPU scheduling module, GPU scheduling module and DDR scheduling module. Subsequently, the CPU scheduling module, GPU scheduling module and DDR scheduling module control the CPU, GPU and DDR to continue to run with the working parameters corresponding to the highest performance mode for the next 5000ms.
[0289] In some optional embodiments, the system desktop application can send an application launch completion message to the scene recognition module after either the game application or the non-game application has finished launching. In response to this message, the scene recognition module sends an identifier of the application launch completion scene to the touch message module. The touch message module then forwards this identifier to the resource scheduling module. When the resource scheduling module receives the identifier, if the actual duration of the highest performance mode has not yet reached the duration shown in Table 2, the resource scheduling module can switch the electronic device from the highest performance mode to the first performance mode in advance.
[0290] For example, after receiving the identifier of the game application startup scenario, the resource scheduling module looks up the corresponding duration of 5000ms from Table 2 and sends 5000ms to the CPU scheduling module, GPU scheduling module, and DDR scheduling module. If the resource scheduling module receives the identifier of the startup end scenario 4000ms after receiving the identifier of the game application startup scenario, the resource scheduling module can immediately send the working parameters corresponding to the first performance mode to the CPU scheduling module, GPU scheduling module, and DDR scheduling module, so that the electronic device immediately switches to the first performance mode.
[0291] In some optional embodiments, the application framework layer of the electronic device also includes a list control (ListView). After receiving a touch command, if the touch command contains multiple consecutive contact areas, the touch message module can identify the touch command as a swipe touch command, and then send the swipe touch command to the list control. After receiving the swipe touch command, the list control controls the icons, images, and text displayed on the electronic device's screen to swipe. After receiving the swipe touch command, the list control can send a swipe message to the scene recognition module, which carries the list swipe speed. After receiving the swipe message, the scene recognition module calculates the list swipe time based on the list swipe speed and animation curve, and then sends the list swipe time and the identifier of the list swipe scene to the touch message module. The touch message module forwards the list swipe time and the identifier of the list swipe scene to the resource scheduling module.
[0292] After receiving the list sliding time and the identifier of the list sliding scenario, the resource scheduling module compares the list sliding time with the duration corresponding to the list sliding scenario shown in Table 2. If the list sliding time is not greater than the duration corresponding to the list sliding scenario shown in Table 2 (3000ms), the resource scheduling module extends the duration of the highest performance mode to the list sliding time. If the list sliding time is greater than the duration corresponding to the list sliding scenario shown in Table 2 (3000ms), the resource scheduling module extends the duration of the highest performance mode to 3000ms.
[0293] The animation curve is pre-set in the electronic device's configuration file, and the list control and scene recognition module can read the animation curve from the configuration file. When the list control controls the sliding of objects on the display screen, the sliding speed gradually decreases along the animation curve from the initial list sliding speed until the speed drops to 0, at which point the sliding stops. Therefore, the scene recognition module can calculate the time it takes for the list sliding speed to decrease to 0, which is the list sliding time, based on the list sliding speed and the animation curve.
[0294] In some alternative embodiments, the resource scheduling module may not automatically extend the duration of the highest performance mode based on application scenario information, but instead directly switch the electronic device from the highest performance mode to the standby performance mode after the current touch response process ends.
[0295] The benefits of extending the duration of the highest performance mode based on the application scenario are:
[0296] Improve the processing efficiency of electronic devices when executing subsequent programs after completing the touch response process.
[0297] In a specific example, when a user clicks on a game application icon on the system desktop, the touch message module sends a touch command to the system desktop. The system desktop responds to this touch command, launches the game application, and then displays its launch interface on the electronic device's screen. In this embodiment, when the resource scheduling module processes this touch command on the system desktop, it can identify the current application scenario as a game application scenario, thereby extending the duration of the highest performance mode. This allows the electronic device to quickly launch the game application in the highest performance mode, shortening the time required to launch the game application.
[0298] In some optional embodiments, the scene recognition module may also directly send the business scene identifier to the resource scheduling module.
[0299] In some optional embodiments, the duration corresponding to the service scenario identifier can also be found by the touch message module and sent to the resource scheduling module.
[0300] In some optional embodiments, after receiving the service scenario identifier, the touch message module can send the service scenario identifier and the identifier of the highest performance mode together to the resource scheduling module. After receiving the identifier of the highest performance mode sent by the touch message module, the resource scheduling module sends the parameters corresponding to the highest performance mode, as well as the duration corresponding to the service scenario identifier, to the CPU scheduling module, GPU scheduling module, and DDR scheduling module.
[0301] As can be seen from the above embodiments, before the touch message module sends the service scenario identifier and the identifier of the highest performance mode to the resource scheduling module, the resource scheduling module has already received the prediction point instruction carrying the identifier of the highest performance mode and issued the parameters corresponding to the highest performance mode to the CPU scheduling module, GPU scheduling module, and DDR scheduling module. However, the CPU scheduling module, GPU scheduling module, and DDR scheduling module need a certain amount of time to set the parameters of the corresponding hardware. Therefore, when the touch message module sends the service scenario identifier and the identifier of the highest performance mode to the resource scheduling module, the operating parameters of the CPU, GPU, and DDR may not have been adjusted to the operating parameters corresponding to the highest performance mode.
[0302] In response to the above situation, after receiving the highest performance mode identifier sent by the touch message module, the resource scheduling module can first read the current working parameters of the corresponding hardware from the CPU scheduling module, GPU scheduling module, and DDR scheduling module. If the working parameters of the CPU, GPU, and DDR are already the working parameters corresponding to the highest performance mode, the resource scheduling module does not need to send the parameters corresponding to the highest performance mode to the CPU scheduling module, GPU scheduling module, and DDR scheduling module again. If the working parameters of the CPU, GPU, and DDR are not the working parameters corresponding to the highest performance mode, the resource scheduling module sends the parameters corresponding to the highest performance mode to the CPU scheduling module, GPU scheduling module, and DDR scheduling module.
[0303] The method for switching performance modes of electronic devices provided in this application has the following beneficial effects:
[0304] As explained above regarding the working principle of touch panels, existing electronic devices only begin switching performance modes after the capacitance value changes to 100%, meaning the touch object has contacted the touch panel and completed the touch operation. However, the method provided in this embodiment can switch the electronic device to its highest performance mode before the capacitance value of the touch panel reaches 100%, i.e., before the actual touch operation occurs. This allows the electronic device to directly process touch commands in its highest performance mode after the actual touch operation, thereby shortening the touch response time.
[0305] Please refer to Figure 7 , Figure 7A timing diagram of a touch response process provided in an embodiment of this application, wherein the timing... Figure 7 a is a timing diagram of the touch response flow of an electronic device using the switching method of this embodiment. Figure 7 b is Figure 2 The timing diagram of the touch response process is shown.
[0306] Time series Figure 7 In step a, at time S0, the touch driver detects a change in the capacitance sampling value in any area of the touch panel. After time S0, the amplitude of the capacitance value change gradually increases until it reaches 100% at time S1, at which point the electronic device receives a touch command. Because of the electronic device performance mode switching method provided in this embodiment, the electronic device's resource scheduling module begins switching performance modes at time S0, and switches the electronic device to the highest performance mode at time S2, before time S1. Therefore, after a touch operation occurs at time S1, the electronic device can directly process the touch command in the highest performance mode and present the operation result after time T0.
[0307] Time series Figure 7 In step b, the resource scheduling module of the electronic device changes the capacitance value by 100% at time S1. When the electronic device receives a touch command, it starts to switch the performance mode of the electronic device. After time T1, the performance mode of the electronic device switches to the highest performance mode at time S3. Then the electronic device processes the touch command in the highest performance mode. Finally, after time T0, the operation result is presented at time S4.
[0308] Comparison of timing Figure 7 As can be seen from a and 7b, by applying the electronic device performance mode switching method provided in this embodiment, after the touch operation actually occurs at time S1, the electronic device only needs time T0 to present the result corresponding to the touch operation to the user. In contrast, existing electronic devices require time T0+T1 after the touch operation actually occurs at time S1 to present the operation result at time S5. Therefore, the electronic device performance mode switching method provided in this embodiment can shorten the time for the electronic device to respond to user touch operations.
[0309] On the other hand, when the object being touched is not close to the touch panel, the touch driver does not detect any change in the capacitance sampling value on the touch panel. At this time, the electronic device continues to operate in the first performance mode with lower power consumption, thereby reducing the power consumption of the electronic device.
[0310] In some alternative embodiments, the configuration file of the electronic device can be divided into more performance modes and corresponding ranges of variation for each performance mode.
[0311] For example, the capacitance value variation table set in the configuration file can be as shown in Table 3 below:
[0312] Table 3
[0313] Less than or equal to 10mm, greater than 8mm Greater than or equal to 10%, less than 15% Second performance mode 4401 Less than or equal to 8mm, greater than 5mm Greater than or equal to 15%, less than 20% Third performance mode 5378 Less than or equal to 5mm, greater than 3mm Greater than or equal to 20%, less than 30% Fourth performance mode 4096 Less than or equal to 3mm, greater than 1mm Greater than or equal to 30%, less than 90% Fifth performance mode 5379 Less than or equal to 1mm Greater than or equal to 90%, less than 100% Highest performance mode 4402
[0314] In one possible implementation, the capacitance value variation table set in the configuration file can be as shown in Table 4 below:
[0315] Table 4
[0316] Less than 10mm, greater than or equal to 8mm Greater than 10%, less than or equal to 15% Second performance mode 4401 Less than 8mm, greater than or equal to 5mm Greater than 15%, less than or equal to 20% Third performance mode 5378 Less than 5mm, greater than or equal to 3mm Greater than 20%, less than or equal to 30% Fourth performance mode 4096 Less than 3mm, greater than or equal to 1mm Greater than 30%, less than or equal to 90% Fifth performance mode 5379 Less than 1mm Greater than 90%, less than or equal to 100% Highest performance mode 4402
[0317] In Table 3, the operating parameters of the second performance mode can be 10% of the corresponding operating parameters of the highest performance mode, the operating parameters of the third performance mode can be 30% of the corresponding operating parameters of the highest performance mode, the operating parameters of the fourth performance mode can be 50% of the corresponding operating parameters of the highest performance mode, and the operating parameters of the fifth performance mode can be 80% of the corresponding operating parameters of the highest performance mode.
[0318] The range of variation shown in Table 3 can be obtained in the following way:
[0319] First, based on the number of performance modes and the performance of the touch panel, determine the distance between the touch object and the touch panel corresponding to each performance mode.
[0320] Taking Table 3 as an example, assuming that the capacitance of the touch panel changes when the touch object approaches within 12 millimeters (mm), the electronic device is pre-set to switch to the second performance mode when the touch object approaches within 8mm to 10mm of the touch panel, to the third performance mode when the touch object approaches within 5mm to 8mm, to the fourth performance mode when the touch object approaches within 3mm to 5mm, to the fifth performance mode when the touch object approaches within 1mm to 3mm, and to the highest performance mode when the touch object approaches within 1mm.
[0321] Then, a specific model of touch panel installed on the electronic device can be tested to obtain the change in capacitance value of the touch panel when the touch object is at different distances. The test data can then be fitted to obtain a curve representing the change in capacitance value of the touch panel and the distance of the touch object, as well as the function expression of this curve.
[0322] In a specific example, the function expression obtained from the test could be: y = -4.234ln(x) + 19.576.
[0323] Where 4.234 represents the touch panel's sensitivity, and 19.576 represents the touch panel's signal-to-noise ratio. x represents the percentage change in capacitance, for example, a 10% change in capacitance corresponds to x of 10. y represents the vertical distance between the object being touched and the touch panel.
[0324] The curve corresponding to the above function expression is as follows: Figure 8 As shown, Figure 8 The horizontal axis represents the change in capacitance of the touch panel, and the vertical axis represents the distance between the touch object and the touch panel.
[0325] Finally, by substituting the distance gradient into the fitted function expression, we can obtain the capacitance value change range corresponding to each distance, and then use the capacitance value change range to determine the change range range shown in Table 3.
[0326] For example, the above function expression shows that the capacitance value change range is 15% for 8mm and 10% for 10mm. Therefore, the change range for the second performance mode is 10%-15%.
[0327] As mentioned above, each performance mode in Table 3 can be configured with a corresponding duration.
[0328] For example, in Table 3, the duration corresponding to the second performance mode is 150ms, the duration corresponding to the third performance mode is 120ms, the duration corresponding to the fourth performance mode is 100ms, the duration corresponding to the fifth performance mode is 80ms, and the duration corresponding to the highest performance mode is 50ms.
[0329] The aforementioned duration can be set based on the operation time of most users, so that the duration corresponding to each performance mode is longer than the operation time of most users in the corresponding performance mode. For example, when most users perform touch operations, the touch object stays within the range of 8mm to 10mm for 120ms, so the duration corresponding to the second performance mode can be set to 150ms; the touch object stays within the range of 5mm to 8mm for 100ms, so the duration corresponding to the third performance mode can be set to 120ms.
[0330] Using Table 3 as an example, combined with Figure 9 The method for switching performance modes of electronic devices provided in the embodiments of this application will be further described. Figure 9 A timing diagram of the method for switching performance modes of an electronic device provided in an embodiment of this application.
[0331] After an electronic device is powered on, it enters a standby state. At this time, the electronic device is in a low-power performance mode. The performance mode of the electronic device in standby state can be referred to as the first performance mode.
[0332] In the first performance mode, the capacitance processing module executes step 91, detects that the capacitance value change is within the range of 10% to 15%, and sends a forecast point instruction to the resource scheduling module. The resource scheduling module then switches the electronic device to the second performance mode.
[0333] In the second performance mode, the capacitance processing module executes step 92, detects that the capacitance value change range is within 15% to 20%, and sends a forecast point instruction to the resource scheduling module. The resource scheduling module then switches the electronic device to the third performance mode.
[0334] In the third performance mode, the capacitance value processing module executes step 93, detects that the capacitance value change range is within 20% to 30%, and sends a forecast point instruction to the resource scheduling module. The resource scheduling module then switches the electronic device to the fourth performance mode.
[0335] In the fourth performance mode, the capacitance processing module executes step 94, detects that the capacitance value change range is within 30% to 90%, and sends a forecast point instruction to the resource scheduling module. The resource scheduling module then switches the electronic device to the fifth performance mode.
[0336] In the fifth performance mode, the capacitance value processing module continues to execute step 95. If the capacitance value change is within the range of 90% to 100%, the capacitance value processing module sends a forecast point instruction to the resource scheduling module, and the resource scheduling module switches the electronic device to the highest performance mode.
[0337] In the highest performance mode, the capacitance processing module continues to execute step 96, detects that the capacitance value change reaches 100%, executes step 97, outputs a touch command, and then applies it to the highest performance mode of the electronic device to process the touch command.
[0338] In the above embodiment, as the touch object gradually approaches the touch panel, the capacitance value on the touch panel gradually increases. The capacitance processing module sends multiple prediction point commands as the capacitance value changes, causing the resource scheduling module to progressively increase the operating parameters of the CPU, GPU, and DDR in increments of 10%, 30%, 50%, and 80% of the operating parameters corresponding to the highest performance mode, until the operating parameters of the CPU, GPU, and DDR are increased to the operating parameters corresponding to the highest performance mode before the capacitance processing module outputs the touch command.
[0339] The advantage of progressively increasing operating parameters based on the magnitude of capacitance change is that the electronic device only switches to the highest performance mode when the capacitance change is significant. For example, as shown in Table 3, the highest performance mode is only activated when the capacitance change reaches 90% to 100%. Therefore, the time the electronic device spends in the highest performance mode can be shortened, reducing its power consumption.
[0340] In some optional embodiments, when the capacitance value change in any area of the touch panel is greater than or equal to a certain switching threshold, the capacitance processing module can directly send a forecast point instruction carrying the identifier of the highest performance mode to the resource scheduling module, so that the resource scheduling module can directly switch the electronic device from the first performance mode to the highest performance mode.
[0341] For example, the switching threshold can be set to 30%. When the capacitance value change in any area of the touch panel exceeds 30%, the capacitance processing module can send a forecast point instruction carrying the identifier of the highest performance mode to the resource scheduling module. After receiving this forecast point instruction, the resource scheduling module will directly switch the electronic device from the first performance mode to the highest performance mode.
[0342] When the capacitance processing module determines that the object approaching the touch panel is a stylus, the capacitance processing module further performs the following steps:
[0343] After sending a forecast point instruction carrying the identifier of the highest performance mode, the tolerance processing module reports an icon enlargement instruction (Hover instruction) to the system desktop in the application through the touch message module. If the system desktop is displayed on the screen of the electronic device at this time, the system desktop responds to the icon enlargement instruction and enlarges the application icon located below the stylus by a preset ratio, such as enlarging it to 1.1 times its original size.
[0344] When the capacitance value changes by a factor greater than or equal to the drawing threshold, the capacitance processing module sends an ink drawing command (ink enable) to the stylus application in the application. After receiving the ink drawing command, the stylus application can draw lines on the display screen to represent the stylus movement trajectory according to the preset line form and line color.
[0345] For example, the above drawing threshold could be 95%.
[0346] The capacitance value processing module can identify whether the touch object is a finger or a stylus based on the device type carried in the capacitance value change message.
[0347] Figure 10 A flowchart illustrating a method for switching performance modes of an electronic device, as provided in an embodiment of this application.
[0348] The method provided in this embodiment can be performed in real time after the electronic device is powered on.
[0349] 1001. Check if the capacitance sampling value of the touch panel has changed.
[0350] If the capacitance sampling value of the touch panel changes, proceed to step 1002; if the capacitance sampling value of the touch panel does not change, continue to step 1001.
[0351] Even when no object is near the touch panel, the capacitance sampling value may fluctuate slightly. Generally, the capacitance value change is less than 10%.
[0352] To avoid interference caused by such small fluctuations, step 1001 can further detect whether the capacitance sample value is greater than a preset reporting threshold. If the capacitance sample value of the touch panel changes and the change in capacitance value is greater than or equal to the reporting threshold, step 1002 is executed. If the capacitance sample value of the touch panel does not change, or the capacitance sample value changes but the change in capacitance value is less than the reporting threshold, then step 1001 is continued.
[0353] 1002. Switch the electronic device from the first performance mode to the preset performance mode based on the change in capacitance value.
[0354] As mentioned earlier, the preset performance mode can be the highest performance mode of the electronic device, or it can be another performance mode that is slightly worse than the highest performance mode but better than the first performance mode.
[0355] Furthermore, referring to the foregoing embodiments, the resource scheduling module can switch the electronic device from the first performance mode to the preset performance mode in one go when the change in capacitance value exceeds a certain switching threshold, or it can switch the device according to... Figure 7 The method shown switches the electronic device from the first performance mode to the preset performance mode step by step as the capacitance value changes.
[0356] 1003. Determine whether a touch command has been received within the preset time period.
[0357] If no touch command is received within the preset time, execute 1004.
[0358] If a touch command is received within the preset time period, execute 1005.
[0359] 1004. Switch the electronic device from the preset performance mode to the first performance mode.
[0360] After 1004 is executed, 1001 will continue to be executed.
[0361] 1005. Determine whether the touch command is a valid touch command.
[0362] If the touch command is valid, execute 1006; if the touch command is invalid, execute 1004.
[0363] 1006. Improve the refresh rate of electronic device displays.
[0364] 1007. Continue to run in the preset performance mode according to the time corresponding to the application scenario of the touch command.
[0365] For details on the specific implementation methods of the above steps, please refer to the aforementioned embodiments, which will not be described in detail here.
[0366] Figure 11 A flowchart illustrating another method for switching performance modes of an electronic device provided in this application embodiment.
[0367] For details on the specific implementation methods of the above steps, please refer to the aforementioned embodiments, which will not be described in detail here.
[0368] 1100, scan the capacitance sampling value of the touch panel.
[0369] 1101. Is the capacitance change within the range of 10% to 15%?
[0370] If the capacitance change is between 10% and 15%, proceed to step 1102; if the capacitance change is not between 10% and 15%, proceed to step 1103.
[0371] 1102, switch the electronic device to the second performance mode.
[0372] 1103, is the capacitance change within the range of 15% to 20%?
[0373] If the capacitance change is between 15% and 20%, proceed to step 1104; if the capacitance change is not between 15% and 20%, proceed to step 1105.
[0374] 1104, Switch electronic devices to the third performance mode.
[0375] 1105. Is the capacitance change within the range of 20% to 30%?
[0376] If the capacitance change is between 20% and 30%, proceed to step 1106; if the capacitance change is not between 20% and 30%, proceed to step 1107.
[0377] 1106, switch the electronic device to the fourth performance mode.
[0378] 1107. Is the capacitance change within the range of 30% to 90%?
[0379] If the capacitance change is between 30% and 90%, proceed to step 1108; if the capacitance change is not between 30% and 90%, proceed to step 1109.
[0380] 1108, switch the electronic device to the fifth performance mode.
[0381] 1109. Is the capacitance change within the range of 90% to 100%?
[0382] If the capacitance change is between 90% and 100%, proceed to step 1110; if the capacitance change is not between 90% and 100%, proceed to step 1112.
[0383] 1110, switch your electronic device to the highest performance mode.
[0384] 1111, Report the icon enlargement command.
[0385] 1112. Is the capacitance change greater than 95%?
[0386] If the capacitance change is greater than 95%, proceed to step 1113; if the capacitance change is not greater than 95%, return to step 1101.
[0387] 1113, Report the brush and ink drawing instruction.
[0388] It should be noted that this embodiment describes the implementation process of a method for switching the performance mode of an electronic device when the touch object is a stylus. When the touch object is a finger, steps 1111 to 1113 of the method for switching the performance mode of an electronic device provided in this embodiment may not be executed. When the touch object is a finger, if step 1109 determines that the capacitance change is not between 90% and 100%, it returns to step 1101; if it determines that the capacitance change is between 90% and 100%, it executes step 1110, and after step 1110 is executed, it executes step 1114.
[0389] 1114. Is the capacitance change greater than 99%?
[0390] If the capacitance change is greater than 99%, proceed to step 1116; if the capacitance change is not greater than 99%, proceed to step 1115.
[0391] 1115, switch the electronic device to the first performance mode.
[0392] After step 1115 is executed, return to step 1101.
[0393] 1116, Report touch command.
[0394] 1117, Determine whether the touch command is a valid touch command.
[0395] If the touch command is a valid touch command, proceed to step 1118; if the touch command is an invalid touch command, this method ends.
[0396] 1118, Improve the refresh rate of electronic device displays.
[0397] 1119, Identify business scenarios.
[0398] 1120, Determine whether the business scenario is an application startup scenario.
[0399] If the business scenario is an application startup scenario, proceed to step 1121; if the business scenario is not an application startup scenario, proceed to step 1122.
[0400] Application launch scenarios include the aforementioned game application launch scenarios and non-game application launch scenarios.
[0401] 1121, Extend the duration of the highest performance mode to the end of application startup or the duration corresponding to the business scenario.
[0402] 1122, Determine if the business scenario is a list scrolling scenario.
[0403] If the business scenario is a list scrolling scenario, proceed to step 1123; if the business scenario is not a list scrolling scenario, proceed to step 1124.
[0404] 1123, extends the duration of the highest performance mode based on the list scrolling speed and animation curve.
[0405] 1124. Extend the duration of the highest performance mode based on the business scenario.
[0406] For details on the specific implementation methods of the above steps, please refer to the aforementioned embodiments, which will not be described in detail here.
[0407] The method for switching performance modes of electronic devices provided in the above embodiments, and in combination with Figure 4 As shown in the capacitance value change curve, the electronic device performance mode switching method provided in this application is equivalent to detecting whether there is a touch object within a first distance in front of the touch panel based on the capacitance value change of the touch panel, and performing one or more mode switching operations when there is a touch object within the first distance in front of the touch panel, thereby switching the electronic device from a first performance mode with lower processing efficiency to a preset performance mode with higher processing efficiency.
[0408] Please refer to Figure 12 This application also provides a method for switching performance modes of an electronic device, which may include the following steps:
[0409] After the electronic device is started, proceed to step 1201.
[0410] 1201. Detect whether there is a touch object within the first distance in front of the touch panel.
[0411] The front of the touch panel is the direction perpendicular to the touch panel and pointing outwards from the electronic device; the touch object is the object used to operate the touch panel.
[0412] When there is a touch object within the first distance in front of the touch panel, proceed to step 1202; when there is no touch object within the first distance in front of the touch panel, continue to proceed to step 1201.
[0413] 1202. Switch the electronic device from the first performance mode to the preset performance mode.
[0414] The first performance mode is the performance mode of the electronic device when there is no touch object within a first distance in front of the touch panel; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the first performance mode.
[0415] This application also provides a computer storage medium for storing a computer program, which, when executed, is specifically used to implement the electronic device performance mode switching method provided in any embodiment of this application.
Claims
1. A method for switching performance modes of an electronic device, characterized in that, Applied to electronic devices, the electronic devices include touch panels, touch driving modules, capacitance processing modules, resource scheduling modules, touch message modules, applications, and scene recognition modules; The method includes: Detect whether there is a touch object within a first distance in the direction of the touch panel; the direction of the touch panel is perpendicular to the touch panel and points outward of the electronic device; the touch object is an object used to operate the touch panel; When a touch object is within a first distance in front of the touch panel, the operating parameters of the electronic device's CPU, GPU, and double-speed memory are switched from the operating parameters corresponding to a first performance mode to the operating parameters corresponding to a preset performance mode. The first performance mode is the performance mode of the electronic device when there is no touch object within a first distance in front of the touch panel. The processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the first performance mode. The performance mode represents the combination of operating parameters of the CPU, GPU, and double-speed memory in the electronic device, and different operating parameters correspond to different performance modes. The operating parameters of the CPU, GPU, and double-speed memory represent the frequencies at which the CPU, GPU, and double-speed memory operate. The touch driving module scans the capacitance sampling value of the touch panel; The touch driving module sends a third capacitance value change message to the capacitance value processing module; the third capacitance value change message carries the change range of the capacitance sampling value of the touch panel; If the capacitance value processing module determines that the change in the capacitance sample value carried by the third capacitance value change message is greater than the preset touch threshold, the capacitance value processing module sends a touch command to the touch message module. In response to receiving the touch command, the touch message module determines whether the touch command is a valid touch command; After determining that the touch command is a valid touch command, the touch message module sends the valid touch command to the application. The application processes the valid touch command in the preset performance mode and sends a scene message to the scene recognition module. The scene message includes the activity status, application category and application package name. The scene recognition module identifies the current business scene of the electronic device based on the scene message; After the scene recognition module identifies the current business scenario of the electronic device, it sends a business scenario identifier corresponding to the current business scenario of the electronic device to the touch message module; the scene recognition module stores the correspondence between business scenarios and business scenario identifiers; The touch message module sends the business scenario identifier to the resource scheduling module; The resource scheduling module finds the duration corresponding to the identifier of the business scenario in the preset configuration file. The durations are different for different business scenarios. The resource scheduling module maintains the electronic device in the preset performance mode during the duration corresponding to the identifier of the business scenario.
2. The switching method according to claim 1, characterized in that, The first distance includes the first distance.
3. The switching method according to claim 1, characterized in that, Switching the operating parameters of the electronic device's CPU, GPU, and double-speed memory from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the preset performance mode includes: As the distance between the touch object and the touch panel decreases, multiple mode switching operations are performed until the performance mode of the electronic device is switched to the preset performance mode. The processing efficiency of the electronic device corresponding to the performance mode after each mode switching operation is higher than the processing efficiency of the electronic device corresponding to the performance mode before the mode switching operation.
4. The switching method according to claim 3, characterized in that, As the distance between the touch object and the touch panel decreases in the forward direction, multiple mode switching operations are performed until the performance mode of the electronic device switches to the preset performance mode, including: When the forward distance between the touch object and the touch panel is within a preset first distance range, the electronic device is switched from the first performance mode to the fifth performance mode; the processing efficiency of the electronic device corresponding to the fifth performance mode is higher than that of the electronic device corresponding to the first performance mode; the upper limit of the first distance range is the second distance; the second distance is less than or equal to the first distance; When the forward distance between the touch object and the touch panel is within a preset second distance range, the electronic device is switched from the fifth performance mode to the preset performance mode; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the fifth performance mode; the upper limit of the second distance range is the lower limit of the first distance range.
5. The switching method according to claim 1, characterized in that, Switching the operating parameters of the electronic device's CPU, GPU, and double-speed memory from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the preset performance mode includes: When the distance between the touch object and the touch panel in the forward direction is within a second distance, a mode switching operation is performed to switch the electronic device from the first performance mode to the preset performance mode; the second distance is less than or equal to the first distance.
6. The switching method according to any one of claims 1 to 3, characterized in that, After switching the operating parameters of the electronic device's CPU, GPU, and double-speed memory from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the preset performance mode, the method further includes: When the electronic device is in the preset performance mode for a period of time that is greater than or equal to the duration corresponding to the preset performance mode, the electronic device is switched from the preset performance mode to the first performance mode.
7. The switching method according to claim 6, characterized in that, After switching the electronic device from the preset performance mode to the first performance mode, the method further includes: The system will then detect again whether there is a touch object within a first distance in front of the touch panel; When there is a touch object within a first distance in front of the touch panel, the operating parameters of the electronic device’s CPU, GPU and double-speed memory are switched again from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the preset performance mode.
8. The switching method according to claim 1, characterized in that, The electronic device includes a display screen; If the touch command is a valid touch command, increase the refresh rate of the display screen.
9. The switching method according to any one of claims 1 to 8, characterized in that, The detection of whether there is a touch object within a first distance in the forward direction of the touch panel includes: The touch driving module scans the capacitance sampling value of the touch panel; When the touch driving module detects that the change in the capacitance sampling value of the touch panel is greater than or equal to a preset reporting threshold, the touch driving module detects a touch object within a first distance in the forward direction of the touch panel.
10. The switching method according to claim 4, characterized in that, When the forward distance between the touch object and the touch panel is within a preset first distance range, the electronic device is switched from the first performance mode to the fifth performance mode; when the forward distance between the touch object and the touch panel is within a preset second distance range, the electronic device is switched from the fifth performance mode to the preset performance mode, including: The touch driving module scans the capacitance sampling value of the touch panel; The touch driving module sends a first capacitance value change message to the capacitance value processing module; the first capacitance value change message carries the change range of the capacitance sampling value of the touch panel; The capacitance value processing module determines that the change range of the capacitance sample value carried by the first capacitance value change message is within a preset first change range interval; the first change range interval corresponds to the first distance interval. The tolerance processing module sends a first forecast point instruction to the resource scheduling module; the first forecast point instruction carries the identifier of the fifth performance mode corresponding to the first change range; the processing efficiency of the electronic device corresponding to the fifth performance mode is higher than that of the electronic device corresponding to the first performance mode. In response to receiving the first forecast point instruction, the resource scheduling module switches the electronic device from the first performance mode to the fifth performance mode; The touch driving module continues to scan the capacitance sampling value of the touch panel; the touch driving module sends a second capacitance value change message to the capacitance value processing module; the second capacitance value change message carries the change range of the capacitance sampling value of the touch panel; The capacitance value processing module determines that the change range of the capacitance sample value carried by the second capacitance value change message is within a preset second change range; the lower limit of the second change range is the upper limit of the first change range; the second change range corresponds to the second distance range; The tolerance processing module sends a second forecast point instruction to the resource scheduling module; the second forecast point instruction carries an identifier of the preset performance mode corresponding to the second variation range; the electronic device processing efficiency corresponding to the preset performance mode is higher than the electronic device processing efficiency corresponding to the fifth performance mode. In response to receiving the second forecast point instruction, the resource scheduling module switches the electronic device from the fifth performance mode to the preset performance mode.
11. The method according to claim 5, characterized in that, When the distance between the touch object and the touch panel in the forward direction is within a second distance, a mode switching operation is performed to switch the electronic device from the first performance mode to the preset performance mode, including: The touch driving module scans the capacitance sampling value of the touch panel; the touch driving module sends a capacitance change message to the capacitance processing module; the capacitance change message carries the change range of the capacitance sampling value of the touch panel; The capacitance processing module determines that the change in the capacitance sample value carried by the capacitance change message is greater than a preset switching threshold. The tolerance processing module sends a forecast point instruction carrying an identifier of the preset performance mode to the resource scheduling module; the processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the first performance mode. In response to receiving the forecast point instruction, the resource scheduling module switches the electronic device to the preset performance mode.
12. The switching method according to claim 10, characterized in that, The electronic device includes a CPU scheduling module, a GPU scheduling module, and a DDR scheduling module; The resource scheduling module switches the electronic device from the first performance mode to the fifth performance mode, including: The resource scheduling module sends the working parameters corresponding to the fifth performance mode to the CPU scheduling module, the GPU scheduling module and the DDR scheduling module; The GPU scheduling module switches the operating parameters of the GPU of the electronic device from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the fifth performance mode. The CPU scheduling module switches the operating parameters of the CPU of the electronic device from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the fifth performance mode. The DDR scheduling module switches the DDR operating parameters of the electronic device from the operating parameters corresponding to the first performance mode to the operating parameters corresponding to the fifth performance mode.
13. The switching method according to claim 1, characterized in that, The touch command includes the contact time between the touch object and the touch panel; The touch message module determines whether the touch command is a valid touch command, including: The touch message module determines whether another touch command has been received within a preset time period before the contact time between the touch object and the touch panel; If another touch command is received within a preset time period before the contact time between the touch object and the touch panel, the touch command is determined to be an invalid touch command. If no other touch command is received within a preset time period before the contact time between the touch object and the touch panel, the touch command is determined to be a valid touch command.
14. The switching method according to claim 1, characterized in that, The scene recognition module identifies the current business scene of the electronic device based on the scene message, including: The scene recognition module reads the activity status, application category, and application package name of the scene message; If the activity status is "created" and the application category is "game application", the scene recognition module identifies the current business scenario of the electronic device as a game application launch scenario; If the activity status is "created" and the application category is a non-game application, the scene recognition module identifies the current business scenario of the electronic device as a non-game application launch scenario. If the activity state is switching and the application category is system interface, the scene recognition module identifies the current business scene of the electronic device as the system interface drop-down scene.
15. The switching method according to claim 1, characterized in that, The electronic device includes a frame rate adjustment module; After the touch message module determines whether the touch command is a valid touch command, it also includes: After the touch message module determines that the touch command is a valid touch command, the touch message module sends the valid touch command to the resource scheduling module; In response to receiving the valid touch command, the resource scheduling module sends a refresh rate command to the frame rate adjustment module; In response to receiving the refresh rate command, the frame rate adjustment module increases the refresh rate of the display screen of the electronic device.
16. The switching method according to claim 4, characterized in that, The upper limit of the first distance interval is 3 mm, the lower limit of the first distance interval is 1 mm, the upper limit of the second distance interval is 1 mm, and the lower limit of the second distance interval is 0 mm.
17. The switching method according to claim 10, characterized in that, The first range of variation is 30% to 90%; the second range of variation is 90% to 100%.
18. An electronic device, characterized in that, The electronic device includes: one or more processors, memory and touch panel, and includes a touch driver module, a capacitance processing module, a resource scheduling module, a touch message module, an application and a scene recognition module; The memory is used to store one or more programs; The one or more processors are used to execute the one or more programs, causing the electronic device to perform the following actions: Detect whether there is a touch object within a first distance in the direction of the touch panel; the direction of the touch panel is perpendicular to the touch panel and points outward of the electronic device; the touch object is an object used to operate the touch panel; When a touch object is within a first distance in front of the touch panel, the operating parameters of the electronic device's CPU, GPU, and double-speed memory are switched from the operating parameters corresponding to a first performance mode to the operating parameters corresponding to a preset performance mode. The first performance mode is the performance mode of the electronic device when there is no touch object within a first distance in front of the touch panel. The processing efficiency of the electronic device corresponding to the preset performance mode is higher than that of the electronic device corresponding to the first performance mode. The performance mode represents the combination of operating parameters of the CPU, GPU, and double-speed memory in the electronic device, and different operating parameters correspond to different performance modes. The operating parameters of the CPU, GPU, and double-speed memory represent the frequencies at which the CPU, GPU, and double-speed memory operate. The touch driving module scans the capacitance sampling value of the touch panel; The touch driving module sends a third capacitance value change message to the capacitance value processing module; the third capacitance value change message carries the change range of the capacitance sampling value of the touch panel; If the capacitance value processing module determines that the change in the capacitance sample value carried by the third capacitance value change message is greater than the preset touch threshold, the capacitance value processing module sends a touch command to the touch message module. In response to receiving the touch command, the touch message module determines whether the touch command is a valid touch command; After determining that the touch command is a valid touch command, the touch message module sends the valid touch command to the application. The application processes the valid touch commands in the preset performance mode; The application sends a scene message to the scene recognition module. The scene message includes the activity status, application category, and application package name. The scene recognition module identifies the current business scene of the electronic device based on the scene message; After the scene recognition module identifies the current business scenario of the electronic device, it sends a business scenario identifier corresponding to the current business scenario of the electronic device to the touch message module; the scene recognition module stores the correspondence between business scenarios and business scenario identifiers; The touch message module sends the business scenario identifier to the resource scheduling module; The resource scheduling module finds the duration corresponding to the identifier of the business scenario in the preset configuration file. The durations are different for different business scenarios. The resource scheduling module maintains the electronic device in the preset performance mode during the duration corresponding to the identifier of the business scenario.
19. A computer storage medium, characterized in that, Used to store a computer program, which, when executed, is specifically used to implement the method for switching performance modes of an electronic device as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Method for processing information and electronic device
CN103543812A