Mirror image screen projection method, device and equipment

By controlling the screen mirroring device to display data frames at its own frame rate and adjusting the sending strategy when necessary, the problem of display stuttering caused by the low frame rate of the screen mirroring device was solved, achieving a smooth screen mirroring effect.

CN121560262APending Publication Date: 2026-02-24VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511760952.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

When a screen mirroring device is connected to a device being mirrored, the frame rate of the device being mirrored is lower than that of the screen mirroring device, which causes the frame mirroring device to have a longer frame rate cycle and a lower frame rate, resulting in display stuttering.

Method used

The screen of the projection device is controlled to display data frames at its own first refresh rate. When the first refresh rate is greater than the second refresh rate of the projected device, data frames are sent according to the refresh rate of the projected device to ensure that the screen refresh rate of the projection device is not affected.

Benefits of technology

By adjusting the display and transmission strategies of the projection device, display lag was avoided, ensuring that the screen of the projection device refreshed data frames normally according to its refresh rate, thus providing a smooth display experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560262A_ABST
    Figure CN121560262A_ABST
Patent Text Reader

Abstract

The invention discloses a mirror image screen projection method, device and equipment, and belongs to the technical field of multi-screen interaction. The mirror image screen projection method applied to first electronic equipment comprises the following steps: under the condition that the first electronic equipment performs mirror image screen projection on second electronic equipment through a connecting line, controlling a screen of the first electronic equipment to display data frames at a first frame refreshing rate; wherein the first electronic equipment and the second electronic equipment are in communication connection through a connecting line, and the first frame refreshing rate is the frame refreshing rate of a screen of the first electronic equipment; under the condition that the first frame refreshing rate is greater than the second frame refreshing rate, sending the data frame to the second electronic equipment according to the second frame refreshing rate; wherein the second frame refreshing rate is the frame refreshing rate of the screen of the second electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of multi-screen interaction technology, specifically relating to a screen mirroring method, apparatus, and device. Background Technology

[0002] Screen mirroring is a technology that transmits content from electronic devices such as mobile phones, tablets, and computers to large screens such as TVs and projectors in real time.

[0003] In related technologies, when a screen mirroring device and a screen-projected device are mirrored via a connection cable, the frame refresh process of the screen mirroring device and the screen-projected device is serial. That is, the data frame is first sent to the screen mirroring device and then to the screen-projected device. The data frame is sent according to the refresh rate of the screen mirroring device. If the refresh rate of the screen-projected device is lower than that of the screen mirroring device, the refresh cycle of the screen mirroring device will become longer and the refresh rate will become lower due to the influence of the refresh rate of the screen-projected device, resulting in screen stuttering on the screen mirroring device. Summary of the Invention

[0004] The purpose of this application is to provide a screen mirroring method, apparatus, and device that can solve the problem of display lag in screen mirroring devices.

[0005] In a first aspect, embodiments of this application provide a screen mirroring method applied to a first electronic device, the method comprising: When the first electronic device mirrors the screen to the second electronic device via a connecting cable, the screen of the first electronic device is controlled to display data frames at a first refresh rate; wherein the first electronic device and the second electronic device are connected in communication via a connecting cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. If the first refresh rate is greater than the second refresh rate, a data frame is sent to the second electronic device according to the second refresh rate; wherein, the second refresh rate is the refresh rate of the screen of the second electronic device.

[0006] Secondly, embodiments of this application provide a screen mirroring device applied to a first electronic device, the device comprising: The display module is used to control the screen of the first electronic device to display data frames at a first refresh rate when the first electronic device is mirrored to the second electronic device via a connecting cable; wherein the first electronic device and the second electronic device are communicatively connected via a connecting cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. The sending module is used to send data frames to the second electronic device according to the second refresh rate when the first refresh rate is greater than the second refresh rate; wherein the second refresh rate is the refresh rate of the screen of the second electronic device.

