Screen projection method and electronic device

CN122269064APending Publication Date: 2026-06-23HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-12-20
Publication Date
2026-06-23

Smart Images

  • Figure CN122269064A_ABST
    Figure CN122269064A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a screen projection method and an electronic device. The method comprises: in a screen projection process initiated by a first electronic device, the first electronic device can send screen projection authorization information to a second electronic device, so that the second electronic device displays the screen projection authorization information to a user. The user can perform a corresponding physical key operation on the first electronic device side to complete the screen projection authorization according to the screen projection authorization information. That is, the user can complete the screen projection authorization operation of the first electronic device through the physical key of the first electronic device. Therefore, the method can be used to realize screen projection authorization through physical key operation, so as to improve the success rate of screen projection authorization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and in particular to a screen projection method and an electronic device. Background Technology

[0002] Screen mirroring technology refers to the ability of an electronic device to project its user interface onto another electronic device. For example, the user interface of a mobile phone can be projected onto a television, and the user interface of a tablet can be projected onto a laptop.

[0003] For privacy and security reasons, during the screen mirroring process on the first electronic device, the user usually needs to complete the screen mirroring authorization operation on the first electronic device before the first electronic device will trigger the screen mirroring of the user interface to the second electronic device.

[0004] However, when the screen of the first electronic device is inoperable, the user cannot complete the screen mirroring authorization through the screen of the first electronic device, which ultimately leads to authorization failure and affects the user's screen mirroring experience. Summary of the Invention

[0005] This application provides a screen mirroring method and an electronic device for implementing screen mirroring authorization through physical button operation, thereby improving the success rate of screen mirroring authorization.

[0006] In a first aspect, this application provides a screen mirroring method applicable to a first electronic device. The method includes: after establishing a communication connection between the first electronic device and a second electronic device, the first electronic device sends screen mirroring authorization information to the second electronic device to cause the second electronic device to display the screen mirroring authorization information; wherein, the screen mirroring authorization information is used to instruct the user to complete at least one target physical button operation required for authorization on the first electronic device side; when the first electronic device receives at least one target physical button operation performed by the user, the first electronic device sends screen mirroring data to the second electronic device.

[0007] Using this method, during the screen mirroring process, the first electronic device can send screen mirroring authorization information to the second electronic device, enabling the second electronic device to display this authorization information to the user. The user can then execute corresponding physical button operations on the first electronic device to complete the screen mirroring authorization based on this authorization information. In other words, the user can complete the screen mirroring authorization operation on the first electronic device using its physical buttons. Therefore, the user can complete the screen mirroring authorization on the first electronic device by executing at least one physical button operation, even if the screen of the first electronic device is unusable. This allows the user to mirror the user interface of the first electronic device to the second electronic device for display, thereby improving the success rate of screen mirroring authorization.

[0008] In addition, the screen casting authorization information is sent by the first electronic device. Therefore, the first electronic device will only send screen casting data to the second electronic device after receiving the screen casting authorization. This avoids the problem of malicious screen casting terminals bypassing the screen casting authorization and directly establishing a screen casting connection, thereby improving the security of user privacy.

[0009] In one possible design, after the first electronic device establishes a communication connection with the second electronic device, the first electronic device generates screen mirroring authorization information. This design ensures the security of the screen mirroring authorization information, as it is generated by the first electronic device.

[0010] In one possible design, the first electronic device acquires the saved screen mirroring authorization information. This design can improve the efficiency of the first electronic device in acquiring screen mirroring authorization information.

[0011] In one possible design, the first electronic device can generate screen mirroring authorization information through the following steps:

[0012] The first electronic device acquires the identifiers of multiple physical buttons; the first electronic device generates a target identifier sequence based on the identifiers of the multiple physical buttons; wherein the target identifier sequence contains the identifier of at least one target physical button; the first electronic device determines screen projection authorization information based on the target identifier sequence.

[0013] Optionally, the target identifier sequence can be a random sequence generated by the first electronic device.

[0014] Optionally, the identifier of the physical button can be a random identifier generated by the first electronic device, so that the target identifier sequence generated using the random identifier has randomness.

[0015] This design allows for randomness in the generated screen mirroring authorization information, thereby improving the security of the authorization information and ensuring user privacy.

[0016] In one possible design, when the first electronic device receives a button operation, it verifies the button operation based on the sequence of at least one target physical button operation indicated by the screen projection authorization information; when the button operation is successfully verified, the first electronic device continues to detect and verify the next button operation until it receives at least one target physical button operation and sends screen projection data to the second electronic device.

[0017] Optionally, screen mirroring can be terminated if button operation verification fails.

[0018] This design allows the first electronic device to immediately terminate screen mirroring when it receives an incorrect key press, without needing to receive and verify any further key presses. This improves the efficiency of screen mirroring authorization verification and avoids unnecessary power consumption by the first electronic device.

[0019] In one possible design, when button operation verification fails, the first electronic device sends a notification message to the second electronic device, which then informs the user that screen mirroring has failed. This design allows the second electronic device to notify the user of the screen mirroring failure, thereby improving the user experience.

[0020] In one possible design, after the first electronic device establishes a communication connection with the second electronic device, the first electronic device displays a screen mirroring authorization message on its display screen. When it receives a confirmation operation from the user regarding the screen mirroring authorization message, the first electronic device sends screen mirroring data to the second electronic device. This design allows the user to quickly complete the screen mirroring authorization confirmation based on the screen mirroring authorization message displayed by the first electronic device (such as a request for authorization pop-up), thereby improving the efficiency of screen mirroring authorization.

[0021] In one possible design, the communication connection can be either wired or wireless.

[0022] Secondly, this application provides a screen mirroring method applicable to a second electronic device. The method includes: after a first electronic device and a second electronic device establish a communication connection, the second electronic device receives screen mirroring authorization information from the first electronic device; wherein the screen mirroring authorization information is used to instruct the user to perform at least one target physical button operation on the first electronic device side to complete the screen mirroring authorization; the second electronic device displays the screen mirroring authorization information on a display screen; the second electronic device receives screen mirroring data from the first electronic device and displays the user interface of the first electronic device according to the screen mirroring data.

