Multi-screen display method and related device
Patent Information
- Application Number
- CN202510577859.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-10-30
AI Technical Summary
如果每次更换扩展屏都需要重新调整分辨率、缩放比例等设置,用户的使用体验很差
Smart Images

Figure CN123011168A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to multi-screen display methods and related devices. Background Technology
[0002] With the development of electronic technology, multi-screen display scenarios are becoming increasingly common, such as connecting an office computer to an external monitor for multi-screen display. In multi-screen display scenarios, the content displayed on the main screen of this device can be transferred to an extended screen for display. Due to the wide variety of display specifications (such as physical size and resolution), when the specifications of the main screen and the extended screen differ significantly, problems such as the extended screen being unable to display or having poor display quality may occur, seriously affecting the user experience. For example, when displaying the content 1 of a high-resolution (e.g., 3K) main screen on a low-resolution (e.g., 3K) extended screen, if the physical size of each pixel on the extended screen is larger, the extended screen will display an enlarged version of the content 1, and will not be able to display the entire content 1, resulting in a very poor display quality.
[0003] Currently, in multi-screen display technology, if the extended screen's display quality is poor, users can manually adjust parameters such as resolution and scaling to achieve a better viewing experience. However, if users have to readjust these settings every time they switch extended screens, the user experience is very poor. Summary of the Invention
[0004] This application provides a multi-screen display method and related apparatus that can adaptively configure the DPI of various extended screens without requiring manual adjustment by the user, thereby enabling adaptive display on the extended screens and effectively improving the display effect of the extended screens in multi-screen display scenarios.
[0005] In a first aspect, this application provides a multi-screen display method applied to an electronic device. The electronic device includes a first display screen with a resolution of a first resolution. The method includes: the electronic device creating a first canvas with the first resolution; the electronic device acquiring a first DPI, the first DPI being determined based on the DPI of the first display screen and a DPI scaling factor, the DPI scaling factor indicating the scaling ratio of a second display screen relative to the DPI of the first display screen; the electronic device drawing first display content on the first canvas based on the first DPI, acquiring a first image of the first display content; acquiring a target image of the first display content based on the first image; the first image having a resolution of the first resolution, and the target image having a resolution of the second display screen of a second resolution; and displaying the target image of the first display content on the second display screen.
[0006] By implementing the embodiments of this application, a first DPI suitable for the second display screen can be adaptively configured; based on the first DPI, display content is drawn on a first canvas of the same resolution as the first display screen; after off-screen rendering and image scaling of the first canvas, the target image of the display content is obtained and sent to the second display screen. The display effect of the target image of the first display content displayed on the second display screen is similar to or consistent with the display effect of the first display content displayed on the first display screen. In this way, in a multi-screen display scenario, the DPI of various specifications of extended screens can be adaptively configured without manual adjustment by the user, thereby adaptively adjusting the display size of the first display content in the extended screen, achieving a better display size, and effectively improving the display effect of the extended screen in a multi-screen display scenario.
[0007] In one implementation, the first DPI is equal to the product of the first display screen's DPI and the DPI scaling factor.
[0008] In one implementation, the DPI scaling factor is determined based on a first ratio and a second ratio, wherein the first ratio is equal to the ratio of the physical sizes of the first display screen and the second display screen, and the second ratio is equal to the ratio of the reference viewing distances of the first display screen and the second display screen.
[0009] In one implementation, the electronic device stores preset values of a first DPI or DPI scaling factor corresponding to multiple display screens; the multiple display screens include a second display screen.
[0010] In one implementation, the method further includes: the electronic device creating a virtual display screen with the same resolution as the second display screen; sending a target image of the first display content to the second display screen, including: displaying the target image of the first display content on the virtual display screen; and sending the display content of the virtual display screen to the second display screen.
[0011] In one implementation, the electronic device draws first display content on a first canvas based on a first DPI and obtains a first image of the first display content, including: the electronic device draws the first display content on the first canvas based on the first DPI; the electronic device performs off-screen rendering on the display content of the first canvas and obtains a first image of the first display content.
[0012] In one implementation, the method further includes: the electronic device displaying a cursor on a virtual display screen based on user input; the size of the cursor on the virtual display screen is determined based on a DPI scaling factor and the original size of the cursor.
[0013] In one implementation, the size of the cursor on the virtual display screen is equal to the original size of the cursor divided by the DPI scaling factor, where the original size of the cursor is the size of the cursor on the first display screen.
[0014] In one implementation, obtaining a target image of the first display content based on the first image includes: scaling the first image based on the physical size or second resolution of the second display screen to obtain the scaled target image.
[0015] In one implementation, scaling the first image based on the physical size or second resolution of the second display screen to obtain a scaled target image includes: determining an image scaling ratio based on the physical size or second resolution of the second display screen; scaling the first image based on the image scaling ratio to obtain the scaled target image.
[0016] In one implementation, the method further includes: an electronic device acquiring screen information of a second display screen, the screen information including one or more of the following: the resolution of the display screen, and the physical size of the display screen.
[0017] Secondly, embodiments of this application provide an electronic device, which includes a processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, and the processor reading the computer instructions from the memory to cause the electronic device to execute the multi-screen display method described in the first aspect.
[0018] Thirdly, embodiments of this application provide a computer storage medium including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the multi-screen display method in any of the possible implementations of any of the above aspects.
[0019] Fourthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to execute the multi-screen display method in any of the possible implementations of any of the above aspects. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0021] Figure 2 A schematic diagram of a software architecture provided for an embodiment of this application;
[0022] Figure 3 A schematic diagram of another software architecture provided in an embodiment of this application;
[0023] Figure 4 A flowchart illustrating a multi-screen display method provided in an embodiment of this application;
[0024] Figure 5A flowchart illustrating another multi-screen display method provided in an embodiment of this application;
[0025] Figure 6 This is a flowchart illustrating another multi-screen display method provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0027] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0028] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0029] The technical concepts involved in this application are described below.
[0030] A pixel (px) is the basic unit of image display. A pixel does not have a fixed physical length. An image is a collection of pixels. Generally speaking, the more pixels per unit area, the higher the resolution, and the closer the displayed image will be to the real object.
[0031] The physical size of a screen, also known as its physical dimensions, can be expressed as the length of its diagonal. The unit is inches, where 1 inch equals 2.54 centimeters. Common mobile phone screen sizes include 4.2 inches, 5.0 inches, 5.2 inches, and 5.5 inches, while common computer screen sizes include 14.2 inches, 15.6 inches, 20.0 inches, 24.0 inches, and 27.0 inches.
[0032] Screen resolution refers to the physical resolution of the screen itself, measured in pixels (px). It indicates the horizontal and vertical physical pixel count of the screen. For screens of the same physical size, a lower resolution (e.g., 640*480) displays fewer pixels, resulting in larger individual pixel sizes; conversely, a higher resolution displays more pixels, leading to smaller individual pixel sizes. Common screen resolutions for electronic devices include 720P (1280×720), 1K (1920×1080), 2K (2560×1440), and 3K (3200×1800).
[0033] Screen pixel density (pixels per inch, PPI) is used to represent the number of physical pixels per inch of a screen. PPI describes the number of pixels on the screen itself, an inherent hardware physical characteristic that cannot be changed. Screen pixel density is calculated based on screen resolution and screen size.
[0034] Display pixel density (dots per inch, DPI) refers to the number of pixels that can be sampled, displayed, and output per inch. DPI describes the pixel density displayed on a terminal device and is a software attribute that can be configured. Manufacturers can also pre-configure the DPI before the electronic device leaves the factory, allowing the electronic device to display based on the default DPI configuration.
[0035] In this embodiment of the application, the screen may also be referred to as a display screen.
[0036] Currently, the display effect of extended screens in multi-screen display technology is unsatisfactory. This application provides a multi-screen display method that can adaptively configure the DPI of extended screens of various specifications without manual user adjustment, thereby enabling adaptive display on the extended screens and effectively improving the display effect of extended screens in multi-screen display scenarios. The multi-screen display method provided in this application will be further described in detail below with reference to the accompanying drawings.
[0037] First, the electronic device 100 to which the image processing method provided in this application embodiment is applied is introduced. The electronic device 100 can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, or a cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device (e.g., smart bracelet), in-vehicle device, smart home device (e.g., smart TV, smart screen, large-screen device, etc.), and / or smart city device. This application embodiment does not impose any special limitations on the specific type of electronic device 100.
[0038] For example, Figure 1 A schematic diagram of an electronic device 100 is shown.
[0039] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0040] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0041] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0042] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0043] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0044] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0045] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0046] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0047] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0048] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0049] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0050] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0051] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0052] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0053] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0054] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0055] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0056] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0057] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0058] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0059] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0060] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0061] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0062] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0063] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0064] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0065] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0066] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0067] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0068] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0069] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0070] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), and double data rate synchronous dynamic random access memory (DDR SDRAM, such as fifth-generation DDR SDRAM, which is generally called DDR5 SDRAM). Non-volatile memory can include disk storage devices and flash memory.
[0071] Flash memory can be classified according to its operating principle, including NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.; according to the level of the storage cell, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc.; and according to the storage specification, including universal flash storage (UFS) and embedded multimedia card (eMMC), etc.
[0072] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0073] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0074] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0075] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0076] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0077] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0078] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0079] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0080] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0081] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
[0082] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for image stabilization.
[0083] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0084] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0085] The accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes).
[0086] Distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser.
[0087] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED.
[0088] An ambient light sensor 180L is used to sense the ambient light intensity. Electronic device 100 can adaptively adjust the brightness of display screen 194 according to the sensed ambient light intensity.
[0089] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0090] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature processing strategy.
[0091] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0092] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords.
[0093] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0094] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0095] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0096] The SIM card interface 195 is used to connect the SIM card.
[0097] The electronic device 100 provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in industry, such as operating systems developed based on OpenHarmony, like HarmonyOS; or other operating systems such as Android™, iOS mobile operating systems; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; or it can be a future new operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of the electronic device 100, utilize and run hardware and software resources, and provide public services to organize user interaction. In the electronic device 100, the operating system connects downwards to the physical devices at the hardware layer and provides a runtime environment for application software upwards.
[0098] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.
[0099] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device 100 provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as Android™.
[0100] For example, such as Figure 2 As shown, the software architecture of electronic device 100 can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. Layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.
[0101] The kernel layer can include: Kernel Abstract Layer (KAL), kernel subsystem, driver subsystem, etc.
[0102] Kernel Abstraction Layer: By shielding the differences between multiple kernels, it provides basic kernel capabilities to the upper layers, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.
[0103] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (Lite Operating System), etc.
[0104] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.
[0105] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:
[0106] The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI business subsystem.
[0107] The basic software service subsystem set provides common and general software services. This set may include an event notification subsystem, a telephone service subsystem, a multimedia subsystem, an audio framework system, etc. The multimedia subsystem, in particular, provides a simple and easy-to-understand interface, allowing applications to access and use the system's media resources.
[0108] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include smart screen proprietary business subsystem, wearable proprietary business subsystem, IoT proprietary business subsystem, etc.
[0109] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.
[0110] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.
[0111] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.
[0112] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call), and StarFlash communication capabilities.
[0113] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages and multiple chip platforms.
[0114] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functions such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and the APIs they support may also differ.
[0115] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API includes the Audio API (audio service), Push API (push service), Account API (account service), and Smart Screen Recognition service.
[0116] Applications can include system apps and extended / third-party apps. System apps can include the home screen, control bar, settings, contacts, phone, camera, etc., while extended / third-party apps can include social applications, travel applications, etc.
[0117] In some embodiments, the software architecture of the electronic device may also refer to Figure 3 .like Figure 3 As shown, the system architecture, from top to bottom, consists of: application layer, system service layer, and kernel layer. In one implementation, the application layer, system service layer, and kernel layer can be defined as follows: Figure 2 Related descriptions.
[0118] The application layer can include application 1, which can be a system app, an extended app, or a third-party app. For example, application 1 can be a desktop, a gallery, or a Word document. The electronic device 100 can display the content of application 1 (e.g., display content 1) on the main screen (i.e., display screen 1); it can also adaptively configure a first DPI according to the extended screen (i.e., display screen 2), draw and render the display content 1 on the main screen based on the first DPI, and obtain image 1 of display content 1; then, according to the resolution of the extended screen, the image 1 is scaled to the target image, and the target image of display content 1 is sent to the extended screen.
[0119] The system service layer includes the DisplayManagerService (DMS) module, the WindowManagerService (WMS) module, the RenderService (RS) module, the Input module, and the Dedicated Distributed Storage Service (DSS) module. Among these,
[0120] The DMS module is used to manage the display information of electronic devices. It is responsible for creating a first canvas (Display) with the same resolution as the display screen 1. It adaptively configures the first DPI according to the DPI of the display screen 1 and the physical size of the display screen 2. The first DPI is used to draw the display content 1 of the first canvas.
[0121] The WMS module manages window information and is responsible for passing the screen information (such as physical resolution, PPI, DPI, etc.) of the display screen (e.g., display screen 1, display screen 2) to the Input module.
[0122] The RS module is used to draw and render the display content. It is responsible for creating a virtual display screen (Screen) with the same resolution as the display screen 2, rendering the display content 1 on the first canvas off-screen, scaling the rendered image 1, and sending the scaled target image for display. Optionally, RS can achieve image scaling by downsampling image 1.
[0123] The Input module is used to manage the input and output of the electronic device 100. It is responsible for converting the coordinates of display screen 1 and display screen 2, as well as the cursor scaling when display screen 2 displays content 1.
[0124] It is understandable that the DMS, WMS, and RS modules mainly handle display logic to achieve DPI adaptive display, while the Input module mainly ensures the correctness of subsequent user input operations such as mouse clicks, thereby reducing user setup operations and ensuring display and user experience.
[0125] The kernel layer is the layer between hardware and software. It can include hardware drivers and the operating system kernel, supporting functions such as memory management and system process management. For example, the kernel layer at least includes a Display Subsystem (DSS) module, a Hardware Interface (HDI) module, a GPU driver, and a display driver. The DSS module provides users with dedicated physical storage resources and is responsible for sending the content of the first canvas, after off-screen rendering and image scaling, to display screen 2. The HDI module can be used to obtain screen information (such as physical resolution) of display screen 2; the GPU driver can be used to drive the GPU to render the content on the first canvas; and the display driver can be used to drive the display screen to display content.
[0126] In a multi-screen display method provided in this application embodiment, a first DPI suitable for the display screen 2 is adaptively configured based on the DPI of the display screen 1 and the physical size of the display screen 2; based on the first DPI, display content 1 is drawn on a first canvas of the same resolution as the display screen 1; after off-screen rendering and image scaling on the first canvas, the target image of the display content 1 is obtained and displayed on the display screen 2. By implementing this application embodiment, the display effect of the target image of the display content 1 displayed on the display screen 2 and the display effect of the display content 1 displayed on the display screen 1 are similar or identical. Thus, in a multi-screen display scenario, without the user needing to manually adjust the resolution, scaling ratio, or other information of the extended display screen (e.g., display screen 2), the display effect of extended display screens of different specifications (e.g., different resolutions, different physical sizes) can be adaptively improved, effectively enhancing the user experience.
[0127] For example, such as Figure 4 As shown, the method flow of the multi-screen display method may include some or all of steps S101 to S108. In some embodiments, such as Figure 5 As shown, steps S101 to S108 can be specifically implemented as S101' to S108' respectively.
[0128] S101, Electronic device 100 acquires screen information of display screen 2, the screen information including the screen information of display screen 2, the screen information including the physical resolution of display screen 2 (i.e., resolution 2).
[0129] In some embodiments, such as Figure 5 As shown, step S101 specifically includes: the HDI module of the display screen 1 of the electronic device 100 obtains the screen information of the display screen 2 and reports the screen information of the display screen 2 to the RS module.
[0130] In this embodiment, the electronic device 100 can acquire screen information of the display screen 2 via wired or wireless communication. In some usage scenarios, the physical resolution of the display screen 2 is lower than the physical resolution (i.e., resolution 1) of the display screen 1 of the electronic device 100; the PPI of the display screen 2 is lower than the PPI of the display screen 1, that is, the physical size of a single pixel of the display screen 2 is larger than the physical size of a single pixel of the display screen 1.
[0131] In one scenario of multi-screen display, display screen 2 can be an independent external monitor connected to electronic device 100. Electronic device 100 and display screen 2 can communicate via wired or wireless means. Electronic device 100 can receive screen information sent by display screen 2. For example, display screen 1 can be a laptop, tablet, or mobile phone, while display screen 2 can be an independent smart display, an external monitor for a computer, etc.
[0132] In another application scenario of multi-screen display, display screen 1 and display screen 2 can be two independent displays on electronic device 100. Electronic device 100 stores the screen information of display screen 2 in its memory, and electronic device 100 can directly read the screen information of display screen 2 from the memory. For example, display screen 1 is the main screen of electronic device 100, and display screen 2 is the rear screen of electronic device 100.
[0133] In another application scenario of multi-screen display, the display screen 2 can be the display screen of other smart terminals. The electronic device 100 and the smart terminal (e.g., a smart TV or desktop computer) can communicate via wired or wireless means to obtain screen information from the display screen 2. This application embodiment does not specifically limit the device type of the smart terminal.
[0134] S102. Based on the resolution 2 of the display screen 2, the electronic device 100 creates a virtual display screen (Screen) with a resolution of 2.
[0135] In some embodiments, such as Figure 5 As shown, step S102 specifically includes: the RS module of electronic device 100 creates a virtual display screen with the same resolution as display screen 2.
[0136] S103. Based on the resolution of the display screen 1 of the electronic device 100, the electronic device 100 creates a first canvas (Display) corresponding to the display screen 1.
[0137] In some embodiments, such as Figure 5 As shown, step S103 specifically includes: based on the resolution 1 of the display screen 1 of the electronic device 100, the DMS module of the electronic device 100 creates a first canvas corresponding to the display screen 1.
[0138] The canvas (Display) is the foundation for laying out and drawing the displayed content. This application does not limit the method of drawing the content or the method of rendering the canvas onto the display screen; drawing and rendering methods in the prior art can be referenced.
[0139] S104, the electronic device 100 acquires the first DPI and draws the display content 1 on the first canvas based on the first DPI.
[0140] In some embodiments, such as Figure 5 As shown, step S104 specifically includes: the DMS module of the electronic device 100 obtains the first DPI, and the RS module draws the display content 1 on the first canvas based on the first DPI.
[0141] In some embodiments, the electronic device 100 determines a DPI scaling factor based on the physical size of display screen 1, the physical size of display screen 2, the reference viewing distance of display screen 1, and the reference viewing distance of display screen 2; the electronic device 100 determines a first DPI based on the DPI scaling factor and the display pixel density DPI of display screen 1. In one implementation, the DPI scaling factor is equal to a first ratio of the physical sizes of display screen 1 and display screen 2 divided by a second ratio of the reference viewing distances; the first DPI is equal to the display pixel density DPI1 of display screen 1 multiplied by the DPI scaling factor. The aforementioned reference viewing distance of the display screen refers to the preferred distance between the user's eye and the display screen when using the display screen. The reference viewing distance of the display screen is determined based on the physical size of the display screen. This application embodiment does not specifically limit the reference viewing distance of various display screen specifications.
[0142] For example, the physical size of display 1 is 14.2 inches, the physical size of display 2 is 24 inches, the reference viewing distance of display 1 is 50 cm, and the reference viewing distance of display 2 is 70 cm. a1 is an adjustment parameter for the DPI scaling factor, which can be set according to actual usage needs. Optionally, a1 = 1, the DPI scaling factor is equal to 0.83; the first DPI = 0.83 * DPI1. For example, the DPI1 of display screen 1 is 300, and the first DPI is 249.
[0143] In some embodiments, the screen information in step S101 includes the physical size of the display screen 2. In some embodiments, the screen information in step S101 does not include the physical size of the display screen 2, and the electronic device 100 calculates the physical size of the display screen 2 based on the resolution of the display screen 2.
[0144] In some embodiments, based on the physical size of the display screen 1 and the physical size of various extended display screens (e.g., display screen 2), the developers obtain the optimal value of the first DPI of various extended display screens in advance through experiments, and preset the optimal value as the first DPI; the electronic device 100 stores the first DPI.
[0145] S105, the electronic device 100 performs off-screen rendering on the display content 1 of the first canvas and obtains the rendered image 1 of the display content 1.
[0146] In some embodiments, such as Figure 5 As shown, step S105 specifically includes: the RS module of the electronic device 100 performs off-screen rendering of the display content 1 of the first canvas to obtain the image 1 after rendering of the display content 1.
[0147] S106, Electronic device 100 performs image scaling on image 1 to obtain the scaled target image, the target image having a resolution of resolution 2.
[0148] In some embodiments, such as Figure 5 As shown, step S106 specifically includes: the RS module of the electronic device 100 performs image scaling (e.g., downsampling) on the image 1 of the display content 1 according to the resolution 2 of the display screen 2, to obtain the scaled target image. It can be understood that the resolution of image 1 is the resolution 1 of the display screen 1 (e.g., 3K), and the resolution of the scaled target image is the resolution 2 of the display screen 2 (e.g., 1K); thus, the target image of the display content 1 can be displayed full-screen on the display screen 2. In this embodiment, the electronic device 100 can use image scaling algorithm 1 to scale the image 1 of the display content 1 to obtain the target image of the display content 1; this embodiment does not specifically limit the image scaling algorithm 1, such as downsampling algorithm, bilinear interpolation algorithm, etc.
[0149] In some embodiments, the electronic device 100 determines an image scaling ratio; based on this scaling ratio, it scales the image 1 to obtain a scaled target image. In one implementation, the image scaling ratio is determined based on the resolution 1 of the display screen 1 and the resolution 2 of the display screen 2. In one implementation, the image scaling ratio is equal to the average of the horizontal scaling ratio and the vertical scaling ratio, where the horizontal scaling ratio is equal to the ratio of the number of horizontal pixels in resolution 2 to the number of horizontal pixels in resolution 1, and the vertical scaling ratio is equal to the ratio of the number of vertical pixels in resolution 2 to the number of vertical pixels in resolution 1. In one implementation, the image scaling ratio is equal to the ratio of the physical size of the display screen 2 to the physical size of the display screen 1.
[0150] S107, Electronic device 100 displays the target image of display content 1 on the virtual display screen corresponding to display screen 2.
[0151] In some embodiments, such as Figure 5 As shown, step S107 specifically includes: the RS module of electronic device 100 displays the target image of display content 1 on the virtual display screen corresponding to display screen 2.
[0152] S108, the electronic device 100 sends the display content of the virtual display screen to the display screen 2.
[0153] In some embodiments, the DSS module of the electronic device 100 sends the display content of the virtual display screen to the display screen 2 for display.
[0154] In some embodiments, based on user input (e.g., mouse input), the electronic device 100 can display a cursor on a virtual display screen; the size of the cursor on the virtual display screen is determined based on a DPI scaling factor and the original size of the cursor. In one implementation, the size of the cursor on the virtual display screen is equal to the original size of the cursor divided by the DPI scaling factor. In one implementation, the original size of the cursor is the size of the cursor on display screen 1.
[0155] It should be noted that, not limited to display screen 2, electronic device 100 can also connect to other extended screens at the same time, and adaptively configure the first DPI for other extended screens, while achieving better display effects on other extended screens as well.
[0156] By implementing the embodiments of this application, to address the problem that individual pixels on the low-resolution display screen 2 are too large compared to the high-resolution display screen 1, a virtual display screen (Screen) for the low-resolution display screen and a first canvas (Display) for the high-resolution display screen can be created, adaptively configuring a first DPI suitable for the display screen 2; then, based on the first DPI, display content 1 is drawn on the first canvas, and after off-screen rendering and image scaling, it is displayed on the virtual display screen and sent to the display screen 2. In this way, the target image of the first display content displayed on the display screen 2 and the display effect (e.g., display size) of the first display content displayed on the display screen 1 are similar to or consistent with each other, effectively solving the aforementioned problem.
[0157] In conjunction with the foregoing embodiments, this application provides a multi-screen display method, which is applied to an electronic device. The electronic device includes a first display screen, and the resolution of the first display screen is a first resolution. For example, as shown... Figure 6 As shown, the method includes some or all of steps S201 to S205.
[0158] S201. The electronic device creates a first canvas with a first resolution, and the first display screen of the electronic device has a first resolution.
[0159] S202. The electronic device acquires a first DPI, which is determined based on the DPI of the first display screen and a DPI scaling factor, wherein the DPI scaling factor indicates the scaling ratio of the second display screen relative to the DPI of the first display screen.
[0160] S203. The electronic device draws first display content on a first canvas based on a first DPI and acquires a first image of the first display content.
[0161] S204. The electronic device acquires a target image of the first display content based on the first image; the resolution of the first image is a first resolution, and the resolution of the target image is a second resolution of the second display screen.
[0162] S205, Send the target image of the first display content to the second display screen.
[0163] It should be noted that the first display screen can be the display screen 1 of the aforementioned embodiment, and the first resolution can be the resolution 1 of the aforementioned embodiment; the second display screen can be the display screen 2 of the aforementioned embodiment, and the second resolution can be the resolution 2 of the aforementioned embodiment; the first display content can be the display content 1 of the aforementioned embodiment.
[0164] In one implementation, the first DPI is equal to the product of the first display screen's DPI and the DPI scaling factor.
[0165] In one implementation, the DPI scaling factor is determined based on a first ratio and a second ratio, wherein the first ratio is equal to the ratio of the physical sizes of the first display screen and the second display screen, and the second ratio is equal to the ratio of the reference viewing distances of the first display screen and the second display screen.
[0166] In one implementation, the electronic device stores preset values of a first DPI or DPI scaling factor corresponding to multiple display screens; the multiple display screens include a second display screen.
[0167] In one implementation, the method further includes: the electronic device creating a virtual display screen with the same resolution as the second display screen; sending a target image of the first display content to the second display screen, including: displaying the target image of the first display content on the virtual display screen; and sending the display content of the virtual display screen to the second display screen.
[0168] In one implementation, the electronic device draws first display content on a first canvas based on a first DPI and obtains a first image of the first display content, including: the electronic device draws the first display content on the first canvas based on the first DPI; the electronic device performs off-screen rendering on the display content of the first canvas and obtains a first image of the first display content.
[0169] In one implementation, the method further includes: the electronic device displaying a cursor on a virtual display screen based on user input; the size of the cursor on the virtual display screen is determined based on a DPI scaling factor and the original size of the cursor.
[0170] In one implementation, the size of the cursor on the virtual display screen is equal to the original size of the cursor divided by the DPI scaling factor, where the original size of the cursor is the size of the cursor on the first display screen.
[0171] In one implementation, obtaining a target image of the first display content based on the first image includes: scaling the first image based on the physical size or second resolution of the second display screen to obtain the scaled target image.
[0172] In one implementation, scaling the first image based on the physical size or second resolution of the second display screen to obtain a scaled target image includes: determining an image scaling ratio based on the physical size or second resolution of the second display screen; scaling the first image based on the image scaling ratio to obtain the scaled target image.
[0173] In one implementation, the method further includes: an electronic device acquiring screen information of a second display screen, the screen information including one or more of the following: the resolution of the display screen, and the physical size of the display screen.
[0174] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.
[0175] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0177] In summary, the above description is merely an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the disclosure of this application should be included within the scope of protection of this application.
Claims
1. A multi-screen display method, applied to electronic devices, characterized in that, The electronic device includes a first display screen, the first display screen having a first resolution, and the method includes: The electronic device creates a first canvas at the first resolution; The electronic device acquires a first DPI, which is determined based on the DPI of the first display screen and a DPI scaling factor, wherein the DPI scaling factor indicates the scaling ratio of the second display screen relative to the DPI of the first display screen. The electronic device draws first display content on the first canvas based on the first DPI and acquires a first image of the first display content. The electronic device acquires a target image of the first display content based on the first image; the resolution of the first image is the first resolution, and the resolution of the target image is the second resolution of the second display screen; The electronic device sends the target image of the first display content to the second display screen.
2. The method according to claim 1, characterized in that, The first DPI is equal to the product of the DPI of the first display screen and the DPI scaling factor.
3. The method according to claim 1 or 2, characterized in that, The DPI scaling factor is determined based on a first ratio and a second ratio, wherein the first ratio is equal to the ratio of the physical sizes of the first display screen and the second display screen, and the second ratio is equal to the ratio of the reference viewing distances of the first display screen and the second display screen.
4. The method according to claim 1, characterized in that, The electronic device stores preset values of a first DPI or DPI scaling factor corresponding to various display screen specifications; the various display screen specifications include a second display screen.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The electronic device creates a virtual display screen with the same resolution as the second display screen; Sending the target image of the first display content to the second display screen includes: Display the target image of the first display content onto the virtual display screen; The content displayed on the virtual display screen is sent to the second display screen.
6. The method according to any one of claims 1 to 5, characterized in that, The electronic device, based on the first DPI, draws first display content on the first canvas and acquires a first image of the first display content, including: The electronic device draws the first display content on the first canvas based on the first DPI; The electronic device performs off-screen rendering of the content displayed on the first canvas to obtain the first image of the first displayed content.
7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Based on user input, the electronic device displays a cursor on the virtual display screen; the size of the cursor on the virtual display screen is determined based on the DPI scaling factor and the original size of the cursor.
8. The method according to claim 7, characterized in that, The size of the cursor on the virtual display screen is equal to the original size of the cursor divided by the DPI scaling factor, and the original size of the cursor is the size of the cursor on the first display screen.
9. The method according to any one of claims 1 to 8, characterized in that, The step of obtaining the target image of the first display content based on the first image includes: Based on the physical size or second resolution of the second display screen, the first image is scaled to obtain the target image after scaling.
10. The method according to claim 9, characterized in that, The scaling of the first image based on the physical size or second resolution of the second display screen to obtain the scaled target image includes: The image scaling ratio is determined based on the physical size of the second display screen or the second resolution; Based on the image scaling ratio, the first image is scaled to obtain the scaled target image.
11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: The electronic device acquires screen information of the second display screen, the screen information including one or more of the following: the resolution of the display screen, the physical size of the display screen.
12. An electronic device, characterized in that, include: A processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, which, when the processor reads from the memory, cause the electronic device to perform the multi-screen display method as described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the multi-screen display method as described in any one of claims 1 to 11.
14. A computer program product, characterized in that, When the computer program product is run on a computer, the computer performs the multi-screen display method as described in any one of claims 1 to 11.