[0007] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores programs or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the screen mirroring method provided in embodiments of this application.

[0008] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions, which, when executed by a processor, implement the steps of the screen mirroring method provided in embodiments of this application.

[0009] Fifthly, this application provides a chip that includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the screen mirroring method provided in this application.

[0010] Sixthly, embodiments of this application provide a computer program product, which is stored in a storage medium and executed by at least one processor to implement the steps of the screen mirroring method provided in embodiments of this application.

[0011] In this embodiment, when a first electronic device mirrors its screen to a second electronic device via a connection cable, the screen of the first electronic device is controlled to display data frames at a first refresh rate. The first and second electronic devices are communicatively connected via the connection cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. If the first refresh rate is greater than a second refresh rate, data frames are sent to the second electronic device according to the second refresh rate, where the second refresh rate is the refresh rate of the screen of the second electronic device. Thus, the refresh rate of the first electronic device is not affected by the refresh rate of the second electronic device, and the screen of the first electronic device refreshes data frames according to its refresh rate, resulting in smooth display without lag. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating a screen mirroring method provided in some embodiments of this application; Figure 2 This is a schematic diagram of a data frame being transmitted according to some embodiments of this application; Figure 3 This is another schematic diagram of the data frame being transmitted provided by some embodiments of this application; Figure 4 This is a schematic diagram of an overall process for screen mirroring provided in some embodiments of this application; Figure 5 This is a schematic diagram of another overall process for screen mirroring provided in some embodiments of this application. Figure 6These are schematic diagrams of the screen mirroring device provided in some embodiments of this application; Figure 7 These are schematic diagrams of the structure of electronic devices provided in some embodiments of this application; Figure 8 These are schematic diagrams of the hardware structure of electronic devices provided in some embodiments of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0015] The terminology used in the implementation section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The terminology involved in the embodiments of this application is explained below.

[0016] The refresh rate, also known as the frame rate, refers to the number of times a display refreshes its image per second, measured in Hertz (Hz).

[0017] DisplayManager (DpManager) is a service used to manage displays, including managing the configuration of multiple displays on a device, switching display modes, and adjusting screen parameters.

[0018] A control is a graphical user interface element, a basic building block of the user interface, such as a window or text box. It is displayed in the program interface of any application. Controls can be buttons, text boxes, labels, etc., and are used to control all the data processed by each application and the interactive operations related to that data.

[0019] The screen projection method, apparatus, and device provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0020] It should be noted that the screen mirroring method provided in this application can be applied to a first electronic device, which can be a mobile phone, tablet computer, laptop computer, PDA, or other electronic device. Some embodiments of this application use an electronic device as the executing entity to illustrate the screen mirroring method provided in this application.

[0021] Figure 1 is a flowchart illustrating a screen mirroring method provided in some embodiments of this application. The screen mirroring method may include: Step 101: When the first electronic device mirrors the screen to the second electronic device via a connecting cable, control the screen of the first electronic device to display data frames at a first refresh rate; wherein, the first electronic device and the second electronic device are connected for communication via a connecting cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. In some embodiments of this application, the second electronic device may be an electronic device such as a television or a projector.

[0022] In some embodiments of this application, the first electronic device and the second electronic device are communicatively connected via a connection cable. When the first electronic device has a Type-C interface and the second electronic device has a High Definition Multimedia Interface (HDMI), the first electronic device and the second electronic device are communicatively connected via a Type-C to HDMI connection cable.

[0023] After the first and second electronic devices are connected via a cable, and the screen of the second electronic device is on, the first electronic device receives an HDMI connection signal and initiates an Interrupt Request (IRQ) to notify the kernel to recognize the hardware interface insertion event. This triggers the Universal Serial Bus (USB) driver to recognize the interface as HDMI. The graphics compositing service in the Hardware Composer (HWC) receives the hardware connection event, synchronizes the configuration information of the currently connected HDMI screen, and reports the screen display information to the graphics processing service (SurfaceFlinger) to create a new HDMI physical screen object. The information continues to be synchronized to the display service in the framework layer. The screen of the first electronic device displays data frames at its refresh rate.