[0023] Thirdly, this application provides a screen mirroring system, which includes a first electronic device and a second electronic device. The first electronic device has multiple physical buttons. The system includes: after establishing a communication connection between the first electronic device and the second electronic device, the first electronic device sends screen mirroring authorization information to the second electronic device; wherein, the screen mirroring authorization information is used to instruct the user to perform at least one target physical button operation on the first electronic device side to complete the screen mirroring authorization; the second electronic device receives the screen mirroring authorization information from the first electronic device and displays the screen mirroring authorization information on a display screen; when the first electronic device receives the at least one target physical button operation performed by the user, it sends screen mirroring data to the second electronic device; the second electronic device receives the screen mirroring data and displays the user interface of the first electronic device according to the screen mirroring data.

[0024] Fourthly, an electronic device is provided, comprising: a display screen, one or more processors, a memory, and one or more programs; wherein the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the electronic device, cause the electronic device to perform the methods provided by any one of the first to second aspects described above.

[0025] Fifthly, this application also provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform a method of any possible design of the first to second aspects.

[0026] Sixthly, this application also provides a computer program product that, when run on a device, causes the device to perform any possible design of any of the first to second aspects of the embodiments of this application.

[0027] For the various aspects of the second to sixth aspects mentioned above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that the various possible solutions for the first aspect may achieve, which will not be repeated here. Attached Figure Description

[0028] Figure 1A This is a schematic diagram illustrating a connection method between an electronic device and another electronic device, provided in an embodiment of this application.

[0029] Figure 1B This is a schematic diagram illustrating a connection method between an electronic device and another electronic device, provided in an embodiment of this application.

[0030] Figure 1C This is a schematic diagram illustrating a connection method between an electronic device and another electronic device, provided in an embodiment of this application.

[0031] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0032] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0033] Figure 4 A flowchart illustrating a screen mirroring method provided in this application embodiment;

[0034] Figure 5 A schematic diagram illustrating the matching relationship between screen projection authorization information and user-executed key operations, provided for embodiments of this application;

[0035] Figure 6 A flowchart illustrating a method for generating screen mirroring authorization information provided in this application embodiment;

[0036] Figure 7 This is a schematic diagram illustrating a connection method between a smartphone and a television set, provided as an embodiment of this application.

[0037] Figure 8AThis is a schematic diagram illustrating a connection method between a smartphone and an external display, provided in an embodiment of this application.

[0038] Figure 8B A flowchart illustrating a screen mirroring method provided in this application embodiment;

[0039] Figure 9 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0040] This application provides a screen mirroring method and electronic device for authorizing screen mirroring via physical button operation, thereby improving the success rate of screen mirroring authorization. The method and device are based on the same technical concept. Since the principles by which the method and device solve the problem are similar, the implementation of the device and method can be mutually referenced, and repeated details will not be elaborated further.

[0041] The following explanations of some terms used in this application are provided to facilitate understanding by those skilled in the art.

[0042] 1) Electronic devices. Electronic devices refer to devices with screens that can establish communication connections with other electronic devices.

[0043] In this application embodiment, the electronic device can be a personal computer (PC), laptop computer, computer, netbook, tablet computer, in-vehicle computer, etc. Of course, the electronic device can also be various portable devices, in-vehicle terminal devices, personal digital assistants (PDAs), smart home devices (e.g., smart TVs), and other smart devices. For example, the electronic device may, but is not limited to, be equipped with... Or other operating systems.

[0044] 2) Screen. The screen is used to display the user interface of the electronic device. When the screen has touch functionality, the electronic device can sense touch events input by the user through the screen. In this application, screen inoperability may mean that the screen cannot display the user interface of the electronic device, and / or that the electronic device cannot sense touch events input by the user through the screen.

[0045] 3) Input events. Input events are generated by an electronic device after detecting an external input operation, which includes touch on a touch-sensitive surface, key input, etc.

[0046] 4) Screen Casting. Screen casting refers to the process of an electronic device projecting its user interface onto the screen of another electronic device via wired or wireless means. For ease of explanation, the electronic device projecting the user interface will be referred to as the first electronic device, and the electronic device onto which the user interface is projected will be referred to as the second electronic device. Furthermore, the screen content of the first electronic device displayed on the second electronic device can be synchronized with that of the first electronic device. That is, in this case, when the content on the screen of the first electronic device changes, the screen content of the first electronic device displayed on the second electronic device will also change accordingly.

[0047] 5) Physical buttons. Physical buttons refer to buttons on electronic devices that can be physically pressed. Users can directly perform input, selection, and confirmation operations on electronic devices using physical buttons. Taking a mobile phone as an example, physical buttons on a mobile phone can include volume buttons (such as volume up and volume down buttons), power buttons, etc.

[0048] 6) Key driver. A key driver is a software program that allows the operating system to communicate with physical keys. It can detect key events triggered by the user through physical keys and can also broadcast key events to the operating system.

[0049] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple. Furthermore, the terms "first," "second," etc., used in the embodiments of this application are only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0050] The solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0051] The screen mirroring method provided in this application can be applied to screen mirroring scenarios. Generally, a screen mirroring scenario includes a sending end and a receiving end. The sending end sends screen mirroring data to the receiving end, and the receiving end displays the user interface of the sending end based on the received screen mirroring data. In this application, the sending end can be referred to as a first electronic device, and the receiving end can be referred to as a second electronic device. The first electronic device can be a mobile phone, tablet computer, PC, smartwatch, or other device. The second electronic device can be a mobile phone, tablet computer, PC, television, or other device. It is understood that the sending end and receiving end can also have other names; for example, the sending end is an active screen mirroring device, and the receiving end is a passive screen mirroring device. This application does not limit this. Optionally, the first electronic device and the second electronic device can perform screen mirroring in various ways. The following description, in conjunction with the scenarios provided in the accompanying drawings, exemplarily illustrates the screen mirroring methods between the first electronic device and the second electronic device.

