WO2022242487A1 - Display method and related device - Google Patents

Display method and related device Download PDF

Info

Publication number
WO2022242487A1
WO2022242487A1 PCT/CN2022/091634 CN2022091634W WO2022242487A1 WO 2022242487 A1 WO2022242487 A1 WO 2022242487A1 CN 2022091634 W CN2022091634 W CN 2022091634W WO 2022242487 A1 WO2022242487 A1 WO 2022242487A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
resolution
user interface
layer
dynamic
Prior art date
Application number
PCT/CN2022/091634
Other languages
French (fr)
Chinese (zh)
Inventor
朱伟
孙兴阳
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022242487A1 publication Critical patent/WO2022242487A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of electronic technology, in particular to a display method and related devices.
  • the display screen resolution required by smart terminal devices is getting higher and higher, gradually developing towards 2K resolution, 3K resolution, 4K resolution, and 8K resolution.
  • the high-resolution interface display has problems such as picture freezing, blurred image details, and high power consumption.
  • the present application provides a display method and a related device, which realize smooth and clear high-resolution display, reduce power consumption of high-resolution display, and effectively improve user experience.
  • the present application provides a display method, which is applied to a terminal device, and the terminal device includes a display screen, including: drawing a first user interface image of a first resolution corresponding to a first display screen in response to a first instruction, And acquire the first base image of the second resolution of the first display image; wherein, the first instruction is used to instruct the terminal device to draw the first display image of the second resolution, and the first user interface image includes the first display image in the first display image Dynamic interface elements, the first base map includes static interface elements in the first display screen, the terminal device stores at least one base map of the display screen that has been drawn, and the second resolution is greater than the first resolution; based on the first resolution The first user interface image and the first base image of the second resolution are synthesized into the first display picture of the second resolution; and the first display picture is displayed through the display screen.
  • the embodiment of the present application divide the display screen into the base map of the static part and the user interface image of the dynamic part, the base map includes the static interface elements in the display screen, and the user interface image of the dynamic part only includes all the user interfaces in the display screen
  • the dynamic interface element in the terminal device stores a pre-drawn high-resolution basemap; in response to the first instruction, the terminal device only draws a low-resolution user interface image containing the dynamic interface element, and then converts the low-resolution
  • the composite image of the user interface image and the high-resolution basemap is sent to the display screen for display.
  • the first display screen includes at least one user interface
  • the drawing of the first user interface image with the first resolution corresponding to the first display screen includes: drawing the dynamic interface element corresponding to the first user interface
  • the first layer the first user interface is any user interface in the at least one user interface, the resolution of the first layer is less than or equal to the first resolution; the dynamics of each user interface in the first display screen
  • the layers corresponding to the interface elements are synthesized into the first user interface image with the first resolution.
  • the drawing of the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first layer in the first user interface image with the first resolution based on the interface layout of the first user interface.
  • the size of the layer is the first size
  • the position of the first layer is the first position
  • the position of the first dynamic interface element in the first layer of the first size is the second position
  • the size of the first dynamic interface element is The second size
  • the first dynamic interface element is any dynamic interface element of the first user interface in the first layer; based on the second position and second size of the first dynamic interface element, draw on the canvas of the first size
  • the first dynamic interface element generates a first layer of a first size corresponding to the dynamic interface element of the first user interface.
  • the above synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first layer in the first The first position and the first size in the first user interface image of the resolution, and the layers corresponding to the dynamic interface elements of each user interface are synthesized into the first user interface image of the first resolution.
  • the synthesis of the first display image of the second resolution based on the first user interface image of the first resolution and the first base image of the second resolution includes: combining the first user interface image of the first resolution Enlarging a user interface image into a first user interface image with a second resolution; synthesizing the first user interface image with the second resolution and the first base image with the second resolution into a first display image with the second resolution.
  • the drawing of the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first layer in the first user interface image of the second resolution based on the interface layout of the first user interface
  • the position of the first dynamic interface element in a layer is the third position and the size of the first dynamic interface element is the third size; based on the third size of the first dynamic interface element, draw the first dynamic interface on the canvas of the fourth size
  • the interface elements generate the first layer, there is no overlap between the dynamic interface elements in the first layer, and the position of the first dynamic interface element in the first layer is the fourth position.
  • the dynamic interface elements of the first user interface on the first layer are sequentially arranged in a first preset order on the first layer.
  • the above synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first The third size and the fourth position of the dynamic interface element determine that the position of the first dynamic interface element in the first user interface image of the first resolution is the fifth position; based on the first dynamic interface element in the first layer at the A third size and a fifth position in a user interface image are synthesized into a first user interface image with a first resolution.
  • the dynamic interface elements of multiple layers in the first user interface image are sequentially arranged in a second preset order in the first user interface image.
  • synthesizing the first user interface image with the first resolution based on the third size and the fifth position of the first dynamic interface element in the first layer in the first user interface image includes: obtaining The image data of the first area where the first dynamic interface element is located in the first layer, the size of the first area is the third size, and the position of the first area is the fourth position; determine the first dynamic interface in the first user interface image
  • the image data of the second area where the element is located is the image data of the first area, the size of the second area is the third size, and the position of the second area is the fifth position.
  • synthesizing the first display picture with the second resolution based on the first user interface image with the first resolution and the first base map with the second resolution includes: obtaining the first user interface image in the first user interface image The image data of the second area where the first dynamic interface element is located, the size of the second area is the third size, and the position of the second area is the fifth position; obtain the image data of the third area in the first base image, the third area The size of is the third size, and the position of the third area is the third position of the first dynamic interface element; the image data of the second area and the image data of the third area are synthesized into the image data of the third area of the first display screen , to generate the first display screen; the size of the third area is the third size, and the position of the third area is the third position.
  • the interface elements whose display content is not changeable in the first display screen are static interface elements, and the interface elements whose display content is variable are dynamic interface elements; or, the terminal device runs When the first display screen is displayed, interface elements whose display content change probability is lower than a preset value in the first display screen are static interface elements, and interface elements whose display content change probability is greater than or equal to a preset value are dynamic interface elements.
  • the drawing of the first user interface image of the first resolution corresponding to the first display screen and obtaining the first base image of the second resolution of the first display screen include: using the first frame rate Draw the first user interface image of the first resolution corresponding to the first display picture, and acquire the first base map of the second resolution of the first display picture at the second frame rate; the first frame rate is greater than the second frame rate;
  • the above synthesizing the first display image with the second resolution includes: synthesizing the first display image with the second resolution at the first frame rate.
  • the fourth size is smaller than the first size, which is the size of the first layer in the first user interface image at the first resolution.
  • the fourth size is greater than the sum of sizes of all dynamic interface elements of the first user interface in the first user interface image of the second resolution.
  • the fourth size is determined by the terminal device based on the sum of the foregoing sizes.
  • the first dynamic interface element is a single dynamic interface element or a composite dynamic interface element composed of multiple dynamic interface elements.
  • drawing and compositing can be performed at the granularity of composite dynamic interface elements.
  • the unit granularity of drawing and compositing is larger, which can improve the rendering and compositing efficiency of the display picture.
  • the present application provides a terminal device, including one or more processors and one or more memories.
  • the one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the terminal device executes A display method in any possible implementation manner of any one of the above aspects.
  • an embodiment of the present application provides a computer storage medium, including computer instructions.
  • the terminal device is made to execute the display method in any possible implementation of any one of the above aspects.
  • an embodiment of the present application provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute the display method in any possible implementation manner of any one of the above aspects.
  • FIG. 1A to FIG. 1C are schematic diagrams of a user interface of an application scenario provided by an embodiment of the present application.
  • FIG. 2A is a schematic structural diagram of a terminal device provided in an embodiment of the present application.
  • FIG. 2B is a schematic diagram of a base map storage provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a software system architecture provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of the internal implementation of a display method provided by the embodiment of the present application.
  • FIG. 5A is a schematic diagram of the internal implementation of another display method provided by the embodiment of the present application.
  • FIG. 5B is a schematic flowchart of another display method provided by the embodiment of the present application.
  • FIG. 6A is a schematic diagram of a layer corresponding to a dynamic part of a user interface provided in an embodiment of the present application
  • FIG. 6B is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application.
  • FIG. 6C is an enlarged schematic diagram of a layer provided in the embodiment of the present application.
  • FIG. 6D is a composite schematic diagram of a layer and a base map provided by the embodiment of the present application.
  • FIG. 7A is a schematic diagram of the internal implementation of another display method provided by the embodiment of the present application.
  • FIG. 7B is a schematic flowchart of another display method provided by the embodiment of the present application.
  • FIG. 8A is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application.
  • FIG. 8B is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application.
  • Fig. 8C is a composite schematic diagram of another layer and base map provided by the embodiment of the present application.
  • Fig. 9A is a schematic diagram of a composite dynamic interface element provided by the embodiment of the present application.
  • FIG. 9B is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application.
  • FIG. 9C is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application.
  • FIG. 9D is a schematic diagram of another compound dynamic interface element provided by the embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • Display resolution refers to the physical resolution of the display itself, usually expressed in the form of "horizontal pixels X vertical pixels" on the display panel in the display, for example, the resolution of 800 ⁇ 600 refers to the Each row can display 800 pixels horizontally, and each column can display 600 pixels vertically.
  • Image Resolution refers to the amount of information stored in an image.
  • image resolution is measured by the number of pixels in the picture, expressed in the form of "number of horizontal pixels X number of vertical pixels" in the picture.
  • image resolution is measured by the number of pixels per inch (PPI, pixel per inch) or the number of pixels per centimeter (PPC, pixel per centimeter).
  • measurement method 1 is taken as an example for description. It can be understood that in measurement method 1, the image resolution of an image may also correspond to the size of the image, that is, the number of horizontal pixels is the width of the image, and the number of vertical pixels is the height of the image.
  • nK resolutions such as 2K resolution, 3K resolution, 4K resolution, and 8K resolution involved in this application refer to the number of pixels in each row in the horizontal direction being close to n times 1024, or the total number of pixels is close to nK resolution
  • the preset pixel amount of the image For example, a resolution whose total number of pixels is close to 8,847,360 pixels of a 4K image may also be referred to as 4K resolution. Therefore, the nK resolution can have various specifications.
  • the existing 4K resolution includes 4096 ⁇ 2160, 3656*2664, 3840*2160 and other resolutions.
  • the 4K resolution involved in the subsequent embodiments takes 4096 ⁇ 2560 resolution as an example, and the 2K resolution takes 2560 ⁇ 1440 resolution as an example, which is not limited in this application.
  • User interface (user interface, UI)
  • the user interface is the medium interface for interaction and information exchange between the application program or operating system and the user, which realizes the conversion between the internal form of information and the form acceptable to the user.
  • the user interface is the source code written in a specific computer language such as java and extensible markup language (XML).
  • the source code of the interface is parsed and rendered on the electronic device, and finally presented as content that can be recognized by the user.
  • a control is a basic interface element of a user interface.
  • a control can encapsulate data and methods, and a control can have its own properties and methods.
  • the types of controls may include, but are not limited to: user interface controls (controls used to develop and build user interfaces), chart controls (controls used to develop charts, which can realize data visualization, etc.), report controls (used to develop reports) Controls, which realize the functions of browsing, designing, editing, printing, etc. of reports), table controls (controls used to develop tables (cells), and realize the functions of data processing and operation in grids), composite controls formed by multiple controls, etc. .
  • controls may include but not limited to: window, scroll bar, table view, button, menu bar, text box, navigation Bars, toolbars (toolbar), images (lmage), static text (tatictext), components (Widget) and other visual interface elements.
  • the terminal device may execute the response event corresponding to the control.
  • the main interface of the terminal device displays the icon 1 of the video application, and in response to the user input that the user acts on the icon 1 , the terminal device switches from the current user interface to the user interface of the video application.
  • the application program window may be an application program window in the Android system, an application program window in the IOS system, or an application program window in other operating systems, which is not specifically limited here.
  • the application program window may be referred to as a window for short.
  • An application includes multiple application windows, and one application window corresponds to one or more user interfaces.
  • Layers Generally, there are mainly three types of layers displayed by the terminal device 100 , namely, a status bar, a navigation bar, and a user interface corresponding to an application window.
  • the status bar and the navigation bar can be respectively used as a user interface of the desktop application, and the terminal device 100 can draw and render at least one layer corresponding to the application window running in the foreground, and perform the above-mentioned at least one layer After synthesis, it is sent to the display screen.
  • Layer size refers to the size of the area occupied by the layer when it is displayed on the display screen, and is usually characterized by two parameters: the width (such as the number of horizontal pixels) and the height (such as the number of vertical pixels) of the layer.
  • Layer position refers to the display position of the layer on the display screen, usually represented by the display coordinates of the upper left corner or lower left corner of the layer on the display screen.
  • the above display coordinates are usually pixel coordinates, for example, the pixel coordinates of the upper left corner of the layer are (50,100). It can be understood that based on the size and position of the layer, the display area of the layer on the display screen can be determined.
  • Transparency of a layer refers to the degree of transparency of a layer, which affects the visual effect of overlapping display of this layer with other layers, usually represented by the parameter Alpha.
  • the value of Alpha ranges from 0 to 100%. When the value of Alpha is 0, the layer is completely transparent (that is, the layer is invisible visually), and when the value of Alpha is At 100%, the layer is opaque.
  • the order of layers is usually characterized by Z-order.
  • the Z axis refers to the reference axis perpendicular to the plane direction of the display screen.
  • Different layers determine the front and rear order of display according to the coordinates on the Z axis. This order is called Z-order.
  • the smaller the Z-order of the layer the higher the layer is displayed.
  • the Z-order of the layer corresponding to window 1 is smaller than the Z-order of the layer corresponding to window 2.
  • the layer of window 1 Located on the upper layer of the window 2 layer, if the window 1 layer is opaque, the window 1 layer will block the window 2 layer.
  • the larger the Z-order of the layer the higher the layer is displayed.
  • the size, position and transparency of the user interface elements can refer to the related description of the size, position and transparency of the layer, and will not be repeated here.
  • Frame rate the number of frame images that can be rendered per second depends on the rendering capability of the hardware of the terminal device 100 .
  • the screen refresh rate refers to the number of times the display can be refreshed per second.
  • the vertical synchronization technology can make the actual frame rate not exceed the screen refresh rate.
  • the CPU and/or GPU draws, synthesizes and renders the display content of the user interface, and submits the rendering result to the frame buffer.
  • the terminal device 100 reads the data in the frame buffer line by line according to the VSYNC signal, and transmits the data to the display screen for display.
  • the resolution of the display screen of the terminal device 100 shown in FIG. 1A and FIG. 1B is 4K resolution.
  • the display screen 11 may include a status bar 101 and a user interface 1 of a desktop application.
  • the user interface 1 includes a background image 102 and a wired input source icon. 103 , a screen casting icon 104 and a setting icon 105 . in:
  • the status bar 101 may include: a screen projection device text 101A, a screen projection device name 101B, and one or more signal strength indicators 101C for a wireless fidelity (Wi-Fi) signal.
  • a screen projection device text 101A a screen projection device text 101A
  • a screen projection device name 101B a screen projection device name 101B
  • one or more signal strength indicators 101C for a wireless fidelity (Wi-Fi) signal.
  • the wired input source icon 103 may receive an input operation (such as a touch operation, a selection instruction sent by a remote controller), and in response to the detected input operation, the terminal device 100 may display multiple selection controls for wired input sources.
  • an input operation such as a touch operation, a selection instruction sent by a remote controller
  • the screen projection icon 104 may receive an input operation (such as a touch operation, a selection instruction sent by a remote controller), and in response to the detected input operation, the terminal device 100 may display a tutorial of the wireless screen projection function.
  • an input operation such as a touch operation, a selection instruction sent by a remote controller
  • the setting icon 105 may receive an input operation (such as a touch operation, a selection instruction sent by a remote controller), and in response to the detected input operation, the terminal device 100 may display a screen projection setting interface.
  • an input operation such as a touch operation, a selection instruction sent by a remote controller
  • switching input source interface 12 may include switching input source text 108, input source 1 icon 109, input source 2 icon 110, input source 2 selection indicator box 111, input source 3 icon 112 and background 113.
  • the selected indication box 111 is used to indicate that the input source 2 icon 110 is selected.
  • the input source 2 icon 110 is selected, which means that the terminal device selects a USB-C connected device (for example, "HUAWEI P40") as the screen projection input.
  • the selected indication box 111 of the input source 2 may receive a user's confirmation operation (such as a touch operation, a confirmation instruction sent by a remote control), and in response to the detected confirmation operation, the terminal device 100 may display the The content of the screen projection of the device connected by USB-C (that is, the user interface 2 shown in Figure 1C), and modify the content of the screen projection device name 101B to "HUAWEI P40". It is not limited to the user interface 2, and the above screen projection content may also be other user interfaces, which are not specifically limited here.
  • FIG. 1A and FIG. 1B are exemplary user interfaces provided in the embodiments of the present application, and do not limit the embodiments of the present application.
  • the user interfaces shown in FIG. 1A and FIG. 1B may include fewer or more controls .
  • the user interface shown in FIG. 1A and FIG. 1B may not include a status bar, and the screen projection device text 101A, the screen projection device name 101B and the signal strength indicator 101C are controls in the user interface 1 .
  • the terminal device 100 renders the image to be displayed at 4K resolution and displays it, there will be high power consumption, the picture displayed by the terminal device 100 freezes, and it cannot quickly respond to the user's input operation to display the image shown in FIG. 1B. If the performance of the processor and/or memory of the terminal device 100 is not enough to support the smooth display of the 4K resolution interface, the above problems will seriously affect the display effect of the terminal device 100.
  • the terminal device 100 utilizes the existing hardware magnification scheme, that is, first renders the picture to be displayed at a low resolution (for example, 2K resolution), and then enlarges the 2K resolution image picture to 4K resolution before displaying, it will cause Visually, the image details are blurred and the display effect is not good.
  • a low resolution for example, 2K resolution
  • the display method provided by the embodiment of the present application reduces the hardware performance requirements and power consumption of the processor (such as CPU and GPU), and improves the fineness of the interface display while realizing high-resolution interface display.
  • the frame rate required for smooth display for example, 60 frames per second (fps)
  • fps frames per second
  • FIG. 2A is a schematic structural diagram of a terminal device 100 provided in an embodiment of the present application.
  • the terminal device 100 may be a terminal device equipped with iOS, Android, Microsoft or other operating systems.
  • the terminal device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, and a projection display device , cellular phone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, Vehicle-mounted devices, smart home devices (such as smart TVs), and/or smart city devices, the embodiment of the present application does not specifically limit the specific type of the electronic devices.
  • the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • processor 110 may be integrated into a system-on-chip (System-On-Chip, SOC).
  • SOC System-On-Chip
  • the structure shown in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100 .
  • the terminal device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a central processing unit (central processing unit, CPU), a graphics processor ( graphics processing unit (GPU), image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor
  • AP central processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the terminal device 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs.
  • the terminal device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the terminal device 100 can be realized through the NPU, such as: image recognition, face recognition, speech recognition, text understanding, etc.
  • the internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM).
  • RAM random access memory
  • NVM non-volatile memory
  • Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.; non-volatile memory can include disk storage devices, flash memory (flash memory).
  • SRAM static random-access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • non-volatile memory can include disk storage devices, flash memory (flash memory).
  • flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.
  • it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), triple-level cell (TLC), quad-level cell (QLC), etc.
  • SLC single-level storage cells
  • MLC multi-level storage cells
  • TLC triple-level cell
  • QLC quad-level cell
  • UFS universal flash storage
  • embedded multimedia memory card embedded multi media Card
  • the random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other running programs, and can also be used to store data of users and application programs.
  • the non-volatile memory can also store executable programs and data of users and application programs, etc., and can be loaded into the random access memory in advance for the processor 110 to directly read and write.
  • the external memory interface 120 may be used to connect an external non-volatile memory, so as to expand the storage capacity of the terminal device 100 .
  • the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external non-volatile memory.
  • the terminal device 100 may implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the internal memory 121 (such as a non-volatile memory) of the terminal device 100 is also used to store a drawn picture with a preset resolution corresponding to at least one display screen of the terminal device 100 (for ease of description, this In the embodiment of the application, this picture is referred to as the base picture for short).
  • the display screen includes at least one user interface. When the display screen includes at least two user interfaces, any two user interfaces in the at least one user interface may have no overlap or partial overlap.
  • the terminal device 100 divides the interface elements in the user interface into static and dynamic, and the interface elements displayed in the base map include the static interface elements in the visible area of at least one user interface.
  • the aforementioned preset resolution is smaller than or equal to the resolution of the display screen of the terminal device 100 .
  • static interface elements refer to interface elements whose display content is less likely to change (or immutable) when the user interface is running, such as background (background 102, background 113 as shown in FIG. 1A ), fixed text ( Text 101A) as shown in Figure 1A), icon etc. (icon 103 as shown in Figure 1A, the icon 109 shown in Figure 1B);
  • Dynamic interface element refers to that the display content change possibility is higher when user interface runs (or can be variable) interface elements, such as a selected indicator box (selected indicator box 107 and selected indicator box 111 as shown in Figure 1B), a control with variable display icons (indicator 101C as shown in Figure 1A), variable input text (the screen projection device name 101B as shown in FIG. 1B ) and so on.
  • the internal memory 121 of the terminal device 100 stores pre-drawn basemap 1 and basemap 2 with a resolution of 4K, and the basemap 1 includes visible static interface elements in the display screen 11 shown in FIG. 1A , and base map 2 includes visible static interface elements in the display screen shown in FIG. 1B .
  • the internal memory 121 also stores pictures of pre-drawn dynamic interface elements (such as an indicator 101C and a selected indicator box 107 ).
  • the terminal device 100 acquires the base map 2 with 4K resolution from the internal memory 121, and then synthesizes the base map 2 with 4K resolution as shown in FIG. 1B based on the base map 2 with 4K resolution. display screen.
  • the software system architecture of the terminal device 100 involved in the embodiment of the present application is illustrated below by way of example.
  • the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the Android system with a layered architecture is taken as an example to illustrate the software structure of the terminal device 100 .
  • FIG. 3 exemplarily shows a software structural block diagram of the terminal device 100 provided by the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system can be divided into an application program layer, an application program framework layer, a hardware abstraction layer (hardware abstraction layer, HAL) layer and a kernel layer (kernel) from top to bottom.
  • HAL hardware abstraction layer
  • kernel layer kernel layer
  • the application layer consists of a series of application packages. As shown in FIG. 3 , the application package may include applications such as desktop applications, video applications, and screen-casting applications. It can also include applications such as camera, gallery, call, music, etc., which will not be described here.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window management module, application management module, input management module, media framework and graphics framework.
  • the application management module can be used to obtain application windows running in the foreground and running in the background.
  • the application management module includes Activity Manager Service (ActivityManagerService, AMS), and AMS is a system service of the Android (android) system, which is used to control the reasonable scheduling and operation of different application programs in the system.
  • the stack is managed.
  • the main responsibilities of AMS include uniformly scheduling the activities of various applications, managing application processes, managing memory, scheduling services, scheduling tasks, querying the current running status of the system, and so on.
  • Activity is an interface for interaction between users and applications. Each Activity component is associated with a Window object, which is used to describe a specific application window.
  • the application management module can determine the application windows running in the foreground and the background by calling the AMS.
  • the input management module is used to manage the input events and event distribution of the whole system.
  • the input management module includes an input management service (InputManagerService, IMS), and the IMS is used for input event management, that is, to monitor all input device nodes, and when the input device node has data, process the data and find A suitable application window distributes input events to the window through the window management module.
  • IMS can determine the activity running in the foreground by calling the AMS, and then combine the interface layout of the application window corresponding to the activity running in the foreground to determine the specified application window of the specified application corresponding to the above input event.
  • the window management module is used to manage application windows.
  • the window management module can obtain the resolution of the display screen, judge whether there is a status bar, and so on.
  • the above-mentioned application program window may be an application program window in the Android system, an application program window in the IOS system, or an application program window in other operating systems, which is not specifically limited here.
  • the window management module may include a window management service (Window Manager Service, WMS), and WMS is a system service of the android system, which controls the creation, display and hiding of all windows.
  • WMS assigns layers (Surface) to all windows, manages the display order, size, position, etc. of layers, and controls window animation. It is an important transfer station for the input system.
  • the window management module After the window management module receives the input event distributed by the input management module, it sends an instruction to the designated application corresponding to the input event to instruct the application to draw the user interface of the designated application window corresponding to the input event.
  • the application layer can draw and render the layer corresponding to the above user interface according to the instruction sent by the window management module, and call the system process to draw and render the layer corresponding to the status bar and the navigation bar.
  • the media framework includes a media player, video decoder, image player and image decoder, and the graphic framework includes an interface composition module.
  • the application layer After the application layer obtains the video data, it can call the video decoder through the media player to decode the above video data. After the application layer obtains the image data, it can call the image decoder through the media player to decode the above image data. It should be noted that the video data and image data obtained by the application layer are usually compressed data.
  • the interface composition module is used for synthesizing at least one layer into a user interface image.
  • the above-mentioned interface synthesis module is SurfaceFlinger, and SurfaceFlinger determines the display area and display content of each layer in the composite image based on parameters such as the size, position, Z-order, and transparency of each layer, and then SurfaceFlinger calls the hardware compositor (Hardware Composer, HWC) to generate the display buffer data (Buffer) of the composite image based on the display area and display content of each layer in the composite image.
  • HWC hardware compositor
  • Buffer display buffer data
  • the composition of the user interface image may also be realized by calling the GPU.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • Hardware Abstraction Layer is an interface layer between the kernel and the hardware circuit, providing a virtual hardware platform for the software system shown in Figure 3.
  • the HAL layer can include: video processing module (Video Process, VP) HAL, HWC HAL and frame buffer (FrameBuffer, FB) HAL.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer can include FB driver, video object (Video Output, VO) driver and input system. It can also include sensor driver, touch IC driver and audio driver, etc.
  • the HAL layer and the kernel layer can perform corresponding operations in response to functions called by the application framework layer.
  • the FB driver can send the display buffer data of the user interface image to the VO driver, and the VO driver can call the image amplifier and/or synthesizer to synthesize the above-mentioned user interface image and the image output by the media framework to generate a display screen, and the screen to be displayed can be sent to the display screen 194 for display.
  • the kernel layer includes display drivers.
  • the image output by the media framework can be sent to the graphics framework, and the interface synthesis module of the graphics framework synthesizes the image output by the media framework and the layer output by the application layer into a picture to be displayed; then, the interface synthesis module calls the display driver through the hardware abstraction layer Send the user interface image to the display for display.
  • the application framework layer may also include a basemap storage module.
  • the terminal device 100 draws the base map of each display screen in advance, and stores it in the base map storage module.
  • the base map storage module stores the pre-drawn base map 1 and base map 2 shown in FIG. 2B, the base map of the display screen of the terminal device 100 shown in FIG.
  • the bottom image of the display screen of the terminal device 100 is the bottom image 2 .
  • the application layer draws and renders the user interface in response to the instruction sent by the window management module, and only needs to draw and render the dynamic interface elements in the user interface when generating the layer corresponding to the user interface.
  • the application layer can determine the base map 3 of the picture to be displayed according to the instruction sent by the window management module, and then obtain the stored data of the base map 3 from the base map storage module and send it to the image processor; the image processor calls the image decoder based on The above stored data decodes the base image 3, and sends the base image 3 to the VO driver through the VO HAL.
  • the VO driver can invoke the synthesizer to synthesize the user interface image containing only dynamic interface elements and the base map 3 to generate a picture to be displayed.
  • the above-mentioned to-be-displayed screen may be referred to as the first display screen for short.
  • the image format of the base map stored by the base map storage module may be a compressed image format (such as JPEG format).
  • the image decoder can decode the basemap into YUV format.
  • YUV format refers to the pixel format in which brightness parameters and chrominance parameters are expressed separately.
  • Y means brightness (Luminance or Luma), that is, gray value
  • U and "V” means chroma (Chrominance or Chroma).
  • Storing images in YUV format generally takes up less storage space than RGBA format.
  • the user interface image drawn by the terminal device 100 is in RGBA format
  • the synthesizer provided in the embodiment of the present application can support the synthesis of the user interface image in RGBA format output by the software system and the video image in YUV format, and The composite image is sent to the display screen 194 for display.
  • FIG. 4 is a schematic diagram of an implementation of a display method provided by an embodiment of the present application.
  • the application layer draws and renders the layers corresponding to the user interface running in the foreground, and sends the layer data of the above layers to the interface synthesis module of the graphics framework; the interface The synthesis module synthesizes the user interface image of resolution 1 based on the layer data of at least one layer sent by the application layer, and sends the image cache data of the user interface image of resolution 1 to the image amplifier; the image amplifier converts the resolution 1
  • the UI image is upscaled to a resolution 2 UI image, and the resolution 2 UI image is sent to the compositor.
  • the application layer In response to the instruction sent by the window management module, the application layer also obtains the video source with resolution 2, and sends each frame of video image in the video source with resolution 2 to the video decoder of the media framework; the video decoder decodes based on the above video data
  • the dynamic video image of resolution 2 is decoded, and the dynamic video image of resolution 2 is sent to the synthesizer.
  • the synthesizer generates a synthesized image based on the user interface image with resolution 2 and the dynamic video image with resolution 2, and sends the synthesized image to the display screen 194 for display.
  • the resolution 2 is greater than the resolution 1, for example, the resolution 1 is a 2K resolution, and the resolution 2 is a 4K resolution.
  • the display method provided by the embodiment of the present application supports the independent output of user interface and video.
  • the terminal device 100 draws a low-resolution (such as resolution 1) user interface image and enlarges it to a high-resolution (such as resolution 2)
  • the user interface image is displayed after decoding the high-resolution (eg resolution 2) video source into a high-resolution video image and then displayed.
  • the display method provided by the embodiment of the present application can realize high-resolution screen display, Solve the problem of insufficient performance of hardware (processor and/or memory, etc.) in high-resolution video playback scenarios in the current industry.
  • the high-resolution user interface image displayed by the terminal device 100 is obtained by enlarging the low-resolution user interface image, and there is a problem that the details of the user interface part in the display screen are blurred and the visual effect is not good.
  • the embodiment of the present application also provides another display method.
  • the terminal device 100 can divide the display screen into a base map of the static part and a user interface image of the dynamic part.
  • Static interface elements the dynamic part of the user interface image only includes dynamic interface elements in all user interfaces in the display screen
  • the terminal device 100 stores a pre-drawn high-resolution base map; the terminal device 100 draws a low-resolution base map that only contains
  • the user interface image of the dynamic interface element is then sent to the display screen 194 to display the composite image of the low-resolution user interface image and the high-resolution base map.
  • Implementing the display method provided by the embodiment of the present application can realize high-resolution interface display.
  • the embodiments of the present application have relatively low hardware performance requirements for processors (such as GPU, CPU) and/or memory, the embodiments of the present application can support the frame rate required for smooth display while realizing high-resolution interface display. And update the display interface quickly in response to the user's input operation.
  • the use of pre-drawn basemaps also effectively reduces the power consumption of high-resolution interface displays.
  • the embodiment of the present application provides two implementation schemes (ie, the following scheme 1 and scheme 2), and the above two implementation schemes are described in detail below.
  • FIG. 5A is a schematic diagram of internal implementation of solution 1 provided in the embodiment of the present application
  • FIG. 5B is a schematic flow diagram of the method of solution 1 provided in the embodiment of the present application. The method includes but not limited to steps S101 to S111.
  • the application layer determines the position and size of the layer of the first user interface in the user interface image with resolution 1. , and the position and size of the first dynamic interface element in the layer of the first user interface, and then draw and render a layer of size 1 corresponding to the dynamic part of the first user interface.
  • the first user interface is any user interface in the above user interface images
  • the first dynamic interface element is any dynamic interface element in the first user interface.
  • the terminal device 100 stores the interface layout of the first user interface, and the interface layout information of the first user interface includes the layer size of the first user interface in the user interface image with resolution 1 (for ease of description, Referred to as size 1), position (referred to as position 1 for convenience of description), transparency and z-order, and the position of the first dynamic interface element of the first user interface in the above layers (referred to as position for convenience of description 2), size (for convenience of description, referred to as size 2 for short), transparency and other information.
  • the terminal device 100 draws the layer of the first user interface, based on the interface layout information of the user interface, the position and size of each dynamic interface element of the first user interface in the layer can be determined, and then the dynamic interface elements of the first user interface can be drawn on the canvas of size 1. For each dynamic interface element of the first user interface, a layer of size 1 corresponding to the dynamic part of the first user interface is generated.
  • the display screen 194 of the terminal device 100 displays the display screen 11 shown in FIG. Touch time and other information) is sent to the input system, and the input system processes the above-mentioned input operation 1 into an original input event, and the original input event is stored in the kernel layer.
  • the input management module obtains the original input event from the kernel layer, and the input management module calls the application management module to determine the user interface of the application program window running in the foreground and the interface layout information of the user interface (such as the user interface 1 of the desktop application), combined with the above interface layout information It is determined that the above original input event is a click event acting on the display area of the wired input source icon 103 .
  • the event management module sends the input event to the window management module.
  • the window management module sends an instruction 1 to the application layer, instructing the application layer to update the display screen to the display screen shown in FIG. 1B .
  • the application layer determines that the base map of the updated display screen is base map 2, and the user interface image corresponding to the dynamic interface elements in the updated display screen, and calls the graphics framework to draw the above user interface image.
  • the display screen shown in FIG. 1B includes a status bar 101 , a desktop application user interface 1 and an input source switching interface 12 .
  • the static interface elements of the status bar 101 may include text 101A
  • the dynamic interface elements of the status bar 101 may include a screen projection device name 101B and an indicator 101C.
  • the static interface elements of the user interface 1 may include a background 102, a wired input source icon 103, a screen projection icon 104, and a setting icon 105
  • the dynamic interface elements of the user interface 1 may include a selection indicator box 107 for a wired input source, and an unselected screen projection icon.
  • the indication box 201 and the unselected indication box 202 of the setting may include text 101A
  • the dynamic interface elements of the status bar 101 may include a screen projection device name 101B and an indicator 101C.
  • the static interface elements of the user interface 1 may include a background 102, a wired input source icon 103, a screen projection icon 104, and a setting icon 105
  • the dynamic interface elements of the user interface 1 may include a selection indicator box 107 for a wired input source, and an unselected screen projection icon.
  • the static interface elements of the switching input source interface 12 may include text 108, the input source 1 icon 109, the input source 2 icon 110 and the input source 3 icon 112, and the dynamic interface elements of the switching input source interface 12 may include an unselected indication of the input source 1 Box 203 , the selected indication box 111 of input source 1 and the unselected indication box 204 of input source 1 . It should be noted that, in one implementation, the selected indicator box 107 and the selected indicator box 111 are visible, while the unselected indicator box 201, the unselected indicator box 202, the unselected indicator box 203, and the unselected indicator box 204 are visible. Invisible.
  • the application layer calls the system process to draw the layer 1 corresponding to the dynamic part of the status bar, and the screen projection application in the application layer responds to the above instruction 1, and draws the user interface 1 of the screen projection application
  • the size and position of layer 1, layer 2 and layer 3 are the same, and the size is equal to the size corresponding to the resolution of the user interface image to be synthesized in the interface synthesis module.
  • the resolution of the user interface image to be synthesized is resolution 1
  • the sizes of layer 1, layer 2 and layer 3 shown in FIG. 6A are all equal to the size corresponding to resolution 1, and layers 1
  • the positions of layer 2 and layer 3 in the user interface image to be synthesized (for example, the position of the upper left corner) are both (0, 0).
  • the sizes and positions of layer 1, layer 2 and layer 3 may be different.
  • the resolution of the user interface image to be synthesized is resolution 1, and the sizes of layer 1, layer 2, and layer 3 shown in FIG.
  • the positions of layer 2 in the user interface image to be combined are (0, 0), and the positions of layer 1 and layer 3 in the user interface image to be combined are not (0, 0).
  • the dotted interface elements represent that the interface element is invisible in the screen displayed by the terminal device 100.
  • the terminal device 100 draws the layer 2 and the layer 3, it may not draw the dotted line interface element, or it may draw the interface element, but set the transparency of the interface element to 100%.
  • the application layer sends the layer data of the layers corresponding to the dynamic parts of the user interfaces in the first display screen to the interface synthesis module of the graphics framework.
  • the interface composition module synthesizes the user interface image 1 with resolution 1 based on the layer data of at least one layer sent by the application layer.
  • the layer data of a layer may include information such as the size, position, transparency, and Z-order of the layer.
  • the compositor When the compositor receives the layer data of at least one layer, the compositor will composite the above-mentioned at least two layers on the canvas with resolution 1 based on the size, position, transparency and Z-order of the above-mentioned at least one layer UI image 1 for resolution 1.
  • the application layer sends the layer data of layer 1, layer 2 and layer 3 to the interface synthesis module of the graphics framework.
  • the interface composition module can determine the display area of each layer on the canvas with resolution 1 based on the size and position of the above-mentioned layer 1, layer 2, and layer 3, and The Z-order of the layer Composite the above layer 1, layer 2 and layer 3 on the canvas of resolution 1 in Z-order order to form user interface image 1 of resolution 1.
  • the transparency of areas other than the effective display area of the dynamic interface elements in the layer corresponding to the dynamic part of each user interface is set to be completely transparent or a preset transparency.
  • the interface synthesis module sends the image cache data of the user interface image 1 with resolution 1 to the image amplifier.
  • the image amplifier enlarges the user interface image 1 with resolution 1 into user interface image 1 with resolution 2, where resolution 2 is greater than resolution 1.
  • the ratio of the number of horizontal pixels between the resolution 2 and the resolution 1 is A, and the ratio of the number of vertical pixels between the resolution 2 and the resolution 1 is B.
  • the resolution 1 is smaller than the resolution of the display screen 194, and the resolution 2 may be equal to or smaller than the resolution of the display screen 194, which is not specifically limited here.
  • A is equal to B, and the image amplifier scales up the user interface image 1 with resolution 1 to the user interface image 1 with resolution 2 in equal proportion.
  • the image amplifier scales up the user interface image 1 with resolution 1 to the user interface image 1 with resolution 2 in equal proportion.
  • the user interface image 1 with resolution 1 is scaled up to the user interface image 1 with resolution 2 in equal proportions.
  • the image amplifier sends the image cache data of the user interface image 1 with resolution 2 to the synthesizer.
  • the application layer In response to the instruction 1 sent by the window management module, the application layer further determines that the base image of the first display screen is the base image 3, and acquires the stored data of the base image 3 with a resolution of 2 from the base image storage module.
  • the application layer sends the stored data of the base image 3 to the image decoder of the media framework.
  • the image decoder decodes the base image 3 with resolution 2 based on the above stored data.
  • the image decoder sends the image buffer data of the base map 3 with resolution 2 to the compositor.
  • the synthesizer generates a composite image based on the above-mentioned user interface image 1 with resolution 2 and the above-mentioned base image 3 with resolution 2, and sends the above-mentioned composite image to the display screen 194.
  • the user interface image 1 is located on the upper layer of the base image 3.
  • the synthesizer determines that the original position and target position of the base image 3 are both (0,0) when the above-mentioned user interface image 1 with resolution 2 is synthesized, and the original size and target size of the synthesized base image 3 are both corresponding to resolution 1. Size; the compositor composites the UI image 1 on top of the basemap 3 based on the original position, target position, original size, and target size above.
  • the user interface image 1 is located on the upper layer of the base image 3, since the transparency of the areas in the user interface image other than the effective display area of the dynamic interface elements are set to be completely transparent or preset transparency , in the image synthesized by the compositor, the area other than the effective display area of the dynamic interface element can display the display content of the base map.
  • the synthesizer synthesizes the user interface image 1 of resolution 2 and the base image 3 of resolution 2 into the display picture shown in FIG. 1B , and sends the display picture to the display screen 194 for further processing.
  • the base map 3 may be the base map 2 shown in FIG. 2B stored in the internal memory.
  • FIG. 7A is a schematic diagram of internal implementation of solution 2 provided in the embodiment of the present application
  • FIG. 7B is a schematic flow diagram of the method of solution 2 provided in the embodiment of the present application. The method includes but not limited to steps S201 to S209.
  • the application layer determines, based on the interface layout of the first user interface in the first display screen, in the user interface image with resolution 2, the first user interface in the layer. Position 3 and size 3 of a dynamic interface element, and then draw and render the layer corresponding to the dynamic part of the first user interface based on the size 3 of the first dynamic interface element, position 3 is the first dynamic interface element between the user interface image and the second -Displays the target position in the screen.
  • the first user interface is any user interface in the above user interface images
  • the first dynamic interface element is any dynamic interface element in the first user interface.
  • the layer size of the first user interface is smaller than the size corresponding to resolution 2.
  • the terminal device 100 when drawing the layer corresponding to the dynamic part of the first user interface, the terminal device 100 first determines the layer at resolution 2 based on the interface layout information of the first user interface.
  • the size of each dynamic interface element of the first user interface in the user interface image For ease of description, in this embodiment of the present application, the position of the first dynamic interface element of the first user interface in the user interface image with resolution 2 may be referred to as position 3 for short, and the position of the first dynamic interface element of the first user interface in the resolution
  • the dimensions in UI images of rate 2 are simply referred to as dimension 3.
  • the application layer can draw the first dynamic interface element of size 3 on the canvas with the specified resolution (or specified size), so that the layer of the specified resolution (or specified size) of the first user interface can be obtained.
  • scheme 2 does not specifically limit the positions of the dynamic interface elements in the layer, as long as the dynamic interface elements do not overlap in the layer.
  • the actual position of the first dynamic interface element of the first user interface in the layer with the specified resolution may be referred to as position 4 for short.
  • the dynamic interface elements are arranged in the upper left corner of the layer in order from left to right without overlapping.
  • the target display resolution of the terminal device 100 is resolution 2
  • the position 3 of the first dynamic interface element of the first user interface in the resolution 2 layer is the second A target position of a dynamic interface element in the first display frame.
  • the specified resolutions of the layers corresponding to the dynamic parts of the user interfaces in the first display screen are the resolutions of the user interface images to be synthesized, that is, resolution 3.
  • Resolution 3 may be a resolution preset by the terminal device 100 that is smaller than resolution 2; or, resolution 3 may be based on the size of all dynamic interface elements in the first display screen of the terminal device 100 (for example, the size of the first dynamic interface element 3) It is determined that the layer corresponding to each user interface can accommodate all the dynamic interface elements of the user interface. In this way, the terminal device 100 can draw the first dynamic interface element of size 3 corresponding to the high-resolution (for example, resolution 2) user interface image on the low-resolution (for example, resolution 3) canvas.
  • the application layer determines the size of all dynamic interface elements (such as the size 3 of the first dynamic interface element) in the status bar, user interface 1 and switching input source interface 12, and then based on all dynamic interface The size of the element determines the resolution 3; then call the system process to draw the dynamic interface elements of the status bar on the canvas of the resolution 3, and generate the layer 4 of the corresponding resolution 3 of the status bar; similarly, the projection in the application layer
  • the screen application draws a layer 5 of resolution 3 corresponding to the dynamic part of the user interface 1 of the screencasting application, and a layer 6 of resolution 3 corresponding to the dynamic part of the switching input source interface 12 .
  • the user interface image to be synthesized has a resolution of 3, and the resolutions of layer 4, layer 5, and layer 6 shown in FIG. 8A are all resolution 3.
  • the size of the dynamic interface element in layer 4 (for example, the size 3 of the first dynamic interface element) is larger than the corresponding dynamic interface in layer 1
  • the size of the element (such as the size 2 of the first dynamic interface element)
  • the element position of each dynamic interface element in layer 4 is not specifically limited (for example, each dynamic interface element in layer 4 can be pressed in the upper left corner of the layer There is no overlapping distribution from left to right), and the position of each dynamic interface element in layer 1 is determined based on the interface layout information of the first user interface.
  • the resolutions of the layers corresponding to the dynamic parts of the user interfaces in the first display screen may be different, and the layers corresponding to the dynamic parts of the user interfaces can accommodate all the dynamic interface elements in the user interface (such as The first dynamic interface element of size 3) is enough.
  • the resolution of the layers of the dynamic part of the first user interface may be preset by the terminal device 100, or may be determined by the terminal device 100 based on the size of the dynamic interface elements in the first user interface (such as the size of the first dynamic interface element). 3) OK.
  • the user interface image to be synthesized has a resolution of 3, and the resolutions of layer 4, layer 5, and layer 6 shown in FIG. 8B are all smaller than or equal to resolution 3.
  • the dotted interface elements in layers 5 and 6 indicate that the interface elements are invisible in the screen displayed by the terminal device 100, and the terminal device 100 may not draw the above-mentioned interface elements when drawing layers 5 and 6.
  • the dotted interface element can also be drawn, but the transparency of the interface element is set to 100%.
  • the application layer sends the layer data of the layers corresponding to the dynamic parts of the user interfaces in the first display screen to the interface composition module of the graphics framework, and the layer data corresponding to the first user interface includes the first dynamic interface elements in Position 4 and size 3 in the layer, and the target position of the first dynamic interface element (that is, position 3).
  • the application layer sends the layer data of layer 4, layer 5 and layer 6 to the interface synthesis module of the graphics framework.
  • the interface synthesis module After receiving the layer data of at least one layer sent by the application layer, the interface synthesis module synthesizes the at least one layer into a user interface image based on the position 4 and size 3 of the first dynamic interface element in the layer 2.
  • the actual position of each dynamic interface element in the above user interface image 2 is position 3, and each dynamic interface element in the above user interface image 2 has no overlap.
  • the interface composition module after receiving the layer data of at least one layer sent by the application program layer, the interface composition module based on the size 3 and position of the first dynamic interface element in the layer of the first user interface 4. Determine the position 5 of the first dynamic interface element in the user interface image 2; then based on the size and position of each dynamic interface element in the user interface image 2 (such as the size 3 and position 5 of the first dynamic interface element), the All the dynamic interface elements of each layer are synthesized into the canvas with resolution 3 to generate user interface image 2 with resolution 3.
  • the position of each dynamic interface element in the user interface image 2 is not specifically limited, as long as the dynamic interface elements do not overlap.
  • the dynamic interface elements in each layer are distributed from left to right in the canvas with a resolution of 3, and then the dynamic interface elements of each layer are arranged in units of layers at a resolution of 3 3 in the canvas from top to bottom.
  • the interface synthesis module synthesizes a user interface image 2 with a resolution of 3 based on the layer data of the above-mentioned layers 3 , 4 , and 5 .
  • the dynamic interface elements of layer 4 (or layer 5, layer 6) in user interface image 2 are distributed in order from left to right in user interface image 2, and the dynamic interface elements of each layer in user interface image 2 are distributed in the user interface image 2.
  • the interface image 2 is distributed in the order of layer 4, layer 5 and layer 6 from top to bottom.
  • the interface synthesis module sends the image buffer data of the user interface image 2 with a resolution of 3 to the synthesizer.
  • the image buffer data includes the size 3 and position 5 of the first dynamic interface element in the user interface image 2, and the first dynamic interface element The target position of the interface element (ie position 3).
  • the application layer In response to the instruction 1 sent by the window management module, the application layer further determines that the base image of the first display screen is base image 3, and acquires the stored data of base image 3 with resolution 2 from the base image storage module.
  • the application layer sends the stored data of the base image 3 to the image decoder of the media framework.
  • the image decoder decodes the base image 3 with resolution 2 based on the above stored data.
  • the image decoder sends the image buffer data of the base image 3 with the resolution 2 to the compositor.
  • the synthesizer synthesizes the image of the display area of each dynamic interface element in the user interface image 2 with a resolution of 3 and the image of the target area of the interface element in the base map 3 into a new image of the target area, thereby generating a resolution of 2
  • the synthesized image (that is, the first display picture) of the above-mentioned synthesized image is sent to the display screen 194 for display.
  • the synthesizer determines the display area of the first dynamic interface element in the user interface image 2 based on the position 5 and size 3 of the first dynamic interface element in the user interface image 2 with a resolution of 3, and obtains the display area of the display area.
  • Image cache data 1; the synthesizer also determines the target area of the first dynamic interface element in the base image 3 based on the target position (ie position 3) and size 3 of the first dynamic interface element in the base image, and obtains the target area
  • the image buffer data 2 of the above image buffer data 2; then the above image buffer data 1 and image buffer data 2 are synthesized into the new image buffer data of the target area. In this way, after the base image 3 is synthesized with all the dynamic interface elements in the user interface image 2, a synthesized image to be displayed is generated.
  • the synthesizer synthesizes the user interface image 2 of resolution 3 and the base image 3 of resolution 2 into the display picture shown in FIG. 1B , and sends the display picture to the display screen 194 for further processing. show.
  • the synthesizer determines the area 1 corresponding to the selected indicator box 111 based on the position 5 and size 3 of the button 111, and obtains the image cache data of the selected indicator box 111 in area 1;
  • the combiner is also based on the position 3 and size 3 of the selected indicator box 111, determines that the target area of the selected indicator box in the base map is area 2, and obtains the image cache data of area 2, area 2 includes the input source 2 icon 110; and then
  • the image buffer data of area 1 and area 2 are synthesized into the image buffer data of the combined image of area 2 , and the combined image of area 2 includes the input source 2 icon 110 and the selected indication box 111 .
  • the display screen 194 can display the input source 2 icon 110 and the selected indication box 111 in the area 2 according to the synthesized image buffer data in the area 2 .
  • the dynamic interface elements of the first user interface can also be formed into a composite control, which is processed as a whole dynamic interface element.
  • the terminal device 100 may store interface layout information related to the composite dynamic interface element, and the terminal device 100 may directly acquire the position and size of the composite dynamic interface element.
  • the terminal device 100 does not store the interface layout information about the compound dynamic interface element, and the terminal device 100 may indirectly acquire the position of the compound dynamic interface element based on the position and size of each dynamic interface element included in the compound dynamic interface element and size.
  • the dynamic interface elements in the switching input source interface 12 form a composite dynamic interface element 301, and the switching input source interface 12
  • the interface layout information does not include the position and size of the compound dynamic interface element 301, and the terminal device 100 can determine that the position of the compound dynamic interface element 301 is the upper left corner position of the upper left corner interface element in the compound dynamic interface element 301, that is, the indicator box 203 is not selected
  • the upper left corner position (a1, b1); and based on the upper left corner position (a1, b1) and the lower right corner position of the lower right corner interface element in the composite dynamic interface element 301 (that is, the lower right corner position (a2, b2)) Determine the size of the compound dynamic interface element 301, that is, (a2-a1) ⁇ (b2-b1). It can be understood that the relative positional relationship of each dynamic interface element in the composite dynamic interface element 301 is determined based on
  • step 201 when the terminal device 100 draws the layer 3 corresponding to the dynamic part of the switching input source interface 12, first, based on the interface layout information of the switching input source interface 12, it is determined that the composite dynamic part in the user interface image with resolution 2 Position 3 and size 3 of interface element 301 . Then, the application layer can draw the composite dynamic interface element 301 of size 3 on the canvas with the specified resolution, so that the layer 3 with the specified resolution of the switching input source interface 12 can be obtained.
  • the actual position of the compound dynamic interface element 301 in layer 3 is the position 4 of the compound dynamic interface element 301 .
  • layers 1 , 2 , and 3 have the same resolution, and the dynamic part of the switching input source interface 12 is drawn on the upper left corner of layer 3 as a composite dynamic interface element 301 .
  • the resolutions of layer 1, layer 2, and layer 3 can be different, and the dynamic part of the switching input source interface 12 is drawn in layer 3 as a composite dynamic interface element 301, and the dynamic part of layer 3
  • the size may be equal to the size of the composite dynamic interface element 301 .
  • step 202 after the interface composition module receives the layer data of layer 3 sent by the application program layer, based on the position 4 and the size 3 of the composite dynamic interface element 301 in layer 3, it is determined that the composite dynamic interface element 301 is in the user interface.
  • FIG. 9B and FIG. 9C For example, reference may be made to the synthesis of user interface images shown in FIG. 9B and FIG. 9C .
  • the composition granularity of this embodiment can be larger, and the layer 3 shown in Fig. Dynamic interface elements are synthesized at a granularity, while layer 3 shown in FIG. 9B and FIG. 9C is synthesized at a granularity of composite dynamic interface elements.
  • Fig. 9A to Fig. 9C are illustrated by switching the input source interface 12 as an example, which does not constitute a limitation to the embodiment of this application, and other user interfaces in the screen to be displayed can also draw layers with the granularity of composite dynamic interface elements and compositing user interface images.
  • the terminal device 100 when the terminal device 100 detects an input operation acting on the display area of the wired input source icon 103, in response to the above input operation, the terminal device 100 displays the 11 displays a wired input source button 107 and an input source switching interface 12 as shown in FIG. 1B .
  • the base map in the display screen in response to the above-mentioned input operation, the base map in the display screen remains unchanged, that is, the base map in the display screen in FIG. 1B is the same as the base map in the display screen in FIG.
  • FIG. 9D exemplarily shows the composite dynamic interface element 302.
  • the composite dynamic interface element 302 also includes the text 108 for switching the input source, the input source 1 icon 109, the input source 2 icon 110, Input source 3 icon 112 and background 113 .
  • FIG. 9A to FIG. 9C For the drawing and composition of the layer 3 corresponding to the switching input source interface 12, reference may be made to the descriptions of the related embodiments in FIG. 9A to FIG. 9C , which will not be repeated here.
  • the terminal device 100 converts the static part of the user interface into a base map, draws the high-resolution base map in advance and stores it, and the terminal device 100 only needs to draw the low-resolution user interface The dynamic part of the interface. In this way, the load and performance requirements on hardware such as CPU, GPU and memory for high-resolution interface refresh are greatly reduced.
  • the application layer in response to the above instruction 1, can draw the low-resolution layer corresponding to the dynamic part of the user interface based on the preset frame rate 1, and based on the preset
  • the frame rate of 2 obtains the base map required for the image to be displayed from the base image storage module; then the compositor can synthesize a high-resolution display image based on frame rate 1.
  • frame rate 2 is smaller than frame rate 1.
  • the application layer obtains the basemap from the basemap storage module at a low frame rate, which can avoid the power consumption and load caused by frequent image decoding, and in turn can further increase the screen refresh rate; on this basis, the application layer high frame rate
  • the layer corresponding to the dynamic part is drawn efficiently, and the combiner synthesizes the display picture at a high frame rate, which can ensure that the terminal device 100 can quickly respond to the user's interactive operation to update the interface.
  • the embodiment of the present application provides the following display method, the display method is applied to the terminal device 100, and the display method includes but not limited to steps S301 to S303. in,
  • the above-mentioned first display screen includes at least one user interface
  • the above-mentioned drawing of the first user interface image with the first resolution corresponding to the first display screen includes: drawing the first user interface image corresponding to the dynamic interface elements of the first user interface A layer, the first user interface is any user interface in the at least one user interface, the resolution of the first layer is less than or equal to the first resolution; the dynamic interface of each user interface in the first display screen
  • the layers corresponding to the elements are synthesized into the first user interface image with the first resolution.
  • the first instruction may be the aforementioned instruction 1.
  • the first instruction may be an input operation acting on the wired input source icon 103 shown in FIG. 1A .
  • the first resolution may be the aforementioned resolution 1
  • the second resolution may be the aforementioned resolution 2
  • the first display screen may be the display screen of resolution 2 shown in FIG.
  • the first base image may be base image 3 of resolution 2 shown in FIG. 6D .
  • the first user interface may be the status bar 101, the user interface 1 or the switching input source interface 12 described in FIG. 1B and FIG. 6D
  • the first layer may be the dynamic interface of the status bar 101
  • the first layer may be the layer 2 corresponding to the dynamic interface element of the user interface 1
  • the first layer may be the layer 3 corresponding to the dynamic interface element of the switching input source interface 12 .
  • the resolutions of layer 1 , layer 2 and layer 3 are smaller than or equal to resolution 1 .
  • drawing the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first image in the first user interface image with the first resolution based on the interface layout of the first user interface
  • the size of the layer is the first size
  • the position of the first layer is the first position
  • the position of the first dynamic interface element in the first layer of the first size is the second position
  • the size of the first dynamic interface element is the second position
  • Two dimensions the first dynamic interface element is any dynamic interface element of the first user interface in the first layer; based on the second position and the second size of the first dynamic interface element, draw the second dynamic interface element on the canvas of the first size
  • a dynamic interface element generating a first layer of a first size corresponding to the dynamic interface element of the first user interface.
  • the first layer may be the layer of the aforementioned first user interface
  • the first position of the first layer may be the aforementioned position 1
  • the first size of the first layer may be the aforementioned Size 1.
  • the second position of the first dynamic interface element may be the aforementioned position 2
  • the second size of the first dynamic interface element may be the aforementioned size 2.
  • the above synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first layer at the first resolution The layer corresponding to the dynamic interface element of each user interface is synthesized into the first user interface image of the first resolution.
  • synthesizing the first display image of the second resolution based on the first user interface image of the first resolution and the first base image of the second resolution includes: combining the first user interface image of the first resolution The user interface image is enlarged to a first user interface image with a second resolution; the first user interface image with a second resolution and the first base image with a second resolution are synthesized into a first display image with a second resolution.
  • the terminal device 100 enlarges the user interface image 1 with resolution 1 to the user interface image 1 with resolution 2, and then enlarges the user interface image 1 with resolution 2 and the bottom image 3 with resolution 2 to form the display screen shown in FIG. 6D .
  • drawing the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first layer in the first user interface image at the second resolution based on the interface layout of the first user interface.
  • the position of the first dynamic interface element in the layer is the third position and the size of the first dynamic interface element is the third size; based on the third size of the first dynamic interface element, draw the first dynamic interface on the canvas of the fourth size element, generate the first layer, there is no overlap between dynamic interface elements in the first layer, and the position of the first dynamic interface element in the first layer is the fourth position.
  • the first instruction may be the aforementioned instruction 1.
  • the first instruction may be an input operation acting on the wired input source icon 103 shown in FIG. 1A .
  • the first resolution may be the aforementioned resolution 3
  • the second resolution may be the aforementioned resolution 2
  • the first display screen may be the display screen of resolution 2 shown in FIG.
  • the first base image may be base image 3 with resolution 2 shown in FIG. 8C .
  • the first user interface may be the status bar 101, user interface 1 and switching input source interface 12 described in FIG. 1B and FIG. 8C
  • the first layer may be the dynamic interface of the status bar 101
  • the first layer may be the layer 5 corresponding to the dynamic interface element of the user interface 1
  • the first layer may be the layer 6 corresponding to the dynamic interface element of the switching input source interface 12 .
  • the resolutions of layer 1 , layer 2 and layer 3 are less than or equal to resolution 3 .
  • the third position of the first dynamic interface element may be the aforementioned position 3
  • the third size of the first dynamic interface element may be the aforementioned size 3
  • the actual position of the first dynamic interface element in the first layer It may be the aforementioned fourth position.
  • the fourth size may be the size of the layer (layer 4, layer 5 or layer 6) shown in FIG. 8A or FIG. 8B, that is, the size corresponding to the aforementioned specified size or specified resolution.
  • the dynamic interface elements of the first user interface in the first layer are sequentially arranged in a first preset order in the first layer.
  • the dynamic interface elements in the layer are distributed in the order from left to right in the upper left corner of the layer without overlapping.
  • the above synthesizing the layer corresponding to the dynamic interface element of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first dynamic interface in the first layer The third size and the fourth position of the interface element determine that the position of the first dynamic interface element in the first user interface image of the first resolution is the fifth position; based on the position of the first dynamic interface element in the first layer in the first The third size and the fifth position in the user interface image are combined into the first user interface image with the first resolution.
  • the fifth position of the first dynamic interface element may be the aforementioned position 5 .
  • the dynamic interface elements of each layer are synthesized into the user interface image 2 .
  • the dynamic interface elements of multiple layers in the first user interface image are sequentially arranged in a second preset order in the first user interface image.
  • the dynamic interface elements of each layer are distributed in the user interface image 2 in the order of layers from top to bottom.
  • synthesizing the first user interface image with the first resolution based on the third size and the fifth position of the first dynamic interface element in the first layer in the first user interface image includes: obtaining the first user interface image The image data of the first area where the first dynamic interface element is located in a layer, the size of the first area is the third size, and the position of the first area is the fourth position; determine the first dynamic interface element in the first user interface image
  • the image data of the second area is the image data of the first area, the size of the second area is the third size, and the position of the second area is the fifth position.
  • synthesizing the first display picture with the second resolution based on the first user interface image with the first resolution and the first base image with the second resolution includes: obtaining the first user interface image in the first user interface image The image data of the second area where a dynamic interface element is located, the size of the second area is the third size, and the position of the second area is the fifth position; the image data of the third area in the first base image is obtained, and the image data of the third area is The size is the third size, and the position of the third area is the third position of the first dynamic interface element; the image data of the second area and the image data of the third area are synthesized into the image data of the third area of the first display screen, A first display image is generated; the size of the third area is a third size, and the position of the third area is a third position.
  • the second area may be the area 1 in the aforementioned user interface image 2
  • the third area may be the area 2 in the aforementioned base image.
  • the interface elements whose display content cannot be changed in the first display screen are static interface elements, and the interface elements whose display content is variable are dynamic interface elements; or, the terminal device runs the first display screen.
  • interface elements whose display content change probability is lower than a preset value in the first display screen are static interface elements, and interface elements whose display content change probability is greater than or equal to a preset value are dynamic interface elements.
  • the drawing of the first user interface image of the first resolution corresponding to the first display picture, and obtaining the first base image of the second resolution of the first display picture include: drawing at the first frame rate The first user interface image of the first resolution corresponding to the first display screen, and obtain the first base map of the second resolution of the first display screen at a second frame rate; the first frame rate is greater than the second frame rate; the above Synthesizing the first display image with the second resolution includes: synthesizing the first display image with the second resolution at the first frame rate.
  • the first frame rate may be the aforementioned frame rate 1
  • the second frame rate may be the aforementioned frame rate 2.
  • the fourth size is smaller than the first size, which is the size of the first layer in the first user interface image at the first resolution.
  • the fourth size for example, the size of layer 4 corresponding to status bar 101
  • the first size for example, the size of layer 4 corresponding to status bar 101 1 size
  • the fourth size is greater than the sum of sizes of all dynamic interface elements of the first user interface in the first user interface image at the second resolution.
  • the fourth size is determined by the terminal device based on the sum of the above sizes.
  • the first dynamic interface element is a single dynamic interface element or a composite dynamic interface element composed of multiple dynamic interface elements.
  • drawing and compositing can be performed at the granularity of composite dynamic interface elements.
  • the unit granularity of drawing and compositing is larger, which can improve the rendering and compositing efficiency of the display picture.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