[0024] In some embodiments of this application, before step 101, the screen mirroring method provided in this application may further include: displaying a prompt message; wherein the prompt message is used to prompt the user to confirm screen mirroring; receiving a first input; wherein the first input is used to trigger screen mirroring.

[0025] In some embodiments of this application, the prompt information in these embodiments may be "Do you agree to the mirroring of the first electronic device onto the second electronic device?"

[0026] In some embodiments of this application, the first input is an input used to trigger screen mirroring. The first input in these embodiments includes, but is not limited to, touch input, voice input, or gesture input by the user using a touch device such as a finger or stylus to the control used to trigger screen mirroring; wherein, the control used to trigger screen mirroring is, for example, a button for screen mirroring; touch input includes, but is not limited to, click input, swipe input, etc. Click input can be a single click, double click, or any number of clicks, and can also be a long press or a short press. The first input in these embodiments can be set and modified adaptively according to actual needs.

[0027] After the prompt message indicating whether the user agrees to the mirroring of the first electronic device onto the second electronic device is displayed, and the user agrees to the mirroring of the first electronic device onto the second electronic device by entering the first input, the screen of the first electronic device displays data frames at its refresh rate.

[0028] Step 102: If the first refresh rate is greater than the second refresh rate, send a data frame to the second electronic device according to the second refresh rate; wherein, the second refresh rate is the refresh rate of the screen of the second electronic device.

[0029] In some embodiments of this application, step 102 may include: determining a first data frame to be sent to the second electronic device based on a first refresh rate and a second refresh rate; and sending the first data frame to the second electronic device.

[0030] In some embodiments of this application, determining the first data frame to be sent to the second electronic device based on the first frame rate and the second frame rate includes: determining the number of data frames to be sent to the second electronic device per unit time based on the second frame rate; and determining the first data frame based on the first frame rate and the number of data frames.

[0031] In some embodiments of this application, the unit time can be set according to actual needs, for example, the unit time is 1 second, 2 seconds, 5 seconds, etc.

[0032] In some embodiments of this application, the number of data frames to be sent to the second electronic device per unit time can be determined by the following formula (1): N=F2*T (1) In formula (1), N is the number of data frames that need to be sent to the second electronic device per unit time, F2 is the second refresh rate, and T is the unit time.

[0033] Within a unit time T, the number of data frames displayed on the screen of the first electronic device is M, where M = F1 * T, and F1 is the second refresh rate. When determining the first data frame based on the first refresh rate and the number of data frames to be sent to the second electronic device within a unit time, N data frames can be selected from the M data frames displayed on the screen of the first electronic device, and the selected N data frames can be used as the first data frame.

[0034] This application does not limit the method used to select N data frames from the M data frames displayed on the screen of the first electronic device; any available method can be applied to this application. For example, the first N data frames of the M data frames can be selected; when M is an integer multiple of N (K), a data frame can be selected every K-1 frames as the first data frame.

[0035] For example, assuming a unit time is 1 second, a first refresh rate of 120Hz, and a second refresh rate of 60Hz, then based on the second refresh rate of 60Hz, the number of data frames that need to be sent to the second electronic device within 1 second can be determined to be 60. If the number of data frames displayed on the screen of the first electronic device within 1 second is 120, then the first 60 frames out of the 120 data frames are determined as the first data frames.

[0036] For example, assuming a unit time is 1 second, the first refresh rate is 120Hz, and the second refresh rate is 60Hz, then based on the second refresh rate of 60Hz, the number of data frames that need to be sent to the second electronic device within 1 second can be determined to be 60. The number of data frames displayed on the screen of the first electronic device within 1 second is 120 frames, which is twice the number of 60 frames. At this time, every other data frame can be selected as the first data frame. For example, the first data frame, the third data frame, ..., the 119th data frame out of the 120 data frames can be selected as the first data frame.