[0052] Scenario 1: The first electronic device and the second electronic device have a communication interface. The first electronic device and the second electronic device can establish a physical connection through the communication interface, thereby projecting the user interface of the first electronic device onto the second electronic device for display.

[0053] For example, a physical connection is established between the communication interface of the first electronic device and the communication interface of the second electronic device via a cable (such as a data cable, docking station, etc.), thereby enabling the user interface of the first electronic device to be projected onto the second electronic device for display. See [reference needed]. Figure 1A As shown. It should be noted that, in Figure 1A Using a smartphone as the first electronic device and a television as the second electronic device as an example, other electronic devices with screen mirroring capabilities (such as tablets, smartwatches, etc.) can also establish a physical connection via cables to achieve screen mirroring. Additionally, the first and second electronic devices can be connected to input devices such as keyboards and mice via a docking station, allowing users to operate the first electronic device using these input devices.

[0054] It should be noted that this application does not limit the type of communication interface of the electronic device. For example, the communication interface may be, but is not limited to, a universal serial bus (USB) interface.

[0055] Scenario 2: The first and second electronic devices have wireless communication capabilities. A communication connection can be established between the first and second electronic devices, allowing the user interface of the first electronic device to be projected onto the second electronic device for display via wireless communication.

[0056] For example, Figure 1BThis example illustrates the situation using a smartphone as the first electronic device and a PC as the second electronic device, with the two connected wirelessly.

[0057] The first and second electronic devices can connect to the same wireless local area network (WLAN) via short-range wireless communication technology. This allows them to connect through a collaborative channel within the WLAN, projecting the user interface of the first electronic device onto the second. This short-range wireless communication technology can include, but is not limited to, Bluetooth, Wi-Fi, Wi-Fi point-to-point (P2P), and near-field communication (NFC).

[0058] Optionally, scenario two may also include an access point. This access point supports short-range wireless communication technology. The first electronic device and the second electronic device can first access the access point via short-range wireless communication technology, and then the access point connects the first electronic device and the second electronic device to the local area network. For example, this access point can be a Wi-Fi access point, and the first electronic device and the second electronic device can access the same Wi-Fi access point.

[0059] For example, the first electronic device and the second electronic device can access the same Bluetooth beacon through Bluetooth technology. In this way, the two can establish a wireless communication connection through Bluetooth technology, and thus establish a device collaboration channel.

[0060] For example, the first electronic device and the second electronic device can trigger a communication connection through an NFC tag, and then use a Bluetooth module to transmit encrypted data for identity authentication; after successful authentication, the two can communicate in a P2P manner.

[0061] It is important to note that Figure 1A-Figure 1B The types of the first and second electronic devices, their connection methods, and the positions of the displayed interfaces or windows are merely examples and do not constitute any limitation on the scenarios applicable to the embodiments of this application.

[0062] Currently, in both Scenario 1 and Scenario 2 mentioned above, for privacy and security reasons, during the screen mirroring process, after the first electronic device and the second electronic device establish a communication connection, the user usually needs to complete the screen mirroring authorization operation on the first electronic device before the first electronic device will trigger the screen mirroring of the user interface onto the second electronic device. For example, taking a mobile phone as the first electronic device and a monitor as the second electronic device, with a wired connection between the two: after the mobile phone and the monitor are connected, the mobile phone screen can display... Figure 1C The authorization interface shown may include prompts, a "Cancel" control, and an "Agree" control. Users can authorize screen mirroring by clicking the "Agree" control. The phone will respond to the user's click on the "Agree" control, projecting the content from the phone screen onto the display.

[0063] However, this approach fails when the screen of the first electronic device is inoperable, preventing the user from authorizing screen mirroring and resulting in authorization failure, thus impacting user experience. Therefore, this application provides a screen mirroring method. This method is applicable to both a first and a second electronic device, where the first electronic device has multiple physical buttons. For example, the physical buttons on the first electronic device include volume up, volume down, and a power button. Using this method, the user can authorize screen mirroring by performing at least one physical button operation on the first electronic device. Even when the screen of the first electronic device is inoperable, the user can still authorize screen mirroring from the first electronic device, thereby projecting the user interface of the first electronic device onto the second electronic device for display, improving the success rate of screen mirroring authorization.

[0064] This application provides an electronic device that can form a communication system with another electronic device to implement the screen projection method provided in this application. See below for reference. Figure 2 The structure of the electronic device provided in the embodiments of this application will be described.

[0065] like Figure 2 As shown, the electronic device 200 may include: a processor 210, an external memory interface 220, an internal memory 221, a USB interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a SIM card interface 295, etc.

[0066] Understandable, Figure 2The electronic device shown is merely an example and does not constitute a limitation on the electronic device. The electronic device may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 2 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0067] Processor 210 may include one or more processing units, such as a central processing unit (CPU), application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of electronic device 200. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0068] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can retrieve it directly from this memory. By providing a memory, the number of times the processor 210 accesses data in the internal memory 221 can be reduced, thus reducing the processor 210's waiting time and improving system efficiency.

[0069] The screen projection method provided in this application embodiment can be controlled by the processor 210 or invoked by other components. For example, it can invoke the processing program of this application embodiment stored in the internal memory 221 to control the wireless communication module 260 to perform data communication with other electronic devices and to control the display screen to display the user interface. The processor 210 may include different devices. For example, when integrating a CPU and a GPU, the CPU and GPU can cooperate to execute the screen projection method provided in this application embodiment. For example, some algorithms in the screen projection method are executed by the CPU, while other algorithms related to the user interface display are executed by the GPU to achieve faster processing efficiency.

[0070] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 200 may include one or N displays 294, where N is a positive integer greater than 1. Display screen 294 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, display screen 294 can display windows, photos, videos, web pages, or documents, etc. Furthermore, it is understood that in some embodiments, the status bar may also include Bluetooth icons, Wi-Fi icons, external device icons, etc. In some embodiments, when the processor 210 detects a touch operation by a user's finger (or stylus, etc.) on an application icon, it opens the user interface corresponding to the application icon in response to the touch operation and displays the user interface on the display screen 294. In some embodiments, when the processor 210 detects a click operation by an external input device (e.g., mouse, keyboard, etc.) of the electronic device 200 on an application icon, it performs corresponding control operations on the application in response to the click operation.