A display method and a related device. The display method comprises: in response to an instruction sent by a window management module, an application program layer determining, on the basis of the interface layout of a first user interface in a first display picture, the position and size 1 of an image layer of the first user interface in a user interface image having resolution 1, and the position and size of a first dynamic interface element in the image layer of the first user interface, so as to draw and render an image layer of size 1 corresponding to a dynamic part of the first user interface (S101); sending image layer data of the image layer corresponding to the dynamic part of each user interface in the first display picture (S102); synthesizing a user interface image 1 having resolution 1 on the basis of image layer data of at least one image layer sent by the application program layer (S103); sending image cache data of the user interface image 1 having resolution 1 (S104); amplifying the user interface image having resolution 1 to a user interface image 1 having resolution 2, resolution 2 being greater than resolution 1 (S105); sending image cache data of the user interface image 1 having resolution 2 (S106); in response to an instruction 1 sent by the window management module, the application program layer further determining that a base image of the first display picture is base image 3, and acquiring storage data of the base image 3 having resolution 2 from a base image storage module (S107); sending the storage data of the base image 3 (S108); performing decoding on the basis of the storage data to obtain the base image 3 having resolution 2 (S109); sending image cache data of the base image 3 having resolution 2 (S110); and generating a composite image on the basis of the user interface image 1 having resolution 2 and the base image 3 having resolution 2, and sending the composite image to a display screen 194 for display, the user interface image 1 being located above the base image 3 (S111). By implementing the method, smooth and clear high-resolution display can be achieved, the power consumption of high-resolution display is reduced, and the user experience is effectively improved.