[0037] In some embodiments of this application, determining the first data frame to be sent to the second electronic device based on the first refresh rate and the second refresh rate includes: determining the first data frame based on the refresh period corresponding to the first time, the second time, and the second refresh rate; wherein the first time is the time of the most recent data frame sent to the second electronic device before the second time, and the second time is the time when the data frame is to be sent to the second electronic device.

[0038] In some embodiments of this application, determining the first data frame based on the first time, the second time, and the frame refresh period corresponding to the second refresh rate includes: when the time difference between the second time and the first time is greater than or equal to the frame refresh period, determining the data frame to be sent to the second electronic device at the second time as the first data frame.

[0039] In some embodiments of this application, after the first electronic device sends a data frame to the second electronic device, the time when the first electronic device sends the data frame to the second electronic device is recorded as mCommitTimeStamp. It can be understood that mCommitTimeStamp is the first time in the embodiments of this application. When the data frame is to be sent to the second electronic device at the second time, the time difference mDiffTime between the second time and mCommitTimeStamp is calculated. If the time difference mDiffTime is less than the frame refresh cycle of the second electronic device, the data frame is not sent to the second electronic device. If the time difference mDiffTime is greater than or equal to the frame refresh cycle of the second electronic device, the data frame is determined as the first data frame and sent to the second electronic device. The second electronic device displays the data frame upon receiving it and records the time when the data frame is sent to the second electronic device as mCommitTimeStamp.

[0040] It should be noted that when the first electronic device mirrors the screen to the second electronic device, the first data frame of the screen sent to the first electronic device and the first data frame of the screen sent to the second electronic device need to be synchronized.

[0041] For example, such as Figure 2 and Figure 3 As shown, Figure 2 This is a schematic diagram of a data frame being transmitted according to some embodiments of this application; Figure 3 This is another schematic diagram of the data frame transmission provided by some embodiments of this application.

[0042] exist Figure 2 In this scenario, the first electronic device has a refresh rate of 120Hz, and the second electronic device has a refresh rate of 60Hz. Figure 3 In the process, the first electronic device has a refresh rate of 120Hz, and the second electronic device has a refresh rate of 50Hz.

[0043] In some embodiments of this application, the first electronic device may include DpManager. DpManager manages the Type-C to HDMI screen mirroring strategy of the first electronic device and monitors the screen frame rate. Running in the HWC-composer-service process, it synchronizes the frame rate information of the screens of the first and second electronic devices. When the first and second electronic devices are in different frame rate scenarios, it controls whether to send data frames to the second electronic device. The display management service obtains the data frame and sends it to the screen of the first electronic device; if the time difference between the second and first times is less than the frame refresh cycle of the second electronic device, it does not send the data frame to the second electronic device; if the time difference between the second and first times is greater than or equal to the frame refresh cycle of the second electronic device, it sends the data frame to the second electronic device.

[0044] In some embodiments of this application, the display management service can receive data frames sent by the processor of the first electronic device; and send data frames to the second electronic device according to a second refresh rate. When DpManager detects that the refresh rates of the first and second electronic devices are different, DpManager receives the data frame sent by the processor of the first electronic device and sends the data frame to the screen of the first electronic device; it determines whether the refresh rate of the first electronic device is greater than the refresh rate of the second electronic device. If the refresh rate of the first electronic device is greater than the refresh rate of the second electronic device, it determines whether the time difference between the current time and the time of the last time a data frame was sent to the second electronic device is less than the refresh cycle of the second electronic device. If the time difference between the current time and the time of the last time a data frame was sent to the second electronic device is less than the refresh cycle of the second electronic device, then the data frame is not sent to the second electronic device. If the time difference between the current time and the time of the last time a data frame was sent to the second electronic device is greater than or equal to the refresh cycle of the second electronic device, then the data frame is sent to the second electronic device.