[0071] In this embodiment, the display screen 294 can be a single flexible display screen, or it can be a spliced ​​display screen composed of two rigid screens and a flexible screen located between the two rigid screens. When the processor 210 runs the file management method provided in this embodiment, the processor 210 can control the display screen 294 to display the relevant results.

[0072] Camera 293 is used to capture still images or videos. Optionally, electronic device 200 may include 1 to N cameras 293. For example, camera 293 may include a front-facing camera or a rear-facing camera, or a single camera 293 may function as both a front-facing and a rear-facing camera. Typically, camera 293 may include a photosensitive element such as a lens assembly and an image sensor. The lens assembly includes multiple lenses (convex or concave lenses) for collecting light signals reflected from the object to be photographed and transmitting the collected light signals to the image sensor. The image sensor generates a raw image of the object to be photographed based on the light signals.

[0073] Internal memory 221 can be used to store computer executable program code, which includes instructions. Processor 210 executes various functional applications and data processing of electronic device 200 by running the instructions stored in internal memory 221. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, program code for at least one application, etc. The operating system may include, but is not limited to, […]. The data storage area can store data created during the use of the electronic device 200, etc.

[0074] The sensor module 280 may include a fingerprint sensor, a touch sensor, a pressure sensor, a magnetic sensor, an ambient light sensor, a barometric pressure sensor, a bone conduction sensor, etc.

[0075] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor, and baseband processor.

[0076] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0077] The mobile communication module 250 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 250 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 250 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 250 may be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 may be housed in the same device.

[0078] The wireless communication module 260 can provide solutions for wireless communication applications on the electronic device 200, including wireless local area networks (WLAN) (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 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 210. The wireless communication module 260 can also receive signals to be transmitted from processor 210, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0079] Physical buttons 290 can provide button signal input related to user settings and function control of electronic device 200. Physical buttons 290 may include volume up buttons, volume down buttons, power buttons, and other physically pressable buttons. Users can directly perform input, selection, and confirmation operations on electronic device 200 through physical buttons 290 on electronic device 200.

[0080] In addition, the electronic device 200 can implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, and an application processor, such as music playback and recording. The electronic device 200 can use a motor 291 to generate vibration alerts. The indicator 292 in the electronic device 200 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. The SIM card interface 295 in the electronic device 200 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 295 to achieve contact and separation with the electronic device 200.

[0081] It should be noted that, in some scenarios (e.g., when the second electronic device is a PC, tablet computer, smart TV, or other smart terminal device), its structure is different from that of the second electronic device in this application. Figure 2 The electronic device 200 is similar, and the details can be found in the above description. This application will not repeat them here.

[0082] In the electronic device 200 provided in this application embodiment, its software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Android system as an example to exemplarily illustrate the software structure of the first electronic device or the second electronic device. Figure 3 As shown.

[0083] Layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. For example... Figure 3 As shown, this software architecture can be divided into four layers, from top to bottom: the application layer, the application framework layer (FWK), the Android runtime and system libraries, and the kernel layer. Additionally, electronic devices or external storage devices may also include a hardware layer.

[0084] The application layer is the top layer of the operating system, including native operating system applications and third-party applications such as camera, gallery, calendar, Bluetooth, music, video, and messaging. The applications discussed in this application embodiment are referred to as applications (APPs), which are software programs capable of performing one or more specific functions.

[0085] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer may include predefined functions. It may include a window manager, content provider, view system, resource manager, notification manager, etc.

[0086] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0087] The kernel layer provides core system services for the operating system, such as security, memory management, process management, network protocol stack, and driver models. It also serves as an abstraction layer between the hardware and software stacks. This layer contains many drivers related to electronic devices, primarily: display drivers and button drivers. Button drivers enable communication between the operating system and the buttons on the electronic device; the device can detect user-triggered key presses through the button driver. Other drivers include Flash drivers for memory-based devices; camera drivers; audio drivers; Bluetooth drivers; and WiFi drivers.

[0088] In some embodiments, the kernel layer may also include an input driver service for acquiring and reporting operation information on the interface or window displayed on the display screen from external input devices (e.g., mouse, keyboard, etc.), sensors (e.g., touch screen, touch sensor, etc.) or other electronic devices.

[0089] The hardware layer can include various sensors, displays, physical buttons, etc.

[0090] To improve the success rate of screen mirroring authorization, this application provides a screen mirroring method. The method is described below with reference to the accompanying drawings. This method can be applied to a screen mirroring system including a first electronic device and a second electronic device, for example... Figures 1A-1C The scene shown. (See attached image.) Figure 4 As shown, the method includes:

[0091] S401: After the first electronic device and the second electronic device establish a communication connection, the first electronic device sends screen mirroring authorization information to the second electronic device. Correspondingly, the second electronic device receives the screen mirroring authorization information from the first electronic device.

[0092] The communication connection established between the first electronic device and the second electronic device can be a wired connection or a wireless connection. For wired connections, please refer to the connection method in Scenario 1 above. For wireless connections, please refer to the connection method in Scenario 2 above.

[0093] In this application, the screen mirroring authorization information can be used to instruct the user to complete at least one target physical button operation required for authorization on the first electronic device side. When there are multiple target physical button operations, the screen mirroring authorization information can include instruction information for multiple target physical button operations arranged in sequence. For example, such as Figure 5 As shown, the physical button operations indicated by the screen casting authorization information include button operation 1 to button operation 6; as shown in the figure, the physical button corresponding to button operation 1 is the volume down button, the physical button corresponding to button operation 2 is the power button, ..., the physical button corresponding to button operation 6 is the volume down button.