Description

显示方法及相关装置Display method and related device
本申请要求于2021年5月19日提交中国专利局、申请号为202110547689.X、申请名称为“一种显示方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。本申请要求于2021年6月30日提交中国专利局、申请号为202110742507.4、申请名称为“显示方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application with application number 202110547689.X and application title "A Display Method and Related Device" filed with the China Patent Office on May 19, 2021, the entire contents of which are hereby incorporated by reference Applying. This application claims the priority of a Chinese patent application with application number 202110742507.4 and application title "Display Method and Related Devices" filed with the China Patent Office on June 30, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及电子技术领域,尤其涉及显示方法及相关装置。The present application relates to the field of electronic technology, in particular to a display method and related devices.
背景技术Background technique
随着智能终端设备的普及和发展,智能终端设备所需的显示屏分辨率越来越高,逐渐向2K分辨率、3K分辨率、4K分辨率、8K分辨率发展。智能终端设备的显示屏分辨率越高,显示的画质就越精细,视频及游戏等应用的视觉效果就越逼真。With the popularization and development of smart terminal devices, the display screen resolution required by smart terminal devices is getting higher and higher, gradually developing towards 2K resolution, 3K resolution, 4K resolution, and 8K resolution. The higher the display resolution of smart terminal equipment, the finer the picture quality displayed, and the more realistic the visual effects of applications such as video and games.
目前,高分辨率的界面显示,存在画面卡顿、图像细节模糊、高功耗等问题。At present, the high-resolution interface display has problems such as picture freezing, blurred image details, and high power consumption.
发明内容Contents of the invention
本申请提供了显示方法及相关装置,实现了流畅且清晰的高分辨率显示,降低高分辨率显示的功耗,有效提高了用户体验。The present application provides a display method and a related device, which realize smooth and clear high-resolution display, reduce power consumption of high-resolution display, and effectively improve user experience.
第一方面,本申请提供了显示方法,应用于终端设备,所述终端设备包括显示屏,包括:响应于第一指令,绘制第一显示画面对应的第一分辨率的第一用户界面图像,并获取第一显示画面的第二分辨率的第一底图;其中,第一指令用于指示终端设备绘制第二分辨率的第一显示画面,第一用户界面图像包括第一显示画面中的动态界面元素,第一底图包括第一显示画面中的静态界面元素,终端设备存储有已绘制的至少一个显示画面的底图,第二分辨率大于第一分辨率;基于第一分辨率的第一用户界面图像和第二分辨率的第一底图,合成第二分辨率的第一显示画面;通过显示屏显示第一显示画面。In a first aspect, the present application provides a display method, which is applied to a terminal device, and the terminal device includes a display screen, including: drawing a first user interface image of a first resolution corresponding to a first display screen in response to a first instruction, And acquire the first base image of the second resolution of the first display image; wherein, the first instruction is used to instruct the terminal device to draw the first display image of the second resolution, and the first user interface image includes the first display image in the first display image Dynamic interface elements, the first base map includes static interface elements in the first display screen, the terminal device stores at least one base map of the display screen that has been drawn, and the second resolution is greater than the first resolution; based on the first resolution The first user interface image and the first base image of the second resolution are synthesized into the first display picture of the second resolution; and the first display picture is displayed through the display screen.
实施本申请实施例,将显示画面分为静态部分的底图和动态部分的用户界面图像,底图包括用显示画面中的静态界面元素,动态部分的用户界面图像仅包含显示画面中所有用户界面中的动态界面元素,终端设备存储有预先绘制好的高分辨率的底图;响应于第一指令,终端设备仅绘制低分辨率的包含动态界面元素的用户界面图像,然后将低分辨率的用户界面图像与高分辨率的底图的合成图像送到显示屏进行显示。实施本申请实施例,能够实现高分辨率的界面显示,有效提高了用户体验。此外,还大幅降低了对处理器和/或内存等硬件的负载和性能要求,有效降低了实时界面显示的功耗。Implement the embodiment of the present application, divide the display screen into the base map of the static part and the user interface image of the dynamic part, the base map includes the static interface elements in the display screen, and the user interface image of the dynamic part only includes all the user interfaces in the display screen The dynamic interface element in the terminal device stores a pre-drawn high-resolution basemap; in response to the first instruction, the terminal device only draws a low-resolution user interface image containing the dynamic interface element, and then converts the low-resolution The composite image of the user interface image and the high-resolution basemap is sent to the display screen for display. Implementing the embodiment of the present application can realize high-resolution interface display and effectively improve user experience. In addition, the load and performance requirements on hardware such as processor and/or memory are greatly reduced, and the power consumption of real-time interface display is effectively reduced.
在一种实现方式中,上述第一显示画面包括至少一个用户界面,上述绘制第一显示画面对应的第一分辨率的第一用户界面图像,包括:绘制第一用户界面的动态界面元素对应的第一图层,第一用户界面是所述至少一个用户界面中的任一用户界面,第一图层的分辨率小于等于第一分辨率;将第一显示画面中的每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像。In an implementation manner, the first display screen includes at least one user interface, and the drawing of the first user interface image with the first resolution corresponding to the first display screen includes: drawing the dynamic interface element corresponding to the first user interface The first layer, the first user interface is any user interface in the at least one user interface, the resolution of the first layer is less than or equal to the first resolution; the dynamics of each user interface in the first display screen The layers corresponding to the interface elements are synthesized into the first user interface image with the first resolution.
在一种实现方式中,上述绘制第一用户界面的动态界面元素对应的第一图层,包括:基于第一用户界面的界面布局,确定在第一分辨率的第一用户界面图像中第一图层的尺寸为第 一尺寸,第一图层的位置为第一位置,在第一尺寸的第一图层中第一动态界面元素的位置为第二位置以及第一动态界面元素的尺寸为第二尺寸,第一动态界面元素为第一图层中的第一用户界面的任一动态界面元素;基于第一动态界面元素的第二位置和第二尺寸,在第一尺寸的画布上绘制第一动态界面元素,生成第一用户界面的动态界面元素对应的第一尺寸的第一图层。In an implementation manner, the drawing of the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first layer in the first user interface image with the first resolution based on the interface layout of the first user interface. The size of the layer is the first size, the position of the first layer is the first position, the position of the first dynamic interface element in the first layer of the first size is the second position and the size of the first dynamic interface element is The second size, the first dynamic interface element is any dynamic interface element of the first user interface in the first layer; based on the second position and second size of the first dynamic interface element, draw on the canvas of the first size The first dynamic interface element generates a first layer of a first size corresponding to the dynamic interface element of the first user interface.
在一种实现方式中,上述将第一显示画面中的每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像,包括:基于第一图层在第一分辨率的第一用户界面图像中的第一位置和第一尺寸,将所述每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像。In an implementation manner, the above synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first layer in the first The first position and the first size in the first user interface image of the resolution, and the layers corresponding to the dynamic interface elements of each user interface are synthesized into the first user interface image of the first resolution.
在一种实现方式中,上述基于第一分辨率的第一用户界面图像和第二分辨率的第一底图,合成第二分辨率的第一显示画面,包括:将第一分辨率的第一用户界面图像放大为第二分辨率的第一用户界面图像;将第二分辨率的第一用户界面图像和第二分辨率的第一底图合成为第二分辨率的第一显示画面。In an implementation manner, the synthesis of the first display image of the second resolution based on the first user interface image of the first resolution and the first base image of the second resolution includes: combining the first user interface image of the first resolution Enlarging a user interface image into a first user interface image with a second resolution; synthesizing the first user interface image with the second resolution and the first base image with the second resolution into a first display image with the second resolution.
在一种实现方式中,上述绘制第一用户界面的动态界面元素对应的第一图层,包括:基于第一用户界面的界面布局,确定在第二分辨率的第一用户界面图像中的第一图层中第一动态界面元素的位置为第三位置以及第一动态界面元素的尺寸为第三尺寸;基于第一动态界面元素的第三尺寸,在第四尺寸的画布上绘制第一动态界面元素,生成第一图层,第一图层中动态界面元素间无重叠,第一动态界面元素在第一图层中的位置为第四位置。In an implementation manner, the drawing of the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first layer in the first user interface image of the second resolution based on the interface layout of the first user interface The position of the first dynamic interface element in a layer is the third position and the size of the first dynamic interface element is the third size; based on the third size of the first dynamic interface element, draw the first dynamic interface on the canvas of the fourth size The interface elements generate the first layer, there is no overlap between the dynamic interface elements in the first layer, and the position of the first dynamic interface element in the first layer is the fourth position.
在一种实现方式中,第一图层中第一用户界面的各动态界面元素在第一图层中按第一预设顺序依次排列。In an implementation manner, the dynamic interface elements of the first user interface on the first layer are sequentially arranged in a first preset order on the first layer.
在一种实现方式中,上述将第一显示画面中的每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像,包括:基于第一图层中第一动态界面元素的第三尺寸和第四位置,确定第一动态界面元素在第一分辨率的第一用户界面图像中的位置为第五位置;基于第一图层中第一动态界面元素在第一用户界面图像中的第三尺寸和第五位置,合成第一分辨率的第一用户界面图像。In an implementation manner, the above synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first The third size and the fourth position of the dynamic interface element determine that the position of the first dynamic interface element in the first user interface image of the first resolution is the fifth position; based on the first dynamic interface element in the first layer at the A third size and a fifth position in a user interface image are synthesized into a first user interface image with a first resolution.
在一种实现方式中,第一用户界面图像中多个图层的动态界面元素在第一用户界面图像中按第二预设顺序依次排列。In an implementation manner, the dynamic interface elements of multiple layers in the first user interface image are sequentially arranged in a second preset order in the first user interface image.
在一种实现方式中,上述基于第一图层中第一动态界面元素在第一用户界面图像中的第三尺寸和第五位置,合成第一分辨率的第一用户界面图像,包括:获取第一图层中第一动态界面元素所在的第一区域的图像数据,第一区域的尺寸为第三尺寸,第一区域的位置为第四位置;确定第一用户界面图像中第一动态界面元素所在的第二区域的图像数据,为第一区域的图像数据,第二区域的尺寸为第三尺寸,第二区域的位置为第五位置。In an implementation manner, synthesizing the first user interface image with the first resolution based on the third size and the fifth position of the first dynamic interface element in the first layer in the first user interface image includes: obtaining The image data of the first area where the first dynamic interface element is located in the first layer, the size of the first area is the third size, and the position of the first area is the fourth position; determine the first dynamic interface in the first user interface image The image data of the second area where the element is located is the image data of the first area, the size of the second area is the third size, and the position of the second area is the fifth position.
在一种实现方式中,上述基于第一分辨率的第一用户界面图像和第二分辨率的第一底图,合成第二分辨率的第一显示画面,包括:获取第一用户界面图像中第一动态界面元素所在的第二区域的图像数据,第二区域的尺寸为第三尺寸,第二区域的位置为第五位置;获取第一底图中第三区域的图像数据,第三区域的尺寸为第三尺寸,第三区域的位置为第一动态界面元素的第三位置;将第二区域的图像数据和第三区域的图像数据合成为第一显示画面的第三区域的图像数据,生成第一显示画面;第三区域的尺寸为第三尺寸,第三区域的位置为第三位置。In an implementation manner, synthesizing the first display picture with the second resolution based on the first user interface image with the first resolution and the first base map with the second resolution includes: obtaining the first user interface image in the first user interface image The image data of the second area where the first dynamic interface element is located, the size of the second area is the third size, and the position of the second area is the fifth position; obtain the image data of the third area in the first base image, the third area The size of is the third size, and the position of the third area is the third position of the first dynamic interface element; the image data of the second area and the image data of the third area are synthesized into the image data of the third area of the first display screen , to generate the first display screen; the size of the third area is the third size, and the position of the third area is the third position.
在一种实现方式中,终端设备运行第一显示画面时,第一显示画面中显示内容不可变的 界面元素为静态界面元素,显示内容可变的界面元素为动态界面元素;或者,终端设备运行第一显示画面时,第一显示画面中显示内容的变化概率低于预设值的界面元素为静态界面元素,显示内容的变化概率大于等于预设值的界面元素为动态界面元素。In one implementation, when the terminal device runs the first display screen, the interface elements whose display content is not changeable in the first display screen are static interface elements, and the interface elements whose display content is variable are dynamic interface elements; or, the terminal device runs When the first display screen is displayed, interface elements whose display content change probability is lower than a preset value in the first display screen are static interface elements, and interface elements whose display content change probability is greater than or equal to a preset value are dynamic interface elements.
在一种实现方式中,上述绘制第一显示画面对应的第一分辨率的第一用户界面图像,并获取第一显示画面的第二分辨率的第一底图,包括:以第一帧率绘制第一显示画面对应的第一分辨率的第一用户界面图像,并以第二帧率获取第一显示画面的第二分辨率的第一底图;第一帧率大于第二帧率;上述合成第二分辨率的第一显示画面,包括:以第一帧率合成第二分辨率的第一显示画面。In an implementation manner, the drawing of the first user interface image of the first resolution corresponding to the first display screen and obtaining the first base image of the second resolution of the first display screen include: using the first frame rate Draw the first user interface image of the first resolution corresponding to the first display picture, and acquire the first base map of the second resolution of the first display picture at the second frame rate; the first frame rate is greater than the second frame rate; The above synthesizing the first display image with the second resolution includes: synthesizing the first display image with the second resolution at the first frame rate.
在一种实现方式中,第四尺寸小于第一尺寸,第一尺寸为在第一分辨率的第一用户界面图像中第一图层的尺寸。In one implementation manner, the fourth size is smaller than the first size, which is the size of the first layer in the first user interface image at the first resolution.
相比传统的图层绘制,实时本申请实施例,通过降低所绘制的图层的尺寸,能够进一步降低绘制用户界面图像的性能要求和功耗。Compared with traditional layer drawing, in the embodiment of the present application, by reducing the size of the drawn layer, performance requirements and power consumption for drawing user interface images can be further reduced.
在一种实现方式中,第四尺寸,大于在第二分辨率的第一用户界面图像中的第一用户界面的所有动态界面元素的尺寸之和。In an implementation manner, the fourth size is greater than the sum of sizes of all dynamic interface elements of the first user interface in the first user interface image of the second resolution.
在一种实现方式中,第四尺寸是终端设备基于上述尺寸之和确定的。In an implementation manner, the fourth size is determined by the terminal device based on the sum of the foregoing sizes.
在一种实现方式中,第一动态界面元素是单个动态界面元素或由多个动态界面元素组成的复合动态界面元素。In one implementation manner, the first dynamic interface element is a single dynamic interface element or a composite dynamic interface element composed of multiple dynamic interface elements.
实时本申请实施例,能够以复合动态界面元素为粒度进行绘制和合成。这样,绘制和合成的单元粒度更大,能够提高显示画面的绘制和合成效率。In this embodiment of the present application, drawing and compositing can be performed at the granularity of composite dynamic interface elements. In this way, the unit granularity of drawing and compositing is larger, which can improve the rendering and compositing efficiency of the display picture.
第二方面,本申请提供了一种终端设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得终端设备执行上述任一方面任一项可能的实现方式中的显示方法。In a second aspect, the present application provides a terminal device, including one or more processors and one or more memories. The one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the terminal device executes A display method in any possible implementation manner of any one of the above aspects.
第三方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在终端设备上运行时,使得终端设备执行上述任一方面任一项可能的实现方式中的显示方法。In a third aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are run on a terminal device, the terminal device is made to execute the display method in any possible implementation of any one of the above aspects.
第四方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一方面任一项可能的实现方式中的显示方法。In a fourth aspect, an embodiment of the present application provides a computer program product, which, when the computer program product is run on a computer, causes the computer to execute the display method in any possible implementation manner of any one of the above aspects.
附图说明Description of drawings
图1A至图1C为本申请实施例提供的一种应用场景的用户界面示意图;FIG. 1A to FIG. 1C are schematic diagrams of a user interface of an application scenario provided by an embodiment of the present application;
图2A为本申请实施例提供的一种终端设备的结构示意图;FIG. 2A is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
图2B为本申请实施例提供的一种底图存储示意图;FIG. 2B is a schematic diagram of a base map storage provided by the embodiment of the present application;
图3为本申请实施例提供的一种软件系统架构的示意图;FIG. 3 is a schematic diagram of a software system architecture provided by an embodiment of the present application;
图4为本申请实施例提供的一种显示方法的内部实现示意图;FIG. 4 is a schematic diagram of the internal implementation of a display method provided by the embodiment of the present application;
图5A为本申请实施例提供的另一种显示方法的内部实现示意图;FIG. 5A is a schematic diagram of the internal implementation of another display method provided by the embodiment of the present application;
图5B为本申请实施例提供的另一种显示方法的流程示意图;FIG. 5B is a schematic flowchart of another display method provided by the embodiment of the present application;
图6A为本申请实施例提供的一种用户界面的动态部分对应的图层示意图;FIG. 6A is a schematic diagram of a layer corresponding to a dynamic part of a user interface provided in an embodiment of the present application;
图6B为本申请实施例提供的另一种用户界面的动态部分对应的图层示意图;FIG. 6B is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application;
图6C为本申请实施例提供的一种图层放大示意图;FIG. 6C is an enlarged schematic diagram of a layer provided in the embodiment of the present application;
图6D为本申请实施例提供的一种图层和底图的合成示意图;FIG. 6D is a composite schematic diagram of a layer and a base map provided by the embodiment of the present application;
图7A为本申请实施例提供的另一种显示方法的内部实现示意图;FIG. 7A is a schematic diagram of the internal implementation of another display method provided by the embodiment of the present application;
图7B为本申请实施例提供的另一种显示方法的流程示意图;FIG. 7B is a schematic flowchart of another display method provided by the embodiment of the present application;
图8A为本申请实施例提供的另一种用户界面的动态部分对应的图层示意图;FIG. 8A is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application;
图8B为本申请实施例提供的另一种用户界面的动态部分对应的图层示意图;FIG. 8B is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application;
图8C为本申请实施例提供的另一种图层和底图的合成示意图;Fig. 8C is a composite schematic diagram of another layer and base map provided by the embodiment of the present application;
图9A为本申请实施例提供的一种复合动态界面元素的示意图;Fig. 9A is a schematic diagram of a composite dynamic interface element provided by the embodiment of the present application;
图9B为本申请实施例提供的另一种用户界面的动态部分对应的图层示意图;FIG. 9B is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application;
图9C为本申请实施例提供的另一种用户界面的动态部分对应的图层示意图;FIG. 9C is a schematic diagram of layers corresponding to the dynamic part of another user interface provided by the embodiment of the present application;
图9D为本申请实施例提供的另一种复合动态界面元素的示意图。FIG. 9D is a schematic diagram of another compound dynamic interface element provided by the embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. Among them, in the description of the embodiments of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in the text is only a description of associated objects The association relationship indicates that there may be three kinds of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiment of the present application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
首先对本申请实施例涉及的技术概念进行介绍。First, the technical concepts involved in the embodiments of the present application are introduced.
显示屏分辨率:指显示屏本身的物理分辨率,通常用显示屏中显示面板上的“水平像素数X垂直像素数”的形式表示,例如,800×600的分辨率是指在显示屏上每行可以水平显示800个像素,每列垂直显示600个像素。Display resolution: refers to the physical resolution of the display itself, usually expressed in the form of "horizontal pixels X vertical pixels" on the display panel in the display, for example, the resolution of 800×600 refers to the Each row can display 800 pixels horizontally, and each column can display 600 pixels vertically.
图像分辨率:指图像中存储的信息量。图像分辨率有多种衡量方法,在衡量方式1中,图像分辨率通过图片中的像素数来衡量,以图片中“水平像素数X垂直像素数”的形式表示。在衡量方式2中,图像分辨率通过每英寸的像素数(PPI,pixel per inch)或者每厘米的像素数(PPC,pixel per centimeter)来衡量。本申请实施例中,以衡量方式1为例进行说明。可以理解,衡量方式1中,图像的图像分辨率也可以对应该图像的尺寸,即水平像素数为该图像的宽,垂直像素数为该图像的高。Image Resolution: Refers to the amount of information stored in an image. There are many measurement methods for image resolution. In measurement method 1, image resolution is measured by the number of pixels in the picture, expressed in the form of "number of horizontal pixels X number of vertical pixels" in the picture. In measurement method 2, the image resolution is measured by the number of pixels per inch (PPI, pixel per inch) or the number of pixels per centimeter (PPC, pixel per centimeter). In the embodiment of the present application, measurement method 1 is taken as an example for description. It can be understood that in measurement method 1, the image resolution of an image may also correspond to the size of the image, that is, the number of horizontal pixels is the width of the image, and the number of vertical pixels is the height of the image.
需要说明的是,本申请涉及的2K分辨率、3K分辨率、4K分辨率和8K分辨率等nK分辨率是指水平方向每行像素数接近n倍的1024,或者总像素量接近nK分辨率图像的预设像素量。例如,总像素量接近4K图像的8847360个像素量的分辨率也可以称作4K分辨率。因此,nK分辨率可以有多种规格,例如,现有的4K分辨率包括4096×2160、3656*2664、3840*2160等分辨率。后续实施例涉及的4K分辨率均以4096×2560分辨率为例,2K分辨率均以2560x1440分辨率为例,本申请对此不做限制。It should be noted that nK resolutions such as 2K resolution, 3K resolution, 4K resolution, and 8K resolution involved in this application refer to the number of pixels in each row in the horizontal direction being close to n times 1024, or the total number of pixels is close to nK resolution The preset pixel amount of the image. For example, a resolution whose total number of pixels is close to 8,847,360 pixels of a 4K image may also be referred to as 4K resolution. Therefore, the nK resolution can have various specifications. For example, the existing 4K resolution includes 4096×2160, 3656*2664, 3840*2160 and other resolutions. The 4K resolution involved in the subsequent embodiments takes 4096×2560 resolution as an example, and the 2K resolution takes 2560×1440 resolution as an example, which is not limited in this application.
用户界面(user interface,UI),用户界面是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。User interface (user interface, UI), the user interface is the medium interface for interaction and information exchange between the application program or operating system and the user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is the source code written in a specific computer language such as java and extensible markup language (XML). The source code of the interface is parsed and rendered on the electronic device, and finally presented as content that can be recognized by the user.
控件(control)是用户界面的基本的界面元素,控件可以是对数据和方法的封装,控件可以有自己的属性和方法。例如,控件的类型可以包括但不限于:用户界面控件(用于开发构 建用户界面的控件)、图表控件(用于开发图表的控件,可以实现数据可视化等)、报表控件(用与开发报表的控件,实现报表的浏览查看、设计、编辑、打印等功能)、表格控件(用于开发表格(cell)的控件,实现网格中数据处理和操作的功能)、多个控件成的复合控件等。A control is a basic interface element of a user interface. A control can encapsulate data and methods, and a control can have its own properties and methods. For example, the types of controls may include, but are not limited to: user interface controls (controls used to develop and build user interfaces), chart controls (controls used to develop charts, which can realize data visualization, etc.), report controls (used to develop reports) Controls, which realize the functions of browsing, designing, editing, printing, etc. of reports), table controls (controls used to develop tables (cells), and realize the functions of data processing and operation in grids), composite controls formed by multiple controls, etc. .
本申请实施例中,控件可以包括但不限于:窗口(window)、滚动条(scrollbar)、表格视图(tableview)、按钮(button)、菜单栏(menu bar)、文本框(text box)、导航栏、工具栏(toolbar)、图像(lmage)、静态文本(tatictext)、部件(Widget)等可视的界面元素。In the embodiment of the present application, controls may include but not limited to: window, scroll bar, table view, button, menu bar, text box, navigation Bars, toolbars (toolbar), images (lmage), static text (tatictext), components (Widget) and other visual interface elements.
可选的,响应于用户作用于控件的用户输入,终端设备可以执行该控件对应的响应事件,例如,终端设备的主界面显示有视频应用的图标1,响应于用户作用于图标1的用户输入,终端设备从当前用户界面切换到视频应用的用户界面。Optionally, in response to the user input that the user acts on the control, the terminal device may execute the response event corresponding to the control. For example, the main interface of the terminal device displays the icon 1 of the video application, and in response to the user input that the user acts on the icon 1 , the terminal device switches from the current user interface to the user interface of the video application.
应用程序窗口:应用程序窗口可以是Android系统中的应用程序窗口,还可是IOS系统中的应用程序窗口,还可以是其他操作系统中的应用程序窗口,此处不作具体限定。本申请实施例中应用程序窗口可以简称为窗口。一个应用包括多个应用程序窗口,一个应用程序窗口对应一个或多个用户界面。The application program window: the application program window may be an application program window in the Android system, an application program window in the IOS system, or an application program window in other operating systems, which is not specifically limited here. In this embodiment of the present application, the application program window may be referred to as a window for short. An application includes multiple application windows, and one application window corresponds to one or more user interfaces.
图层:通常终端设备100显示的图层主要有三种,即状态栏、导航栏以及应用程序窗口对应的用户界面。本申请实施例中,可以将状态栏和导航栏分别作为桌面应用的一个用户界面,终端设备100可以绘制和渲染前台运行的应用程序窗口对应的至少一个图层,并将上述至少一个图层进行合成后送显到显示屏。Layers: Generally, there are mainly three types of layers displayed by the terminal device 100 , namely, a status bar, a navigation bar, and a user interface corresponding to an application window. In the embodiment of the present application, the status bar and the navigation bar can be respectively used as a user interface of the desktop application, and the terminal device 100 can draw and render at least one layer corresponding to the application window running in the foreground, and perform the above-mentioned at least one layer After synthesis, it is sent to the display screen.
图层的尺寸:指该图层在显示屏上显示时所占区域的大小,通常用图层的宽(如水平像素数)和高(如垂直像素数)这两个参数来表征。Layer size: refers to the size of the area occupied by the layer when it is displayed on the display screen, and is usually characterized by two parameters: the width (such as the number of horizontal pixels) and the height (such as the number of vertical pixels) of the layer.
图层的位置:指该图层在显示屏上的显示位置,通常用图层左上角或左下角在显示屏上的显示坐标来表征。上述显示坐标通常为像素坐标,例如,图层左上角的像素坐标为(50,100)。可以理解,基于图层的尺寸和位置,可以确定该图层在显示屏上的显示区域。Layer position: refers to the display position of the layer on the display screen, usually represented by the display coordinates of the upper left corner or lower left corner of the layer on the display screen. The above display coordinates are usually pixel coordinates, for example, the pixel coordinates of the upper left corner of the layer are (50,100). It can be understood that based on the size and position of the layer, the display area of the layer on the display screen can be determined.
图层的透明度:指图层的透明程度,影响该图层与其他图层重叠显示的视觉效果,通常用参数Alpha表示。在一种实现方式中,Alpha取值范围为0至100%,当Alpha取值为0时,该图层是完全透明的(即视觉上该图层是不可见的),而当Alpha取值为100%时,则该图层是不透明的。Transparency of a layer: refers to the degree of transparency of a layer, which affects the visual effect of overlapping display of this layer with other layers, usually represented by the parameter Alpha. In one implementation, the value of Alpha ranges from 0 to 100%. When the value of Alpha is 0, the layer is completely transparent (that is, the layer is invisible visually), and when the value of Alpha is At 100%, the layer is opaque.
图层的顺序:图层的顺序通常用Z轴顺序(Z-order)来表征。Z轴指垂直于显示屏的平面方向的参考轴,不同的图层按照在Z轴上的坐标来确定显示的前后顺序,这个顺序就叫做Z-order。在一种实现方式中,图层的Z-order越小,表示图层在显示时越靠上。在多窗口同时显示的应用场景中,窗口1对应的图层的Z轴顺序小于窗口2对应的图层的Z-order,当窗口1和窗口2的显示区域重叠显示时,窗口1的图层位于窗口2的图层的上层,若窗口1的图层是不透明的,窗口1的图层会遮挡窗口2的图层。在另一种实现方式中,图层的Z-order越大,表示图层在显示时越靠上。Layer order: The order of layers is usually characterized by Z-order. The Z axis refers to the reference axis perpendicular to the plane direction of the display screen. Different layers determine the front and rear order of display according to the coordinates on the Z axis. This order is called Z-order. In an implementation manner, the smaller the Z-order of the layer, the higher the layer is displayed. In the application scenario where multiple windows are displayed at the same time, the Z-order of the layer corresponding to window 1 is smaller than the Z-order of the layer corresponding to window 2. When the display areas of window 1 and window 2 overlap and display, the layer of window 1 Located on the upper layer of the window 2 layer, if the window 1 layer is opaque, the window 1 layer will block the window 2 layer. In another implementation manner, the larger the Z-order of the layer, the higher the layer is displayed.
本申请实施例中,用户界面元素的尺寸、位置和透明度,可以参考图层的尺寸、位置和透明度的相关描述,此处不再赘述。In the embodiment of the present application, the size, position and transparency of the user interface elements can refer to the related description of the size, position and transparency of the layer, and will not be repeated here.
帧率:每秒钟内能够渲染的帧图像数量,取决于终端设备100硬件的渲染能力。屏幕刷新率指显示屏在每秒钟能刷新显示的次数。终端设备100的帧率大于屏幕刷新率时,可能导致画面异常,通过垂直同步技术可以使得实际帧率不超过屏幕刷新率。具体的,在垂直同步(Vertical Synchronization,VSYNC)信号到来后,CPU和/或GPU对用户界面的显示内容进行 绘制、合成和渲染,并把渲染结果提交到帧缓冲区。下一次VSYNC信号到来时,终端设备100按照VSYNC信号逐行读取帧缓冲区的数据,并传递给显示屏进行显示。Frame rate: the number of frame images that can be rendered per second depends on the rendering capability of the hardware of the terminal device 100 . The screen refresh rate refers to the number of times the display can be refreshed per second. When the frame rate of the terminal device 100 is higher than the screen refresh rate, it may cause an abnormal picture, and the vertical synchronization technology can make the actual frame rate not exceed the screen refresh rate. Specifically, after the vertical synchronization (Vertical Synchronization, VSYNC) signal arrives, the CPU and/or GPU draws, synthesizes and renders the display content of the user interface, and submits the rendering result to the frame buffer. When the VSYNC signal arrives next time, the terminal device 100 reads the data in the frame buffer line by line according to the VSYNC signal, and transmits the data to the display screen for display.
下面通过图1A和图1B对本申请提供的显示方法的应用场景进行示例性说明。The application scenarios of the display method provided by the present application will be described as examples below with reference to FIG. 1A and FIG. 1B .
示例性的,图1A和图1B所示的终端设备100的显示屏的分辨率为4K分辨率。Exemplarily, the resolution of the display screen of the terminal device 100 shown in FIG. 1A and FIG. 1B is 4K resolution.
如图1A所示,是本申请实施例提供的一种示例性的显示画面11,显示画面11可以包括状态栏101和桌面应用的用户界面1,用户界面1包括背景图102、有线输入源图标103、投屏图标104和设置图标105。其中:As shown in FIG. 1A, it is an exemplary display screen 11 provided by the embodiment of the present application. The display screen 11 may include a status bar 101 and a user interface 1 of a desktop application. The user interface 1 includes a background image 102 and a wired input source icon. 103 , a screen casting icon 104 and a setting icon 105 . in:
状态栏101可以包括:投屏设备文本101A、投屏设备名称101B和无线高保真(wireless fidelity,Wi-Fi)信号的一个或多个信号强度指示符101C。The status bar 101 may include: a screen projection device text 101A, a screen projection device name 101B, and one or more signal strength indicators 101C for a wireless fidelity (Wi-Fi) signal.
有线输入源图标103可以接收输入操作(例如触摸操作、通过遥控器发送的选择指令),响应于检测到的输入操作,终端设备100可以显示多个有线输入源的选择控件。The wired input source icon 103 may receive an input operation (such as a touch operation, a selection instruction sent by a remote controller), and in response to the detected input operation, the terminal device 100 may display multiple selection controls for wired input sources.
投屏图标104可以接收输入操作(例如触摸操作、通过遥控器发送的选择指令),响应于检测到的输入操作,终端设备100可以显示无线投屏功能的教程。The screen projection icon 104 may receive an input operation (such as a touch operation, a selection instruction sent by a remote controller), and in response to the detected input operation, the terminal device 100 may display a tutorial of the wireless screen projection function.
设置图标105可以接收输入操作(例如触摸操作、通过遥控器发送的选择指令),响应于检测到的该输入操作,终端设备100可以显示投屏的设置界面。The setting icon 105 may receive an input operation (such as a touch operation, a selection instruction sent by a remote controller), and in response to the detected input operation, the terminal device 100 may display a screen projection setting interface.
示例性的,当终端设备100检测到作用于有线输入源图标103的显示区域的输入操作,响应于上述输入操作,终端设备100在显示画面11上显示如图1B所示的有线输入源的选中指示框107和切换输入源界面12,切换输入源界面12可以包括切换输入源的文本108、输入源1图标109、输入源2图标110、输入源2的选中指示框111、输入源3图标112和背景113。Exemplarily, when the terminal device 100 detects an input operation acting on the display area of the wired input source icon 103, in response to the above input operation, the terminal device 100 displays on the display screen 11 the selection of the wired input source as shown in FIG. 1B Indication box 107 and switching input source interface 12, switching input source interface 12 may include switching input source text 108, input source 1 icon 109, input source 2 icon 110, input source 2 selection indicator box 111, input source 3 icon 112 and background 113.
其中,选中指示框111用于指示输入源2图标110被选中。输入源2图标110被选中,表征终端设备选择USB-C连接的设备(例如“HUAWEI P40”)作为投屏输入。示例性的,输入源2的选中指示框111可以接收用户的确认操作(例如触摸操作、通过遥控器发送的确认指令),响应于检测到的确认操作,终端设备100可以显示图1C所示的USB-C连接的设备的投屏内容(即图1C所示的用户界面2),并修改投屏设备名称101B的内容为“HUAWEI P40”。不限于用户界面2,上述投屏内容还可以为其他用户界面,此处不做具体限定。Wherein, the selected indication box 111 is used to indicate that the input source 2 icon 110 is selected. The input source 2 icon 110 is selected, which means that the terminal device selects a USB-C connected device (for example, "HUAWEI P40") as the screen projection input. Exemplarily, the selected indication box 111 of the input source 2 may receive a user's confirmation operation (such as a touch operation, a confirmation instruction sent by a remote control), and in response to the detected confirmation operation, the terminal device 100 may display the The content of the screen projection of the device connected by USB-C (that is, the user interface 2 shown in Figure 1C), and modify the content of the screen projection device name 101B to "HUAWEI P40". It is not limited to the user interface 2, and the above screen projection content may also be other user interfaces, which are not specifically limited here.
需要说明的是,图1A和图1B是本申请实施例中提供的示例性的用户界面,不对本申请实施例构成限定,图1A和图1B所示的用户界面可以包括更少或更多控件。可选的,图1A和图1B所示的用户界面也可以不包括状态栏,投屏设备文本101A、投屏设备名称101B和信号强度指示符101C是用户界面1中的控件。It should be noted that FIG. 1A and FIG. 1B are exemplary user interfaces provided in the embodiments of the present application, and do not limit the embodiments of the present application. The user interfaces shown in FIG. 1A and FIG. 1B may include fewer or more controls . Optionally, the user interface shown in FIG. 1A and FIG. 1B may not include a status bar, and the screen projection device text 101A, the screen projection device name 101B and the signal strength indicator 101C are controls in the user interface 1 .
参见图1A和图1B,若终端设备100按4K分辨率渲染待显示的图像并显示,会存在功耗高,终端设备100显示的画面卡顿,不能快速响应用户的输入操作以显示图1B所示的用户界面等问题,当终端设备100的处理器和/或内存的性能不足以支持4K分辨率界面的流畅显示时,上述问题会严重影响终端设备100的显示效果。若终端设备100利用现有的硬件放大的方案,即先按低分辨率(例如2K分辨率)渲染待显示的画面,然后将2K分辨率的图像画面放大到4K分辨率后再显示,会导致视觉上图像细节模糊,显示效果不好。Referring to FIG. 1A and FIG. 1B, if the terminal device 100 renders the image to be displayed at 4K resolution and displays it, there will be high power consumption, the picture displayed by the terminal device 100 freezes, and it cannot quickly respond to the user's input operation to display the image shown in FIG. 1B. If the performance of the processor and/or memory of the terminal device 100 is not enough to support the smooth display of the 4K resolution interface, the above problems will seriously affect the display effect of the terminal device 100. If the terminal device 100 utilizes the existing hardware magnification scheme, that is, first renders the picture to be displayed at a low resolution (for example, 2K resolution), and then enlarges the 2K resolution image picture to 4K resolution before displaying, it will cause Visually, the image details are blurred and the display effect is not good.
而通过本申请实施例提供的显示方法,降低了对处理器(例如CPU和GPU)的硬件性能要求和功耗,在实现高分辨率的界面显示的同时,提升了界面显示的精细度,能够支持流畅显示所需的帧率(例如60帧每秒(fps)),以及快速响应用户的输入操作而更新显示界面,从而有效提高了用户的视觉体验和使用体验。However, the display method provided by the embodiment of the present application reduces the hardware performance requirements and power consumption of the processor (such as CPU and GPU), and improves the fineness of the interface display while realizing high-resolution interface display. The frame rate required for smooth display (for example, 60 frames per second (fps)) is supported, and the display interface is updated in response to the user's input operation quickly, thereby effectively improving the user's visual experience and user experience.
下面对本申请实施例的具体实施方式进行详细介绍。The specific implementation manner of the embodiment of the present application will be described in detail below.
示例性的,图2A为本申请实施例提供的一种终端设备100的结构示意图。Exemplarily, FIG. 2A is a schematic structural diagram of a terminal device 100 provided in an embodiment of the present application.
终端设备100可以是搭载iOS、Android、Microsoft或者其它操作系统的终端设备。示例性的,终端设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及投屏显示设备、蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备(例如智能电视机、)和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。The terminal device 100 may be a terminal device equipped with iOS, Android, Microsoft or other operating systems. Exemplarily, the terminal device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, and a projection display device , cellular phone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, Vehicle-mounted devices, smart home devices (such as smart TVs), and/or smart city devices, the embodiment of the present application does not specifically limit the specific type of the electronic devices.
终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
其中,图示的部分部件(例如处理器110、内部存储器121)可以集成在一个片上系统(System-On-Chip,SOC)中。Wherein, some components shown in the figure (for example, the processor 110 and the internal memory 121 ) may be integrated into a system-on-chip (System-On-Chip, SOC).
可以理解的是,本发明实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure shown in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100 . In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,中央处理器(central processing unit,CPU),图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a central processing unit (central processing unit, CPU), a graphics processor ( graphics processing unit (GPU), image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface, MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号解调以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may 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, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以 实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the terminal device 100 can be realized through the NPU, such as: image recognition, face recognition, speech recognition, text understanding, etc.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM).
随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5SDRAM)等;非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.; non-volatile memory can include disk storage devices, flash memory (flash memory).
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universal flash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。According to the operating principle, flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. According to the potential order of storage cells, it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), triple-level cell (TLC), quad-level cell (QLC), etc., can include universal flash storage (English: universal flash storage, UFS) according to storage specifications , embedded multimedia memory card (embedded multi media Card, eMMC), etc.
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other running programs, and can also be used to store data of users and application programs.
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory can also store executable programs and data of users and application programs, etc., and can be loaded into the random access memory in advance for the processor 110 to directly read and write.
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展终端设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。The external memory interface 120 may be used to connect an external non-volatile memory, so as to expand the storage capacity of the terminal device 100 . The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external non-volatile memory.
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device 100 may implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。 Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
在一些实施例中,终端设备100的内部存储器121(例如非易失性存储器)还用于存储终端设备100的至少一个显示画面对应的已绘制的预设分辨率的图片(为便于描述,本申请实施例将该图片简称为底图)。上述显示画面包括至少一个用户界面,当上述显示画面包括至少两个用户界面时,上述至少一个用户界面中任意两个用户界面可以无重叠或部分重叠。终端设备100将用户界面中的界面元素划分为静态的和动态的,底图中显示的界面元素包括上述至少一个用户界面的可视区域的静态界面元素。此外,上述预设分辨率小于等于终端设备100的显示屏分辨率。In some embodiments, the internal memory 121 (such as a non-volatile memory) of the terminal device 100 is also used to store a drawn picture with a preset resolution corresponding to at least one display screen of the terminal device 100 (for ease of description, this In the embodiment of the application, this picture is referred to as the base picture for short). The display screen includes at least one user interface. When the display screen includes at least two user interfaces, any two user interfaces in the at least one user interface may have no overlap or partial overlap. The terminal device 100 divides the interface elements in the user interface into static and dynamic, and the interface elements displayed in the base map include the static interface elements in the visible area of at least one user interface. In addition, the aforementioned preset resolution is smaller than or equal to the resolution of the display screen of the terminal device 100 .
本申请实施例中,静态界面元素指用户界面运行时显示内容变化可能性较低的(或不可变的)界面元素,例如背景(如图1A所示的背景102、背景113)、固定文本(如图1A所 示的文本101A)、图标等(如图1A所示的图标103、图1B所示的图标109);动态界面元素指用户界面运行时显示内容变化可能性较高的(或可变的)界面元素,例如选中指示框(如图1B所示的选中指示框107和选中指示框111)、显示图标可变的控件(如图1A所示的指示符101C),可变的输入文本(如图1B所示的投屏设备名称101B)等等。In this embodiment of the present application, static interface elements refer to interface elements whose display content is less likely to change (or immutable) when the user interface is running, such as background (background 102, background 113 as shown in FIG. 1A ), fixed text ( Text 101A) as shown in Figure 1A), icon etc. (icon 103 as shown in Figure 1A, the icon 109 shown in Figure 1B); Dynamic interface element refers to that the display content change possibility is higher when user interface runs (or can be variable) interface elements, such as a selected indicator box (selected indicator box 107 and selected indicator box 111 as shown in Figure 1B), a control with variable display icons (indicator 101C as shown in Figure 1A), variable input text (the screen projection device name 101B as shown in FIG. 1B ) and so on.
示例性的,如图2B所示,在图1A和图1B所示的应用场景中,终端设备100的内部存储器121存储有预先绘制好的4K分辨率的底图1和底图2,底图1包括图1A所示的显示画面11中可视的静态界面元素,底图2包括图1B所示的显示画面中的可视的静态界面元素。可选的,如图2B所示,内部存储器121还存储有预先绘制的动态界面元素(如指示符101C、选中指示框107)的图片。通过本申请实施例提供的显示方法,终端设备100显示图1A所示的显示画面11前,从内部存储器121中获取4K分辨率的底图1,然后基于4K分辨率的底图1合成4K分辨率的显示画面11并显示。响应于针对有线输入源图标103的显示区域的输入操作,终端设备100从内部存储器121中获取4K分辨率的底图2,然后基于4K分辨率的底图2合成图1B所示的4K分辨率的显示画面。Exemplarily, as shown in FIG. 2B , in the application scenarios shown in FIG. 1A and FIG. 1B , the internal memory 121 of the terminal device 100 stores pre-drawn basemap 1 and basemap 2 with a resolution of 4K, and the basemap 1 includes visible static interface elements in the display screen 11 shown in FIG. 1A , and base map 2 includes visible static interface elements in the display screen shown in FIG. 1B . Optionally, as shown in FIG. 2B , the internal memory 121 also stores pictures of pre-drawn dynamic interface elements (such as an indicator 101C and a selected indicator box 107 ). Through the display method provided by the embodiment of the present application, before the terminal device 100 displays the display screen 11 shown in FIG. rate display screen 11 and display. In response to the input operation on the display area of the wired input source icon 103, the terminal device 100 acquires the base map 2 with 4K resolution from the internal memory 121, and then synthesizes the base map 2 with 4K resolution as shown in FIG. 1B based on the base map 2 with 4K resolution. display screen.
下面示例性说明本申请实施例涉及的终端设备100的软件系统架构。The software system architecture of the terminal device 100 involved in the embodiment of the present application is illustrated below by way of example.
终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is taken as an example to illustrate the software structure of the terminal device 100 .
参见图3,图3示例性示出了本申请实施例提供的终端设备100的软件结构框图。Referring to FIG. 3 , FIG. 3 exemplarily shows a software structural block diagram of the terminal device 100 provided by the embodiment of the present application.
如图3所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,可以将Android系统从上至下分为应用程序层,应用程序框架层,硬件抽象层(hardware abstraction layer,HAL)层以及内核层(kernel)。其中:As shown in Figure 3, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system can be divided into an application program layer, an application program framework layer, a hardware abstraction layer (hardware abstraction layer, HAL) layer and a kernel layer (kernel) from top to bottom. in:
应用程序层包括一系列应用程序包。如图3所示,应用程序包可以包括桌面应用,视频应用,投屏应用等应用程序。还可以包括相机,图库,通话,音乐等应用程序,此处不再赘述。The application layer consists of a series of application packages. As shown in FIG. 3 , the application package may include applications such as desktop applications, video applications, and screen-casting applications. It can also include applications such as camera, gallery, call, music, etc., which will not be described here.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。应用程序框架层可以包括窗口管理模块、应用管理模块、输入管理模块、媒体框架和图形框架。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. The application framework layer can include window management module, application management module, input management module, media framework and graphics framework.
应用管理模块可以用于获取前台运行和后台运行的应用程序窗口。在一些实施例中,应用管理模块包括Activity管理服务(ActivityManagerService,AMS),AMS是安卓(android)系统的系统服务,用于控制系统中不同的应用程序之间合理的调度与运行,对Activity任务栈进行管理。AMS的主要职责包括统一调度各应用程序的Activity、管理应用程序的进程(process)、管理内存、调度服务(service)、调度任务(Task)、查询系统当前运行状态等等。Activity是用户和应用程序之间进行交互的接口,每一个Activity组件都关联有一个Window对象,用来描述一个具体的应用程序窗口。应用管理模块通过调用AMS可以确定前台和后台运行的应用程序窗口。The application management module can be used to obtain application windows running in the foreground and running in the background. In some embodiments, the application management module includes Activity Manager Service (ActivityManagerService, AMS), and AMS is a system service of the Android (android) system, which is used to control the reasonable scheduling and operation of different application programs in the system. The stack is managed. The main responsibilities of AMS include uniformly scheduling the activities of various applications, managing application processes, managing memory, scheduling services, scheduling tasks, querying the current running status of the system, and so on. Activity is an interface for interaction between users and applications. Each Activity component is associated with a Window object, which is used to describe a specific application window. The application management module can determine the application windows running in the foreground and the background by calling the AMS.
输入管理模块用于管理整个系统的输入事件和事件分发。在一些实施例中,输入管理模块包括输入管理服务(InputManagerService,IMS),IMS用于负责输入事件管理,即监听所有的输入设备节点,当输入设备节点有数据时,对数据进行加工处理并找到合适的应用程序 窗口,将输入事件通过窗口管理模块分发给该窗口。IMS可以通过调用AMS确定前台运行的activity,然后结合前台运行的activity对应的应用程序窗口的界面布局,确定上述输入事件对应的指定应用的指定应用程序窗口。The input management module is used to manage the input events and event distribution of the whole system. In some embodiments, the input management module includes an input management service (InputManagerService, IMS), and the IMS is used for input event management, that is, to monitor all input device nodes, and when the input device node has data, process the data and find A suitable application window distributes input events to the window through the window management module. The IMS can determine the activity running in the foreground by calling the AMS, and then combine the interface layout of the application window corresponding to the activity running in the foreground to determine the specified application window of the specified application corresponding to the above input event.
窗口管理模块用于管理应用程序窗口。窗口管理模块可以获取显示屏分辨率,判断是否有状态栏等。上述应用程序窗口可以是Android系统中的应用程序窗口,还可是IOS系统中的应用程序窗口,还可以是其他操作系统中的应用程序窗口,此处不作具体限定。在一些实施例中,窗口管理模块可以包括窗口管理服务(Window Manager Service,WMS),WMS是android系统的系统服务,控制所有窗口的创建、显示与隐藏。WMS为所有窗口分配图层(Surface),管理图层的显示顺序、尺寸、位置等,控制窗口动画,是输入系统的重要的中转站。The window management module is used to manage application windows. The window management module can obtain the resolution of the display screen, judge whether there is a status bar, and so on. The above-mentioned application program window may be an application program window in the Android system, an application program window in the IOS system, or an application program window in other operating systems, which is not specifically limited here. In some embodiments, the window management module may include a window management service (Window Manager Service, WMS), and WMS is a system service of the android system, which controls the creation, display and hiding of all windows. WMS assigns layers (Surface) to all windows, manages the display order, size, position, etc. of layers, and controls window animation. It is an important transfer station for the input system.
窗口管理模块接收输入管理模块分发的输入事件后,向该输入事件对应的指定应用发送指令,以指示该应用绘制上述输入事件对应的指定应用程序窗口的用户界面。应用程序层可以根据窗口管理模块发送的指令绘制和渲染上述用户界面对应的图层,以及调用系统进程绘制和渲染状态栏和导航栏对应的图层。After the window management module receives the input event distributed by the input management module, it sends an instruction to the designated application corresponding to the input event to instruct the application to draw the user interface of the designated application window corresponding to the input event. The application layer can draw and render the layer corresponding to the above user interface according to the instruction sent by the window management module, and call the system process to draw and render the layer corresponding to the status bar and the navigation bar.
媒体框架包括媒体播放器、视频解码器、图像播放器和图像解码器,图形框架包括界面合成模块。The media framework includes a media player, video decoder, image player and image decoder, and the graphic framework includes an interface composition module.
应用程序层获取视频数据后,可以通过媒体播放器调用视频解码器对上述视频数据进行解码。应用程序层获取图像数据后,可以通过媒体播放器调用图像解码器对上述图像数据进行解码。需要说明的是,应用程序层获取的视频数据和图像数据通常是经过压缩的数据。After the application layer obtains the video data, it can call the video decoder through the media player to decode the above video data. After the application layer obtains the image data, it can call the image decoder through the media player to decode the above image data. It should be noted that the video data and image data obtained by the application layer are usually compressed data.
界面合成模块用于将至少一个图层合成用户界面图像。在一种实现方式中,上述界面合成模块为SurfaceFlinger,SurfaceFlinger基于每个图层的尺寸、位置、Z-order和透明度等参数,确定每个图层在合成图像中的显示区域和显示内容,然后SurfaceFlinger调用硬件合成器(Hardware Composer,HWC)基于每个图层在合成图像中的显示区域和显示内容生成合成图像的显示缓冲数据(Buffer)。不限于通过调用硬件合成器(Hardware Compose,HWC)实现用户界面图像的合成,本申请实施例中也可以通过调用GPU实现用户界面图像的合成。The interface composition module is used for synthesizing at least one layer into a user interface image. In one implementation, the above-mentioned interface synthesis module is SurfaceFlinger, and SurfaceFlinger determines the display area and display content of each layer in the composite image based on parameters such as the size, position, Z-order, and transparency of each layer, and then SurfaceFlinger calls the hardware compositor (Hardware Composer, HWC) to generate the display buffer data (Buffer) of the composite image based on the display area and display content of each layer in the composite image. It is not limited to realizing the composition of the user interface image by calling a hardware compose (Hardware Compose, HWC). In the embodiment of the present application, the composition of the user interface image may also be realized by calling the GPU.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
硬件抽象层(Hardware Abstraction Layer,HAL)是位于内核与硬件电路之间的接口层,为图3所示的软件系统提供虚拟硬件平台。HAL层可以包括:视频处理模块(Video Process,VP)HAL、HWC HAL和帧缓冲区(FrameBuffer,FB)HAL。Hardware Abstraction Layer (Hardware Abstraction Layer, HAL) is an interface layer between the kernel and the hardware circuit, providing a virtual hardware platform for the software system shown in Figure 3. The HAL layer can include: video processing module (Video Process, VP) HAL, HWC HAL and frame buffer (FrameBuffer, FB) HAL.
内核层是硬件和软件之间的层。内核层可以包含FB驱动,视频对象(Video Output,VO)驱动和输入系统。还可以包括传感器驱动,触控IC驱动和音频驱动等等。HAL层及内核层(kernel)可以响应于应用程序框架层调用的功能,执行对应的操作。The kernel layer is the layer between hardware and software. The kernel layer can include FB driver, video object (Video Output, VO) driver and input system. It can also include sensor driver, touch IC driver and audio driver, etc. The HAL layer and the kernel layer (kernel) can perform corresponding operations in response to functions called by the application framework layer.
本申请实施例中,FB驱动可以将用户界面图像的显示缓冲数据发送到VO驱动,VO驱动调用图像放大器和/或合成器可以将上述用户界面图像和媒体框架输出的图像进行合成,生成待显示画面,并可以将该待显示画面送到显示屏194进行显示。In the embodiment of this application, the FB driver can send the display buffer data of the user interface image to the VO driver, and the VO driver can call the image amplifier and/or synthesizer to synthesize the above-mentioned user interface image and the image output by the media framework to generate a display screen, and the screen to be displayed can be sent to the display screen 194 for display.
在一些实施例中,内核层包括显示驱动。媒体框架输出的图像可以发送到图形框架,由 图形框架的界面合成模块将媒体框架输出的图像和应用程序层输出的图层合成为待显示画面;然后,界面合成模块通过硬件抽象层调用显示驱动将用户界面图像送到显示屏进行显示。In some embodiments, the kernel layer includes display drivers. The image output by the media framework can be sent to the graphics framework, and the interface synthesis module of the graphics framework synthesizes the image output by the media framework and the layer output by the application layer into a picture to be displayed; then, the interface synthesis module calls the display driver through the hardware abstraction layer Send the user interface image to the display for display.
在一些实施例中,应用程序框架层还可以包括底图存储模块。终端设备100将各显示画面的底图预先绘制好,并存储在底图存储模块。示例性的,底图存储模块存储有图2B所示预先绘制好的底图1和底图2,图1A所示的终端设备100的显示画面的底图为底图1,图1B所示的终端设备100的显示画面的底图为底图2。In some embodiments, the application framework layer may also include a basemap storage module. The terminal device 100 draws the base map of each display screen in advance, and stores it in the base map storage module. Exemplarily, the base map storage module stores the pre-drawn base map 1 and base map 2 shown in FIG. 2B, the base map of the display screen of the terminal device 100 shown in FIG. The bottom image of the display screen of the terminal device 100 is the bottom image 2 .
在一些实施例中,应用程序层响应于窗口管理模块发送的指令,绘制和渲染用户界面,生成该用户界面对应的图层时,仅需绘制和渲染该用户界面中的动态界面元素。应用程序层可以根据窗口管理模块发送的指令确定待显示画面的底图3,然后从底图存储模块获取该底图3的存储数据并发送到图像处理器;图像处理器调用图像解码器底基于上述存储数据解码出底图3,并将底图3通过VO HAL发送至VO驱动。VO驱动可以调用合成器对仅包含动态界面元素的用户界面图像和底图3进行合成,生成待显示画面。为便于描述,后续实施例可以将上述待显示画面简称为第一显示画面。In some embodiments, the application layer draws and renders the user interface in response to the instruction sent by the window management module, and only needs to draw and render the dynamic interface elements in the user interface when generating the layer corresponding to the user interface. The application layer can determine the base map 3 of the picture to be displayed according to the instruction sent by the window management module, and then obtain the stored data of the base map 3 from the base map storage module and send it to the image processor; the image processor calls the image decoder based on The above stored data decodes the base image 3, and sends the base image 3 to the VO driver through the VO HAL. The VO driver can invoke the synthesizer to synthesize the user interface image containing only dynamic interface elements and the base map 3 to generate a picture to be displayed. For ease of description, in subsequent embodiments, the above-mentioned to-be-displayed screen may be referred to as the first display screen for short.
本申请实施例中,底图存储模块存储的底图的图像格式可以为压缩图像的格式(例如JPEG格式)。图像解码器可以将底图解码为YUV格式,YUV格式是指亮度参量和色度参量分开表示的像素格式,“Y”表示明亮度(Luminance或Luma),也就是灰度值,“U”和“V”表示色度(Chrominance或Chroma)。相比RGBA格式,存储YUV格式的图像通常占用更少的存储空间。In the embodiment of the present application, the image format of the base map stored by the base map storage module may be a compressed image format (such as JPEG format). The image decoder can decode the basemap into YUV format. YUV format refers to the pixel format in which brightness parameters and chrominance parameters are expressed separately. "Y" means brightness (Luminance or Luma), that is, gray value, "U" and "V" means chroma (Chrominance or Chroma). Storing images in YUV format generally takes up less storage space than RGBA format.
在一种实现方式中,终端设备100绘制的用户界面图像是RGBA格式的,本申请实施例提供的合成器可以支持软件系统输出的RGBA格式的用户界面图像和YUV格式的视频图像的合成,以及将合成图像送到显示屏194进行显示。In one implementation, the user interface image drawn by the terminal device 100 is in RGBA format, and the synthesizer provided in the embodiment of the present application can support the synthesis of the user interface image in RGBA format output by the software system and the video image in YUV format, and The composite image is sent to the display screen 194 for display.
结合上述硬件结构和软件系统架构,下面对本申请实施例提供的显示方法的具体实现进行介绍。Combining the above hardware structure and software system architecture, the specific implementation of the display method provided by the embodiment of the present application will be introduced below.
图4是本申请实施例提供的一种显示方法的实现示意图。FIG. 4 is a schematic diagram of an implementation of a display method provided by an embodiment of the present application.
如图4所示,响应于窗口管理模块发送的指令,应用程序层绘制和渲染前台运行的用户界面对应的图层,并将上述图层的图层数据发送到图形框架的界面合成模块;界面合成模块基于应用程序层发送的至少一个图层的图层数据合成分辨率1的用户界面图像,并将分辨率1的用户界面图像的图像缓存数据发送到图像放大器;图像放大器将分辨率1的用户界面图像放大为分辨率2的用户界面图像,并将分辨率2的用户界面图像发送到合成器。响应于窗口管理模块发送的指令,应用程序层还获取分辨率2的视频源,将分辨率2的视频源中每帧视频图像发送到媒体框架的视频解码器;视频解码器解码基于上述视频数据解码出分辨率2的动态视频图像,并将分辨率2的动态视频图像发送到合成器。合成器基于上述分辨率2的用户界面图像和上述分辨率2的动态视频图像生成合成图像,并将上述合成图像送显到显示屏194。As shown in Figure 4, in response to the instructions sent by the window management module, the application layer draws and renders the layers corresponding to the user interface running in the foreground, and sends the layer data of the above layers to the interface synthesis module of the graphics framework; the interface The synthesis module synthesizes the user interface image of resolution 1 based on the layer data of at least one layer sent by the application layer, and sends the image cache data of the user interface image of resolution 1 to the image amplifier; the image amplifier converts the resolution 1 The UI image is upscaled to a resolution 2 UI image, and the resolution 2 UI image is sent to the compositor. In response to the instruction sent by the window management module, the application layer also obtains the video source with resolution 2, and sends each frame of video image in the video source with resolution 2 to the video decoder of the media framework; the video decoder decodes based on the above video data The dynamic video image of resolution 2 is decoded, and the dynamic video image of resolution 2 is sent to the synthesizer. The synthesizer generates a synthesized image based on the user interface image with resolution 2 and the dynamic video image with resolution 2, and sends the synthesized image to the display screen 194 for display.
可以理解,分辨率2大于分辨率1,例如,分辨率1为2K分辨率,分辨率2为4K分辨率。It can be understood that the resolution 2 is greater than the resolution 1, for example, the resolution 1 is a 2K resolution, and the resolution 2 is a 4K resolution.
本申请实施例提供的显示方法支持用户界面和视频的独立输出,终端设备100绘制低分辨率(如分辨率1)的用户界面图像,并将其放大为高分辨率(如分辨率2)的用户界面图像后显示,将高分辨率(如分辨率2)的视频源解码为高分辨率的视频图像后显示。这样,针 对具备高分辨率的显示屏、处理器和/或内存的性能不足、具备较强的视频解码能力的终端设备100,本申请实施例提供的显示方法能够实现高分辨率的画面显示,解决当前业界中高分辨率视频播放场景的硬件(处理器和/或内存等)性能不足的问题。The display method provided by the embodiment of the present application supports the independent output of user interface and video. The terminal device 100 draws a low-resolution (such as resolution 1) user interface image and enlarges it to a high-resolution (such as resolution 2) The user interface image is displayed after decoding the high-resolution (eg resolution 2) video source into a high-resolution video image and then displayed. In this way, for a terminal device 100 with a high-resolution display screen, insufficient processor and/or memory performance, and strong video decoding capabilities, the display method provided by the embodiment of the present application can realize high-resolution screen display, Solve the problem of insufficient performance of hardware (processor and/or memory, etc.) in high-resolution video playback scenarios in the current industry.
然而上述显示方法中,终端设备100显示的高分辨率的用户界面图像是由低分辨率的用户界面图像放大得到的,存在显示画面中的用户界面部分细节模糊,视觉效果不好的问题。However, in the above display method, the high-resolution user interface image displayed by the terminal device 100 is obtained by enlarging the low-resolution user interface image, and there is a problem that the details of the user interface part in the display screen are blurred and the visual effect is not good.
本申请实施例还提供了另一种显示方法,所述方法中终端设备100可以将显示画面分为静态部分的底图和动态部分的用户界面图像,底图包括用显示画面中的可视的静态界面元素,动态部分的用户界面图像仅包含显示画面中所有用户界面中的动态界面元素,终端设备100存储有预先绘制好的高分辨率的底图;终端设备100绘制低分辨率的仅包含动态界面元素的用户界面图像,然后将低分辨率的用户界面图像与高分辨率的底图的合成图像送到显示屏194进行显示。实施本申请实施例提供的显示方法,能够实现高分辨率的界面显示。由于本申请实施例对处理器(例如GPU、CPU)和/或内存等硬件性能要求较低,本申请实施例能够在实现高分辨率的界面显示的同时,支持流畅显示所需的帧率,以及快速响应用户的输入操作而更新显示界面。此外,使用预先绘制的底图也有效降低了高分辨率界面显示的功耗。针对上述显示方法,本申请实施例提供了两种实现方案(即下述方案1和方案2),下面对上述两种实现方案进行详细介绍。The embodiment of the present application also provides another display method. In the method, the terminal device 100 can divide the display screen into a base map of the static part and a user interface image of the dynamic part. Static interface elements, the dynamic part of the user interface image only includes dynamic interface elements in all user interfaces in the display screen, the terminal device 100 stores a pre-drawn high-resolution base map; the terminal device 100 draws a low-resolution base map that only contains The user interface image of the dynamic interface element is then sent to the display screen 194 to display the composite image of the low-resolution user interface image and the high-resolution base map. Implementing the display method provided by the embodiment of the present application can realize high-resolution interface display. Since the embodiments of the present application have relatively low hardware performance requirements for processors (such as GPU, CPU) and/or memory, the embodiments of the present application can support the frame rate required for smooth display while realizing high-resolution interface display. And update the display interface quickly in response to the user's input operation. In addition, the use of pre-drawn basemaps also effectively reduces the power consumption of high-resolution interface displays. Regarding the above display method, the embodiment of the present application provides two implementation schemes (ie, the following scheme 1 and scheme 2), and the above two implementation schemes are described in detail below.
示例性的,图5A是本申请实施例提供的方案1的内部实现示意图,图5B是本申请实施例提供的方案1的方法流程示意图。该方法包括但不限于步骤S101至S111。Exemplarily, FIG. 5A is a schematic diagram of internal implementation of solution 1 provided in the embodiment of the present application, and FIG. 5B is a schematic flow diagram of the method of solution 1 provided in the embodiment of the present application. The method includes but not limited to steps S101 to S111.
S101、响应于窗口管理模块发送的指令,基于第一显示画面中第一用户界面的界面布局,应用程序层确定在分辨率1的用户界面图像中第一用户界面的图层的位置和尺寸1,以及在第一用户界面的图层中第一动态界面元素的位置和尺寸,进而绘制和渲染第一用户界面的动态部分对应的尺寸1的图层。S101. In response to the instruction sent by the window management module, based on the interface layout of the first user interface in the first display screen, the application layer determines the position and size of the layer of the first user interface in the user interface image with resolution 1. , and the position and size of the first dynamic interface element in the layer of the first user interface, and then draw and render a layer of size 1 corresponding to the dynamic part of the first user interface.
其中,第一用户界面是上述用户界面图像中的任一用户界面,第一动态界面元素为第一用户界面中的任一动态界面元素。Wherein, the first user interface is any user interface in the above user interface images, and the first dynamic interface element is any dynamic interface element in the first user interface.
需要说明的是,终端设备100存储有第一用户界面的界面布局,第一用户界面的界面布局信息包括在分辨率1的用户界面图像中第一用户界面的图层的尺寸(为便于描述,简称为尺寸1)、位置(为便于描述,简称为位置1)、透明度和z-order,以及在上述图层中第一用户界面的第一动态界面元素的位置(为便于描述,简称为位置2)、尺寸(为便于描述,简称为尺寸2)和透明度等信息。终端设备100绘制第一用户界面的图层时,基于该用户界面的界面布局信息可以确定第一用户界面的各动态界面元素在图层中的位置和尺寸,进而可以在尺寸1的画布上绘制第一用户界面的各动态界面元素,生成第一用户界面的动态部分对应的尺寸1的图层。It should be noted that the terminal device 100 stores the interface layout of the first user interface, and the interface layout information of the first user interface includes the layer size of the first user interface in the user interface image with resolution 1 (for ease of description, Referred to as size 1), position (referred to as position 1 for convenience of description), transparency and z-order, and the position of the first dynamic interface element of the first user interface in the above layers (referred to as position for convenience of description 2), size (for convenience of description, referred to as size 2 for short), transparency and other information. When the terminal device 100 draws the layer of the first user interface, based on the interface layout information of the user interface, the position and size of each dynamic interface element of the first user interface in the layer can be determined, and then the dynamic interface elements of the first user interface can be drawn on the canvas of size 1. For each dynamic interface element of the first user interface, a layer of size 1 corresponding to the dynamic part of the first user interface is generated.
示例性的,下面以图1A和图1B所示的应用场景进行示例性说明。Exemplarily, the following uses the application scenarios shown in FIG. 1A and FIG. 1B for exemplary description.
终端设备100的显示屏194显示图1A所示的显示画面11,终端设备100的输入设备(例如触摸传感器180K)检测到的触控操作1,触控操作1的相关信息(例如触控坐标、触控时长等信息)发送给输入系统,输入系统将上述输入操作1加工成原始输入事件,原始输入事件被存储在内核层。输入管理模块从内核层获取原始输入事件,输入管理模块调用应用管理模块确定前台运行应用程序窗口的用户界面以及该用户界面(例如桌面应用的用户界面1)的界面布局信息,结合上述界面布局信息确定上述原始输入事件是作用于有线输入源图标103的 显示区域的点击事件。事件管理模块将该输入事件发送给窗口管理模块。窗口管理模块向应用程序层发送指令1,指示应用程序层更新显示画面为图1B所示的显示画面。应用程序层确定更新后的显示画面的底图为底图2,以及更新后的显示画面中动态界面元素对应的用户界面图像,并调用图形框架绘制上述用户界面图像。图1B所示的显示画面包括状态栏101、桌面应用的用户界面1和切换输入源界面12。The display screen 194 of the terminal device 100 displays the display screen 11 shown in FIG. Touch time and other information) is sent to the input system, and the input system processes the above-mentioned input operation 1 into an original input event, and the original input event is stored in the kernel layer. The input management module obtains the original input event from the kernel layer, and the input management module calls the application management module to determine the user interface of the application program window running in the foreground and the interface layout information of the user interface (such as the user interface 1 of the desktop application), combined with the above interface layout information It is determined that the above original input event is a click event acting on the display area of the wired input source icon 103 . The event management module sends the input event to the window management module. The window management module sends an instruction 1 to the application layer, instructing the application layer to update the display screen to the display screen shown in FIG. 1B . The application layer determines that the base map of the updated display screen is base map 2, and the user interface image corresponding to the dynamic interface elements in the updated display screen, and calls the graphics framework to draw the above user interface image. The display screen shown in FIG. 1B includes a status bar 101 , a desktop application user interface 1 and an input source switching interface 12 .
可选的,状态栏101的静态界面元素可以包括文本101A,状态栏101的动态界面元素可以包括投屏设备名称101B和指示符101C。用户界面1的静态界面元素可以包括背景102、有线输入源图标103、投屏图标104和设置图标105,用户界面1的动态界面元素可以包括有线输入源的选中指示框107、投屏的未选中指示框201和设置的未选中指示框202。切换输入源界面12的静态界面元素可以包括文本108、输入源1图标109、输入源2图标110和输入源3图标112,切换输入源界面12的动态界面元素可以包括输入源1的未选中指示框203、输入源1的选中指示框111和输入源1的未选中指示框204。需要说明的是,在一种实现方式中,选中指示框107和选中指示框111是可见的,而未选中指示框201、未选中指示框202、未选中指示框203和未选中指示框204是不可见的。Optionally, the static interface elements of the status bar 101 may include text 101A, and the dynamic interface elements of the status bar 101 may include a screen projection device name 101B and an indicator 101C. The static interface elements of the user interface 1 may include a background 102, a wired input source icon 103, a screen projection icon 104, and a setting icon 105, and the dynamic interface elements of the user interface 1 may include a selection indicator box 107 for a wired input source, and an unselected screen projection icon. The indication box 201 and the unselected indication box 202 of the setting. The static interface elements of the switching input source interface 12 may include text 108, the input source 1 icon 109, the input source 2 icon 110 and the input source 3 icon 112, and the dynamic interface elements of the switching input source interface 12 may include an unselected indication of the input source 1 Box 203 , the selected indication box 111 of input source 1 and the unselected indication box 204 of input source 1 . It should be noted that, in one implementation, the selected indicator box 107 and the selected indicator box 111 are visible, while the unselected indicator box 201, the unselected indicator box 202, the unselected indicator box 203, and the unselected indicator box 204 are visible. Invisible.
响应于窗口管理模块发送的指令1,应用程序层调用系统进程绘制状态栏的动态部分对应的图层1,应用程序层中的投屏应用响应于上述指令1,绘制投屏应用的用户界面1的动态部分对应的图层2,以及切换输入源界面12的动态部分对应的图层3。In response to the instruction 1 sent by the window management module, the application layer calls the system process to draw the layer 1 corresponding to the dynamic part of the status bar, and the screen projection application in the application layer responds to the above instruction 1, and draws the user interface 1 of the screen projection application The layer 2 corresponding to the dynamic part of , and the layer 3 corresponding to the dynamic part of the switching input source interface 12 .
在一种实现方式中,图层1、图层2和图层3的尺寸和位置均相同,尺寸等于界面合成模块中待合成的用户界面图像的分辨率对应的尺寸。示例性的,待合成的用户界面图像的分辨率为分辨率1,图6A示出的图层1、图层2和图层3的尺寸均等于分辨率1对应的尺寸,且图层1、图层2和图层3在待合成的用户界面图像中的位置(例如左上角位置)均为(0,0)。在另一种实现方式中,图层1、图层2和图层3的尺寸和位置可以不相同。示例性的,待合成的用户界面图像的分辨率为分辨率1,图6B示出的图层1、图层2和图层3的尺寸不相同,且均小于等于分辨率1对应的尺寸,其中,图层2在待合成的用户界面图像中的位置为(0,0),图层1和图层3在待合成的用户界面图像中的位置不为(0,0)。In an implementation manner, the size and position of layer 1, layer 2 and layer 3 are the same, and the size is equal to the size corresponding to the resolution of the user interface image to be synthesized in the interface synthesis module. Exemplarily, the resolution of the user interface image to be synthesized is resolution 1, the sizes of layer 1, layer 2 and layer 3 shown in FIG. 6A are all equal to the size corresponding to resolution 1, and layers 1, The positions of layer 2 and layer 3 in the user interface image to be synthesized (for example, the position of the upper left corner) are both (0, 0). In another implementation manner, the sizes and positions of layer 1, layer 2 and layer 3 may be different. Exemplarily, the resolution of the user interface image to be synthesized is resolution 1, and the sizes of layer 1, layer 2, and layer 3 shown in FIG. 6B are different, and they are all smaller than or equal to the size corresponding to resolution 1. Wherein, the position of layer 2 in the user interface image to be combined is (0, 0), and the positions of layer 1 and layer 3 in the user interface image to be combined are not (0, 0).
如图6A和图6B所示,图层2和图层3中虚线的界面元素(例如未选中指示框201和未选中指示框203)表征终端设备100显示的画面中该界面元素是不可见的,终端设备100在绘制图层2和图层3时可以不绘制上述虚线的界面元素,也可以绘制该界面元素,但设置该界面元素的透明度为100%。As shown in FIG. 6A and FIG. 6B, the dotted interface elements (for example, the unselected indicator box 201 and the unselected indicator box 203) in layer 2 and layer 3 represent that the interface element is invisible in the screen displayed by the terminal device 100. , when the terminal device 100 draws the layer 2 and the layer 3, it may not draw the dotted line interface element, or it may draw the interface element, but set the transparency of the interface element to 100%.
在一种实现方式中,终端设备显示图1A所示的显示画面1时,已经绘制了图层1和图层2,并存储了图层1和图层2的图像缓存数据。响应于用户的输入操作,终端设备100在图1A所示的显示画面上叠加显示切换输入源界面12时,响应于上述指令1,应用程序层仅需绘制切换输入源界面12对应的图层3,并可以直接获取已绘制的图层1和图层2的图像缓存数据。In an implementation manner, when the terminal device displays the display screen 1 shown in FIG. 1A , layer 1 and layer 2 have already been drawn, and image cache data of layer 1 and layer 2 have been stored. In response to the user's input operation, when the terminal device 100 superimposes and displays the switching input source interface 12 on the display screen shown in FIG. 1A , in response to the above instruction 1, the application layer only needs to draw the layer 3 corresponding to the switching input source interface 12 , and can directly obtain the image cache data of layer 1 and layer 2 that have been drawn.
S102、应用程序层将第一显示画面中各用户界面的动态部分对应的图层的图层数据发送到图形框架的界面合成模块。S102. The application layer sends the layer data of the layers corresponding to the dynamic parts of the user interfaces in the first display screen to the interface synthesis module of the graphics framework.
S103、界面合成模块基于应用程序层发送的至少一个图层的图层数据合成分辨率1的用户界面图像1。S103. The interface composition module synthesizes the user interface image 1 with resolution 1 based on the layer data of at least one layer sent by the application layer.
可以理解,上述用户界面图像1仅包含动态界面元素。It can be understood that the above user interface image 1 only includes dynamic interface elements.
在一些实施例中,图层的图层数据可以包括该图层的尺寸、位置、透明度和Z-order等信 息。当合成器接收到至少一个图层的图层数据时,合成器将基于上述至少一个图层的尺寸、位置、透明度和Z-order,在分辨率1的画布上将上述至少两个图层合成为分辨率1的用户界面图像1。In some embodiments, the layer data of a layer may include information such as the size, position, transparency, and Z-order of the layer. When the compositor receives the layer data of at least one layer, the compositor will composite the above-mentioned at least two layers on the canvas with resolution 1 based on the size, position, transparency and Z-order of the above-mentioned at least one layer UI image 1 for resolution 1.
示例性的,应用程序层将图层1、图层2和图层3的图层数据发送到图形框架的界面合成模块。如图6A和图6B所示,界面合成模块可以基于上述图层1、图层2和图层3的尺寸和位置,确定各图层在分辨率1的画布上的显示区域,并按照各图层的Z-order将上述图层1、图层2和图层3按Z-order顺序在分辨率1的画布上合成为分辨率1的用户界面图像1。Exemplarily, the application layer sends the layer data of layer 1, layer 2 and layer 3 to the interface synthesis module of the graphics framework. As shown in Figure 6A and Figure 6B, the interface composition module can determine the display area of each layer on the canvas with resolution 1 based on the size and position of the above-mentioned layer 1, layer 2, and layer 3, and The Z-order of the layer Composite the above layer 1, layer 2 and layer 3 on the canvas of resolution 1 in Z-order order to form user interface image 1 of resolution 1.
本申请实施例中,各用户界面的动态部分对应的图层中除动态界面元素的有效显示区域外的区域的透明度均设置为完全透明或预设的透明度。In the embodiment of the present application, the transparency of areas other than the effective display area of the dynamic interface elements in the layer corresponding to the dynamic part of each user interface is set to be completely transparent or a preset transparency.
S104、界面合成模块将上述分辨率1的用户界面图像1的图像缓存数据发送到图像放大器。S104. The interface synthesis module sends the image cache data of the user interface image 1 with resolution 1 to the image amplifier.
S105、图像放大器将分辨率1的用户界面图像1放大为分辨率2的用户界面图像1,分辨率2大于分辨率1。S105 , the image amplifier enlarges the user interface image 1 with resolution 1 into user interface image 1 with resolution 2, where resolution 2 is greater than resolution 1.
其中,分辨率2和分辨率1的水平像素数之比为A,分辨率2和分辨率1的垂直像素数之比为B。分辨率1小于显示屏194的分辨率,分辨率2可以等于显示屏194的分辨率,也可以小于显示屏194的分辨率,此处不做具体限定。Wherein, the ratio of the number of horizontal pixels between the resolution 2 and the resolution 1 is A, and the ratio of the number of vertical pixels between the resolution 2 and the resolution 1 is B. The resolution 1 is smaller than the resolution of the display screen 194, and the resolution 2 may be equal to or smaller than the resolution of the display screen 194, which is not specifically limited here.
在一种实现方式中,A等于B,图像放大器将分辨率1的用户界面图像1等比例放大为分辨率2的用户界面图像1。示例性的,如图6C所示,分辨率1的用户界面图像1等比例放大为分辨率2的用户界面图像1。In one implementation manner, A is equal to B, and the image amplifier scales up the user interface image 1 with resolution 1 to the user interface image 1 with resolution 2 in equal proportion. Exemplarily, as shown in FIG. 6C , the user interface image 1 with resolution 1 is scaled up to the user interface image 1 with resolution 2 in equal proportions.
S106、图像放大器将分辨率2的用户界面图像1的图像缓存数据发送到合成器。S106. The image amplifier sends the image cache data of the user interface image 1 with resolution 2 to the synthesizer.
S107、响应于窗口管理模块发送的指令1,应用程序层还确定第一显示画面的底图为底图3,并从底图存储模块获取分辨率2的底图3的存储数据。S107. In response to the instruction 1 sent by the window management module, the application layer further determines that the base image of the first display screen is the base image 3, and acquires the stored data of the base image 3 with a resolution of 2 from the base image storage module.
S108、应用程序层将底图3的存储数据发送到媒体框架的图像解码器。S108. The application layer sends the stored data of the base image 3 to the image decoder of the media framework.
需要说明的是,本申请实施例中对步骤S108和S101的实施顺序不做具体限定。It should be noted that, in the embodiment of the present application, the implementation order of steps S108 and S101 is not specifically limited.
S109、图像解码器基于上述存储数据解码出分辨率2的底图3。S109. The image decoder decodes the base image 3 with resolution 2 based on the above stored data.
S110、图像解码器将分辨率2的底图3的图像缓存数据发送到合成器。S110. The image decoder sends the image buffer data of the base map 3 with resolution 2 to the compositor.
S111、合成器基于上述分辨率2的用户界面图像1和上述分辨率2的底图3生成合成图像,并将上述合成图像送显到显示屏194,用户界面图像1位于底图3的上层。S111. The synthesizer generates a composite image based on the above-mentioned user interface image 1 with resolution 2 and the above-mentioned base image 3 with resolution 2, and sends the above-mentioned composite image to the display screen 194. The user interface image 1 is located on the upper layer of the base image 3.
具体的,合成器确定上述分辨率2的用户界面图像1合成到底图3的原始位置和目标位置均为(0,0),合成到底图3的原始尺寸和目标尺寸均为分辨率1对应的尺寸;合成器基于上述原始位置、目标位置、原始尺寸和目标尺寸将用户界面图像1合成到底图3之上。Specifically, the synthesizer determines that the original position and target position of the base image 3 are both (0,0) when the above-mentioned user interface image 1 with resolution 2 is synthesized, and the original size and target size of the synthesized base image 3 are both corresponding to resolution 1. Size; the compositor composites the UI image 1 on top of the basemap 3 based on the original position, target position, original size, and target size above.
需要说明的是,合成器合成图像时,用户界面图像1位于底图3的上层,由于用户界面图像中除动态界面元素的有效显示区域外的区域的透明度均设置为完全透明或预设的透明度,合成器合成的图像中除动态界面元素的有效显示区域外的区域可以显示底图的显示内容。It should be noted that when the compositor synthesizes images, the user interface image 1 is located on the upper layer of the base image 3, since the transparency of the areas in the user interface image other than the effective display area of the dynamic interface elements are set to be completely transparent or preset transparency , in the image synthesized by the compositor, the area other than the effective display area of the dynamic interface element can display the display content of the base map.
示例性的,如图6D所示,合成器将分辨率2的用户界面图像1和分辨率2的底图3合成为图1B所示的显示画面,并将该显示画面发送到显示屏194进行显示。参见图2B,底图3可以为内部存储器存储的图2B所示的底图2。Exemplarily, as shown in FIG. 6D , the synthesizer synthesizes the user interface image 1 of resolution 2 and the base image 3 of resolution 2 into the display picture shown in FIG. 1B , and sends the display picture to the display screen 194 for further processing. show. Referring to FIG. 2B , the base map 3 may be the base map 2 shown in FIG. 2B stored in the internal memory.
示例性的,图7A是本申请实施例提供的方案2的内部实现示意图,图7B是本申请实施例提供的方案2的方法流程示意图。该方法包括但不限于步骤S201至S209。Exemplarily, FIG. 7A is a schematic diagram of internal implementation of solution 2 provided in the embodiment of the present application, and FIG. 7B is a schematic flow diagram of the method of solution 2 provided in the embodiment of the present application. The method includes but not limited to steps S201 to S209.
S201、响应于窗口管理模块发送的指令1,应用程序层基于第一显示画面中第一用户界面的界面布局,确定在分辨率2的用户界面图像中,第一用户界面的图层中的第一动态界面元素的位置3和尺寸3,进而基于第一动态界面元素的尺寸3绘制和渲染第一用户界面的动态部分对应的图层,位置3为第一动态界面元素在用户界面图像和第一显示画面中的目标位置。S201. In response to the instruction 1 sent by the window management module, the application layer determines, based on the interface layout of the first user interface in the first display screen, in the user interface image with resolution 2, the first user interface in the layer. Position 3 and size 3 of a dynamic interface element, and then draw and render the layer corresponding to the dynamic part of the first user interface based on the size 3 of the first dynamic interface element, position 3 is the first dynamic interface element between the user interface image and the second -Displays the target position in the screen.
其中,第一用户界面是上述用户界面图像中的任一用户界面,第一动态界面元素为第一用户界面中的任一动态界面元素。第一用户界面的图层的尺寸小于分辨率2对应的尺寸。Wherein, the first user interface is any user interface in the above user interface images, and the first dynamic interface element is any dynamic interface element in the first user interface. The layer size of the first user interface is smaller than the size corresponding to resolution 2.
不同于图5B所示的显示方法,本申请实施例中,终端设备100绘制第一用户界面的动态部分对应的图层时,先基于第一用户界面的界面布局信息,确定在分辨率2的用户界面图像中第一用户界面的各动态界面元素的尺寸。为便于描述,本申请实施例中可以将第一用户界面的第一动态界面元素在分辨率2的用户界面图像中的位置简称为位置3,将第一用户界面的第一动态界面元素在分辨率2的用户界面图像中的尺寸简称为尺寸3。然后,应用程序层可以在指定分辨率(或指定尺寸)的画布上绘制尺寸3的第一动态界面元素,从而可以获取第一用户界面的指定分辨率(或指定尺寸)的图层。不同于图5B所示的方案1,方案2对动态界面元素在图层中的位置不做具体限定,各动态界面元素在图层中没有重叠即可。为便于描述,本申请实施例中可以将第一用户界面的第一动态界面元素在上述指定分辨率的图层中的实际位置简称为位置4。Different from the display method shown in FIG. 5B , in the embodiment of the present application, when drawing the layer corresponding to the dynamic part of the first user interface, the terminal device 100 first determines the layer at resolution 2 based on the interface layout information of the first user interface. The size of each dynamic interface element of the first user interface in the user interface image. For ease of description, in this embodiment of the present application, the position of the first dynamic interface element of the first user interface in the user interface image with resolution 2 may be referred to as position 3 for short, and the position of the first dynamic interface element of the first user interface in the resolution The dimensions in UI images of rate 2 are simply referred to as dimension 3. Then, the application layer can draw the first dynamic interface element of size 3 on the canvas with the specified resolution (or specified size), so that the layer of the specified resolution (or specified size) of the first user interface can be obtained. Different from scheme 1 shown in FIG. 5B , scheme 2 does not specifically limit the positions of the dynamic interface elements in the layer, as long as the dynamic interface elements do not overlap in the layer. For ease of description, in this embodiment of the present application, the actual position of the first dynamic interface element of the first user interface in the layer with the specified resolution may be referred to as position 4 for short.
在一种实现方式中,各动态界面元素在图层的左上角按从左至右的顺序无重叠的分布。In an implementation manner, the dynamic interface elements are arranged in the upper left corner of the layer in order from left to right without overlapping.
需要说明的是,本申请实施例中,终端设备100的目标显示分辨率为分辨率2,因此,第一用户界面的第一动态界面元素在分辨率2的图层中的位置3即为第一动态界面元素在第一显示画面中的目标位置。It should be noted that, in the embodiment of the present application, the target display resolution of the terminal device 100 is resolution 2, therefore, the position 3 of the first dynamic interface element of the first user interface in the resolution 2 layer is the second A target position of a dynamic interface element in the first display frame.
在一种实现方式中,第一显示画面中各用户界面的动态部分对应的图层的指定分辨率均为待合成的用户界面图像的分辨率,即分辨率3。分辨率3可以是终端设备100预设的小于分辨率2的分辨率;或者,分辨率3可以是终端设备100基于第一显示画面中所有动态界面元素的尺寸(例如第一动态界面元素的尺寸3)确定的,满足每个用户界面对应的图层可以容纳该用户界面的所有动态界面元素即可。这样,终端设备100可以实现在低分辨率(例如分辨率3)的画布上绘制高分辨(例如分辨率2)用户界面图像对应的尺寸3的第一动态界面元素。In an implementation manner, the specified resolutions of the layers corresponding to the dynamic parts of the user interfaces in the first display screen are the resolutions of the user interface images to be synthesized, that is, resolution 3. Resolution 3 may be a resolution preset by the terminal device 100 that is smaller than resolution 2; or, resolution 3 may be based on the size of all dynamic interface elements in the first display screen of the terminal device 100 (for example, the size of the first dynamic interface element 3) It is determined that the layer corresponding to each user interface can accommodate all the dynamic interface elements of the user interface. In this way, the terminal device 100 can draw the first dynamic interface element of size 3 corresponding to the high-resolution (for example, resolution 2) user interface image on the low-resolution (for example, resolution 3) canvas.
示例性的,下面以图1A和图1B所示的应用场景进行示例性说明。Exemplarily, the following uses the application scenarios shown in FIG. 1A and FIG. 1B for exemplary description.
响应于窗口管理模块发送的指令1,应用程序层确定状态栏、用户界面1和切换输入源界面12中所有动态界面元素的尺寸(例如第一动态界面元素的尺寸3),进而基于所有动态界面元素的尺寸确定分辨率3;然后调用系统进程在分辨率3的画布上绘制状态栏的动态界面元素,生成状态栏的对应的分辨率3的图层4;类似的,应用程序层中的投屏应用响应于上述指令1,绘制投屏应用的用户界面1的动态部分对应的分辨率3的图层5,以及切换输入源界面12的动态部分对应的分辨率3的图层6。In response to the instruction 1 sent by the window management module, the application layer determines the size of all dynamic interface elements (such as the size 3 of the first dynamic interface element) in the status bar, user interface 1 and switching input source interface 12, and then based on all dynamic interface The size of the element determines the resolution 3; then call the system process to draw the dynamic interface elements of the status bar on the canvas of the resolution 3, and generate the layer 4 of the corresponding resolution 3 of the status bar; similarly, the projection in the application layer In response to the above instruction 1, the screen application draws a layer 5 of resolution 3 corresponding to the dynamic part of the user interface 1 of the screencasting application, and a layer 6 of resolution 3 corresponding to the dynamic part of the switching input source interface 12 .
示例性的,待合成的用户界面图像为分辨率3,图8A示出的图层4、图层5和图层6的分辨率均为分辨率3。以图层4和前述图层1为例,对比图8A和图6A可知,图层4中的动态界面元素的尺寸(例如第一动态界面元素的尺寸3)大于图层1中相应的动态界面元素的尺寸(例如第一动态界面元素的尺寸2),图层4中各动态界面元素的元素位置是不具体限定的(例如,图层4中各动态界面元素可以在图层的左上角按从左至右的顺序无重叠的分布), 而图层1中各动态界面元素的位置是基于第一用户界面的界面布局信息确定的。Exemplarily, the user interface image to be synthesized has a resolution of 3, and the resolutions of layer 4, layer 5, and layer 6 shown in FIG. 8A are all resolution 3. Taking layer 4 and the aforementioned layer 1 as an example, comparing Figure 8A and Figure 6A, we can see that the size of the dynamic interface element in layer 4 (for example, the size 3 of the first dynamic interface element) is larger than the corresponding dynamic interface in layer 1 The size of the element (such as the size 2 of the first dynamic interface element), the element position of each dynamic interface element in layer 4 is not specifically limited (for example, each dynamic interface element in layer 4 can be pressed in the upper left corner of the layer There is no overlapping distribution from left to right), and the position of each dynamic interface element in layer 1 is determined based on the interface layout information of the first user interface.
在一种实现方式中,第一显示画面中各用户界面的动态部分对应的图层的分辨率可以不同,各用户界面的动态部分对应的图层可以容纳用户界面中的所有动态界面元素(例如尺寸3的第一动态界面元素)即可。例如,第一用户界面的动态部分的图层的分辨率可以是终端设备100预设的,也可以是终端设备100基于第一用户界面中动态界面元素的尺寸(例如第一动态界面元素的尺寸3)确定的。示例性的,待合成的用户界面图像为分辨率3,图8B示出的图层4、图层5和图层6的分辨率均小于等于分辨率3。In an implementation manner, the resolutions of the layers corresponding to the dynamic parts of the user interfaces in the first display screen may be different, and the layers corresponding to the dynamic parts of the user interfaces can accommodate all the dynamic interface elements in the user interface (such as The first dynamic interface element of size 3) is enough. For example, the resolution of the layers of the dynamic part of the first user interface may be preset by the terminal device 100, or may be determined by the terminal device 100 based on the size of the dynamic interface elements in the first user interface (such as the size of the first dynamic interface element). 3) OK. Exemplarily, the user interface image to be synthesized has a resolution of 3, and the resolutions of layer 4, layer 5, and layer 6 shown in FIG. 8B are all smaller than or equal to resolution 3.
类似于方案1,图层5和图层6中虚线的界面元素表征终端设备100显示的画面中该界面元素是不可见的,终端设备100在绘制图层5和图层6时可以不绘制上述虚线的界面元素,也可以绘制该界面元素,但设置该界面元素的透明度为100%。Similar to solution 1, the dotted interface elements in layers 5 and 6 indicate that the interface elements are invisible in the screen displayed by the terminal device 100, and the terminal device 100 may not draw the above-mentioned interface elements when drawing layers 5 and 6. The dotted interface element can also be drawn, but the transparency of the interface element is set to 100%.
S202、应用程序层将第一显示画面中各用户界面的动态部分对应的图层的图层数据发送到图形框架的界面合成模块,第一用户界面对应的图层数据包括第一动态界面元素在图层中的位置4和尺寸3,以及第一动态界面元素的目标位置(即位置3)。S202. The application layer sends the layer data of the layers corresponding to the dynamic parts of the user interfaces in the first display screen to the interface composition module of the graphics framework, and the layer data corresponding to the first user interface includes the first dynamic interface elements in Position 4 and size 3 in the layer, and the target position of the first dynamic interface element (that is, position 3).
示例性的,应用程序层将图层4、图层5和图层6的图层数据发送到图形框架的界面合成模块。Exemplarily, the application layer sends the layer data of layer 4, layer 5 and layer 6 to the interface synthesis module of the graphics framework.
S203、界面合成模块接收到应用程序层发送的至少一个图层的图层数据后,基于第一动态界面元素在图层中的位置4和尺寸3,将上述至少一个图层合成为用户界面图像2,各动态界面元素在上述用户界面图像2中的实际位置为位置3,上述用户界面图像2中各动态界面元素无重叠。S203. After receiving the layer data of at least one layer sent by the application layer, the interface synthesis module synthesizes the at least one layer into a user interface image based on the position 4 and size 3 of the first dynamic interface element in the layer 2. The actual position of each dynamic interface element in the above user interface image 2 is position 3, and each dynamic interface element in the above user interface image 2 has no overlap.
在一些实施例中,界面合成模块接收到应用程序层发送的至少一个图层的图层数据后,基于第一用户界面的图层中的第一动态界面元素在图层中的尺寸3和位置4,确定第一动态界面元素在用户界面图像2中的位置5;进而基于各动态界面元素在用户界面图像2中的尺寸和位置(例如第一动态界面元素的尺寸3和位置5),将各图层的所有动态界面元素合成到分辨率3的画布中,生成分辨3的用户界面图像2。本申请实施例中对各动态界面元素在用户界面图像2中的位置不做具体限定,满足各动态界面元素无重叠即可。In some embodiments, after receiving the layer data of at least one layer sent by the application program layer, the interface composition module based on the size 3 and position of the first dynamic interface element in the layer of the first user interface 4. Determine the position 5 of the first dynamic interface element in the user interface image 2; then based on the size and position of each dynamic interface element in the user interface image 2 (such as the size 3 and position 5 of the first dynamic interface element), the All the dynamic interface elements of each layer are synthesized into the canvas with resolution 3 to generate user interface image 2 with resolution 3. In the embodiment of the present application, the position of each dynamic interface element in the user interface image 2 is not specifically limited, as long as the dynamic interface elements do not overlap.
在一种实现方式中,每个图层中的动态界面元素在分辨率3的画布中按从左至右的顺序分布,然后再以图层为单位将各图层的动态界面元素在分辨率3的画布中按从上至下的顺序分布。In one implementation, the dynamic interface elements in each layer are distributed from left to right in the canvas with a resolution of 3, and then the dynamic interface elements of each layer are arranged in units of layers at a resolution of 3 3 in the canvas from top to bottom.
示例性的,如图8A和图8B所示,界面合成模块基于上述图层3、图层4和图层5的图层数据合成分辨率3的用户界面图像2。用户界面图像2中图层4(或图层5、图层6)的动态界面元素在用户界面图像2按从左至右的顺序分布,用户界面图像2中各图层的动态界面元素在用户界面图像2中按图层4、图层5和图层6的顺序从上至下的分布。Exemplarily, as shown in FIG. 8A and FIG. 8B , the interface synthesis module synthesizes a user interface image 2 with a resolution of 3 based on the layer data of the above-mentioned layers 3 , 4 , and 5 . The dynamic interface elements of layer 4 (or layer 5, layer 6) in user interface image 2 are distributed in order from left to right in user interface image 2, and the dynamic interface elements of each layer in user interface image 2 are distributed in the user interface image 2. The interface image 2 is distributed in the order of layer 4, layer 5 and layer 6 from top to bottom.
S204、界面合成模块将上述分辨率3的用户界面图像2的图像缓存数据发送到合成器,图像缓存数据包括第一动态界面元素在用户界面图像2中的尺寸3和位置5,以及第一动态界面元素的目标位置(即位置3)。S204. The interface synthesis module sends the image buffer data of the user interface image 2 with a resolution of 3 to the synthesizer. The image buffer data includes the size 3 and position 5 of the first dynamic interface element in the user interface image 2, and the first dynamic interface element The target position of the interface element (ie position 3).
S205、响应于窗口管理模块发送的指令1,应用程序层还确定第一显示画面的底图为底图3,并从底图存储模块获取分辨率2的底图3的存储数据。S205. In response to the instruction 1 sent by the window management module, the application layer further determines that the base image of the first display screen is base image 3, and acquires the stored data of base image 3 with resolution 2 from the base image storage module.
需要说明的是,本申请实施例中对步骤S205和S201的实施顺序不做具体限定。It should be noted that, in the embodiment of the present application, the implementation order of steps S205 and S201 is not specifically limited.
S206、应用程序层将底图3的存储数据发送到媒体框架的图像解码器。S206. The application layer sends the stored data of the base image 3 to the image decoder of the media framework.
S207、图像解码器基于上述存储数据解码出分辨率2的底图3。S207. The image decoder decodes the base image 3 with resolution 2 based on the above stored data.
S208、图像解码器将分辨率2的底图3的图像缓存数据发送到合成器。S208. The image decoder sends the image buffer data of the base image 3 with the resolution 2 to the compositor.
S209、合成器将分辨率3的用户界面图像2中每个动态界面元素的显示区域的图像与底图3中该界面元素的目标区域的图像合成为目标区域的新图像,进而生成分辨率2的合成图像(即第一显示画面),并将上述合成图像送显到显示屏194。S209. The synthesizer synthesizes the image of the display area of each dynamic interface element in the user interface image 2 with a resolution of 3 and the image of the target area of the interface element in the base map 3 into a new image of the target area, thereby generating a resolution of 2 The synthesized image (that is, the first display picture) of the above-mentioned synthesized image is sent to the display screen 194 for display.
具体的,合成器基于上述分辨率3的用户界面图像2中第一动态界面元素的位置5和尺寸3,确定第一动态界面元素在用户界面图像2中的显示区域,并获取该显示区域的图像缓存数据1;合成器还基于第一动态界面元素在底图中的目标位置(即位置3)和尺寸3,确定第一动态界面元素在底图3中的目标区域,并获取该目标区域的图像缓存数据2;然后将上述图像缓存数据1和图像缓存数据2合成目标区域的新图像缓存数据。这样,底图3与用户界面图像2中所有动态界面元素合成后,生成待显示的合成图像。Specifically, the synthesizer determines the display area of the first dynamic interface element in the user interface image 2 based on the position 5 and size 3 of the first dynamic interface element in the user interface image 2 with a resolution of 3, and obtains the display area of the display area. Image cache data 1; the synthesizer also determines the target area of the first dynamic interface element in the base image 3 based on the target position (ie position 3) and size 3 of the first dynamic interface element in the base image, and obtains the target area The image buffer data 2 of the above image buffer data 2; then the above image buffer data 1 and image buffer data 2 are synthesized into the new image buffer data of the target area. In this way, after the base image 3 is synthesized with all the dynamic interface elements in the user interface image 2, a synthesized image to be displayed is generated.
示例性的,如图8C所示,合成器将分辨率3的用户界面图像2和分辨率2的底图3合成为图1B所示的显示画面,并将该显示画面发送到显示屏194进行显示。具体的,以输入源2的选中指示框111为例,合成器基于按钮111的位置5和尺寸3确定选中指示框111对应的区域1,并获取选中指示框111在区域1的图像缓存数据;合成器还基于选中指示框111的位置3和尺寸3,确定选中指示框在底图中的目标区域为区域2,并获取区域2的图像缓存数据,区域2包括输入源2图标110;然后将区域1和区域2的图像缓存数据合成为区域2的合成图像的图像缓存数据,区域2的合成图像包括输入源2图标110和选中指示框111。这样,显示屏194根据区域2合成后的图像缓存数据,可以在区域2显示输入源2图标110和选中指示框111。Exemplarily, as shown in FIG. 8C , the synthesizer synthesizes the user interface image 2 of resolution 3 and the base image 3 of resolution 2 into the display picture shown in FIG. 1B , and sends the display picture to the display screen 194 for further processing. show. Specifically, taking the selected indicator box 111 of the input source 2 as an example, the synthesizer determines the area 1 corresponding to the selected indicator box 111 based on the position 5 and size 3 of the button 111, and obtains the image cache data of the selected indicator box 111 in area 1; The combiner is also based on the position 3 and size 3 of the selected indicator box 111, determines that the target area of the selected indicator box in the base map is area 2, and obtains the image cache data of area 2, area 2 includes the input source 2 icon 110; and then The image buffer data of area 1 and area 2 are synthesized into the image buffer data of the combined image of area 2 , and the combined image of area 2 includes the input source 2 icon 110 and the selected indication box 111 . In this way, the display screen 194 can display the input source 2 icon 110 and the selected indication box 111 in the area 2 according to the synthesized image buffer data in the area 2 .
在一些实施例中,方案2中也可以将第一用户界面的动态界面元素组成一个复合控件,作为一个整体的动态界面元素进行处理,为便于描述,后文将其统称为复合动态界面元素。在一种实现方式中,终端设备100可以存储有关复合动态界面元素的界面布局信息,终端设备100可以直接获取复合动态界面元素的位置和尺寸。在一种实现方式中,终端设备100未存储有关复合动态界面元素的界面布局信息,终端设备100可以基于复合动态界面元素包含的各动态界面元素的位置和尺寸,间接获取复合动态界面元素的位置和尺寸。In some embodiments, in solution 2, the dynamic interface elements of the first user interface can also be formed into a composite control, which is processed as a whole dynamic interface element. For the convenience of description, they are collectively referred to as composite dynamic interface elements hereinafter. In an implementation manner, the terminal device 100 may store interface layout information related to the composite dynamic interface element, and the terminal device 100 may directly acquire the position and size of the composite dynamic interface element. In one implementation, the terminal device 100 does not store the interface layout information about the compound dynamic interface element, and the terminal device 100 may indirectly acquire the position of the compound dynamic interface element based on the position and size of each dynamic interface element included in the compound dynamic interface element and size.
下面以切换输入源界面12为例进行具体说明。The following takes the switching of the input source interface 12 as an example for specific description.
示例性的,参考图9A,切换输入源界面12中的动态界面元素(即未选中指示框203、选中指示框111和未选中指示框204)组成复合动态界面元素301,切换输入源界面12的界面布局信息不包括复合动态界面元素301的位置和尺寸,终端设备100可以确定复合动态界面元素301的位置为复合动态界面元素301中的左上角界面元素的左上角位置,即未选中指示框203的左上角位置(a1,b1);并基于左上角位置(a1,b1)和复合动态界面元素301中的右下角界面元素的右下角位置(即未选中指示框204的右下角位置(a2,b2))确定复合动态界面元素301的尺寸,即(a2-a1)×(b2-b1)。可以理解,复合动态界面元素301中各动态界面元素的相对位置关系是基于切换输入源界面12的界面布局信息确定的。Exemplarily, with reference to FIG. 9A , the dynamic interface elements in the switching input source interface 12 (that is, the unselected indicator box 203, the selected indicator box 111 and the unselected indicator box 204) form a composite dynamic interface element 301, and the switching input source interface 12 The interface layout information does not include the position and size of the compound dynamic interface element 301, and the terminal device 100 can determine that the position of the compound dynamic interface element 301 is the upper left corner position of the upper left corner interface element in the compound dynamic interface element 301, that is, the indicator box 203 is not selected The upper left corner position (a1, b1); and based on the upper left corner position (a1, b1) and the lower right corner position of the lower right corner interface element in the composite dynamic interface element 301 (that is, the lower right corner position (a2, b2)) Determine the size of the compound dynamic interface element 301, that is, (a2-a1)×(b2-b1). It can be understood that the relative positional relationship of each dynamic interface element in the composite dynamic interface element 301 is determined based on the interface layout information of the switching input source interface 12 .
具体的,步骤201中,终端设备100绘制切换输入源界面12的动态部分对应的图层3时,先基于切换输入源界面12的界面布局信息,确定在分辨率2的用户界面图像中复合动态界面元素301的位置3和尺寸3。然后,应用程序层可以在指定分辨率的画布上绘制尺寸3的复合动态界面元素301,从而可以获取切换输入源界面12的指定分辨率的图层3。复合动态界面元素301在图层3中的实际位置为复合动态界面元素301的位置4。Specifically, in step 201, when the terminal device 100 draws the layer 3 corresponding to the dynamic part of the switching input source interface 12, first, based on the interface layout information of the switching input source interface 12, it is determined that the composite dynamic part in the user interface image with resolution 2 Position 3 and size 3 of interface element 301 . Then, the application layer can draw the composite dynamic interface element 301 of size 3 on the canvas with the specified resolution, so that the layer 3 with the specified resolution of the switching input source interface 12 can be obtained. The actual position of the compound dynamic interface element 301 in layer 3 is the position 4 of the compound dynamic interface element 301 .
示例性的,参考图9B,图层1、图层2和图层3的分辨率均相同,切换输入源界面12 的动态部分作为复合动态界面元素301绘制在图层3的左上角。Exemplarily, referring to FIG. 9B , layers 1 , 2 , and 3 have the same resolution, and the dynamic part of the switching input source interface 12 is drawn on the upper left corner of layer 3 as a composite dynamic interface element 301 .
示例性的,参考图9C,图层1、图层2和图层3的分辨率可以不同,切换输入源界面12的动态部分作为复合动态界面元素301绘制在图层3中,图层3的尺寸可以等于复合动态界面元素301的尺寸。Exemplarily, referring to FIG. 9C , the resolutions of layer 1, layer 2, and layer 3 can be different, and the dynamic part of the switching input source interface 12 is drawn in layer 3 as a composite dynamic interface element 301, and the dynamic part of layer 3 The size may be equal to the size of the composite dynamic interface element 301 .
步骤202中,界面合成模块接收到应用程序层发送的图层3的图层数据后,基于复合动态界面元素301在图层3中的位置4和尺寸3,确定复合动态界面元素301在用户界面图像2中的位置5;进而基于复合动态界面元素301在用户界面图像2中的位置5和尺寸3,将上述复合动态界面元素301整体合成到分辨率3的画布中,生成分辨3的用户界面图像2。示例性的,可以参考图9B和图9C所示的用户界面图像的合成。In step 202, after the interface composition module receives the layer data of layer 3 sent by the application program layer, based on the position 4 and the size 3 of the composite dynamic interface element 301 in layer 3, it is determined that the composite dynamic interface element 301 is in the user interface. Position 5 in image 2; furthermore, based on the position 5 and size 3 of the compound dynamic interface element 301 in the user interface image 2, the above compound dynamic interface element 301 is integrated into the canvas with resolution 3 to generate a user interface with resolution 3 image 2. For example, reference may be made to the synthesis of user interface images shown in FIG. 9B and FIG. 9C .
参见图9B和图9C,相比图8A和图8B相关实施例提供的用户界面图像合成的实现方式,本实施例的合成粒度可以更大,图8A和图8B所示的图层3以单个动态界面元素为粒度进行合成,而图9B和图9C所示的图层3以复合动态界面元素为粒度进行合成。Referring to Fig. 9B and Fig. 9C, compared with the implementation of user interface image synthesis provided by the relevant embodiments in Fig. 8A and Fig. 8B, the composition granularity of this embodiment can be larger, and the layer 3 shown in Fig. Dynamic interface elements are synthesized at a granularity, while layer 3 shown in FIG. 9B and FIG. 9C is synthesized at a granularity of composite dynamic interface elements.
需要说明的是,图9A至图9C是以切换输入源界面12为例进行说明,对本申请实施例不构成限定,待显示画面中的其他用户界面也能以复合动态界面元素为粒度绘制图层以及合成用户界面图像。It should be noted that, Fig. 9A to Fig. 9C are illustrated by switching the input source interface 12 as an example, which does not constitute a limitation to the embodiment of this application, and other user interfaces in the screen to be displayed can also draw layers with the granularity of composite dynamic interface elements and compositing user interface images.
在一些实施例中,图1A和图1B所示的应用场景中,当终端设备100检测到作用于有线输入源图标103的显示区域的输入操作,响应于上述输入操作,终端设备100在显示画面11上显示如图1B所示的有线输入源的按钮107和切换输入源界面12。在一些实施例中,响应于上述输入操作,显示画面中的底图不变,即图1B显示画面中的底图与图1A显示画面中的底图相同,均为底图1,终端设备100将显示画面中新增加的切换输入源界面12的所有界面元素组合为一个复合控件,即将切换输入源界面12整体作为一个复合动态界面元素302进行处理。图9D示例性示出了上述复合动态界面元素302,除了按钮203、按钮111和按钮204,复合动态界面元素302还包括切换输入源的文本108、输入源1图标109、输入源2图标110、输入源3图标112和背景113。切换输入源界面12对应的图层3的绘制和合成可以参考图9A至图9C的相关实施例的描述,此处不再赘述。In some embodiments, in the application scenarios shown in FIG. 1A and FIG. 1B , when the terminal device 100 detects an input operation acting on the display area of the wired input source icon 103, in response to the above input operation, the terminal device 100 displays the 11 displays a wired input source button 107 and an input source switching interface 12 as shown in FIG. 1B . In some embodiments, in response to the above-mentioned input operation, the base map in the display screen remains unchanged, that is, the base map in the display screen in FIG. 1B is the same as the base map in the display screen in FIG. All the interface elements of the newly added switching input source interface 12 in the display screen are combined into a compound control, that is, the switching input source interface 12 as a whole is processed as a composite dynamic interface element 302 . FIG. 9D exemplarily shows the composite dynamic interface element 302. In addition to the button 203, the button 111 and the button 204, the composite dynamic interface element 302 also includes the text 108 for switching the input source, the input source 1 icon 109, the input source 2 icon 110, Input source 3 icon 112 and background 113 . For the drawing and composition of the layer 3 corresponding to the switching input source interface 12, reference may be made to the descriptions of the related embodiments in FIG. 9A to FIG. 9C , which will not be repeated here.
本申请实施例所提方案1和方案2中,终端设备100将用户界面中静态部分转化为底图,预先绘制好高分辨率的底图并存储,终端设备100仅需绘制低分辨率的用户界面的动态部分。这样,大大降低了高分辨率界面刷新对CPU、GPU和内存等硬件的负载和性能要求。In the scheme 1 and scheme 2 proposed in the embodiment of this application, the terminal device 100 converts the static part of the user interface into a base map, draws the high-resolution base map in advance and stores it, and the terminal device 100 only needs to draw the low-resolution user interface The dynamic part of the interface. In this way, the load and performance requirements on hardware such as CPU, GPU and memory for high-resolution interface refresh are greatly reduced.
本申请实施例中,在方案1和方案2中,响应于上述指令1,应用程序层可以基于预设的帧率1绘制用户界面的动态部分对应的低分辨率的图层,并基于预设的帧率2从底图存储模块获取待显示画面所需的底图;然后合成器可以基于帧率1合成高分辨率的显示画面。其中,帧率2小于帧率1。这样,应用程序层低帧率地从底图存储模块获取底图,可以避免频繁图像解码带来的功耗和负载,转而可以进一步提高屏幕刷新率;在此基础上,应用程序层高帧率地绘制动态部分对应的图层,且合成器高帧率地合成显示画面,可以保证终端设备100快速响应用户的交互操作而进行界面更新。In the embodiment of this application, in scheme 1 and scheme 2, in response to the above instruction 1, the application layer can draw the low-resolution layer corresponding to the dynamic part of the user interface based on the preset frame rate 1, and based on the preset The frame rate of 2 obtains the base map required for the image to be displayed from the base image storage module; then the compositor can synthesize a high-resolution display image based on frame rate 1. Wherein, frame rate 2 is smaller than frame rate 1. In this way, the application layer obtains the basemap from the basemap storage module at a low frame rate, which can avoid the power consumption and load caused by frequent image decoding, and in turn can further increase the screen refresh rate; on this basis, the application layer high frame rate The layer corresponding to the dynamic part is drawn efficiently, and the combiner synthesizes the display picture at a high frame rate, which can ensure that the terminal device 100 can quickly respond to the user's interactive operation to update the interface.
本申请实施例提供了如下显示方法,该显示方法应用于终端设备100,该显示方法包括但不限于步骤S301至S303。其中,The embodiment of the present application provides the following display method, the display method is applied to the terminal device 100, and the display method includes but not limited to steps S301 to S303. in,
S301、响应于第一指令,绘制第一显示画面对应的第一分辨率的第一用户界面图像,并获取第一显示画面的第二分辨率的第一底图;其中,第一指令用于指示终端设备绘制第二分 辨率的第一显示画面,第一用户界面图像包括第一显示画面中的动态界面元素,第一底图包括第一显示画面中的静态界面元素,终端设备存储有已绘制的至少一个显示画面的底图,第二分辨率大于第一分辨率;S301. In response to the first instruction, draw the first user interface image of the first resolution corresponding to the first display screen, and acquire the first base image of the second resolution of the first display screen; wherein, the first instruction is used to Instructing the terminal device to draw a first display screen with a second resolution, the first user interface image includes dynamic interface elements in the first display screen, the first base image includes static interface elements in the first display screen, and the terminal device stores the The base map of at least one display screen is drawn, and the second resolution is greater than the first resolution;
S302、基于第一分辨率的第一用户界面图像和第二分辨率的第一底图,合成第二分辨率的第一显示画面;S302. Based on the first user interface image of the first resolution and the first base image of the second resolution, synthesize the first display image of the second resolution;
S303、通过显示屏显示第一显示画面。S303. Display the first display image through the display screen.
实施本申请实施例,将显示画面分为静态部分的底图和动态部分的用户界面图像,底图包括用显示画面中的静态界面元素,动态部分的用户界面图像仅包含显示画面中所有用户界面中的动态界面元素,终端设备存储有预先绘制好的高分辨率的底图;响应于第一指令,终端设备仅绘制低分辨率的包含动态界面元素的用户界面图像,然后将低分辨率的用户界面图像与高分辨率的底图的合成图像送到显示屏进行显示。实施本申请实施例,能够实现高分辨率的界面显示,有效提高了用户体验。此外,还大幅降低了对处理器和/或内存等硬件的负载和性能要求,有效降低了实时界面显示的功耗。Implement the embodiment of the present application, divide the display screen into the base map of the static part and the user interface image of the dynamic part, the base map includes the static interface elements in the display screen, and the user interface image of the dynamic part only includes all the user interfaces in the display screen The dynamic interface element in the terminal device stores a pre-drawn high-resolution basemap; in response to the first instruction, the terminal device only draws a low-resolution user interface image containing the dynamic interface element, and then converts the low-resolution The composite image of the user interface image and the high-resolution basemap is sent to the display screen for display. Implementing the embodiment of the present application can realize high-resolution interface display and effectively improve user experience. In addition, the load and performance requirements on hardware such as processor and/or memory are greatly reduced, and the power consumption of real-time interface display is effectively reduced.
在一些实施例中,上述第一显示画面包括至少一个用户界面,上述绘制第一显示画面对应的第一分辨率的第一用户界面图像,包括:绘制第一用户界面的动态界面元素对应的第一图层,第一用户界面是所述至少一个用户界面中的任一用户界面,第一图层的分辨率小于等于第一分辨率;将第一显示画面中的每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像。In some embodiments, the above-mentioned first display screen includes at least one user interface, and the above-mentioned drawing of the first user interface image with the first resolution corresponding to the first display screen includes: drawing the first user interface image corresponding to the dynamic interface elements of the first user interface A layer, the first user interface is any user interface in the at least one user interface, the resolution of the first layer is less than or equal to the first resolution; the dynamic interface of each user interface in the first display screen The layers corresponding to the elements are synthesized into the first user interface image with the first resolution.
本申请实施例中,示例性的,第一指令可以为前述指令1。参考图1A,第一指令可以是作用于图1A所示的有线输入源图标103的输入操作。第一分辨率可以是前述分辨率1,第二分辨率可以是前述分辨率2,第一显示画面可以是图6D所示的分辨率2的显示画面,第一用户界面图像可以是图6A至图6C所示的分辨率1的用户界面图像1,第一底图可以是图6D所示的分辨率2的底图3。In this embodiment of the present application, for example, the first instruction may be the aforementioned instruction 1. Referring to FIG. 1A , the first instruction may be an input operation acting on the wired input source icon 103 shown in FIG. 1A . The first resolution may be the aforementioned resolution 1, the second resolution may be the aforementioned resolution 2, the first display screen may be the display screen of resolution 2 shown in FIG. For the user interface image 1 of resolution 1 shown in FIG. 6C , the first base image may be base image 3 of resolution 2 shown in FIG. 6D .
本申请实施例中,示例性的,第一用户界面可以是图1B和图6D所描述的状态栏101、用户界面1或切换输入源界面12,第一图层可以是状态栏101的动态界面元素对应的图层1,第一图层可以是用户界面1的动态界面元素对应的图层2,第一图层可以是切换输入源界面12的动态界面元素对应的图层3。参考图6A和图6B,图层1、图层2和图层3的分辨率小于等于分辨率1。In the embodiment of the present application, for example, the first user interface may be the status bar 101, the user interface 1 or the switching input source interface 12 described in FIG. 1B and FIG. 6D, and the first layer may be the dynamic interface of the status bar 101 The layer 1 corresponding to the element, the first layer may be the layer 2 corresponding to the dynamic interface element of the user interface 1 , and the first layer may be the layer 3 corresponding to the dynamic interface element of the switching input source interface 12 . Referring to FIG. 6A and FIG. 6B , the resolutions of layer 1 , layer 2 and layer 3 are smaller than or equal to resolution 1 .
在一些实施例中,上述绘制第一用户界面的动态界面元素对应的第一图层,包括:基于第一用户界面的界面布局,确定在第一分辨率的第一用户界面图像中第一图层的尺寸为第一尺寸,第一图层的位置为第一位置,在第一尺寸的第一图层中第一动态界面元素的位置为第二位置以及第一动态界面元素的尺寸为第二尺寸,第一动态界面元素为第一图层中的第一用户界面的任一动态界面元素;基于第一动态界面元素的第二位置和第二尺寸,在第一尺寸的画布上绘制第一动态界面元素,生成第一用户界面的动态界面元素对应的第一尺寸的第一图层。In some embodiments, drawing the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first image in the first user interface image with the first resolution based on the interface layout of the first user interface The size of the layer is the first size, the position of the first layer is the first position, the position of the first dynamic interface element in the first layer of the first size is the second position and the size of the first dynamic interface element is the second position Two dimensions, the first dynamic interface element is any dynamic interface element of the first user interface in the first layer; based on the second position and the second size of the first dynamic interface element, draw the second dynamic interface element on the canvas of the first size A dynamic interface element, generating a first layer of a first size corresponding to the dynamic interface element of the first user interface.
本申请实施例中,示例性的,第一图层可以是前述第一用户界面的图层,第一图层的第一位置可以为前述位置1,第一图层的第一尺寸可以为前述尺寸1。第一动态界面元素的第二位置可以为前述位置2,第一动态界面元素的第二尺寸可以为前述尺寸2。In this embodiment of the present application, for example, the first layer may be the layer of the aforementioned first user interface, the first position of the first layer may be the aforementioned position 1, and the first size of the first layer may be the aforementioned Size 1. The second position of the first dynamic interface element may be the aforementioned position 2, and the second size of the first dynamic interface element may be the aforementioned size 2.
在一些实施例中,上述将第一显示画面中的每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像,包括:基于第一图层在第一分辨率的第一用户界面图 像中的第一位置和第一尺寸,将所述每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像。In some embodiments, the above synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first layer at the first resolution The layer corresponding to the dynamic interface element of each user interface is synthesized into the first user interface image of the first resolution.
在一些实施例中,上述基于第一分辨率的第一用户界面图像和第二分辨率的第一底图,合成第二分辨率的第一显示画面,包括:将第一分辨率的第一用户界面图像放大为第二分辨率的第一用户界面图像;将第二分辨率的第一用户界面图像和第二分辨率的第一底图合成为第二分辨率的第一显示画面。In some embodiments, synthesizing the first display image of the second resolution based on the first user interface image of the first resolution and the first base image of the second resolution includes: combining the first user interface image of the first resolution The user interface image is enlarged to a first user interface image with a second resolution; the first user interface image with a second resolution and the first base image with a second resolution are synthesized into a first display image with a second resolution.
本申请实施例中,示例性的,参见图6C和图6D,终端设备100将分辨率1的用户界面图像1放大为分辨率2的用户界面图像1,然后将分辨率2的用户界面图像1和分辨率2的底图3合成为图6D所示的显示画面。In this embodiment of the present application, for example, referring to FIG. 6C and FIG. 6D , the terminal device 100 enlarges the user interface image 1 with resolution 1 to the user interface image 1 with resolution 2, and then enlarges the user interface image 1 with resolution 2 and the bottom image 3 with resolution 2 to form the display screen shown in FIG. 6D .
在一些实施例中,上述绘制第一用户界面的动态界面元素对应的第一图层,包括:基于第一用户界面的界面布局,确定在第二分辨率的第一用户界面图像中的第一图层中第一动态界面元素的位置为第三位置以及第一动态界面元素的尺寸为第三尺寸;基于第一动态界面元素的第三尺寸,在第四尺寸的画布上绘制第一动态界面元素,生成第一图层,第一图层中动态界面元素间无重叠,第一动态界面元素在第一图层中的位置为第四位置。In some embodiments, drawing the first layer corresponding to the dynamic interface elements of the first user interface includes: determining the first layer in the first user interface image at the second resolution based on the interface layout of the first user interface. The position of the first dynamic interface element in the layer is the third position and the size of the first dynamic interface element is the third size; based on the third size of the first dynamic interface element, draw the first dynamic interface on the canvas of the fourth size element, generate the first layer, there is no overlap between dynamic interface elements in the first layer, and the position of the first dynamic interface element in the first layer is the fourth position.
本申请实施例中,示例性的,第一指令可以为前述指令1。参考图1A,第一指令可以是作用于图1A所示的有线输入源图标103的输入操作。第一分辨率可以是前述分辨率3,第二分辨率可以是前述分辨率2,第一显示画面可以是图8C所示的分辨率2的显示画面,第一用户界面图像可以是图8A至图8C所示的分辨率3的用户界面图像2,第一底图可以是图8C所示的分辨率2的底图3。In this embodiment of the present application, for example, the first instruction may be the aforementioned instruction 1. Referring to FIG. 1A , the first instruction may be an input operation acting on the wired input source icon 103 shown in FIG. 1A . The first resolution may be the aforementioned resolution 3, the second resolution may be the aforementioned resolution 2, the first display screen may be the display screen of resolution 2 shown in FIG. For user interface image 2 with resolution 3 shown in FIG. 8C , the first base image may be base image 3 with resolution 2 shown in FIG. 8C .
本申请实施例中,示例性的,第一用户界面可以是图1B和图8C所描述的状态栏101、用户界面1和切换输入源界面12,第一图层可以是状态栏101的动态界面元素对应的图层4,第一图层可以是用户界面1的动态界面元素对应的图层5,第一图层可以是切换输入源界面12的动态界面元素对应的图层6。参考图8A和图8B,图层1、图层2和图层3的分辨率小于等于分辨率3。In the embodiment of this application, for example, the first user interface may be the status bar 101, user interface 1 and switching input source interface 12 described in FIG. 1B and FIG. 8C, and the first layer may be the dynamic interface of the status bar 101 The layer 4 corresponding to the element, the first layer may be the layer 5 corresponding to the dynamic interface element of the user interface 1 , and the first layer may be the layer 6 corresponding to the dynamic interface element of the switching input source interface 12 . Referring to FIG. 8A and FIG. 8B , the resolutions of layer 1 , layer 2 and layer 3 are less than or equal to resolution 3 .
本申请实施例中,第一动态界面元素的第三位置可以是前述位置3,第一动态界面元素的第三尺寸可以是前述尺寸3,第一动态界面元素在第一图层中的实际位置可以是前述第四位置。第四尺寸可以为图8A或图8B所示的图层(图层4、图层5或图层6)的尺寸,即前述指定尺寸或指定分辨率对应的尺寸。In this embodiment of the application, the third position of the first dynamic interface element may be the aforementioned position 3, the third size of the first dynamic interface element may be the aforementioned size 3, and the actual position of the first dynamic interface element in the first layer It may be the aforementioned fourth position. The fourth size may be the size of the layer (layer 4, layer 5 or layer 6) shown in FIG. 8A or FIG. 8B, that is, the size corresponding to the aforementioned specified size or specified resolution.
在一些实施例中,第一图层中第一用户界面的各动态界面元素在第一图层中按第一预设顺序依次排列。In some embodiments, the dynamic interface elements of the first user interface in the first layer are sequentially arranged in a first preset order in the first layer.
示例性的,参考图8A和图8B,图层中各动态界面元素在图层的左上角按从左至右的顺序无重叠的分布。Exemplarily, referring to FIG. 8A and FIG. 8B , the dynamic interface elements in the layer are distributed in the order from left to right in the upper left corner of the layer without overlapping.
在一些实施例中,上述将第一显示画面中的每个用户界面的动态界面元素对应的图层合成为第一分辨率的第一用户界面图像,包括:基于第一图层中第一动态界面元素的第三尺寸和第四位置,确定第一动态界面元素在第一分辨率的第一用户界面图像中的位置为第五位置;基于第一图层中第一动态界面元素在第一用户界面图像中的第三尺寸和第五位置,合成第一分辨率的第一用户界面图像。In some embodiments, the above synthesizing the layer corresponding to the dynamic interface element of each user interface in the first display screen into the first user interface image with the first resolution includes: based on the first dynamic interface in the first layer The third size and the fourth position of the interface element determine that the position of the first dynamic interface element in the first user interface image of the first resolution is the fifth position; based on the position of the first dynamic interface element in the first layer in the first The third size and the fifth position in the user interface image are combined into the first user interface image with the first resolution.
示例性的,第一动态界面元素的第五位置可以是前述位置5。参考图8A和图8B,各图层的动态界面元素合成到用户界面图像2中。Exemplarily, the fifth position of the first dynamic interface element may be the aforementioned position 5 . Referring to FIG. 8A and FIG. 8B , the dynamic interface elements of each layer are synthesized into the user interface image 2 .
在一些实施例中,第一用户界面图像中多个图层的动态界面元素在第一用户界面图像中 按第二预设顺序依次排列。In some embodiments, the dynamic interface elements of multiple layers in the first user interface image are sequentially arranged in a second preset order in the first user interface image.
示例性的,参考图8A和图8B,各图层的动态界面元素在用户界面图像2中,以图层为单位按从上至下的顺序分布。Exemplarily, referring to FIG. 8A and FIG. 8B , the dynamic interface elements of each layer are distributed in the user interface image 2 in the order of layers from top to bottom.
在一些实施例中,上述基于第一图层中第一动态界面元素在第一用户界面图像中的第三尺寸和第五位置,合成第一分辨率的第一用户界面图像,包括:获取第一图层中第一动态界面元素所在的第一区域的图像数据,第一区域的尺寸为第三尺寸,第一区域的位置为第四位置;确定第一用户界面图像中第一动态界面元素所在的第二区域的图像数据,为第一区域的图像数据,第二区域的尺寸为第三尺寸,第二区域的位置为第五位置。In some embodiments, synthesizing the first user interface image with the first resolution based on the third size and the fifth position of the first dynamic interface element in the first layer in the first user interface image includes: obtaining the first user interface image The image data of the first area where the first dynamic interface element is located in a layer, the size of the first area is the third size, and the position of the first area is the fourth position; determine the first dynamic interface element in the first user interface image The image data of the second area is the image data of the first area, the size of the second area is the third size, and the position of the second area is the fifth position.
在一些实施例中,上述基于第一分辨率的第一用户界面图像和第二分辨率的第一底图,合成第二分辨率的第一显示画面,包括:获取第一用户界面图像中第一动态界面元素所在的第二区域的图像数据,第二区域的尺寸为第三尺寸,第二区域的位置为第五位置;获取第一底图中第三区域的图像数据,第三区域的尺寸为第三尺寸,第三区域的位置为第一动态界面元素的第三位置;将第二区域的图像数据和第三区域的图像数据合成为第一显示画面的第三区域的图像数据,生成第一显示画面;第三区域的尺寸为第三尺寸,第三区域的位置为第三位置。In some embodiments, synthesizing the first display picture with the second resolution based on the first user interface image with the first resolution and the first base image with the second resolution includes: obtaining the first user interface image in the first user interface image The image data of the second area where a dynamic interface element is located, the size of the second area is the third size, and the position of the second area is the fifth position; the image data of the third area in the first base image is obtained, and the image data of the third area is The size is the third size, and the position of the third area is the third position of the first dynamic interface element; the image data of the second area and the image data of the third area are synthesized into the image data of the third area of the first display screen, A first display image is generated; the size of the third area is a third size, and the position of the third area is a third position.
示例性的,第二区域可以是前述用户界面图像2中的区域1,第三区域可以是前述底图中的区域2。Exemplarily, the second area may be the area 1 in the aforementioned user interface image 2, and the third area may be the area 2 in the aforementioned base image.
在一些实施例中,终端设备运行第一显示画面时,第一显示画面中显示内容不可变的界面元素为静态界面元素,显示内容可变的界面元素为动态界面元素;或者,终端设备运行第一显示画面时,第一显示画面中显示内容的变化概率低于预设值的界面元素为静态界面元素,显示内容的变化概率大于等于预设值的界面元素为动态界面元素。In some embodiments, when the terminal device runs the first display screen, the interface elements whose display content cannot be changed in the first display screen are static interface elements, and the interface elements whose display content is variable are dynamic interface elements; or, the terminal device runs the first display screen. When a screen is displayed, interface elements whose display content change probability is lower than a preset value in the first display screen are static interface elements, and interface elements whose display content change probability is greater than or equal to a preset value are dynamic interface elements.
在一些实施例中,上述绘制第一显示画面对应的第一分辨率的第一用户界面图像,并获取第一显示画面的第二分辨率的第一底图,包括:以第一帧率绘制第一显示画面对应的第一分辨率的第一用户界面图像,并以第二帧率获取第一显示画面的第二分辨率的第一底图;第一帧率大于第二帧率;上述合成第二分辨率的第一显示画面,包括:以第一帧率合成第二分辨率的第一显示画面。In some embodiments, the drawing of the first user interface image of the first resolution corresponding to the first display picture, and obtaining the first base image of the second resolution of the first display picture include: drawing at the first frame rate The first user interface image of the first resolution corresponding to the first display screen, and obtain the first base map of the second resolution of the first display screen at a second frame rate; the first frame rate is greater than the second frame rate; the above Synthesizing the first display image with the second resolution includes: synthesizing the first display image with the second resolution at the first frame rate.
示例性的,第一帧率可以是前述帧率1,第二帧率可以是前述帧率2。Exemplarily, the first frame rate may be the aforementioned frame rate 1, and the second frame rate may be the aforementioned frame rate 2.
在一些实施例中,第四尺寸小于第一尺寸,第一尺寸为在第一分辨率的第一用户界面图像中第一图层的尺寸。示例性的,对比图8A和图6A(或者对比图8B和图6B)可知,第四尺寸(例如状态栏101对应的图层4的尺寸)小于第一尺寸(例如状态栏101对应的图层1的尺寸)。In some embodiments, the fourth size is smaller than the first size, which is the size of the first layer in the first user interface image at the first resolution. Exemplarily, comparing FIG. 8A with FIG. 6A (or comparing FIG. 8B with FIG. 6B ), it can be seen that the fourth size (for example, the size of layer 4 corresponding to status bar 101) is smaller than the first size (for example, the size of layer 4 corresponding to status bar 101 1 size).
相比传统的图层绘制,实时本申请实施例,通过降低所绘制的图层的尺寸,能够进一步降低绘制用户界面图像的性能要求和功耗。Compared with traditional layer drawing, in the embodiment of the present application, by reducing the size of the drawn layer, performance requirements and power consumption for drawing user interface images can be further reduced.
在一些实施例中,第四尺寸,大于在第二分辨率的第一用户界面图像中的第一用户界面的所有动态界面元素的尺寸之和。In some embodiments, the fourth size is greater than the sum of sizes of all dynamic interface elements of the first user interface in the first user interface image at the second resolution.
在一些实施例中,第四尺寸是终端设备基于上述尺寸之和确定的。In some embodiments, the fourth size is determined by the terminal device based on the sum of the above sizes.
在一些实施例中,第一动态界面元素是单个动态界面元素或由多个动态界面元素组成的复合动态界面元素。In some embodiments, the first dynamic interface element is a single dynamic interface element or a composite dynamic interface element composed of multiple dynamic interface elements.
实时本申请实施例,能够以复合动态界面元素为粒度进行绘制和合成。这样,绘制和合成的单元粒度更大,能够提高显示画面的绘制和合成效率。In this embodiment of the present application, drawing and compositing can be performed at the granularity of composite dynamic interface elements. In this way, the unit granularity of drawing and compositing is larger, which can improve the rendering and compositing efficiency of the display picture.
本申请的各实施方式可以任意进行组合,以实现不同的技术效果。Various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware. The programs can be stored in computer-readable storage media. When the programs are executed , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.
总之,以上所述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。In a word, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. All modifications, equivalent replacements, improvements, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims (20)

  1. 一种显示方法,其特征在于,应用于终端设备,所述终端设备包括显示屏,所述方法包括:A display method, characterized in that it is applied to a terminal device, the terminal device includes a display screen, and the method includes:
    响应于第一指令,绘制第一显示画面对应的第一分辨率的第一用户界面图像,并获取所述第一显示画面的第二分辨率的第一底图;其中,所述第一指令用于指示所述终端设备绘制所述第二分辨率的所述第一显示画面,所述第一用户界面图像包括所述第一显示画面中的动态界面元素,所述第一底图包括所述第一显示画面中的静态界面元素,所述终端设备存储有已绘制的至少一个显示画面的底图,所述第二分辨率大于所述第一分辨率;In response to the first instruction, draw the first user interface image of the first resolution corresponding to the first display screen, and acquire the first base image of the second resolution of the first display screen; wherein, the first instruction is used to instruct the terminal device to draw the first display screen with the second resolution, the first user interface image includes dynamic interface elements in the first display screen, and the first base image includes the The static interface elements in the first display screen, the terminal device stores a drawn base map of at least one display screen, and the second resolution is greater than the first resolution;
    基于所述第一分辨率的所述第一用户界面图像和所述第二分辨率的所述第一底图,合成所述第二分辨率的所述第一显示画面;synthesizing the first display image of the second resolution based on the first user interface image of the first resolution and the first base image of the second resolution;
    通过所述显示屏显示所述第一显示画面。The first display image is displayed through the display screen.
  2. 根据权利要求1所述的方法,其特征在于,所述第一显示画面包括至少一个用户界面,所述绘制第一显示画面对应的第一分辨率的第一用户界面图像,包括:The method according to claim 1, wherein the first display screen includes at least one user interface, and drawing the first user interface image of the first resolution corresponding to the first display screen includes:
    绘制第一用户界面的动态界面元素对应的第一图层,所述第一用户界面是所述至少一个用户界面中的任一用户界面,所述第一图层的分辨率小于等于所述第一分辨率;Draw a first layer corresponding to the dynamic interface elements of the first user interface, the first user interface is any user interface in the at least one user interface, and the resolution of the first layer is less than or equal to the first layer a resolution;
    将所述第一显示画面中的每个用户界面的动态界面元素对应的图层合成为所述第一分辨率的所述第一用户界面图像。and synthesizing the layers corresponding to the dynamic interface elements of each user interface in the first display frame into the first user interface image with the first resolution.
  3. 根据权利要求2所述的方法,其特征在于,所述绘制所述第一用户界面的动态界面元素对应的第一图层,包括:The method according to claim 2, wherein said drawing the first layer corresponding to the dynamic interface elements of the first user interface comprises:
    基于所述第一用户界面的界面布局,确定在所述第一分辨率的所述第一用户界面图像中所述第一图层的尺寸为第一尺寸,所述第一图层的位置为第一位置,在所述第一尺寸的所述第一图层中第一动态界面元素的位置为第二位置以及所述第一动态界面元素的尺寸为第二尺寸,所述第一动态界面元素为所述第一图层中的所述第一用户界面的任一动态界面元素;Based on the interface layout of the first user interface, it is determined that the size of the first layer in the first user interface image of the first resolution is a first size, and the position of the first layer is The first position, the position of the first dynamic interface element in the first layer of the first size is the second position and the size of the first dynamic interface element is the second size, the first dynamic interface The element is any dynamic interface element of the first user interface in the first layer;
    基于所述第一动态界面元素的第二位置和第二尺寸,在所述第一尺寸的画布上绘制所述第一动态界面元素,生成所述第一用户界面的动态界面元素对应的所述第一尺寸的所述第一图层。Based on the second position and the second size of the first dynamic interface element, the first dynamic interface element is drawn on the canvas of the first size, and the dynamic interface element corresponding to the first user interface is generated. The first layer of the first size.
  4. 根据权利要求3所述的方法,其特征在于,所述将所述第一显示画面中的每个用户界面的动态界面元素对应的图层合成为所述第一分辨率的所述第一用户界面图像,包括:The method according to claim 3, wherein the layers corresponding to the dynamic interface elements of each user interface in the first display screen are synthesized into the first user interface with the first resolution Interface images, including:
    基于所述第一图层在所述第一分辨率的所述第一用户界面图像中的第一位置和第一尺寸,将所述每个用户界面的动态界面元素对应的图层合成为所述第一分辨率的所述第一用户界面图像。Based on the first position and the first size of the first layer in the first user interface image with the first resolution, the layers corresponding to the dynamic interface elements of each user interface are synthesized into the The first user interface image at the first resolution.
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述第一分辨率的所述第一用户界面图像和所述第二分辨率的所述第一底图,合成所述第二分辨率的所述第一显示画面,包括:The method according to claim 4, wherein the second base map is synthesized based on the first user interface image of the first resolution and the first base map of the second resolution. resolutions of the first display screen, including:
    将所述第一分辨率的所述第一用户界面图像放大为所述第二分辨率的第一用户界面图像;upscaling the first user interface image at the first resolution to a first user interface image at the second resolution;
    将所述第二分辨率的所述第一用户界面图像和所述第二分辨率的所述第一底图合成为所 述第二分辨率的所述第一显示画面。Combining the first user interface image with the second resolution and the first base image with the second resolution into the first display image with the second resolution.
  6. 根据权利要求2所述的方法,其特征在于,所述绘制所述第一用户界面的动态界面元素对应的第一图层,包括:The method according to claim 2, wherein said drawing the first layer corresponding to the dynamic interface elements of the first user interface comprises:
    基于所述第一用户界面的界面布局,确定在所述第二分辨率的所述第一用户界面图像中的所述第一图层中第一动态界面元素的位置为第三位置以及所述第一动态界面元素的尺寸为第三尺寸;基于所述第一动态界面元素的所述第三尺寸,在第四尺寸的画布上绘制所述第一动态界面元素,生成所述第一图层,所述第一图层中动态界面元素间无重叠,所述第一动态界面元素在所述第一图层中的位置为第四位置。Based on the interface layout of the first user interface, determining that the position of the first dynamic interface element in the first layer in the first user interface image of the second resolution is the third position and the The size of the first dynamic interface element is a third size; based on the third size of the first dynamic interface element, drawing the first dynamic interface element on a canvas of a fourth size to generate the first layer , there is no overlap between the dynamic interface elements in the first layer, and the position of the first dynamic interface element in the first layer is the fourth position.
  7. 根据权利要求6所述的方法,其特征在于,所述第一图层中所述第一用户界面的各动态界面元素在第一图层中按第一预设顺序依次排列。The method according to claim 6, wherein the dynamic interface elements of the first user interface in the first layer are sequentially arranged in a first preset order in the first layer.
  8. 根据权利要求6所述的方法,其特征在于,所述将所述第一显示画面中的每个用户界面的动态界面元素对应的图层合成为所述第一分辨率的所述第一用户界面图像,包括:The method according to claim 6, wherein the layers corresponding to the dynamic interface elements of each user interface in the first display screen are synthesized into the first user interface with the first resolution Interface images, including:
    基于所述第一图层中第一动态界面元素的所述第三尺寸和所述第四位置,确定所述第一动态界面元素在所述第一分辨率的所述第一用户界面图像中的位置为第五位置;Based on the third size and the fourth position of the first dynamic interface element in the first layer, determine that the first dynamic interface element is in the first user interface image with the first resolution The position of is the fifth position;
    基于第一图层中第一动态界面元素在所述第一用户界面图像中的第三尺寸和第五位置,合成所述第一分辨率的所述第一用户界面图像。Synthesizing the first user interface image with the first resolution based on a third size and a fifth position of the first dynamic interface element in the first layer in the first user interface image.
  9. 根据权利要求8所述的方法,其特征在于,所述第一用户界面图像中多个图层的动态界面元素在所述第一用户界面图像中按第二预设顺序依次排列。The method according to claim 8, wherein the dynamic interface elements of multiple layers in the first user interface image are sequentially arranged in a second preset order in the first user interface image.
  10. 根据权利要求8所述的方法,其特征在于,所述基于第一图层中第一动态界面元素在所述第一用户界面图像中的第三尺寸和第五位置,合成所述第一分辨率的所述第一用户界面图像,包括:The method according to claim 8, wherein the first resolution is synthesized based on the third size and the fifth position of the first dynamic interface element in the first layer in the first user interface image. Rate the first UI image, including:
    获取所述第一图层中所述第一动态界面元素所在的第一区域的图像数据,所述第一区域的尺寸为所述第三尺寸,所述第一区域的位置为所述第四位置;Acquiring the image data of the first area where the first dynamic interface element is located in the first layer, the size of the first area is the third size, and the position of the first area is the fourth Location;
    确定所述第一用户界面图像中所述第一动态界面元素所在的第二区域的图像数据,为所述第一区域的图像数据,所述第二区域的尺寸为所述第三尺寸,所述第二区域的位置为所述第五位置。Determining that the image data of the second area where the first dynamic interface element is located in the first user interface image is the image data of the first area, and the size of the second area is the third size, so The position of the second area is the fifth position.
  11. 根据权利要求8至10中的任一项所述的方法,其特征在于,所述基于所述第一分辨率的所述第一用户界面图像和所述第二分辨率的所述第一底图,合成所述第二分辨率的所述第一显示画面,包括:The method according to any one of claims 8 to 10, wherein the first user interface image based on the first resolution and the first base image of the second resolution are The figure, synthesizing the first display frame of the second resolution, comprises:
    获取所述第一用户界面图像中第一动态界面元素所在的第二区域的图像数据,所述第二区域的尺寸为所述第三尺寸,所述第二区域的位置为所述第五位置;Acquiring image data of a second area where the first dynamic interface element is located in the first user interface image, the size of the second area is the third size, and the position of the second area is the fifth position ;
    获取所述第一底图中第三区域的图像数据,所述第三区域的尺寸为所述第三尺寸,所述第三区域的位置为所述第一动态界面元素的所述第三位置;Acquiring image data of a third area in the first base image, where the size of the third area is the third size, and the position of the third area is the third position of the first dynamic interface element ;
    将第二区域的图像数据和第三区域的图像数据合成为所述第一显示画面的第三区域的图 像数据,生成所述第一显示画面;所述第三区域的尺寸为所述第三尺寸,所述第三区域的位置为所述第三位置。Combining the image data of the second area and the image data of the third area into the image data of the third area of the first display screen to generate the first display screen; the size of the third area is the size of the third area size, the position of the third area is the third position.
  12. 根据权利要求1至11中的任一项所述的方法,其特征在于,所述终端设备运行所述第一显示画面时,所述第一显示画面中显示内容不可变的界面元素为所述静态界面元素,显示内容可变的界面元素为所述动态界面元素;或者,所述终端设备运行所述第一显示画面时,所述第一显示画面中显示内容的变化概率低于预设值的界面元素为静态界面元素,显示内容的变化概率大于等于预设值的界面元素为动态界面元素。The method according to any one of claims 1 to 11, wherein when the terminal device runs the first display screen, the interface element whose display content is not changeable in the first display screen is the The static interface element, the interface element whose display content is variable is the dynamic interface element; or, when the terminal device runs the first display screen, the change probability of the display content in the first display screen is lower than a preset value The interface elements are static interface elements, and the interface elements whose display content change probability is greater than or equal to a preset value are dynamic interface elements.
  13. 根据权利要求1至11中的任一项所述的方法,其特征在于,所述绘制第一显示画面对应的第一分辨率的第一用户界面图像,并获取所述第一显示画面的第二分辨率的第一底图,包括:The method according to any one of claims 1 to 11, characterized in that drawing the first user interface image of the first resolution corresponding to the first display screen, and obtaining the first user interface image of the first display screen The first basemap of the second resolution, including:
    以第一帧率绘制所述第一显示画面对应的所述第一分辨率的所述第一用户界面图像,并以第二帧率获取所述第一显示画面的所述第二分辨率的所述第一底图;所述第一帧率大于所述第二帧率;Draw the first user interface image of the first resolution corresponding to the first display picture at a first frame rate, and acquire the image of the second resolution of the first display picture at a second frame rate The first base image; the first frame rate is greater than the second frame rate;
    所述合成所述第二分辨率的所述第一显示画面,包括:以所述第一帧率合成所述第二分辨率的所述第一显示画面。The synthesizing the first display image with the second resolution includes: synthesizing the first display image with the second resolution at the first frame rate.
  14. 根据权利要求6所述的方法,其特征在于,所述第四尺寸小于第一尺寸,所述第一尺寸为在所述第一分辨率的所述第一用户界面图像中所述第一图层的尺寸。The method of claim 6, wherein the fourth size is smaller than a first size of the first image in the first user interface image at the first resolution. The dimensions of the layer.
  15. 根据权利要求6所述的方法,其特征在于,所述第四尺寸,大于在所述第二分辨率的所述第一用户界面图像中的所述第一用户界面的所有动态界面元素的尺寸之和。The method according to claim 6, wherein the fourth size is greater than the size of all dynamic interface elements of the first user interface in the first user interface image of the second resolution Sum.
  16. 根据权利要求15所述的方法,其特征在于,所述第四尺寸是所述终端设备基于所述尺寸之和确定的。The method according to claim 15, wherein the fourth size is determined by the terminal device based on the sum of the sizes.
  17. 根据权利要求3或6所述的方法,其特征在于,所述第一动态界面元素是单个动态界面元素或由多个动态界面元素组成的复合动态界面元素。The method according to claim 3 or 6, wherein the first dynamic interface element is a single dynamic interface element or a composite dynamic interface element composed of multiple dynamic interface elements.
  18. 一种终端设备,包括触控屏,存储器,一个或多个处理器,多个应用程序,以及一个或多个程序;其中,所述一个或多个程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个程序时,使得所述终端设备实现如权利要求1至17任一项所述的方法。A terminal device, including a touch screen, memory, one or more processors, multiple application programs, and one or more programs; wherein, the one or more programs are stored in the memory; its features That is, when the one or more processors execute the one or more programs, the terminal device implements the method according to any one of claims 1 to 17.
  19. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在终端设备上运行时,使得所述电子设备执行如权利要求1至17任一项所述的方法。A computer storage medium, characterized by comprising computer instructions, and when the computer instructions are run on a terminal device, the electronic device is made to execute the method according to any one of claims 1 to 17.
  20. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至17任一项所述的方法。A computer program product, characterized in that, when the computer program product is run on a computer, the computer is made to execute the method according to any one of claims 1 to 17.
