Data transmission method and electronic equipment
Patent Information
- Application Number
- CN202480056876.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2026-04-14
AI Technical Summary
Existing electronic devices have shortcomings in reducing power consumption and extending battery life, especially in terms of data transmission efficiency and clock frequency between the display processor and the display screen, which have not been effectively optimized based on dynamic refresh rate adjustment.
By detecting the target scene and adjusting the data transfer rate and clock frequency between the display processor and the display screen, including extending the transmission time in ultra-power-saving or AOD scenarios, reducing the MIPI rate and clock frequency, and combining dynamic adjustment of the refresh rate to optimize power consumption and battery life.
It effectively reduces the power consumption of electronic devices, improves battery life, and maintains user experience, meeting the needs of different application scenarios.
Smart Images

Figure CN121866525A_ABST
Abstract
Description
Data transmission methods and electronic devices Technical Field
[0001] This application relates to the field of terminals, and more particularly to a data transmission method and an electronic device. Background Technology
[0002] To reduce power consumption and improve battery life, electronic devices such as mobile phones and tablets often adopt a strategy of dynamically adjusting the refresh rate, reducing the screen refresh rate in some working modes.
[0003] Summary of the Invention
[0004] This application provides a data transmission method and an electronic device.
[0005] In a first aspect, this application provides a method for transmitting data, which is applied to an electronic device including a display screen and a display processor, wherein the electronic device also has a first application and a second application installed. The method includes: running the first application; displaying image data corresponding to the first application at a first refresh rate on the display screen; transmitting the image data to the display screen for a first transmission duration; running the second application in response to a first user operation; displaying image data corresponding to the second application at the first refresh rate on the display screen; and transmitting the image data to the display screen for a second transmission duration, wherein the second transmission duration is longer than the first transmission duration.
[0006] By implementing the above method, electronic devices can reduce the transmission time requirement of image data between the display processor and the display screen (i.e., extend the transmission time) in specific scenarios, such as when a second application is running, thereby reducing device power consumption and increasing battery life.
[0007] The first application includes one or more of the following: a desktop application, a video application, and an instant messaging application. The second application includes: a super power-saving application, and / or an AOD (Always-On Display) application. The first user action includes: activating the super power-saving function, and / or turning off the screen.
[0008] In other words, when entering ultra power saving mode or AOD mode, electronic devices can extend the transmission time of image data between the display processor and the display screen. This reduces device power consumption, extends battery life, and does not affect the user experience.
[0009] Preferably, the first refresh rate is 60Hz.
[0010] In some embodiments, the display processor and the display screen transmit image data via a Mobile Industry Processor Interface (MIPI); at a first MIPI rate, the display processor transmits image data to the display screen for a first transmission duration; at a second MIPI rate, the display processor transmits image data to the display screen for a second transmission duration; the first MIPI rate is greater than the second MIPI rate.
[0011] In some embodiments, at a first MIPI rate, the display processor processes image data at a first clock frequency; at a second MIPI rate, the display processor processes image data at a second clock frequency, where the first clock frequency is higher than the second clock frequency.
[0012] By implementing the above method, based on the extended transmission time, electronic devices can reduce the data transmission rate between the display processor and the display screen. Based on the reduced transmission rate, electronic devices can reduce the clock frequency of the display processor, thereby further reducing device power consumption and improving battery life.
[0013] In some embodiments, the method further includes: running a third application in response to a second user operation; displaying image data corresponding to the third application at a first refresh rate; and transmitting the image data to the display for a third transmission duration, wherein the third transmission duration is longer than the first transmission duration and shorter than the second transmission duration.
[0014] The third type of application includes: game applications, camera applications, video applications, and image editing applications.
[0015] In this way, under ultra-power-saving scenarios, when running certain applications, electronic devices can also appropriately reduce the data transmission time between the display processor and the display screen, increase the data transmission rate, and increase the display processor clock frequency to meet user needs.
[0016] In some embodiments, the method further includes: when running a second application, obtaining the number of layers; when the number of layers is within a first range, the display processor continues to transmit image data to the display screen for a second transmission duration; when the number of layers is within a second range, the display processor transmits image data to the display screen for a fourth transmission duration, the fourth transmission duration being greater than the first transmission duration and less than the second transmission duration; the lower boundary of the second range is greater than or equal to the upper boundary of the first range.
[0017] In this way, electronic devices can further finely adjust the data transmission time between the display processor and the display screen, the data transmission rate between the display processor and the display screen, and the clock frequency of the display processor according to the current number of layers, so as to meet the user's needs.
[0018] In a second aspect, this application provides an electronic device including one or more processors and one or more memories; wherein the one or more memories are coupled to one or more processors, and the one or more memories are used to store a computer program, which, when executed by one or more processors, causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0019] Thirdly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0020] Fourthly, this application provides a computer-readable storage medium including a computer program that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0021] Fifthly, this application provides a computer program product containing instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0022] Understandably, the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0023] Figure 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application;
[0024] Figure 2 is a flowchart of the data transmission method provided in an embodiment of this application;
[0025] Figures 3A-3C are schematic diagrams of a set of user interfaces for entering the super power saving scene provided in the embodiments of this application;
[0026] Figures 4A and 4B are schematic diagrams of another set of user interfaces for entering the super power saving scene provided in the embodiments of this application;
[0027] Figures 5A-5E are a set of user interface diagrams for entering an AOD scene provided in the embodiments of this application;
[0028] Figure 6A is a schematic diagram of the clock frequency and MIPI rate of a display processor provided in an embodiment of this application;
[0029] Figure 6B is a transmission time waveform diagram provided in an embodiment of this application;
[0030] Figure 7 is a software structure diagram of the electronic device 100 according to an embodiment of the present invention;
[0031] Figure 8 is a timing diagram of the data transmission method provided in an embodiment of this application;
[0032] Figure 9 is a flowchart of another data transmission method provided in an embodiment of this application;
[0033] Figure 10 is a flowchart of another data transmission method provided in an embodiment of this application. Detailed Implementation
[0034] The following are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
[0035] Figure 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application. As shown in Figure 1, the electronic device 100 includes a processor 11, a display screen 13, a memory 14, a wireless communication module 15, and an audio module 16.
[0036] Processor 11 includes one or more processing units, such as a central processing unit (CPU), a modem processor, a graphics processing unit (GPU), a data processing unit (DPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural network processing unit (NPU), etc. In this embodiment, processor 11 includes a display processor 12, such as a mobile display processor (MDP). The display processor 12 processes image data and sends the processed image data to the display screen 13 for display.
[0037] Display screen 13 is used for display. Display screen 13 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 miniled, microled, micro-oled, a quantum dot light-emitting diode (QLED), etc. Preferably, electronic device 100 uses a display processor 12 that matches the type of display screen 13 to achieve the best display effect.
[0038] Memory 14 includes one or more random access memory (RAM) and one or more non-volatile memory (NVM). RAM can be directly read and written by the processor 11 and can be used to store executable programs of the operating system or other running programs, as well as user and application data. NVM can also store executable programs and user and application data. Executable programs and data stored in NVM can be pre-loaded into RAM for direct reading and writing by the processor 11.
[0039] The wireless communication module 15 can provide wireless communication solutions for use on electronic devices 100, including 2G / 3G / 4G / 5G, wireless fidelity (Wi-Fi) networks, Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies, providing wireless communication services to users.
[0040] The audio module 16 includes a speaker, receiver, microphone, headphone jack, etc., and is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal.
[0041] Processor 11 includes one or more interfaces. Processor 11 can communicate with other components of electronic device 100 (e.g., display screen 13, memory 14, etc.) through these interfaces. These interfaces include, but are not limited to, inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, universal asynchronous receiver / transmitter (UART) interfaces, mobile industry processor interfaces (MIPI), general-purpose input / output (GPIO) interfaces, subscriber identity module (SIM) interfaces, and / or universal serial bus (USB) interfaces. Typically, display processor 12 communicates with display screen 13 via MIPI; for example, display processor 12 sends processed image data to display screen 13 for display via MIPI.
[0042] It is understood that the structural schematic diagram shown in Figure 1 does not constitute a specific limitation on the electronic device 100. The electronic device 100 may also include more components, such as an external memory interface, a universal serial bus (USB) interface, buttons, a motor, an indicator, a camera, a subscriber identification module (SIM) card interface, and a sensor module. The sensor module may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc. This application embodiment does not impose any limitations on this.
[0043] Refresh rate: The number of times the display refreshes the image per second. To reduce power consumption and extend battery life, electronic devices such as mobile phones and tablets can typically dynamically adjust their refresh rates. For example, the electronic device 100 can automatically adjust the display refresh rate based on factors such as remaining battery power and the refresh rate requirements of running applications.
[0044] For example, the electronic device 100 may set the default refresh rate to 90Hz; when the remaining battery power is detected to be less than or equal to a preset value, the electronic device 100 may set the refresh rate to 60Hz; when the electronic device 100 detects that a game application has been launched and the remaining battery power is greater than the preset value, the electronic device 100 may set the refresh rate to 120Hz.
[0045] Based on dynamically adjusting the refresh rate, what other methods can the electronic device 100 perform to further reduce power consumption and extend battery life? These are questions that researchers need to address.
[0046] Researchers have discovered that the higher the data transfer rate between the display processor 12 and the display screen 13, the higher the clock frequency of the display processor 12, and the higher the power consumption of the electronic device 100. Therefore, this application provides a data transfer method.
[0047] By implementing this method, the electronic device 100 can detect the target scene. After detecting the target scene, the electronic device 100 can reduce the data transmission rate between the display processor 12 and the display screen 13, thereby reducing the clock frequency of the display processor 12, reducing the power consumption of the electronic device 100, and extending the battery life.
[0048] In this embodiment, the executable program code implementing the data transmission method described in this application can be stored in the NVM. After the electronic device 100 is powered on, the electronic device 100 can load the aforementioned executable program code stored in the NVM into RAM. Then, the electronic device 100 can detect the target scene, determine the target clock frequency based on the target scene, and subsequently set the clock frequency of the display processor 12 to the aforementioned target clock frequency.
[0049] Not limited to mobile phones and tablets, electronic device 100 can also be a desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device, and other electronic devices configured with or connected to the display screen 13. This application embodiment does not impose special limitations on the specific type of electronic device 100.
[0050] Figure 2 is a flowchart of the data transmission method provided in an embodiment of this application.
[0051] S201, Target scene detected.
[0052] Preferably, the target scenario is a low-power scenario, such as a super power-saving scenario or an always-on display scenario. Typically, the always-on display scenario is an always-on display (AOD) scenario. In the always-on display scenario, the electronic device 100 can use the display screen 13 to display some basic information, such as time, weather, and notifications.
[0053] Electronic device 100 can detect a target scenario by detecting preset user operations that match the target scenario, and then enter the target scenario by setting relevant parameters and states. For example, electronic device 100 can detect user operations performed on the super power saving control, and in response to the operation, electronic device 100 can launch the super power saving application and enter the super power saving scenario. As another example, electronic device 100 can detect user operations performed on the power button, and in response to the operation, electronic device 100 can launch the AOD application and enter the AOD scenario.
[0054] Figures 3A-3C are schematic diagrams of a set of user interfaces for entering the super power saving scene provided in the embodiments of this application.
[0055] Figure 3A shows the settings interface of the electronic device 100 provided in this embodiment. The settings interface includes multiple settings options, such as WLAN, Bluetooth, mobile network, battery, etc. As shown in Figure 3A, the electronic device 100 can detect user operations on the battery options, and in response to the above operations, the electronic device 100 can display the battery settings interface shown in Figure 3B. The battery settings interface includes multiple battery mode options, such as performance mode, power saving mode, and ultra power saving mode. Users can set the operating mode of the electronic device 100 through the above battery mode options to improve performance or extend battery life to meet different user needs.
[0056] Referring to Figures 3B-3C, the electronic device 100 can detect user operations performed in the Super Power Saving Mode. In response to these operations, the electronic device 100 can launch the Super Power Saving Application and enter the Super Power Saving Scene. Through the Super Power Saving Application, the electronic device 100 can reduce power consumption and extend battery life by switching to dark mode, turning off the always-on display, limiting phone performance, limiting the number of applications used, changing the desktop theme, closing background applications, turning off or limiting location services, Wi-Fi, Bluetooth, and other wireless connection functions, and reducing screen brightness.
[0057] Referring to Figure 3C, after launching the Super Power Saving application, the electronic device 100 can immediately display the Super Power Saving Desktop. Preferably, the Super Power Saving Desktop has a dark background and only displays preset allowed application icons.
[0058] Figures 4A and 4B are schematic diagrams of another set of user interfaces for entering the super power saving scene provided in the embodiments of this application.
[0059] Figure 4A shows the desktop of the electronic device 100 in non-super power saving mode according to an embodiment of this application. As shown in Figure 4A, the electronic device 100 can detect a downward swipe operation from the upper right edge of the screen. In response to this operation, the electronic device 100 can display the control center interface shown in Figure 4B. The control center interface includes multiple shortcut controls, such as WLAN, Bluetooth, flashlight, personal hotspot, etc. Users can quickly and conveniently modify relevant settings through these shortcut controls. As shown in Figure 4B, the control center interface also includes a shortcut control 401. The shortcut control 401 can be used to turn super power saving on or off. When a user operation is detected on the shortcut control 401, the electronic device 100 can launch the super power saving application and enter the super power saving scenario. Referring to Figure 3C, in the super power saving scenario, the electronic device 100 can display the super power saving desktop.
[0060] Figures 5A-5E are a set of user interface diagrams for entering an AOD scene provided in the embodiments of this application.
[0061] Referring to Figure 5A, the electronic device 100 can detect user operations applied to the display and brightness options. In response to these operations, the electronic device 100 can display the display and brightness setting interface shown in Figure 5B. The display and brightness setting interface includes an always-on display option. As shown in Figure 5B, the electronic device 100 can detect user operations applied to the always-on display option. In response to these operations, the electronic device 100 can display the always-on display setting interface shown in Figure 5C.
[0062] The Always-On Display (AOD) settings interface includes a switch 501. Referring to Figure 5C, the electronic device 100 can detect user operations on switch 501. In response to these operations, the electronic device 100 can launch the AOD application and enter the AOD scene. Referring to Figure 5D, after AOD is enabled, the electronic device 100 can detect user operations on button 502. In response to these operations, the electronic device 100 can enable always-on display. Referring to Figure 5E, the electronic device 100 can display basic information such as time and date in a partial area of the screen.
[0063] S202. Determine the target clock frequency corresponding to the target scene, and set the clock frequency of the display processor 12 to the target clock frequency.
[0064] Electronic device 100 may have a preset clock configuration file. The clock configuration file records multiple target scenes and the clock frequency of the display processor corresponding to each target scene, i.e., the target clock frequency. Depending on the load of different target scenes, the user's response sensitivity, performance requirements, and level of concern for electronic device 100 under different target scenes, electronic device 100 can match different clock frequencies for different target scenes, which can not only meet the display requirements of the target scenes, but also minimize power consumption and extend battery life.
[0065] After detecting a target scene, the electronic device 100 can obtain the target clock frequency of the display processor 12 corresponding to the target scene through the aforementioned clock configuration file. For example, after detecting a super power saving scene, the electronic device 100 can obtain the target clock frequency of the display processor 12 corresponding to the super power saving scene through the aforementioned clock configuration file, such as 0.33GHz; after detecting an AOD scene, the electronic device 100 can obtain the target clock frequency of the display processor 12 corresponding to the AOD scene through the aforementioned clock configuration file, such as 0.15GHz.
[0066] Then, the electronic device 100 can set the clock frequency of the display processor 12 to the aforementioned target clock frequency. For example, after determining the target clock frequency of 0.33 GHz, the electronic device 100 can set the clock frequency of the display processor 12 (e.g., MDP) to 0.33 GHz.
[0067] In some embodiments, the display processor 12 provides an interface for setting the clock frequency of the display processor 12. In this case, the developer can directly set the clock frequency of the display processor 12 to the target clock frequency through the interface.
[0068] In some embodiments, the display processor 12 does not have an interface for setting its clock frequency. In this case, the developer can indirectly set the clock frequency of the display processor 12 by setting the MIPI rate. MIPI rate: In MIPI, the amount of data transmitted per second, measured in bps / lane.
[0069] Figure 6A is a schematic diagram of the clock frequency and MIPI rate of a display processor 12 according to an embodiment of this application. The horizontal axis represents the clock frequency (GHz) of the display processor 12; the vertical axis represents the MIPI rate (bps / lane).
[0070] As shown in Figure 6A, the higher the clock frequency of the display processor 12, the higher the MIPI rate; one clock frequency can correspond to multiple MIPI rates. For example, when the clock frequency of the display processor 12 is 0.33GHz, the MIPI rate can be 1Gbps / lane or 1.2Gbps / lane. The display processor 12 can adaptively adjust its clock frequency according to the MIPI rate. Therefore, developers can indirectly set the clock frequency of the display processor 12 by setting the MIPI rate.
[0071] For example, when electronic device 100 needs to set the clock frequency of display processor 12 to 0.6 GHz, electronic device 100 can set the MIPI rate to 1.55 Gbps / lane. Based on the new MIPI rate of 1.55 Gbps / lane, display processor 12 can adaptively adjust its own clock frequency to 0.6 GHz to match the new MIPI rate of 1.55 Gbps / lane.
[0072] Understandably, when setting the clock frequency of the display processor 12 directly through the interface, after setting the clock frequency of the display processor 12 to the target clock frequency, the electronic device 100 also needs to adaptively set the MIPI rate to match the updated clock frequency of the display processor 12, thereby further reducing power consumption and improving battery life.
[0073] S203, Update transmission time.
[0074] Transfer time: The time it takes for the display processor 12 to send the processed image data to the display screen 13 for display via MIPI. The higher the MIPI rate, the less transfer time is required to send image data of the same specifications to the display screen 13. That is, the MIPI rate is negatively correlated with the transfer time.
[0075] After setting the clock frequency of the display processor 12 to the target clock frequency, the electronic device 100 can update the transmission time to match the updated MIPI rate. The electronic device 100 can determine the transmission time matching the updated MIPI rate by looking up a table. The matching MIPI rate and transmission time in the table can be determined by the R&D personnel based on experience.
[0076] Referring to Table 1, which is a set of matched MIPI rates and transmission times provided in the embodiments of this application.
[0077] Table 1
[0078] As shown in Table 1, for example, when the MIPI rate is set to 0.6 Gbps / lane (refer to Figure 6A, corresponding to a clock frequency of 0.17 GHz for the display processor 12), the electronic device 100 can update the transmission time to 15.83 ms.
[0079] Figure 6B is a waveform diagram of transmission time provided in an embodiment of this application.
[0080] As shown in Figure 6B, before reducing the clock frequency of the display processor 12 and the MIPI rate, the transmission time of the electronic device 100 can, for example, be set to 7.9 ms. Before the arrival of the third tearing effect signal, according to the method shown in Figure 2, the electronic device 100 can reduce the clock frequency of the display processor 12, reduce the MIPI rate, and update the transmission time. For example, the electronic device 100 can update the transmission time to 15.83 ms. Thus, when the third TE signal arrives, the display processor 12 can send image data to the display screen according to the new transmission time of 15.83 ms.
[0081] In some embodiments, triggering target scenarios such as a super power-saving scenario or an always-on display scenario that update the clock frequency of the display processor 12 is also a target scenario that triggers dynamic adjustment of the refresh rate. In this case, after detecting the target scenario, the electronic device 100 can simultaneously adjust the refresh rate of the display screen 13 and the clock frequency of the display processor 12 to further reduce power consumption by lowering the refresh rate and clock frequency.
[0082] Taking the super power-saving scenario as an example, after detecting the super power-saving scenario, on the one hand, the electronic device 100 can determine the clock frequency of the display processor 12 corresponding to the super power-saving scenario according to the method shown in Figure 2, for example, 0.33GHz, and update the clock frequency of the display processor 12 from 0.6GHz (first clock frequency) to 0.33GHz (second clock frequency). Correspondingly, the MIPI rate between the display processor 12 and the display screen 13 is updated from 1.5Gbps / lane (first MIPI rate) to 1.002Gbps / lane (second MIPI rate), and the transmission duration is updated from 3.33ms (first transmission duration) to 7.9ms (second transmission duration). On the other hand, the electronic device 100 can determine the refresh rate corresponding to the super power-saving scenario according to a preset dynamic refresh rate adjustment method, for example, 60Hz, and update the refresh rate of the display screen 13 from 90Hz to 60Hz.
[0083] In other embodiments, one or more target scenarios that trigger an update to the clock frequency of the display processor 12 are not target scenarios that trigger a dynamic adjustment of the refresh rate. In this case, after detecting a target scenario that triggers an update to the clock frequency of the display processor 12, the electronic device 100 only adjusts the clock frequency of the display processor 12, improving the flexibility of the power consumption strategy.
[0084] For example, suppose that the AOD scene is the target scene that triggers an update of the display processor 12 clock frequency, and not the target scene that triggers a dynamic adjustment of the refresh rate. At this time, after detecting an AOD scene, according to the method shown in Figure 2, the electronic device 100 can determine the clock frequency of the display processor 12 corresponding to the AOD scene, for example, 0.15GHz, and update the clock frequency of the display processor 12 from 0.6GHz (first clock frequency) to 0.15GHz (second clock frequency). Correspondingly, the MIPI rate between the display processor 12 and the display screen 13 is updated from 1.5Gbps / lane (first MIPI rate) to 0.6Gbps / lane (second MIPI rate), and the transmission duration is updated from 3.33ms (first transmission duration) to 15.83ms (second transmission duration). Since the AOD scene is not the target scene that triggers dynamic adjustment of the refresh rate, the electronic device 100 will not update the refresh rate of the display screen 13 if other conditions remain unchanged. For example, before detecting the AOD scene, the refresh rate of the display screen 13 is 60Hz, and after detecting the AOD scene, the refresh rate of the display screen 13 continues to remain at 60Hz (first refresh rate).
[0085] Figure 7 is a software structure diagram of an electronic device 100 according to an embodiment of the present invention.
[0086] The software system of electronic device 100 can adopt a layered architecture, such as the Android system architecture. As shown in Figure 7, electronic device 100 using the Android system architecture includes an application layer, an application framework layer, a hardware abstraction layer (HAL), and a kernel layer.
[0087] The application layer includes a package of applications. In this embodiment, the application layer includes at least a super power-saving application and an AOD application. In addition, the application layer may also include applications such as camera, gallery, calendar, call, music, video, and SMS, which will not be listed here.
[0088] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. As shown in Figure 7, in this embodiment, the framework layer includes at least an image compositing module (Surfaceflinger, SF), which is used for rendering and compositing images. The framework layer may also include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc., which will not be listed here.
[0089] As shown in Figure 7, the Hardware Abstraction Layer includes the Hardware Composer (HWC). The HWC provides hardware acceleration support for SF to achieve efficient display compositing processing. The kernel layer includes the Screen Toolkit (LCDkit) and the Spatial Database Engine Driver (SDE Driver).
[0090] In this embodiment, the developer can preset a clock configuration file in the LCDKIT. Referring to Table 2, the clock configuration file can record the following clock configuration information:
[0091] Table 2
[0092] After entering the target scene based on user operation, the system application implementing the target scene can send a clock switching command to the SDE Driver via SF and HWC. This command may carry a clock tag matching the target scene, such as "1" / "2" / "3" as shown in Table 2. The SDE Driver can then obtain the target clock frequency matching the clock tag carried in the command from a preset clock configuration file. The SDE Driver can then instruct the display processor 12 (e.g., MDP) to switch its clock frequency to the target clock frequency. Referring to S202, even without permission, the SDE Driver can indirectly update the clock frequency of the display processor 12 by updating the MIPI rate, ensuring that the updated clock frequency of the display processor 12 reaches the target clock frequency. The display processor 12 then processes the image data according to the target clock frequency and sends the processed image to the display screen for display.
[0093] For example, after activating Ultra Power Saving, the Ultra Power Saving application can send a clock switching command to the SDE Driver via SF and HWC. This clock switching command can carry a clock tag "2" that matches the Ultra Power Saving scenario. By consulting the clock configuration file shown in Table 2, the SDE Driver can determine the target clock frequency of 0.33GHz corresponding to clock tag "2". Therefore, the SDE Driver can instruct the MDP to switch the clock frequency to the target clock frequency of 0.33GHz.
[0094] For example, after AOD is started, the AOD application also sends a clock switching command to the SDE Driver via SF and HWC. At this time, the clock switching command may carry a clock tag "3" that matches the AOD scenario. By referring to the clock configuration file shown in Table 2, the SDE Driver can determine the target clock frequency of 0.15GHz corresponding to clock tag "3". Therefore, the SDE Driver can instruct the MDP to switch the clock frequency to the target clock frequency of 0.15GHz.
[0095] In some embodiments, the clock configuration file described above can also be set in the SDE Driver so that the SDE Driver can read the clock configuration information in the clock configuration file at any time.
[0096] Figure 8 is a timing diagram of the data transmission method provided in an embodiment of this application.
[0097] S300. Start the target application.
[0098] Electronic device 100 can launch a target application and enter a target scenario through preset user operations that match the target scenario. For example, referring to the user interfaces shown in Figures 3A-3C and 4A-4B, electronic device 100 can launch a super power-saving application and enter a super power-saving scenario based on user operations performed on the super power-saving control. As another example, referring to the user interfaces shown in Figures 5A-5E, after enabling Always-On Display (AOD), electronic device 100 can launch an AOD application and enter an AOD scenario based on user operations performed on the power button.
[0099] S301. The target application sends a clock switching command to the SDE Driver. The clock switching command carries a clock tag that matches the target application.
[0100] As shown in Figure 7, the target application can send clock switching instructions carrying corresponding clock tags to the kernel-level SDE Driver through the SF (Framework Layer) and HWC (Hardware Abstraction Layer). For example, after starting the Super Power Saving application, it can send clock switching instructions to the SDE Driver through SF and HWC. In this case, the clock switching instructions sent by the Super Power Saving application can carry a clock tag "2" that matches the Super Power Saving application. Similarly, after starting the AOD (Alternate Own Device) application, it can send clock switching instructions to the SDE Driver through SF and HWC. In this case, the clock switching instructions sent by the AOD application can carry a clock tag "3" that matches the AOD application.
[0101] The S302.SDE Driver determines the target clock frequency based on the clock tag.
[0102] In response to a clock switching command, the SDE Driver can obtain a clock configuration file. As shown in Figure 7, in one embodiment, the clock configuration file is pre-installed in the LCDKIT module. In this case, the SDE Driver can obtain the clock configuration file from the LCDKIT.
[0103] After obtaining the clock configuration file, the SDE Driver can query the clock configuration file to determine the target clock frequency corresponding to the clock tag carried in the clock switching command. For example, when the clock tag carried in the clock switching command is "2", the SDE Driver can determine the target clock frequency of 0.33GHz corresponding to clock tag "2" according to the clock configuration file; when the clock tag carried in the clock switching command is "3", the SDE Driver can determine the target clock frequency of 0.15GHz corresponding to clock tag "3" according to the clock configuration file.
[0104] The S303.SDE Driver sends a clock switching command carrying the target clock frequency to the display processor 12, instructing the display processor 12 to switch to the target clock frequency.
[0105] For example, after determining the target clock frequency of 0.33 GHz, the SDE Driver can issue a clock switching command to the display processor 12. This clock switching command can carry the target clock frequency of 0.33 GHz. By default, the clock frequency of the display processor 12, such as an MDP, can be 0.6 GHz. In response to the aforementioned clock switching command, the display processor 12 can switch its clock frequency from 0.6 GHz to 0.33 GHz.
[0106] Referring to S202, even without proper authorization, the SDE Driver can send clock switching commands to MIPI. In this case, the clock switching command sent to MIPI carries the target clock frequency for MIPI. The target clock frequency for MIPI is not equal to the target clock frequency of the display processor 12.
[0107] MIPI rate = 2 * MIPI clock frequency
[0108] Based on the above relationship between MIPI rate and MIPI clock frequency and the relationship between clock frequency and MIPI rate of display processor 12 shown in Figure 6A, SDE Driver can determine the target clock frequency of MIPI based on the target clock frequency of display processor 12 in the clock configuration file, and then update the MIPI clock frequency, adjust the MIPI rate, and update the clock frequency of display processor 12.
[0109] For example, when the SDE Driver needs to set the clock frequency of the display processor 12 to 0.33 GHz, based on the relationship between the clock frequency of the processor 12 and the MIPI rate shown in Figure 6A, the SDE Driver can determine the MIPI rate as 1.002 Gbps / lane, and thus determine the target clock frequency of MIPI as 0.501 GHz. At this time, the clock switching command sent by the SDE Driver to MIPI carries the aforementioned target clock frequency of 0.501 GHz.
[0110] S304. Update the transmission time of the display processor 12.
[0111] S305. The display processor 12 processes and sends image data according to the updated clock frequency and transmission time.
[0112] Furthermore, the electronic device 100 can perform more refined scene classification for the target scene. For a target scene, the electronic device 100 can set different clock frequencies for the display processor 12 to further save power consumption and extend battery life.
[0113] Accordingly, the clock configuration file can also include more tags that match different clock frequencies. Applications can issue different tags based on the specific scenario at hand, thereby setting different clock frequencies.
[0114] Table 3
[0115] As shown in Table 3, the clock tags that the Super Power Saving application can send include "2.1" and "2.2". The clock frequency corresponding to clock tag "2.1" is 0.33 GHz; the clock frequency corresponding to clock tag "2.2" is 0.5 GHz. The clock tags that the AOD application can send include "3.1" and "3.2". The clock frequency corresponding to clock tag "3.1" is 0.15 GHz; the clock frequency corresponding to clock tag "3.2" is 0.3 GHz.
[0116] Specifically, in some embodiments, the electronic device 100 can identify applications running in an ultra-power-saving scenario. When a display-intensive application is running, the electronic device 100 can increase the clock frequency of the display processor 12; when no display-intensive applications are running, the electronic device 100 can restore the clock frequency of the display processor 12 to the lowest clock frequency under the ultra-power-saving scenario.
[0117] Figure 9 is a flowchart of another data transmission method provided in an embodiment of this application.
[0118] S401, Super power saving mode detected.
[0119] S402. Determine the minimum clock frequency for the super power saving scenario, and set the clock frequency of the display processor 12 to the aforementioned minimum clock frequency.
[0120] In this embodiment, after the Super Power Saving application is launched, the Super Power Saving application can first issue a clock switching command carrying the clock tag "2.1". In response to the above command, the SDE Driver can determine the target clock frequency of 0.33GHz for the clock tag "2.1", which is the minimum clock frequency under the Super Power Saving scenario (including target clock frequencies of 0.33GHz and 0.5GHz). Then, the SDE Driver can instruct the display processor 12 to switch to the target clock frequency of 0.33GHz.
[0121] S403, Update transmission time.
[0122] S404. In the super power saving scenario, a display-intensive application was detected.
[0123] Display-intensive applications refer to applications that require frequent updates to the displayed content, including but not limited to games, camera applications, video applications, and image editing applications. In ultra-power-saving scenarios, the electronic device 100 can detect the user opening one or more display-intensive applications.
[0124] S405. Determine the target clock frequency for display-intensive applications and set the clock frequency of the display processor 12 to the target clock frequency.
[0125] Upon detecting the launch of a display-intensive application, such as a camera application, the ultra-power-saving application can issue a new clock switching command. This command carries a new clock label, such as "2.2". The new clock label corresponds to a higher clock frequency. In response to the new clock switching command, the SDE Driver determines the new target clock frequency corresponding to the new clock label, and then instructs the display processor 12 to switch to the new target clock frequency. For example, the SDE Driver can determine that the new clock label "2.2" corresponds to a target clock frequency of 0.5 GHz, and then instruct the display processor 12 to switch to the new target clock frequency of 0.5 GHz to meet the display requirements of the display-intensive application. Correspondingly, the electronic device 100 can update the MIPI rate and transmission duration, for example, updating the MIPI rate from 1.002 Gbps / lane to 1.45 Gbps / lane, and the transmission duration from 7.9 ms (second transmission duration) to 3.8 ms (third transmission duration), to match the updated clock frequency of the display processor 12, which is 0.5 GHz.
[0126] S406, Update transmission time.
[0127] In some embodiments, the electronic device 100 can detect the number of layers in a super power-saving scene or an AOD scene. The electronic device 100 can further finely adjust the clock frequency of the display processor 12 based on the current number of layers.
[0128] Figure 10 is a flowchart of another data transmission method provided in an embodiment of this application.
[0129] S501, Target scene detected.
[0130] S502. Determine the minimum clock frequency of the target scene and set the clock frequency of the display processor 12 to the aforementioned minimum clock frequency.
[0131] Taking the ultra power saving scenario as an example, after launching the ultra power saving application, the application can first issue a clock switching command carrying the clock tag "2.1". In response to the above command, the SDE Driver can determine the target clock frequency of 0.33GHz for the clock tag "2.1", which is the minimum clock frequency under the ultra power saving scenario (including target clock frequencies of 0.33GHz and 0.5GHz). Then, the SDE Driver can instruct the display processor 12 to switch to the target clock frequency of 0.33GHz.
[0132] S503, Update transmission time.
[0133] S504, The number of current layers has exceeded the threshold.
[0134] After launching the Super Power Saving app, it can obtain the current number of layers via SF, especially the number of changing layers that need to be updated. The Super Power Saving app has a preset layer threshold M1. When the current number of layers or the number of changing layers exceeds M1, the Super Power Saving app can determine that the current number of layers exceeds the preset value.
[0135] S505. Determine the target clock frequency corresponding to the current number of layers, and set the clock frequency of the display processor 12 to the target clock frequency.
[0136] Taking the current number of images as an example, after the current number of layers exceeds the threshold M1, the super power-saving application can issue a new clock switching command. At this time, the clock switching command carries a new clock label, such as "2.2". The new clock label corresponds to a higher clock frequency. In response to the new clock switching command, the SDE Driver can determine the new target clock frequency corresponding to the new clock label, and then instruct the display processor 12 to switch to the new target clock frequency. For example, the SDE Driver can determine that the new clock label "2.2" corresponds to a target clock frequency of 0.5GHz, and then instruct the display processor 12 to switch to the new target clock frequency of 0.5GHz to meet the display requirements of display-intensive applications. Correspondingly, the electronic device 100 can update the MIPI rate and transmission duration, which will not be elaborated here.
[0137] For example, the layer threshold M1 = 5. When the number of current layers or the number of changed layers is within 1 to 5 (inclusive of boundary values 1 and 5, the first range), the target clock frequency is 0.33 GHz; when the number of current layers or the number of changed layers is greater than 5 (the second range), the target clock frequency is 0.5 GHz.
[0138] Referring to Table 4, in some embodiments, the super power saving application can also set more layers and match more clock frequencies to provide a more refined dynamic clock adjustment strategy for electronic device 100.
[0139] Table 4
[0140] The super power-saving application can issue clock switching commands with different clock tags according to the current layer number range, and then update the clock frequency of the display processor 12 according to the current layer number.
[0141] Similarly, the AOD application can also detect the current number of layers, determine the target clock frequency corresponding to the current number of layers, and then instruct the display processor 12 to use the new target clock frequency, which will not be elaborated here.
[0142] S506, Update transmission time.
[0143] In some embodiments, the electronic device 100 may also simultaneously implement the data transmission methods shown in Figures 9 and 10. That is, the electronic device 100 can identify applications running in the super power saving scenario. When a display-intensive application is running, the electronic device 100 can increase the clock frequency of the display processor 12. At the same time, the electronic device 100 can detect the number of layers in the super power saving scenario or the AOD scenario, and update the clock frequency of the display processor 12 according to the current number of layers.
[0144] As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the listed items. As used in the above embodiments, depending on the context, the term “when” can be interpreted as meaning “if…” or “after…” or “in response to determining…” or “in response to detecting…”. Similarly, depending on the context, the phrase “when…” or “if (the stated condition or event) is interpreted as meaning “if…” or “in response to determining…” or “when (the stated condition or event) is detected” or “in response to detecting (the stated condition or event)”.
[0145] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0146] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for transmitting data, characterized in that, The method is applied to an electronic device, the electronic device including a display screen, a display processor, a first application program, and a second application program, the method comprising: Run the first application; The display screen displays image data corresponding to the first application at a first refresh rate; The display processor transmits image data to the display screen for a first transmission duration; In response to the first user action, the second application is run; The display screen shows the image data corresponding to the second application at a first refresh rate; The display processor transmits image data to the display screen for a second transmission duration, wherein the second transmission duration is longer than the first transmission duration.
2. The method according to claim 1, characterized in that, The first application includes one or more of the following: desktop applications, video applications, and instant messaging applications.
3. The method according to claim 1, characterized in that, The second application includes: a super power saving application, and / or an AOD application.
4. The method according to any one of claims 1-3, characterized in that, The first refresh rate is 60Hz.
5. The method according to claim 1, characterized in that, The first user operation includes: enabling super power saving, and / or turning off the screen.
6. The method according to claim 1, characterized in that, The display processor and the display screen transmit image data via the Mobile Industry Processor Interface (MIPI). At a first MIPI rate, the display processor transmits image data to the display screen for the first transmission duration; at a second MIPI rate, the display processor transmits image data to the display screen for the second transmission duration; the first MIPI rate is greater than the second MIPI rate.
7. The method according to claim 6, characterized in that, At a first MIPI rate, the display processor processes image data at a first clock frequency; at a second MIPI rate, the display processor processes image data at a second clock frequency, wherein the first clock frequency is higher than the second clock frequency.
8. The method according to any one of claims 1-7, characterized in that, The method further includes: In response to a second user action, run a third application; The display screen displays the image data corresponding to the third application at the first refresh rate; The display processor transmits image data to the display screen for a third transmission duration, wherein the third transmission duration is longer than the first transmission duration and shorter than the second transmission duration.
9. The method according to claim 8, characterized in that, The third application includes: game applications, camera applications, video applications, and image editing applications.
10. The method according to any one of claims 1-9, characterized in that, The method further includes: While running the second application, obtain the number of layers; When the number of layers is within a first range, the display processor continues to transmit image data to the display screen for the second transmission duration; When the number of layers is within the second range, the display processor transmits image data to the display screen for a fourth transmission duration, which is longer than the first transmission duration but shorter than the second transmission duration; the lower boundary of the second range is greater than or equal to the upper boundary of the first range.
11. An electronic device, characterized in that, It includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program that, when the one or more processors execute the computer program, causes the method as described in any one of claims 1-10 to be performed.
12. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-10.
13. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-10.