[0094] This step ensures user privacy by ensuring that the screen mirroring authorization information is sent by the first electronic device, which must complete the authorization process before initiating screen mirroring.

[0095] S402: The second electronic device displays screen mirroring authorization information on the display screen.

[0096] In this way, the second electronic device can prompt the user to perform the button operations required to complete the screen mirroring authorization.

[0097] S403: The first electronic device receives at least one target physical key operation performed by the user.

[0098] In this step, the first electronic device can call its own button driver to sense the button events of the physical buttons in real time, thereby receiving at least one target physical button operation performed by the user.

[0099] S404: The first electronic device sends screen projection data to the second electronic device. Correspondingly, the second electronic device receives the screen projection data from the first electronic device.

[0100] In this step, optionally, the screen mirroring data can be provided by the screen mirroring service of the first electronic device. The screen mirroring interface displayed on the second electronic device can be a mirror image of the first electronic device; that is, the screen mirroring interface displayed on the second electronic device is synchronized with the interface displayed on the first electronic device, enabling the second electronic device to display the user interface of the first electronic device in real time. Alternatively, the screen mirroring interface displayed on the second electronic device can be a portion of the interface of the first electronic device to reduce screen mirroring power consumption.

[0101] Through steps S401-S404 above, the user can execute corresponding physical button operations on the first electronic device based on the screen casting authorization information displayed on the second electronic device, thereby completing the screen casting authorization. Since the operation corresponding to the screen casting authorization information is performed by physical button operations on the first electronic device, the user can still complete the screen casting authorization through the physical buttons on the first electronic device even if the screen of the first electronic device is inoperable. For example, when the screen of the first electronic device cannot display, the user can obtain the screen casting authorization information through the second electronic device and execute the corresponding physical button operation on the first electronic device to complete the screen casting authorization. Alternatively, when the screen of the first electronic device cannot detect touch events, the user can execute the physical button operation corresponding to the screen casting authorization information on the first electronic device to complete the screen casting authorization. In summary, this method can achieve screen casting authorization through physical button operations, thereby improving the success rate of screen casting authorization.

[0102] In one implementation, after the first electronic device establishes communication with the second electronic device, the first electronic device can generate screen mirroring authorization information. Alternatively, if the screen mirroring authorization information is pre-set and stored in the first electronic device, the first electronic device can retrieve the stored screen mirroring authorization information.

[0103] Optionally, when the screen mirroring authorization information is generated by the first electronic device, the first electronic device can generate the screen mirroring authorization information through the following steps S601-S603. (See attached diagram.) Figure 6 Steps S601-S603 will be explained.

[0104] S601: The first electronic device acquires the identifiers of multiple physical buttons. The identifiers of the multiple physical buttons may include one or more combinations of numbers, letters, and symbols, or other characters; this application does not specifically limit this.

[0105] In one implementation, the identifiers of multiple physical buttons can be pre-stored in the storage module of the first electronic device. The first electronic device can retrieve the identifiers of the multiple physical buttons by calling the storage module, without needing to generate them, thereby reducing the resource consumption of the first electronic device. In this case, the identifiers of the multiple physical buttons can be considered to be pre-set; or the identifiers of the physical buttons can be considered to be fixed. For example, when the first electronic device is manufactured, default identifiers of multiple physical buttons can be set in the first electronic device. Another example is that the identifiers of the multiple physical buttons can be user-defined. For instance, the multiple physical buttons of the first electronic device are a volume up button, a volume down button, and a power button, and the identifiers of the multiple physical buttons stored in the storage module are 1, 4, and 7, respectively. That is, the identifier corresponding to the volume up button is 1, the identifier corresponding to the volume down button is 4, and the identifier corresponding to the power button is 7.

[0106] In another implementation, the identifiers for the multiple physical buttons can be generated by the first electronic device for this screen mirroring process. In this case, the identifiers for the multiple physical buttons can be considered as a continuously updated random sequence. That is, the first electronic device generates the identifiers for the multiple physical buttons each time it initiates screen mirroring, thereby ensuring the randomness of the identifiers for the multiple physical buttons, and thus ensuring the randomness of the screen mirroring authorization information.

[0107] For example, let's take the first electronic device as having multiple physical buttons: volume up, volume down, and power. When the first electronic device initiates screen mirroring for the first time, the labels for these physical buttons can be G, H, and J, respectively; that is, the volume up button is labeled G, the volume down button is labeled H, and the power button is labeled J. When the first electronic device initiates screen mirroring for the second time, the labels for these physical buttons can be 5, T, and F, respectively; that is, the volume up button is labeled 5, the volume down button is labeled T, and the power button is labeled F.

[0108] S602: The first electronic device generates a target identifier sequence based on the identifiers of multiple physical buttons. The target identifier sequence includes the identifier of at least one target physical button.

[0109] In this step, to improve user experience and the security of the first electronic device, the number of physical button operations corresponding to the target identifier sequence can be set within the first electronic device, or the number of physical button operations required to complete screen mirroring authorization can be set. For example, the number of physical button operations can be 6 or 8. The first electronic device can generate the target identifier sequence based on the set number of physical button operations and the identifiers of multiple physical buttons.

[0110] For example, if the first electronic device has multiple physical buttons, namely volume up, volume down, and power, and these buttons are labeled 1, 2, and 3 respectively, then the volume up button is labeled 1, the volume down button is labeled 2, and the power button is labeled 3. If the target identifier sequence contains 6 characters, then the target identifier sequence could be 123123.

[0111] In addition, to enhance the security of screen mirroring authorization information, the target identifier sequence can be a random sequence, thus ensuring the randomness of the generated screen mirroring authorization information. In other words, the screen mirroring authorization information corresponding to each screen mirroring session by the first electronic device is different.

[0112] Optionally, when the identifiers of multiple physical buttons are preset, i.e., when the identifiers of multiple physical buttons are fixed, the first electronic device can generate a random sequence based on the identifiers of the multiple physical buttons and use this random sequence as the target identifier sequence to achieve randomness in the screen casting authorization information corresponding to the target identifier sequence. For example, the preset identifiers of the multiple physical buttons are: the identifier corresponding to the volume up button is 1, the identifier corresponding to the volume down button is 2, and the identifier corresponding to the power button is 3. If the number of characters in the target identifier sequence is 6, then the generated random target identifier sequence can be 233122.