[0045] After SurfaceFlinger creates a data frame submission path, it starts refreshing data frames. Through the data frame submission path, it sends data frames to the screen of the first electronic device according to the refresh rate of the first electronic device, and sends data frames to the second electronic device according to the refresh rate of the second electronic device.

[0046] like Figure 4 As shown, Figure 4 This is a schematic diagram of an overall process for screen mirroring provided in some embodiments of this application; the overall process for screen mirroring may include the following steps: Step 401: The first electronic device communicates with the second electronic device via a connecting cable; Step 402: After receiving the HDMI connection signal, the first electronic device displays a prompt message to ask the user whether they agree to have the first electronic device mirrored onto the second electronic device; Step 403: If the user agrees to mirror the first electronic device to the second electronic device, synchronize the first data frame to the screen of the first electronic device and the second electronic device; Step 404: DpManager monitors the frame rate of the first electronic device and the frame rate of the second electronic device, and obtains the data frame corresponding to the current time; Step 405: DpManager determines whether the frame rate of the first electronic device is greater than that of the second electronic device. If yes, proceed to step 406; otherwise, proceed to steps 407 and 408. Step 406: DpManager determines whether the time difference between the current time and the time of the last time a data frame was sent to the second electronic device is less than the frame refresh cycle of the second electronic device. If yes, proceed to step 408; otherwise, proceed to steps 407 and 408. Step 407: DpManager sends the data frame to the second electronic device; Step 408: DpManager sends the data frame to the screen of the first electronic device.

[0047] In some embodiments of this application, the display management service can receive data frames sent by the screen of the first electronic device; and send data frames to the second electronic device according to a second refresh rate. If the time difference between the first and second times is less than the refresh cycle of the second electronic device, the data frame is not sent to the second electronic device; if the time difference between the first and second times is greater than or equal to the refresh cycle of the second electronic device, the data frame is sent to the second electronic device.

[0048] In some embodiments of this application, the display management service receiving data frames sent by the screen of the first electronic device may include: the display management service receiving data frames sent by the screen of the first electronic device through a Command Write Bus (CWB) interface.

[0049] In some embodiments of this application, after SurfaceFlinger creates a data frame submission path, it begins refreshing data frames and sends them to the screen of the first electronic device according to the refresh rate of the first electronic device. After the screen of the first electronic device displays the frame data, it synchronously writes the data frames back to DpManager through the CWB interface. When DpManager detects that the refresh rates of the first and second electronic devices are different, it determines whether the refresh rate of the first electronic device is greater than that of the second electronic device, and whether the time difference between the current time and the last time a data frame was sent to the second electronic device is less than the refresh cycle of the second electronic device. If the time difference is less than the refresh cycle of the second electronic device, the data frame is not sent to the second electronic device; if the time difference is greater than or equal to the refresh cycle of the second electronic device, the data frame is sent to the second electronic device.

[0050] like Figure 5 As shown, Figure 5 This is a schematic diagram of another overall process for screen mirroring provided by some embodiments of this application; the overall process for screen mirroring may include the following steps: Step 501: The first electronic device communicates with the second electronic device via a connecting cable; Step 502: After receiving the HDMI connection signal, the first electronic device displays a prompt message to ask the user whether they agree to have the first electronic device mirrored onto the second electronic device; Step 503: If the user agrees to mirror the first electronic device to the second electronic device, synchronize the first data frame to the screen of the first electronic device and the second electronic device; Step 504: The screen of the first electronic device displays the first data frame; Step 505: The screen of the first electronic device displays other data frames at the refresh rate of the first electronic device; Step 506: The screen of the first electronic device synchronously writes other data frames back to DpManager through the CWB interface. DpManager monitors the refresh rate of the first electronic device and the refresh rate of the second electronic device. Step 507: DpManager determines whether the frame rate of the first electronic device is greater than the frame rate of the second electronic device. If yes, proceed to step 508; otherwise, proceed to step 509. Step 508: DpManager determines whether the time difference between the current time and the time of the last time a data frame was sent to the second electronic device is less than the frame refresh cycle of the second electronic device. If so, the received data frame is not sent to the second electronic device. If not, proceed to step 509. Step 509: DpManager sends the received data frame to the second electronic device.