PCT/CN2022/091634 2021-05-19 2022-05-09 Display method and related device WO2022242487A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110547689.X 2021-05-19
CN202110547689 2021-05-19
CN202110742507.4 2021-06-30
CN202110742507.4A CN115373777A (en) 2021-05-19 2021-06-30 Display method and related device

Publications (1)

Publication Number Publication Date
WO2022242487A1 true WO2022242487A1 (en) 2022-11-24

Family

ID=84060117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091634 WO2022242487A1 (en) 2021-05-19 2022-05-09 Display method and related device

Country Status (2)

Country Link
CN (1) CN115373777A (en)
WO (1) WO2022242487A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117557682A (en) * 2024-01-09 2024-02-13 腾讯科技(深圳)有限公司 Data processing method, apparatus, product, device, and medium
CN117707403A (en) * 2023-07-19 2024-03-15 荣耀终端有限公司 Display method and related device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117785201B (en) * 2024-02-26 2024-05-07 成都中科合迅科技有限公司 Component interface drawing method and system based on position identification record

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000209587A (en) * 1999-01-19 2000-07-28 Canon Inc Encoding device, its method, decoding device, its method and computer readable storage medium
US7590947B1 (en) * 2004-05-28 2009-09-15 Adobe Systems Incorporated Intelligent automatic window sizing
CN105139792A (en) * 2015-08-18 2015-12-09 京东方科技集团股份有限公司 Display method and display device
CN110471731A (en) * 2019-08-09 2019-11-19 网易(杭州)网络有限公司 Display interface method for drafting, device, electronic equipment and computer-readable medium
CN112703464A (en) * 2018-07-20 2021-04-23 托比股份公司 Distributed point-of-regard rendering based on user gaze

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000209587A (en) * 1999-01-19 2000-07-28 Canon Inc Encoding device, its method, decoding device, its method and computer readable storage medium
US7590947B1 (en) * 2004-05-28 2009-09-15 Adobe Systems Incorporated Intelligent automatic window sizing
CN105139792A (en) * 2015-08-18 2015-12-09 京东方科技集团股份有限公司 Display method and display device
CN112703464A (en) * 2018-07-20 2021-04-23 托比股份公司 Distributed point-of-regard rendering based on user gaze
CN110471731A (en) * 2019-08-09 2019-11-19 网易(杭州)网络有限公司 Display interface method for drafting, device, electronic equipment and computer-readable medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117707403A (en) * 2023-07-19 2024-03-15 荣耀终端有限公司 Display method and related device
CN117557682A (en) * 2024-01-09 2024-02-13 腾讯科技(深圳)有限公司 Data processing method, apparatus, product, device, and medium
CN117557682B (en) * 2024-01-09 2024-04-19 腾讯科技(深圳)有限公司 Data processing method, apparatus, product, device, and medium