[0113] Optionally, when the identifiers of the multiple physical buttons are randomly generated by the first electronic device, i.e., when the identifiers of the multiple physical buttons are random identifiers, the target identifier sequence generated by the first electronic device based on the identifiers of the multiple physical buttons can all be random, so as to make the screen projection authorization information corresponding to the target identifier sequence random. Alternatively, the first electronic device can use the random sequence generated based on the identifiers of the multiple physical buttons as the target identifier sequence, thereby further increasing the randomness of the target identifier sequence.

[0114] S603: The first electronic device determines the screen projection authorization information based on the target identifier sequence.

[0115] In this step, the first electronic device can obtain screen projection authorization information by sequencing the target identifiers according to the identifiers corresponding to multiple physical buttons.

[0116] For example, the preset identifiers of multiple physical buttons are: the identifier corresponding to the volume up button is 1, the identifier corresponding to the volume down button is 2, and the identifier corresponding to the power button is 3, and the target identifier sequence is 233122. Then the screen casting authorization information corresponding to the target identifier sequence is volume down button, power button, power button, volume up button, volume down button, volume down button.

[0117] Optionally, when the screen mirroring authorization information is pre-saved, it can be stored in a storage module or device, and the first electronic device can retrieve the saved screen mirroring authorization information through the storage module or device. For example, ... Figure 2 As shown, the storage module or device can be an internal memory or a memory connected to the first electronic device via an external memory interface. Understandably, the pre-saved screen projection authorization information can be pre-generated by the first electronic device or by other devices. The specific generation method of the pre-saved screen projection authorization information can be found in steps S601-S603, or it can be generated in other ways; this application will not provide specific examples.

[0118] The following is in conjunction with the appendix Figure 5 The above step S403 will be illustrated by example.

[0119] In one implementation, the user can execute corresponding button operations on the first electronic device based on the button operations indicated by the screen projection authorization information and the sequence thereof. Accordingly, the first electronic device can receive the button operations executed by the user by sensing its own buttons. For example, such as... Figure 5 As shown, the screen mirroring authorization information includes button operations 1 through 6, and the physical button corresponding to each button operation. For example, the physical button corresponding to button operation 1 is the volume down button, the physical button corresponding to button operation 2 is the power button, and so on, with button operation 6 also corresponding to the volume down button. Users can sequentially execute the corresponding physical buttons on the first electronic device based on the order of button operations 1 through 6. Correspondingly, the first electronic device sequentially receives the button operations executed by the user.

[0120] When the first electronic device receives a button operation, it can verify the button operation based on the sequence of at least one physical button operation indicated by the screen projection authorization information.

[0121] When the button operation is successfully verified, the first electronic device continues to detect and verify the next button operation until at least one target physical button operation is received.

[0122] In other words, when the first electronic device receives a button press, it can determine whether the button press is the same as the button presses in the current sequence of the screen mirroring authorization information. If the button press is the same as the current sequence of button presses, it means that the button press verification is successful. The first electronic device can continue to detect the next button press and verify it until it receives all the button presses indicated by the screen mirroring authorization information. At this point, it means that the first electronic device has completed the screen mirroring authorization.

[0123] For example, still using Figure 5 For example, the key operations indicated by the screen mirroring authorization information include key operations 1 through 6. Key operations performed by the user include key operations A through F. When the first electronic device receives key operation A, it determines whether the physical button corresponding to key operation A matches the physical button corresponding to key operation 1. If the physical button corresponding to key operation A matches the physical button corresponding to key operation 1, it indicates that key operation A has been successfully verified. The first electronic device can then detect and verify the next key operation (i.e., key operation B) until all key operations have been received and verified.

[0124] When all physical button operations indicated by the screen casting authorization information are successfully verified, the user completes the screen casting authorization for the first electronic device, and the first electronic device sends screen casting data to the second electronic device.

[0125] In one implementation, during the process of the first electronic device receiving physical button operations performed by the user, if the button operation verification fails, the first electronic device can terminate the screen projection. That is, when button operation verification fails, it indicates that the screen projection authorization of the first electronic device has failed, and the first electronic device can terminate the screen projection without detecting and verifying the next button operation, thus saving power consumption caused by subsequent screen projection authorization verification operations.

[0126] Optionally, when button operation verification fails, the first electronic device can send a notification message to the second electronic device, which can then notify the user of the screen mirroring failure based on the notification message.

[0127] Understandably, if screen mirroring authorization fails, the user can re-establish the communication connection between the first and second electronic devices to repeat steps S401-S404. For example, if the communication connection is wired, the user can unplug the wired cable between the first and second electronic devices to repeat steps S401-S404. Similarly, if the communication connection is wireless, the user can disconnect the wireless connection between the first and second electronic devices to repeat steps S401-S404.

[0128] In one embodiment, after the first electronic device establishes a communication connection with the second electronic device, the first electronic device can also display a screen projection authorization message on the display screen.

[0129] Optionally, the screen mirroring authorization message displayed by the first electronic device can be the same as the screen mirroring authorization information displayed by the second electronic device. Alternatively, the screen mirroring authorization message displayed by the first electronic device can be different from the screen mirroring authorization information displayed by the second electronic device. For example, as... Figure 1C As shown, the screen mirroring authorization message may include a prompt message, a "cancel" control, and an "agree" control.

[0130] When the first electronic device receives confirmation from the user regarding the screen mirroring authorization message, it can also complete the screen mirroring authorization and send screen mirroring data to the second electronic device.

[0131] Optionally, when the screen casting authorization message displayed by the first electronic device is the same as the screen casting authorization information displayed by the second electronic device, the user can complete the screen casting authorization by performing the corresponding physical button operation based on the screen casting authorization information displayed by the second electronic device. When the screen casting authorization message and the screen casting authorization information are different, the user can complete the screen casting authorization by performing the corresponding physical button operation based on the screen casting authorization information displayed by the second electronic device, or the user can complete the screen casting authorization by performing the corresponding confirmation operation based on the screen casting authorization message displayed by the first electronic device.