[0051] In this embodiment, when a first electronic device mirrors its screen to a second electronic device via a connection cable, the screen of the first electronic device is controlled to display data frames at a first refresh rate. The first and second electronic devices are communicatively connected via the connection cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. If the first refresh rate is greater than a second refresh rate, data frames are sent to the second electronic device according to the second refresh rate, where the second refresh rate is the refresh rate of the screen of the second electronic device. Thus, the refresh rate of the first electronic device is not affected by the refresh rate of the second electronic device, and the screen of the first electronic device refreshes data frames according to its refresh rate, resulting in smooth display without lag.

[0052] The screen mirroring method provided in this application can be executed by a screen mirroring device. This application uses a screen mirroring device executing the screen mirroring method as an example to illustrate the screen mirroring device provided in this application.

[0053] Figure 6 This is a schematic diagram of the structure of a screen mirroring device provided in some embodiments of this application. The screen mirroring device 600 includes: The control module 601 is used to control the screen of the first electronic device to display data frames at a first refresh rate when the first electronic device mirrors the screen of the second electronic device via a connecting cable; wherein the first electronic device and the second electronic device are communicatively connected via a connecting cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. The sending module 602 is used to send a data frame to the second electronic device according to the second refresh rate when the first refresh rate is greater than the second refresh rate; wherein the second refresh rate is the refresh rate of the screen of the second electronic device.

[0054] In this embodiment, when a first electronic device mirrors its screen to a second electronic device via a connection cable, the screen of the first electronic device is controlled to display data frames at a first refresh rate. The first and second electronic devices are communicatively connected via the connection cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. If the first refresh rate is greater than a second refresh rate, data frames are sent to the second electronic device according to the second refresh rate, where the second refresh rate is the refresh rate of the screen of the second electronic device. Thus, the refresh rate of the first electronic device is not affected by the refresh rate of the second electronic device, and the screen of the first electronic device refreshes data frames according to its refresh rate, resulting in smooth display without lag.

[0055] In some embodiments of this application, the sending module 602 includes: The determination submodule is used to determine the first data frame to be sent to the second electronic device based on the first refresh rate and the second refresh rate. The sending submodule is used to send the first data frame to the second electronic device.

[0056] In some embodiments of this application, the determination submodule is specifically used for: Based on the second refresh rate, determine the number of data frames that need to be sent to the second electronic device per unit time. The first data frame is determined based on the first refresh rate and the number of data frames.

[0057] In some embodiments of this application, the determination submodule is specifically used for: The first data frame is determined based on the frame refresh cycle corresponding to the first time, the second time, and the second refresh rate; wherein, the first time is the time when the most recent data frame was sent to the second electronic device before the second time, and the second time is the time when the data frame is to be sent to the second electronic device.

[0058] In some embodiments of this application, the determination submodule is specifically used for: If the time difference between the second time and the first time is greater than or equal to the frame refresh period corresponding to the second frame refresh rate, the data frame to be sent to the second electronic device at the second time is determined as the first data frame.

[0059] In some embodiments of this application, a display management service is used to receive data frames sent by the processor of a first electronic device or to receive data frames sent by the screen of the first electronic device; and to send data frames to a second electronic device according to a second refresh rate; wherein, the display management service is a service provided by the first electronic device.

[0060] In some embodiments of this application, the display management service is specifically used for: The command writes to the bus interface to receive data frames sent from the screen of the first electronic device.