Also Published As

Publication number Publication date
CN115373777A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN115473957B (en) Image processing method and electronic equipment
WO2020093988A1 (en) Image processing method and electronic device
WO2022242487A1 (en) Display method and related device
EP4148567A1 (en) Adaptive card generation method, terminal device and server
US20230418696A1 (en) Method for performing drawing operation by application and electronic device
WO2021213351A1 (en) Picture loading method and related apparatus
WO2023093776A1 (en) Interface generation method and electronic device
WO2023005900A1 (en) Screen projection method, electronic device, and system
WO2023071482A1 (en) Video editing method and electronic device
WO2023005751A1 (en) Rendering method and electronic device
WO2023093779A1 (en) Interface generation method and electronic device
WO2023016014A1 (en) Video editing method and electronic device
CN116166256A (en) Interface generation method and electronic equipment
CN116048933A (en) Fluency detection method
CN114793283A (en) Image encoding method, image decoding method, terminal device, and readable storage medium
US12079537B2 (en) Screen projection method and system, and related apparatus
CN116055738B (en) Video compression method and electronic equipment
WO2024061292A1 (en) Interface generation method and electronic device
CN116055715B (en) Scheduling method of coder and decoder and electronic equipment
WO2024082987A1 (en) Interface generation method and electronic device
WO2024169305A1 (en) Application management method and electronic device
WO2023051036A1 (en) Method and apparatus for loading shader
CN118445006A (en) Interface display method and related equipment
CN116166257A (en) Interface generation method and electronic equipment
CN117707449A (en) Display control method and related equipment

Legal Events

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

Ref document number: 22803810

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22803810

Country of ref document: EP

Kind code of ref document: A1