[0132] For example, still using Figure 1CFor example, the screen mirroring authorization message displayed on the first electronic device includes a prompt, a "Cancel" control, and an "Agree" control. The user can trigger the "Agree" control by clicking the screen of the first electronic device to complete the screen mirroring authorization. Alternatively, the user can also perform the corresponding physical button operation based on the screen mirroring authorization information displayed on the second electronic device to complete the screen mirroring authorization.

[0133] In other words, when the screen of the first electronic device is inoperable, the user can authorize the screen mirroring of the first electronic device by pressing the physical button corresponding to the screen mirroring authorization information displayed on the second electronic device, thereby projecting the user interface of the first electronic device onto the second electronic device for display. When the screen of the first electronic device is operable, the user can authorize the screen mirroring of the first electronic device by pressing the confirmation button corresponding to the screen mirroring authorization message displayed on the first electronic device, thus improving the efficiency of screen mirroring authorization.

[0134] Furthermore, when the screen mirroring authorization message displayed by the first electronic device differs from the screen mirroring authorization information displayed by the second electronic device, the user can complete the screen mirroring authorization by executing the authorization operation corresponding to the screen mirroring authorization message displayed by the first electronic device, or by executing the authorization operation corresponding to the screen mirroring authorization information displayed by the second electronic device. The first electronic device does not need to detect whether its screen is damaged, and therefore does not need to perform different actions based on its screen state. For example, the first electronic device could perform different actions based on its screen state as follows: when the first electronic device detects that its screen is damaged, it generates screen mirroring authorization information. When the first electronic device detects that its screen is normal, it generates screen mirroring authorization message. In other words, regardless of whether the screen of the first electronic device is damaged, its screen always displays the screen mirroring authorization message, and the screen of the second electronic device always displays the screen mirroring authorization information.

[0135] Using this method, the first electronic device does not need to detect the status of its own screen, thereby reducing the power consumption of the first electronic device.

[0136] The following describes, in conjunction with different embodiments, Figure 4 The screen mirroring method shown is illustrated by example.

[0137] Example 1: Reference Figure 7 As shown, when the first electronic device is a smartphone and the second electronic device is a television, the first electronic device and the second electronic device can establish a communication connection via a wired connection (i.e., scenario one above). In this embodiment, the smartphone includes a wired screen mirroring service, and the smartphone screen cannot display anything. The smartphone and the external display can establish a wired connection via a docking station.

[0138] After a wired connection is established between the smartphone and the external display, the smartphone's wired screen mirroring service generates screen mirroring authorization information and sends it to the external display. The external display then receives this authorization information and displays it on its own screen. Figure 7 As shown, the screen mirroring authorization information includes authorization prompts and physical button information. The authorization prompts read, "Please press the following buttons in sequence to enable wired screen mirroring." The physical button information is as follows: "Volume Up, Volume Down, Volume Up, Power, Volume Up."

[0139] The wired screen mirroring service listens for physical button operations performed by the user through the button driver and verifies the physical button operations based on the physical button information in the screen mirroring authorization information.

[0140] In other words, after the wired screen mirroring service receives a physical button operation, it can verify the physical button operation based on the physical button information. Once the physical button operation is successfully verified, the wired screen mirroring service continues to listen for the next physical button operation until it receives all the physical button operations corresponding to the screen mirroring authorization information.

[0141] Once the wired screen mirroring service receives all the physical operation buttons corresponding to the screen mirroring authorization information, the smartphone can send screen mirroring data to the external display. Correspondingly, the external display receives the screen mirroring data from the smartphone and displays the smartphone's user interface on its screen.

[0142] In addition, smartphones connect to a mouse and keyboard via a docking station, allowing users to operate the smartphone using these devices. For example, users can perform data backup or migration operations on their smartphones using a mouse and keyboard.

[0143] Based on the screen casting method provided in Embodiment 1, the user can perform at least one physical button operation on the first electronic device to complete the screen casting authorization of the first electronic device. Even if the screen of the first electronic device is inoperable, the user can still complete the screen casting authorization on the first electronic device, thereby casting the user interface of the first electronic device to the second electronic device for display, so as to improve the success rate of screen casting authorization.

[0144] Example 2: Reference Figure 8A As shown, when the first electronic device is a smartphone and the second electronic device is an external display, the first electronic device and the second electronic device can establish a communication connection via a wired connection. In this embodiment, the smartphone includes a wired screen mirroring service. The smartphone and the external display can establish a wired connection via a cable.

[0145] After a wired connection is established between the smartphone and the external display, the smartphone's wired screen mirroring service can generate an authorization request pop-up, which will then be displayed on the smartphone's screen. Simultaneously, the wired screen mirroring service can generate screen mirroring authorization information and send it to the external display via the cable. The wired screen mirroring service can also listen for button events on the device via button drivers, receiving physical button presses from the user to complete the screen mirroring authorization.

[0146] The following is combined with Figure 8B right Figure 8A The content shown will be described in detail.

[0147] Step 1: Establish a wired connection between the smartphone and the external display. The wired connection method is similar to that described in Scenario 1 and will not be repeated here.

[0148] Step 2: The wired screen mirroring service of the smartphone generates an authorization request pop-up and displays the authorization request pop-up to the user through the phone's screen.

[0149] like Figure 1C As shown, the authorization pop-up interface may include a prompt message, a "Cancel" control, and an "Agree" control. Users can trigger the "Agree" control via the device screen to complete the screen mirroring authorization. Alternatively, users can trigger the "Cancel" control via the device screen to refuse screen mirroring authorization.

[0150] Step 3: The wired screen mirroring service generates a random key sequence and sends the random key sequence to the external display so that the external display can prompt the user with screen mirroring authorization information.