[0061] In some embodiments of this application, the screen mirroring device provided in this application further includes: The display module is used to display prompt messages; these prompt messages are used to ask the user to confirm the screen mirroring process. The receiving module is used to receive the first input; wherein the first input is used for user confirmation to perform screen mirroring.

[0062] The first electronic device in this application embodiment can be a terminal or other devices besides a terminal. For example, the first electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, mobile internet device (MID), wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., and this application embodiment does not specifically limit it.

[0063] The first electronic device in this application embodiment can be an electronic device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.

[0064] The screen mirroring device provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented in the mirroring method embodiment will not be described again here to avoid repetition.

[0065] Optionally, such as Figure 7 As shown, this application embodiment also provides an electronic device 700, including a processor 701 and a memory 702. The memory 702 stores a program or instructions that can run on the processor 701. When the program or instructions are executed by the processor 701, they implement the various steps of the screen mirroring method embodiment provided in this application embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0066] Figure 8 These are schematic diagrams of the hardware structure of electronic devices provided in some embodiments of this application.

[0067] The electronic device 800 includes, but is not limited to, components such as: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, and processor 810.

[0068] Those skilled in the art will understand that the electronic device 800 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 810 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0069] The processor 810 is configured to: control the screen of the electronic device 800 to display data frames at a first refresh rate when the electronic device 800 is mirroring the screen of the second electronic device via a connecting cable; wherein the electronic device 800 and the second electronic device are communicatively connected via the connecting cable, and the first refresh rate is the refresh rate of the screen of the electronic device 800; and if the first refresh rate is greater than the second refresh rate, send data frames to the second electronic device according to the second refresh rate; wherein the second refresh rate is the refresh rate of the screen of the second electronic device.

[0070] In this embodiment, when electronic device 800 mirrors its screen to a second electronic device via a connection cable, the screen of electronic device 800 is controlled to display data frames at a first refresh rate. The electronic device 800 and the second electronic device are communicatively connected via the connection cable, and the first refresh rate is the refresh rate of the screen of electronic device 800. If the first refresh rate is greater than a second refresh rate, data frames are sent to the second electronic device according to the second refresh rate, which is the refresh rate of the screen of the second electronic device. Thus, the refresh rate of electronic device 800 is not affected by the refresh rate of the second electronic device, and the screen of electronic device 800 refreshes data frames according to its refresh rate, resulting in smooth display without lag.

[0071] In some embodiments of this application, the processor 810 is specifically used for: Based on the first refresh rate and the second refresh rate, determine the first data frame that needs to be sent to the second electronic device; send the first data frame to the second electronic device.

[0072] In some embodiments of this application, the processor 810 is specifically used for: Based on the second refresh rate, determine the number of data frames that need to be sent to the second electronic device per unit time. The first data frame is determined based on the first refresh rate and the number of data frames.

[0073] In some embodiments of this application, the processor 810 is specifically used for: The first data frame is determined based on the frame refresh cycle corresponding to the first time, the second time, and the second refresh rate; wherein, the first time is the time when the most recent data frame was sent to the second electronic device before the second time, and the second time is the time when the data frame is to be sent to the second electronic device.

[0074] In some embodiments of this application, the processor 810 is specifically used for: If the time difference between the second time and the first time is greater than or equal to the frame refresh period corresponding to the second frame refresh rate, the data frame to be sent to the second electronic device at the second time is determined as the first data frame.

[0075] In some embodiments of this application, the display management service is used to receive data frames sent by the processor of the electronic device 800 or to receive data frames sent by the screen of the electronic device 800; and to send data frames to the second electronic device according to the second refresh rate; wherein, the display management service is a service provided by the electronic device 800.

[0076] In some embodiments of this application, the display management service is specifically used for: The command writes to the bus interface to receive data frames sent from the screen of electronic device 800.

[0077] In some embodiments of this application, the screen mirroring device provided in this application also includes:

[0078] In some embodiments of this application, the display unit 806 is used to: display a prompt message; wherein the prompt message is used to prompt the user to confirm the screen mirroring. The user input unit 807 is used to: receive a first input; wherein the first input is used for user confirmation to perform screen mirroring.

[0079] It should be understood that, in this embodiment, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042. The GPU 8041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0080] The memory 809 can be used to store software programs and various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data; wherein, the first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback function, image playback function, etc.), etc. Furthermore, the memory 809 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0081] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor; wherein, the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.

[0082] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the screen mirroring method provided in this application and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0083] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0084] This application also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the screen mirroring method provided in this application, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0085] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0086] This application also provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the screen mirroring method provided in this application, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0087] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0089] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A screen mirroring method, characterized in that, The method is applied to a first electronic device, and the method includes: When the first electronic device mirrors its screen to the second electronic device via a connecting cable, the screen of the first electronic device is controlled to display data frames at a first refresh rate; wherein the first electronic device and the second electronic device are communicatively connected via the connecting cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. If the first refresh rate is greater than the second refresh rate, a data frame is sent to the second electronic device according to the second refresh rate; wherein, the second refresh rate is the refresh rate of the screen of the second electronic device.

2. The method according to claim 1, characterized in that, Sending data frames to the second electronic device according to the second refresh rate includes: Based on the first refresh rate and the second refresh rate, determine the first data frame that needs to be sent to the second electronic device; The first data frame is sent to the second electronic device.

3. The method according to claim 2, characterized in that, The step of determining the first data frame to be sent to the second electronic device based on the first frame rate and the second frame rate includes: Based on the second refresh rate, determine the number of data frames that need to be sent to the second electronic device per unit time. The first data frame is determined based on the first refresh rate and the number of data frames.

4. The method according to claim 2, characterized in that, The step of determining the first data frame to be sent to the second electronic device based on the first frame rate and the second frame rate includes: The first data frame is determined based on the first time, the second time, and the frame refresh period corresponding to the second refresh rate; wherein, the first time is the time when the most recent data frame was sent to the second electronic device before the second time, and the second time is the time when the data frame is to be sent to the second electronic device.

5. The method according to claim 4, characterized in that, The step of determining the first data frame based on the first time, the second time, and the frame refresh period corresponding to the second frame refresh rate includes: If the time difference between the second time and the first time is greater than or equal to the frame refresh cycle, the data frame to be sent to the second electronic device at the second time is determined as the first data frame.

6. The method according to claim 1, characterized in that, Sending data frames to the second electronic device according to the second refresh rate includes: The display management service receives data frames sent by the processor of the first electronic device or receives data frames sent by the screen of the first electronic device; wherein, the display management service is a service provided by the first electronic device; Data frames are sent to the second electronic device according to the second refresh rate.

7. The method according to claim 6, characterized in that, The display management service receives data frames sent by the screen of the first electronic device, including: The display management service receives data frames sent by the screen of the first electronic device through the command write bus interface.

8. The method according to any one of claims 1 to 7, characterized in that, Before controlling the screen of the first electronic device to display data frames at a first refresh rate, the method further includes: Display a prompt message; wherein the prompt message is used to prompt the user to confirm the screen mirroring; Receive a first input; wherein the first input is used to trigger screen mirroring.

9. A screen mirroring device, characterized in that, The device is applied to a first electronic device, the device comprising: The control module is used to control the screen of the first electronic device to display data frames at a first refresh rate when the first electronic device is mirrored to the second electronic device via a connecting cable; wherein the first electronic device and the second electronic device are communicatively connected via the connecting cable, and the first refresh rate is the refresh rate of the screen of the first electronic device. The sending module is configured to send a data frame to the second electronic device according to the second frame rate when the first frame rate is greater than the second frame rate; wherein the second frame rate is the frame rate of the screen of the second electronic device.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, and when the programs or instructions are executed by the processor, they implement the steps of the screen mirroring method as described in any one of claims 1-8.