[0151] A random key sequence includes multiple physical key operations and the order in which they are performed. For example, a random key sequence could be "volume up, volume down, volume up, power, volume up".

[0152] Steps 4-5: The wired screen mirroring service listens for key events through the key driver and receives multiple physical key operations input by the user according to the random key sequence prompts.

[0153] Step 6: The wired screen mirroring service matches and verifies multiple physical button operations based on a random key sequence.

[0154] If multiple physical button operations are successfully verified, proceed to step 7. If multiple physical button operations fail to verify, end the screen mirroring process.

[0155] Step 7: The wired screen mirroring service sends screen mirroring data to the external display so that the external display shows the smartphone's user interface.

[0156] Based on the screen casting method provided in Embodiment 2, when the smartphone screen is functioning normally, the smartphone's body screen can display an authorization pop-up interface, and the external display can display screen casting authorization information. Accordingly, the user can trigger screen casting authorization via the body screen based on the prompts in the authorization pop-up interface, thereby improving the efficiency of screen casting authorization. Alternatively, the user can also execute corresponding physical button operations based on the screen casting authorization information to complete the screen casting authorization, thus projecting the smartphone's user interface onto an external display.

[0157] Based on the same concept, embodiments of this application also provide an electronic device, such as... Figure 9 As shown, the device includes a processor 901, a memory 902, a communication module 903, and a display screen 904. For example, the aforementioned devices can be connected via one or more communication buses. The one or more computer programs are stored in the memory 902 and configured to be executed by the processor 901. These computer programs include instructions that can be used to cause the electronic device to perform the steps executed by the first or second electronic device in the methods described in the above embodiments.

[0158] For example, the processor 901 described above can specifically be... Figure 2 The processor 210 shown. The memory 902 described above can specifically be... Figure 2 The internal memory 221 shown is and / or an external memory connected to the electronic device. The communication module 903 described above includes a transceiver or communication interface, wherein the transceiver can be... Figure 2 The mobile communication module 250 and / or wireless communication module 260 shown may have a communication interface that can be Figure 2 The external memory interface 220 and / or USB interface shown are examples of this. Specifically, the aforementioned display screen 904 can be... Figure 2 The display screen 294 shown is not limited in this embodiment of the application.

[0159] As used in the above embodiments, depending on the context, the terms "when..." or "after..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrases "when..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0160] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention 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 (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be combined.

[0161] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0162] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0163] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0164] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0165] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A screen mirroring method, applied to a first electronic device, the first electronic device having multiple physical buttons, characterized in that, include: After the first electronic device establishes a communication connection with the second electronic device, screen casting authorization information is sent to the second electronic device so that the second electronic device displays the screen casting authorization information; wherein, the screen casting authorization information is used to instruct the user to perform at least one target physical button operation on the first electronic device to complete the screen casting authorization; When a user performs at least one target physical button operation, screen projection data is sent to the second electronic device.

2. The method as described in claim 1, characterized in that, The method further includes: After the first electronic device establishes a communication connection with the second electronic device, the screen projection authorization information is generated; or, Retrieve the saved screen mirroring authorization information.

3. The method as described in claim 2, characterized in that, The generation of the screen mirroring authorization information includes: Get the identifiers of multiple physical buttons; A target identifier sequence is generated based on the identifiers of the plurality of physical buttons; the target identifier sequence includes the identifier of at least one target physical button; The screen projection authorization information is determined based on the target identifier sequence.

4. The method according to any one of claims 1-3, characterized in that, When the user performs at least one target physical button operation, the system sends screen projection data to the second electronic device, including: Upon receiving a key press operation, the key press operation is verified based on the sequence of at least one target physical key press operation indicated by the screen projection authorization information. When the button operation is successfully verified, the system continues to detect and verify the next button operation until at least one target physical button operation is received, and then sends screen projection data to the second electronic device.

5. The method as described in claim 4, characterized in that, The method further includes: If the button operation verification fails, the screen projection will end.

6. The method as described in claim 4 or 5, characterized in that, The method further includes: When the button operation verification fails, a notification message is sent to the second electronic device so that the second electronic device prompts the user that the screen mirroring has failed.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: After the first electronic device establishes a communication connection with the second electronic device, a screen projection authorization message is displayed on the screen. When a confirmation operation is received from the user regarding the screen mirroring authorization message, screen mirroring data is sent to the second electronic device.

8. The method according to any one of claims 1-7, characterized in that, The communication connection can be a wired connection or a wireless connection.

9. A screen projection method, applied to a second electronic device, characterized in that, include: After the first electronic device establishes a communication connection with the second electronic device, it receives screen casting authorization information from the first electronic device; wherein, the screen casting authorization information is used to instruct the user to perform at least one target physical button operation on the first electronic device to complete the screen casting authorization; The screen projection authorization information is displayed on the screen; Receive screen projection data from the first electronic device, and display the user interface of the first electronic device based on the screen projection data.

10. A screen projection system, comprising a first electronic device and a second electronic device, wherein the first electronic device has a plurality of physical buttons, characterized in that, include: After the first electronic device and the second electronic device establish a communication connection, the first electronic device sends screen casting authorization information to the second electronic device; wherein, the screen casting authorization information is used to instruct the user to perform at least one target physical button operation on the first electronic device side to complete the screen casting authorization; The second electronic device receives screen projection authorization information from the first electronic device and displays the screen projection authorization information on the display screen; When the first electronic device receives the at least one target physical button operation performed by the user, it sends screen projection data to the second electronic device; The second electronic device receives the screen projection data and displays the user interface of the first electronic device based on the screen projection data.

11. An electronic device, characterized in that, The electronic device includes a display screen, a memory, and one or more processors; The memory is used to store computer program code, which includes computer instructions; when the computer instructions are executed by the one or more processors, the electronic device performs the method as described in any one of claims 1-8, or the electronic device performs the method as described in claim 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes program instructions that, when executed on an electronic device, cause the electronic device to perform the method as claimed in any one of claims 1 to 8, or cause the electronic device to perform the method as claimed in claim 9.