Screen casting method, electronic device, storage medium and program product

By pre-storing target device information in the carrier, electronic devices can directly establish a communication connection and display the projected content, solving the problem of cumbersome manual operation in existing projection methods and achieving a more efficient projection process and a better user experience.

WO2026157282A1PCT designated stage Publication Date: 2026-07-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-09-19
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

In existing screen mirroring methods, the interaction between electronic devices mainly relies on manual operation by the user, resulting in a long and cumbersome operation path and reducing the user experience.

Method used

By pre-storing target device information in the carrier, the first electronic device directly obtains the target device information from the carrier, establishes a communication connection with the second electronic device, and sends projection information to display the projection content on the second electronic device, simplifying the device authentication and connection process.

Benefits of technology

No user needs to manually select a device or enter authentication information, simplifying the screen mirroring process, shortening connection time, and improving screen mirroring efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025122685_30072026_PF_FP_ABST
    Figure CN2025122685_30072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent terminals. Disclosed are a screen casting method, an electronic device, a storage medium and a program product. In the method, after acquiring from a carrier first target device information used for authenticating a second electronic device, a first electronic device can establish communication connection with the second electronic device on the basis of the acquired first target device information; then, the first electronic device sends to the second electronic device screen casting information used for displaying screen casting content on the second electronic device; and after receiving the screen casting information, the second electronic device can display corresponding screen casting content on a display screen. In the method, the first target device information is acquired by the first electronic device from the carrier, and the first electronic device can directly establish communication connection with the second electronic device on the basis of the first target device information; compared with manners of acquiring first target device information by means of broadcasting, the present method can improve screen casting efficiency, thereby improving the use experience of users.
Need to check novelty before this filing date? Find Prior Art

Description

Screen mirroring methods, electronic devices, storage media and software products

[0001] This application claims priority to Chinese Patent Application No. 202510124273.5, filed on January 26, 2025, entitled “Screen projection method, electronic device, storage medium and program product”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of smart terminal technology, and in particular to a screen projection method, electronic device, storage medium, and program product. Background Technology

[0003] With the continuous development of smart terminal technology, more and more electronic devices are joining smart scenarios such as screen mirroring. In smart screen mirroring scenarios, the content displayed on the screens of electronic devices such as mobile phones and tablets (such as videos, application interfaces, etc.) can be mirrored to a smart TV. In this kind of smart scenario, the interaction between electronic devices greatly enhances the user experience.

[0004] Taking establishing a communication connection between a mobile phone and a smart TV to complete screen mirroring as an example, the user needs to manually select the desired smart TV from the multiple connectable smart TVs displayed on the phone's screen. After receiving the connection request from the mobile phone, the target smart TV can display authentication information such as a connection code on its screen. Then, the user can input the read authentication information into the mobile phone. In response, the mobile phone detects the user's input authentication information and sends it to the smart TV. If the smart TV determines that the user's input authentication information matches the authentication information displayed on the screen, it can accept the mobile phone's connection request, meaning that the mobile phone and the target smart TV have successfully established a communication connection. In this way, the content displayed on the mobile phone's screen can be mirrored to the target smart TV for playback.

[0005] However, in this method, the interaction between electronic devices is mainly based on manual operation by the user, which is a long and cumbersome process and reduces the user experience. Summary of the Invention

[0006] This application provides a screen mirroring method, electronic device, storage medium, and program product to improve screen mirroring efficiency and thus enhance the user experience.

[0007] In a first aspect, this application provides a screen mirroring method applied to a screen mirroring system, the screen mirroring system including a first electronic device and a second electronic device, the method including: the first electronic device obtaining first target device information from a carrier for authenticating the second electronic device; the first electronic device establishing a communication connection with the second electronic device based on the first target device information; the first electronic device sending screen mirroring information to the second electronic device, the screen mirroring information being used to display screen mirroring content on the second electronic device; and the second electronic device displaying the screen mirroring content on a display screen based on the screen mirroring information.

[0008] In this method, after the first electronic device obtains the information of the first target device from the carrier, it can directly establish a communication connection with the second electronic device based on the first target device information to perform the screen projection task. During the process of establishing a communication connection between the first and second electronic devices, this method eliminates the need for the user to manually select the second electronic device on the display screen of the first electronic device or to manually enter authentication information, making the screen projection process simpler and improving the user experience.

[0009] Furthermore, since the carrier pre-stores the first target device information, the first electronic device can directly obtain the first target device information from the carrier and then establish a communication connection with the second electronic device based on the first target device information. Compared to the method where the first electronic device needs to obtain the first target device information identifier of the second electronic device through broadcast search or other means, this method simplifies the process of obtaining the first target device information, shortens the time for the first and second electronic devices to establish a communication connection, reduces end-to-end latency in the connection process, and thus improves screen projection efficiency.

[0010] In one possible implementation of the first aspect, the carrier includes a virtual carrier and / or a physical carrier; the virtual carrier is used to carry first target device information of the second electronic device; and the physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

[0011] In one possible implementation of the first aspect, when the carrier is a physical carrier, the first electronic device obtains first target device information for authenticating the second electronic device from the carrier, including: when the first electronic device is in a near-field communication connection with the physical carrier, it receives the first target device information for authenticating the second electronic device sent by the physical carrier.

[0012] It is understandable that the physical carrier is a carrier that supports active near-field communication, and in this case, the information of the first target device is carried on the physical carrier through active near-field communication.

[0013] This application does not limit the form of the physical carrier. In one possible implementation of the first aspect, the physical carrier can be a third electronic device or an electronic communication module (e.g., an active NFC module). Furthermore, the third electronic device may also include an electronic communication module.

[0014] The type of third electronic device can be set based on experience or flexibly adjusted according to the actual application scenario. For example, the third electronic device can be a mobile phone or a remote control 300 and other electronic devices.

[0015] It is understandable that, taking the first electronic device as a mobile phone 100 and the second electronic device as a smart TV 200 as an example, when the physical carrier is a remote control 300, the mobile phone 100 can establish a near-field communication connection with the remote control 300 by performing a tap-to-tap operation.

[0016] In the method provided in this application, when the carrier is a physical carrier, the first electronic device can directly obtain the information of the first target device from the physical carrier through methods such as tapping, and then establish a communication connection with the second electronic device based on the information of the first target device. This method simplifies the screen projection process and improves screen projection efficiency.

[0017] In one possible implementation of the first aspect, when the carrier is a virtual carrier, the virtual carrier is an information code used to carry information about the first target device.

[0018] The information code can be displayed on the screen of an electronic device in the form of a QR code, barcode, or other similar format. Alternatively, the information code can also be represented as a string of data.

[0019] When an information code is displayed on the screen of an electronic device in the form of a QR code, barcode, or similar format, the electronic device displaying the information code can be a second electronic device, or it can be another electronic device that is different from both the second and first electronic devices and has a screen.

[0020] In this scenario, taking the electronic device displaying the information code as the second electronic device, specifically a smart TV 200, and the first electronic device as a mobile phone 100, the smart TV 200 can store the information of the first target device in the information code. Thus, after scanning the information code displayed on the smart TV 200, the mobile phone 100 can obtain the information of the first target device from the information code by parsing it.

[0021] In the method provided in this application, when the carrier is a virtual carrier, the first electronic device can directly obtain the information of the first target device from the virtual carrier by scanning an information code, and then establish a communication connection with the second electronic device based on the information of the first target device. This method simplifies the screen projection process and improves projection efficiency.

[0022] In one possible implementation of the first aspect, before the first electronic device establishes a communication connection with the second electronic device based on the first target device information, the method further includes: the first electronic device receiving a screen mirroring service activation message sent by the second electronic device, the screen mirroring service activation message being used to indicate that the screen mirroring service of the second electronic device is in an activated state.

[0023] It's understandable that when the carrier is a virtual carrier, such as an information code, the screen mirroring method is suitable for hotel scenarios. To ensure screen mirroring security in hotel scenarios, the second electronic device can activate its screen mirroring service only after confirming that the first electronic device has obtained the first target device information from the virtual carrier, and then send a screen mirroring service activation message to the first electronic device. Therefore, after receiving the screen mirroring service activation message from the second electronic device, i.e., confirming that the second electronic device's screen mirroring service is enabled, the first electronic device can establish a communication connection with the second electronic device based on the first target electronic device. This screen mirroring method can improve screen mirroring security.

[0024] In one possible implementation of the first aspect, the first electronic device establishes a communication connection with the second electronic device based on the first target device information, including: when the first electronic device determines that there is no second target device information that matches the first target device information, it initiates authentication with the second electronic device based on the first target device information; and when the authentication is successful, the first electronic device establishes a communication connection with the second electronic device.

[0025] Specifically, the first electronic device can determine whether there is second target device information in the database that matches the first target device information. The database can be a local database of the first electronic device, or a cloud database, etc. The database stores target device information of electronic devices that have established communication connections with the first electronic device for transmitting screen projection information.

[0026] The first target device information may include the identifier and authentication information of the second electronic device. If the first electronic device determines that no second target device information matches the first target device information of the second electronic device, for example, if no identifier matching the identifier of the first electronic device exists in the database (e.g., no identifier identical to the identifier of the second electronic device exists in the database), it indicates that the first electronic device and the second electronic device have not yet established a communication connection. In this case, the first electronic device can initiate authentication with the second electronic device based on the first target device information. After successful authentication, the first electronic device can establish a communication connection with the second electronic device.

[0027] In one possible implementation of the first aspect, after the first electronic device establishes a communication connection with the second electronic device, the method further includes: the first electronic device storing information about the first target device.

[0028] It is understandable that if the first electronic device determines that there is no second target device information that matches the first target device information of the second electronic device, after establishing a communication connection with the second device, the first electronic device can store the first target device information in the database. This allows the first electronic device to establish a communication connection with the second electronic device directly without needing to initiate authentication again, further shortening the connection time and improving screen mirroring efficiency.

[0029] In one possible implementation of the first aspect, the first electronic device establishes a communication connection with the second electronic device based on the first target device information, including: when the first electronic device determines that there is second target device information that matches the first target device information, it does not initiate authentication with the second electronic device, but directly establishes a communication connection with the second electronic device.

[0030] If the first electronic device determines that there is second target device information that matches the first target device information of the second electronic device, such as an identifier that matches the identifier of the second electronic device in the database (e.g., an identifier that is the same as the identifier of the smart TV second electronic device in the database), it means that the first electronic device and the second electronic device have already established a communication connection. In this case, the first electronic device can directly establish a communication connection with the second electronic device without initiating authentication with the second electronic device.

[0031] For example, the first electronic device can send a connection request to the second electronic device based on the identifier of the second electronic device in the first target device information, and receive a reply message from the second electronic device indicating its agreement to establish a communication connection. In this way, the first electronic device successfully establishes a communication connection with the second electronic device. This method can further shorten the connection time when the first and second electronic devices are not connecting for the first time, thereby improving screen mirroring efficiency.

[0032] In one possible implementation of the first aspect, the projection information includes any one of the following: the content displayed on the screen of the first electronic device; the interface content of an application running in the background of the first electronic device; and the address information corresponding to the projection content.

[0033] When the screen projection information is the content displayed on the screen of the first electronic device, after the first electronic device sends the screen projection information to the second electronic device, the second electronic device can directly display the screen projection information on its screen.

[0034] Furthermore, the first electronic device can not only project the content currently displayed on its screen onto the second electronic device, but also project the interface content of applications running in the background onto the second electronic device. In this case, the projected information is the interface content of an application running in the background on the first electronic device. It can be understood that although the application's interface content is not currently displayed on the first electronic device's screen, it can be rendered in the background, allowing the first electronic device to send the rendered application's interface content as projected information to the second electronic device for display.

[0035] In addition, the projection information can also be the address information corresponding to the projection content. Thus, after receiving the projection information, the second electronic device can locate the projection content corresponding to that address based on the address information, and then display the projection content corresponding to that address on the screen.

[0036] In this method, the types of screen projection information are quite diverse, which can further enhance the implementation diversity of the screen projection method of this application and enrich the applicable scenarios of the screen projection method of this application.

[0037] Secondly, this application provides a screen mirroring method applied to a screen mirroring system, which includes a carrier and a second electronic device, the carrier being a third electronic device. The method includes: when the third electronic device is connected to the second electronic device, obtaining first target device information from the second electronic device for authenticating the second electronic device; the third electronic device sending the first target device information to the first electronic device; the second electronic device establishing a communication connection with the first electronic device; the second electronic device receiving screen mirroring information sent by the first electronic device, the screen mirroring information being used to display screen mirroring content on the second electronic device; and the second electronic device displaying screen mirroring content on a display screen based on the screen mirroring information.

[0038] In this method, when the second electronic device is connected to the third electronic device, it can send the first target device information to the third electronic device. After the first electronic device obtains the first target device information from the third electronic device and establishes a communication connection with the second target device based on the first target device information, that is, after the second electronic device and the first electronic device establish a communication connection, the second electronic device can display the screen projection content corresponding to the screen projection information.

[0039] In this method, the second electronic device can send the information of the first target device to the first electronic device in real time, enabling the second electronic device to successfully connect to the first electronic device and then perform the screen mirroring task. This method can ensure the real-time updating of the first target device information and improve screen mirroring efficiency.

[0040] In one possible implementation of the second aspect, the third electronic device sends first target device information to the first electronic device, including: when the third electronic device is in a near-field communication connection with the first electronic device, it sends the first target device information to the first electronic device.

[0041] In one possible implementation of the second aspect, the third electronic device is a device that supports active near-field communication (NFC) functionality, and the information of the first target device is carried on the third electronic device through the active NFC functionality.

[0042] In one possible implementation of the second aspect, the third electronic device is a remote control, and the first target device information includes the identification and authentication information of the second electronic device.

[0043] Thirdly, this application provides a screen mirroring method applied to a first electronic device. The method includes: obtaining first target device information from a carrier for authenticating a second electronic device; establishing a communication connection with the second electronic device based on the first target device information; and sending screen mirroring information to the second electronic device, wherein the screen mirroring information is used to display screen mirroring content on the second electronic device.

[0044] In one possible implementation of the third aspect, the carrier includes a virtual carrier and / or a physical carrier; the virtual carrier is used to carry the first target device information of the second electronic device; and the physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

[0045] In one possible implementation of the third aspect, when the carrier is a physical carrier, obtaining first target device information for authenticating the second electronic device from the carrier includes: receiving first target device information for authenticating the second electronic device sent by the physical carrier when in near-field communication connection with the physical carrier.

[0046] In one possible implementation of the third aspect, when the carrier is a virtual carrier, before establishing a communication connection with the second electronic device based on the first target device information, the method further includes: receiving a screen mirroring service activation message sent by the second electronic device, the screen mirroring service activation message being used to indicate that the screen mirroring service of the second electronic device is in an activated state.

[0047] In one possible implementation of the third aspect, establishing a communication connection with the second electronic device based on the first target device information includes: when it is determined that there is no second target device information that matches the first target device information, initiating authentication with the second electronic device based on the first target device information; and establishing a communication connection with the second electronic device when authentication is successful.

[0048] In one possible implementation of the third aspect, after establishing a communication connection with the second electronic device, the method further includes storing information about the first target device.

[0049] In one possible implementation of the third aspect, establishing a communication connection with the second electronic device based on the first target device information includes: when it is determined that there is second target device information that matches the first target device information, not initiating authentication with the second electronic device, but directly establishing a communication connection with the second electronic device.

[0050] In one possible implementation of the third aspect, the first target device information includes the identification and authentication information of the second electronic device.

[0051] In one possible implementation of the third aspect, the projection information includes any one of the following: the content displayed on the screen of the first electronic device; the interface content of an application running in the background of the first electronic device; and the address information corresponding to the projection content.

[0052] Fourthly, this application provides a screen projection method applied to a second electronic device. The method includes: writing first target device information for authenticating the second electronic device into a carrier; establishing a communication connection with the first electronic device; receiving screen projection information sent by the first electronic device, the screen projection information being used to display screen projection content on the second electronic device; and displaying the screen projection content on a display screen based on the screen projection information.

[0053] In one possible implementation of the fourth aspect, the carrier includes a virtual carrier and / or a physical carrier; the virtual carrier is used to carry the first target device information of the second electronic device; and the physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

[0054] In one possible implementation of the fourth aspect, when the carrier is a physical carrier, writing first target device information for authenticating the second electronic device into the carrier includes: sending the first target device information for authenticating the second electronic device to the physical carrier when connected to the physical carrier.

[0055] In one possible implementation of the fourth aspect, when the carrier is a virtual carrier, the virtual carrier is an information code used to carry the information of the first target device; before establishing a communication connection with the first electronic device, the method further includes: determining that the first electronic device has obtained the information of the first target device in the information code and starting the screen casting service; sending a screen casting service start message to the first electronic device, the screen casting service start message being used to indicate that the screen casting service of the second electronic device is in the start state.

[0056] In one possible implementation of the fourth aspect, the first target device information includes the identification and authentication information of the second electronic device.

[0057] In one possible implementation of the fourth aspect, the projection information includes any one of the following: the content displayed on the screen of the first electronic device; the interface content of an application running in the background of the first electronic device; and the address information corresponding to the projection content.

[0058] Fifthly, this application provides a screen projection method applied to a carrier, which is a third electronic device. The method includes: when connected to a second electronic device, obtaining first target device information for authenticating the second electronic device from the second electronic device; and sending the first target device information to the first electronic device.

[0059] In one possible implementation of the fifth aspect, sending first target device information to the first electronic device includes: sending the first target device information to the first electronic device when in near-field communication connection with the first electronic device.

[0060] In one possible implementation of the fifth aspect, the third electronic device is a device that supports active near-field communication, and the information of the first target device is carried on the third electronic device through the active near-field communication function.

[0061] In one possible implementation of the fifth aspect, the third electronic device is a remote control, and the first target device information includes the identification and authentication information of the second electronic device.

[0062] In a sixth aspect, this application provides an electronic device comprising: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the first to fifth aspects, and any possible implementation of the screen projection method of the first to fifth aspects.

[0063] In a seventh aspect, this application provides a readable storage medium storing a program or instructions that, when executed on an electronic device, cause the electronic device to perform the first to fifth aspects, and a screen projection method of any possible implementation of the first to fifth aspects.

[0064] Eighthly, this application provides a program product, comprising: a program or instruction that, when executed on an electronic device, causes the electronic device to perform the first to fifth aspects, and a screen projection method of any possible implementation of the first to fifth aspects.

[0065] The beneficial effects of aspects three through eight can be found in aspects one and two, as well as the beneficial effects of any possible implementation of aspects one and two, which will not be repeated here. Attached Figure Description

[0066] Figure 1 illustrates a scenario diagram of a home setting where a screen mirroring method is applied, according to some embodiments of this application.

[0067] Figure 2 illustrates a flowchart of a screen projection method in a home setting according to some embodiments of this application.

[0068] Figure 3A shows a schematic diagram of a search interface 301 of a mobile phone 100 according to some embodiments of this application.

[0069] Figure 3B shows a schematic diagram of a list interface 302 of a mobile phone 100 according to some embodiments of this application.

[0070] Figure 3C shows a schematic diagram of a trust interface 303 of a mobile phone 100 according to some embodiments of this application.

[0071] Figure 3D shows a schematic diagram of an authentication interface 304 of a mobile phone 100 according to some embodiments of this application.

[0072] Figure 3E shows a schematic diagram of a connection code input interface 305 of a mobile phone 100 according to some embodiments of this application.

[0073] Figure 4 illustrates a scenario diagram of a hotel scene where a screen projection method is applied, according to some embodiments of this application.

[0074] Figure 5 illustrates a flowchart of a screen projection method in a hotel setting according to some embodiments of this application.

[0075] Figure 6A shows a schematic diagram of a screen mirroring protocol interface 601 of a mobile phone 100 according to some embodiments of this application.

[0076] Figure 6B shows a schematic diagram of a screen casting guide interface 602 of a smart TV 200 according to some embodiments of this application.

[0077] Figure 7 illustrates a schematic diagram of the system architecture used in the screen projection method of this application, according to some embodiments of this application.

[0078] Figure 8 illustrates a flowchart of a screen projection method according to some embodiments of this application;

[0079] Figure 9 illustrates the interactive flow diagram of the first screen projection method of this application according to some embodiments of this application;

[0080] Figure 10 illustrates the interactive flow diagram of a second screen projection method according to some embodiments of this application;

[0081] Figure 11 illustrates the interactive flow diagram of a third screen projection method according to some embodiments of this application;

[0082] Figure 12 illustrates the interactive flow diagram of a fourth screen projection method according to some embodiments of this application;

[0083] Figure 13 illustrates the interactive flow diagram of the fifth screen projection method of this application according to some embodiments of this application;

[0084] Figure 14 illustrates the interactive flow diagram of the sixth screen projection method of this application according to some embodiments of this application;

[0085] Figure 15 shows a schematic diagram of the structure of an electronic device according to some embodiments of this application. Detailed Implementation

[0086] The illustrative embodiments of this application include, but are not limited to, screen projection methods, electronic devices, storage media, and program products.

[0087] The following section will first explain the proper nouns used in this application.

[0088] Near-field communication (NFC) technology is a short-range, high-frequency wireless communication technology that allows electronic devices to exchange data when they are close to each other. NFC technology primarily relies on the principle of electromagnetic induction and is typically used between active and passive devices. Specifically, an active device (such as a mobile phone) generates an electromagnetic wave. Upon receiving this wave, the passive device (such as other NFC external devices) activates its internal NFC module (or chip) based on the energy of the wave, thereby establishing a communication connection with the active device through magnetic field coupling.

[0089] It is understandable that after the active device and the passive device establish a communication connection through NFC technology, they can exchange data (for example, the active device reads data from the passive device or writes data to the passive device), or perform specific tasks (such as mobile payment, access control system verification, etc.).

[0090] Active NFC technology: NFC technology capable of sending and receiving data. As one possible example in this application, the NFC module in the remote control can employ active NFC technology, thus possessing active NFC functionality and capable of receiving data such as target device information sent by a smart TV.

[0091] It is understood that the screen projection method involved in this application can be applied to any screen projection device with screen projection function, as well as the device to which the screen is projected. The screen projection device includes, but is not limited to, mobile stations (MS) and mobile terminals (MT). For example, the screen projection device can be a mobile phone, a tablet computer, etc. The device to which the screen is projected can be, for example, a smart TV, wearable device, desktop computer, laptop computer, virtual reality (VR) device, augmented reality (AR) device, terminal in industrial control, terminal in self-driving, terminal in remote medical surgery, terminal in smart grid, terminal in transportation safety, terminal in smart city, terminal in smart home, etc. This application does not limit the specific form of the screen projection device and the device to which the screen is projected.

[0092] Furthermore, this application does not limit the application scenarios of the screen casting method; the application scenarios can be any scenario that requires screen casting. For example, application scenarios can include home (screen casting) scenarios, hotel (screen casting) scenarios, office (screen casting) scenarios, etc.

[0093] The following sections will describe in detail the screen casting methods in related technologies, taking home and hotel scenarios as examples, with the screen casting device being a mobile phone 100 and the screen being cast to a smart TV 200.

[0094] (I) Family Scene

[0095] Figure 1 illustrates a scenario of a home environment where a screen mirroring method is applied. As shown in Figure 1, the home environment includes a mobile phone 100, a smart TV 200, and a remote control 300 connected (or paired) to the smart TV. Both the mobile phone 100 and the remote control 300 may be equipped with NFC modules, enabling them to function as NFC devices. It can be understood that the mobile phone 100 can activate its NFC function in response to the triggering operation of the NFC control on its display screen. Similarly, the remote control 300 can activate its NFC function in response to its power-on operation.

[0096] Continuing with Figure 1, in a home setting, if a user wants to project the content displayed on the screen of mobile phone 100 onto the screen of smart TV 200, they can do so by tapping the phone with the remote control 300 while both devices have NFC enabled. For example, the user can bring mobile phone 100 close to remote control 300 to establish an NFC connection. Once the connection is established, mobile phone 100 can execute the method shown in Figure 2 to complete the projection task.

[0097] The screen mirroring method in the home scenario shown in Figure 1 is described below with reference to Figure 2. Figure 2 shows a flowchart of a screen mirroring method in a home scenario, which can be applied to mobile phone 100 and smart TV 200. As shown in Figure 2, the method includes the following process.

[0098] 201: Mobile phone 100 responds to establish a connection with remote control 300 and searches for the device to be projected.

[0099] It is understandable that after mobile phone 100 detects the establishment of an NFC connection between mobile phone 100 and remote control 300, it begins searching for devices that can be projected onto the screen. While searching for devices to be projected onto, mobile phone 100 can display a search interface 301 on its screen, as shown in Figure 3A. The search interface 301 includes a prompt box 3011, and the prompt information in the prompt box 3011 can be used to inform the user that mobile phone 100 is currently searching for available devices, i.e., devices to be projected onto.

[0100] In some solutions, mobile phone 100 can search for other P2P devices in a peer-to-peer (P2P) network architecture. This method can also be called P2P search (or scanning) method.

[0101] 202: Mobile phone 100 displays a list interface that includes a list of at least one device identified as being projected.

[0102] After searching for at least one device that can be screen-casted, mobile phone 100 can obtain information such as the identifier (e.g., device name) of at least one screen-castable device. Mobile phone 100 can display the obtained identifier and other information of at least one screen-castable device in the list interface 302 shown in Figure 3B. As shown in Figure 3B, the list interface 302 includes a list box 3021, and the list box 3021 contains the names of multiple screen-castable devices, such as device A, device B, and device C.

[0103] The method by which mobile phone 100 obtains the identifier of at least one device to be projected can include: mobile phone 100 broadcasting a search request based on a P2P search method, the search request may include information such as the type of device being searched. After receiving the search request, if the device to be projected determines that it meets the requirements of the search request, it can send a response message to mobile phone 100, the response message may include information such as the identifier of the device to be projected. In this way, mobile phone 100 can obtain the identifier and other information of at least one device to be projected.

[0104] It's understandable that if phone 100 searches for the device to be projected using a P2P search method, phone 100 doesn't need to be connected to the same Wi-Fi network as the device being projected. That is, the device being projected can be connected to the same Wi-Fi network as phone 100, or it can be connected to a different Wi-Fi network. In some solutions, phone 100 doesn't even need to be connected to any Wi-Fi network, as long as its Wi-Fi function is enabled.

[0105] 203: In response to at least one smart TV 200 being selected in the screen mirroring device, mobile phone 100 sends a connection request to smart TV 200.

[0106] Taking device A in Figure 3B as a smart TV 200 as an example, after the mobile phone 100 determines that device A (i.e., smart TV 200) has been selected, it can send a connection request to the smart TV 200. The connection request is used to request the mobile phone 100 to establish a communication connection with the smart TV 200 so that the content displayed on the mobile phone 100's screen can be projected onto the smart TV 200 for playback.

[0107] 204: Smart TV 200 displays a trust interface.

[0108] After receiving the connection request from mobile phone 100, smart TV 200 can display a trust interface 303 as shown in Figure 3C on its screen. The trust interface 303 displays a prompt box 3031, which displays the message: "Mobile phone 100 requests screen mirroring to this device. Do you trust this device?" In addition, prompt box 3031 also displays "Always Trust," "Trust Only This Time," and "Don't Trust" controls.

[0109] 205: The smart TV 200 responds to the triggered operation of the trust control and displays the authentication interface.

[0110] The trust control can be either the "Always Trust" control or the "Trust Only This Time" control in the prompt box 3031. It can be understood that the smart TV 200, in response to the triggering operation of the "Always Trust" control or the "Trust Only This Time" control, can display the authentication interface 304 as shown in Figure 3D. The authentication interface 304 displays a reference connection code, such as "672411".

[0111] 206: Mobile phone 100 detected the connection code entered by the user.

[0112] It is understandable that after the user reads the reference connection code on the display screen of the smart TV 200, they can enter the read connection code, such as "672411", into the connection code input interface 305 on the mobile phone 100 as shown in Figure 3E. In this way, the mobile phone 100 can detect the connection code entered by the user.

[0113] 207: Mobile phone 100 sends the connection code entered by the user to smart TV 200.

[0114] 208: Smart TV 200 determines that the user-input connection code matches the reference connection code.

[0115] After receiving the connection code input by the user from the mobile phone 100, the smart TV 200 can determine whether the connection code sent by the mobile phone 100 matches the reference connection code. It can be understood that in some solutions, if the connection code sent by the mobile phone 100 and the reference connection code are the same, the smart TV 200 can determine that the connection code sent by the mobile phone 100 matches the reference connection code.

[0116] 209: The smart TV 200 sends a request reply message to the mobile phone 100. The request reply message is used to indicate that the connection request of the mobile phone 100 is approved.

[0117] Thus, the communication connection for transmitting screen mirroring information between the mobile phone 100 and the smart TV 200 is established. Then, the mobile phone 100 can send the screen mirroring information (such as the content displayed on the screen) to the smart TV 200, so that the smart TV 200 can display the received screen mirroring information on its screen.

[0118] It is understandable that the interaction between the mobile phone 100 and the smart TV 200 involved in the above screen mirroring process is mainly based on manual operation by the user. For example, the user needs to select a target screen mirroring device (such as the smart TV 200) from at least one device to be mirrored in the list interface 302, and the user needs to enter the read connection code in the connection code input interface 305. This makes the user's operation path involved in the screen mirroring process long and cumbersome, thereby reducing the user experience.

[0119] (II) Hotel Scene

[0120] Figure 4 illustrates a scenario in a hotel where a screen mirroring method is applied. As shown in Figure 4, the hotel scenario includes a mobile phone 100 and a smart TV 200, where the smart TV 200 displays a QR code 401. In the hotel scenario shown in Figure 4, if a user wants to mirror the content displayed on the screen of the mobile phone 100 to the screen of the smart TV 200, the user needs to connect the mobile phone 100 to the wireless network connected to the smart TV 200, and then use the mobile phone 100 to scan the QR code 401 on the smart TV 200 to activate the screen mirroring service, thus completing the screen mirroring task.

[0121] It's understandable that, given the large number of smart TVs in a hotel setting, to prevent users from accidentally or maliciously casting their screens, users can scan the QR code 401 on the smart TV with their mobile phone before activating the screen casting service. This will improve both casting efficiency and security.

[0122] The screen projection method in the hotel scenario shown in Figure 4 will be described below with reference to Figure 5. Figure 5 shows a flowchart of a screen projection method in a hotel scenario. This method can be applied to mobile phone 100, smart TV 200, and server 400, where mobile phone 100 and smart TV 200 can be clients of server 400. As shown in Figure 5, the method includes the following process.

[0123] 501: Mobile phone 100 scans the QR code on the display screen of smart TV 200 to obtain the QR code information and display the screen casting usage agreement interface.

[0124] It can be understood that the QR code can be, for example, QR code 401 as shown in Figure 4. The QR code information of QR code 401 may include information such as the server link and the identifier of QR code 401. Specifically, QR code 401 may be generated by server 400 and then sent to the smart TV 200 for display.

[0125] After scanning QR code 401 with mobile phone 100, the QR code information of QR code 401 can be obtained. In addition, after scanning QR code 401 with mobile phone 100, the screen will also display the screen casting agreement interface 601 as shown in Figure 6A. The screen casting agreement interface 601 displays the "Click to start using screen casting" control 6011 and the "I have read and accept the screen casting agreement" control 6012.

[0126] 502: In response to the user's triggering operation on the control in the screen mirroring protocol interface, mobile phone 100 sends a QR code identifier and a QR code scanning message to server 400.

[0127] As shown in Figure 6A, after the mobile phone 100 detects the user's click operation on the "Click to start using screen casting" control 6011 and the "I have read and accepted the screen casting usage agreement" control 6012, it can send the identifier of QR code 401 and the QR code scanning message to the server 400 to inform the server 400 that the mobile phone 100 has scanned QR code 401.

[0128] 503: Server 400 identifies smart TV 200 based on QR code identification.

[0129] It is understood that the QR code identifier in the QR code information is unique, and one QR code identifier corresponds to one smart TV. That is to say, QR code 401 in this application can correspond to smart TV 200. Therefore, after receiving the identifier of QR code 401 sent by mobile phone 100, server 400 can determine that the electronic device corresponding to QR code 401 is smart TV 200 based on the identifier of QR code 401.

[0130] 504: Server 400 sends a screen mirroring service activation command to Smart TV 200.

[0131] It is understandable that the screen mirroring service activation command sent by server 400 to smart TV 200 can instruct smart TV 200 to activate the screen mirroring service.

[0132] 505: Smart TV 200 responds to the screen mirroring service activation command and activates the screen mirroring service.

[0133] After receiving the screen mirroring service activation command from the server 400, the smart TV 200 can activate the screen mirroring service. Furthermore, after activating the screen mirroring service, the smart TV 200 can display a screen mirroring guide interface 602 as shown in Figure 6B. The screen mirroring guide interface 602 indicates two different screen mirroring methods. For example, the user can perform the screen mirroring task by clicking the screen mirroring control 6021 in the video application on the mobile phone 100, or by clicking the screen mirroring control 6022 in the drop-down status bar of the mobile phone 100.

[0134] In some solutions, after the smart TV 200 enables the screen mirroring service, it can send a message to the server 400 indicating that the screen mirroring service has been enabled. After receiving the message, the server 400 can send the message to the mobile phone 100, thus notifying the mobile phone 100 that the screen mirroring service of the smart TV 200 has been enabled.

[0135] 506: The phone detected the screen mirroring control being triggered and is searching for the device to be mirrored.

[0136] It is understandable that when the phone detects the triggering operation of the screen mirroring control 6021 or 6022, it can start searching for the device to be mirrored.

[0137] 507: Mobile phone 100 displays a list interface that includes a list of at least one device identified as being projected.

[0138] 508: In response to at least one smart TV 200 being selected in the screen mirroring device, a connection request is sent to the smart TV 200.

[0139] It's understandable that, given the large number and density of smart TVs in a hotel setting, to avoid incorrect or malicious screen mirroring, the phone typically needs to use a wireless network-based search method, such as Miracast or DLNA protocols, to find the target device. The characteristic of this wireless network-based search method is that at least one target device found by the phone is connected to the same wireless network as the phone itself. This effectively prevents incorrect or malicious screen mirroring.

[0140] 509: The smart TV 200 sends a request reply message to the mobile phone 100. The request reply message is used to indicate that the connection request of the mobile phone 100 is agreed.

[0141] It is understandable that the execution principle of this 509 is the same as that of the 209 mentioned above, so it will not be repeated here.

[0142] It is understandable that the interaction between the mobile phone 100 and the smart TV 200 involved in the above screen casting process is mainly based on manual operation by the user. For example, the user needs to manually click the screen casting control on the mobile phone 100 (such as screen casting control 6021 or screen casting control 6022), and the user needs to select a target screen casting device (such as smart TV 200) from at least one target device included in the list interface. This makes the user's operation path involved in the screen casting process longer and more cumbersome, thereby reducing the user experience.

[0143] In summary, the screen mirroring process in both home and hotel scenarios relies on manual operation by the user, making the process cumbersome and reducing the user experience.

[0144] To further address the aforementioned issues, this application also provides a screen mirroring method. In this method, a first electronic device (such as a mobile phone 100) can obtain first target device information from a carrier for authenticating a second electronic device. Then, based on the target device information, the first electronic device can establish a communication connection with the second electronic device and send screen mirroring information to the second electronic device. This screen mirroring information is used to display the mirrored content on the second electronic device. After receiving the screen mirroring information, the second electronic device can display the corresponding mirrored content on its display screen.

[0145] In some embodiments, the first target device information includes the identification and authentication information of the second electronic device.

[0146] In the screen mirroring method provided in this application, after the first electronic device obtains the information of the first target device from the carrier, it can directly establish a communication connection with the second electronic device based on the first target device information to execute the screen mirroring task. During the process of establishing a communication connection between the first and second electronic devices, this method eliminates the need for the user to manually select the second electronic device on the display screen of the first electronic device, nor requires the user to manually enter authentication information, thus simplifying the screen mirroring process and improving the user experience.

[0147] Furthermore, since the carrier pre-stores the first target device information, the first electronic device can directly obtain the first target device information from the carrier and then establish a communication connection with the second electronic device based on the first target device information. Compared to the method where the first electronic device needs to obtain the first target device information of the second electronic device through broadcast search or other means, this method simplifies the process of obtaining the first target device information, shortens the time for the first and second electronic devices to establish a communication connection, reduces end-to-end latency in the connection process, and thus improves screen projection efficiency.

[0148] The system architecture used in the screen projection method described in this application will be described in detail below. Figure 7 shows a schematic diagram of the system architecture used in the screen projection method. As shown in Figure 7, the system architecture 700 includes a system screen projection sending end 701, a system screen projection receiving end 702, and a media carrier 703 (as an example of a carrier).

[0149] The system projection sending end 701 is a projection device used to establish a communication connection with the system projection receiving end 702 and then send projection information for displaying projection content on the system projection receiving end 702 to the system projection receiving end 702. In addition, the system projection sending end 701 can also be used to receive the first target device information of the system projection receiving end 702 sent by the media carrier 703.

[0150] In some embodiments, the system screen projection sending end 701 can be a first electronic device, such as the mobile phone 100, tablet or other electronic device mentioned above.

[0151] The system projection receiver 702 is the device to be projected onto. After establishing a communication connection with the system projection sender 701, it receives the projection information sent by the system projection sender 701 and displays the projection content corresponding to the projection information on the display screen. In addition, the system projection receiver 702 is also used to write the first target device information of the system projection receiver 702 to the media carrier 703.

[0152] In some embodiments, the system screen mirroring receiver 702 can be a second electronic device, such as the smart TV 200 described above.

[0153] The medium carrier 703 is used to receive and store the first target device information sent by the system projection receiver 702 when connected to the system projection receiver 702. Then, after establishing an NFC connection with the system projection sender 701, the first target device information is sent to the system projection sender 701.

[0154] In some embodiments, the media carrier 703 can be a virtual carrier or a physical carrier. When the media carrier 703 is a virtual carrier, as an example, the media carrier 703 can be used to carry first target device information, such as an information code carrying the first target device information. When the media carrier 703 is a physical carrier, as an example, the media carrier 703 can be used to obtain the first target device information from the system projection receiver 702 when connected to the system projection receiver 702, and the media carrier 703 is a carrier supporting active NFC function, in which case the first target device information is carried on the media carrier 703 through active NFC function.

[0155] In some embodiments, the medium carrier 703 may be a third electronic device (such as a remote control 300) or an electronic communication module (such as a near field communication NFC module).

[0156] Based on the above system architecture, Figure 8 shows a flowchart of a screen projection method applied to a first electronic device (e.g., mobile phone 100). As shown in Figure 8, the method includes the following steps.

[0157] 801: Obtain first target device information from the carrier for authenticating the second electronic device.

[0158] It is understood that, for ease of description, the steps shown in Figure 8 are explained using the example of a mobile phone 100 as the first electronic device and a smart TV 200 as the second electronic device.

[0159] In this embodiment of the application, the carrier includes a virtual carrier and / or a physical carrier; wherein, the virtual carrier is used to carry the first target device information of the second electronic device; and the physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

[0160] In some embodiments, when the carrier is a physical carrier, the mobile phone 100 can receive first target device information sent by the physical carrier when it is connected to the physical carrier via NFC. Therefore, the physical carrier is a carrier that supports active NFC, and in this case, the first target device information is carried on the physical carrier through active NFC.

[0161] This application does not limit the form of the physical carrier. For example, the physical carrier can be a third electronic device or an electronic communication module (e.g., an active NFC module). In other embodiments, the third electronic device may also include an electronic communication module. The type of the third electronic device can be set based on experience or flexibly adjusted according to the actual application scenario. For example, the third electronic device can be a mobile phone or a remote control 300, etc.

[0162] It is understandable that when the physical carrier is the remote control 300, the mobile phone 100 can establish an NFC connection with the remote control 300 by performing a tap operation.

[0163] In other embodiments, when the carrier is a virtual carrier, the virtual carrier can be an information code used to carry information about the first target device. This application does not limit the form of the information code; for example, the information code can be displayed on the screen of an electronic device in the form of a QR code, barcode, etc. Furthermore, the information code can also be represented as string data.

[0164] In the case where the information code is displayed on the screen of an electronic device in the form of a QR code, barcode, etc., this application embodiment does not limit the type of electronic device on which the information code is displayed. For example, the electronic device displaying the information code can be a smart TV 200, or it can be an electronic device that is different from both the mobile phone 100 and the smart TV 200 and has a screen.

[0165] In this scenario, taking a smart TV 200 as an example of an electronic device displaying the information code, the smart TV 200 can store the information of the first target device in the information code. Thus, after the mobile phone 100 scans the information code displayed on the smart TV 200, it can obtain the information of the first target device from the information code by parsing it.

[0166] When the information code is represented as a string of data, the smart TV 200 can store the first target device information within the information code. Thus, after the mobile phone 100 obtains the information code (e.g., obtains the information code transmitted on a specific channel), it can retrieve the first target device information from the information code.

[0167] In other embodiments, the carrier may also be a cloud server or similar entity used to carry information about the first target device. In this case, the information about the first target device in the cloud server may be uploaded by the smart TV 200. Thus, the mobile phone 100 can obtain the information about the first target device from the cloud server. As a possible triggering condition, the mobile phone 100 may display controls or information for triggering screen mirroring, such as cards, live windows, notification messages, pop-up messages, etc. Optionally, the aforementioned controls or information respond to user interaction, triggering the retrieval of the first target device information from the cloud server. Subsequent processes can be found in the relevant description of this application.

[0168] In this embodiment of the application, the first target device information includes, but is not limited to, the identification and authentication information of the smart TV 200, wherein the authentication information may include the connection code information shown in FIG3D.

[0169] 802: Based on the information of the first target device, establish a communication connection with the second electronic device.

[0170] In some embodiments, after obtaining the first target device information of the smart TV 200, the mobile phone 100 can determine whether there is second target device information that matches the first target device information. Specifically, the mobile phone 100 can determine whether there is second target device information in the database that matches the first target device information. The database can be a local database of the mobile phone 100, or a cloud database, etc. The database is used to store target device information of electronic devices that have established a communication connection with the mobile phone 100 for transmitting screen projection information.

[0171] If mobile phone 100 determines that there is no second target device information matching the first target device information of smart TV 200, for example, if there is no identifier in the database that matches the identifier of smart TV 200 (e.g., there is no identifier in the database that is identical to the identifier of smart TV 200), it means that mobile phone 100 and smart TV 200 have not yet established a communication connection. In this case, mobile phone 100 can initiate authentication with smart TV 200 based on the first target device information. After successful authentication, mobile phone 100 can establish a communication connection with smart TV 200.

[0172] For example, mobile phone 100 can send authentication information and a connection request to smart TV 200 based on the identifier of smart TV 200 in the first target device information. The connection request is used to request the establishment of a communication connection with smart TV 200. If smart TV 200 determines that the authentication information sent by mobile phone 100 matches the authentication information stored internally by smart TV 200, it can confirm successful authentication and then send a request reply message to mobile phone 100, indicating that smart TV 200 agrees to establish a communication connection with mobile phone 100. In this way, mobile phone 100 successfully establishes a communication connection with smart TV 200.

[0173] In some embodiments, after the mobile phone 100 establishes a communication connection with the smart TV 200, the mobile phone 100 may also store the first target device information of the smart TV 200. For example, the mobile phone 100 stores the identifier of the smart TV 200 in a database.

[0174] If mobile phone 100 determines that there is second target device information that matches the first target device information of smart TV 200, such as an identifier that matches the identifier of smart TV 200 in the database (e.g., an identifier that is identical to the identifier of smart TV 200 in the database), it means that mobile phone 100 and smart TV 200 have already established a communication connection. In this case, mobile phone 100 can directly establish a communication connection with smart TV 200 without initiating authentication with smart TV 200.

[0175] For example, mobile phone 100 can send a connection request to smart TV 200 based on the identifier of smart TV 200 in the first target device information, and receive a reply message from smart TV 200 indicating its agreement to establish a communication connection. In this way, mobile phone 100 successfully establishes a communication connection with smart TV 200.

[0176] 803: Send screen mirroring information to the second electronic device. The screen mirroring information is used to display the screen mirroring content on the second electronic device.

[0177] After the mobile phone 100 and the smart TV 200 successfully establish a communication connection, the mobile phone 100 can send the screen casting information to the smart TV 200, so that the smart TV 200 can display the screen casting content corresponding to the screen casting information sent by the mobile phone 100 on the display screen.

[0178] This application does not limit the content of the screen casting information. For example, the screen casting information can be the content displayed on the screen of mobile phone 100. In this way, after mobile phone 100 sends screen casting information to smart TV 200, smart TV 200 can directly display the screen casting information (i.e., the screen casting content) on its screen.

[0179] For example, the screen mirroring information can be the interface content of an application running in the background on mobile phone 100. That is, mobile phone 100 can not only mirror the content currently displayed on its screen to smart TV 200, but also the interface content of applications running in the background. It can be understood that although the application's interface content is not currently displayed on mobile phone 100's screen, it can be rendered in the background, allowing mobile phone 100 to send the rendered application's interface content as screen mirroring information to smart TV 200.

[0180] For example, the screen mirroring information can also be the address information corresponding to the screen mirroring content. In this way, after the smart TV 200 receives the screen mirroring information, it can find the corresponding screen mirroring content based on the address information, and then display the screen mirroring content corresponding to the address information on the screen.

[0181] In the screen mirroring method provided in this application, after the mobile phone 100 obtains the information of the first target device from the carrier, it can automatically establish a communication connection with the smart TV 200 to execute the screen mirroring task. Compared with related technologies, where the user needs to manually select the smart TV 200 on the mobile phone 100's display screen and manually enter authentication information, this method eliminates the need for the user to manually select the smart TV 200 or manually enter authentication information, simplifying the steps required during the screen mirroring process and thus making the screen mirroring method simpler and improving the user experience.

[0182] Furthermore, since the carrier has pre-stored the first target device information, the mobile phone 100 can directly obtain the first target device information from the carrier, and then establish a communication connection with the smart TV 200 based on the first target device information. Compared to the method where the mobile phone 100 needs to obtain the first target device information of the smart TV 200 through broadcast search, this method shortens the time for the mobile phone 100 to obtain the first target device information of the smart TV 200, thereby shortening the time for the mobile phone 100 and the smart TV 200 to establish a communication connection, reducing end-to-end latency in the connection process, and improving screen projection efficiency.

[0183] Based on the foregoing, the first electronic device (such as mobile phone 100) can obtain the information of the first target device from a physical carrier or a virtual carrier. The following describes in detail the interaction flow of the screen projection method under the above two methods, taking the third electronic device (such as remote control 300) as the physical carrier and the information code as the virtual carrier.

[0184] Method 1: The first electronic device obtains the first target device information from the third electronic device.

[0185] It is understandable that the application scenario for this screen mirroring method can be the home scenario mentioned above.

[0186] Figure 9 illustrates the interaction flow of the first screen projection method. This interaction method can be applied to a first electronic device (e.g., mobile phone 100), a second electronic device (e.g., smart TV 200), and a third electronic device (e.g., remote control 300). As an example, the first electronic device may include a first screen projection service module, a first NFC module, and a first connection processing module (or a first soft bus module); the second electronic device may include a second screen projection service module and a second connection processing module (or a second soft bus module); and the third electronic device may include a second NFC module. Based on Figure 9, the interaction flow of the screen projection method for the first and second electronic devices to establish an initial communication connection is described below.

[0187] 901: The second projection service module of the second electronic device determines that the second electronic device and the third electronic device establish a communication connection.

[0188] For ease of description, the steps shown in Figure 9 are described using the example of a mobile phone 100 as the first electronic device, a smart TV 200 as the second electronic device, and a remote control 300 as the third electronic device.

[0189] It can be understood that establishing a communication connection between the smart TV 200 and the remote control 300 means that the remote control 300 can remotely control the smart TV 200. This application does not limit the method by which the smart TV 200 and the remote control 300 establish a communication connection. For example, the smart TV 200 can establish a communication connection with the remote control 300 via Bluetooth.

[0190] 902: The second projection service module of the second electronic device determines the first target device information of the second electronic device.

[0191] In this application, the first target device information may include the identifier of the smart TV 200 and authentication information, and the authentication information may be a connection code. Taking the authentication information as a connection code as an example, the smart TV 200 may generate / update the connection code at fixed time intervals. The form of the connection code can be seen in Figure 3D.

[0192] In other embodiments, the first target device information of the smart TV 200 may also include the media access control address (MAC) of the smart TV 200, as well as network information of the network in which the smart TV 200 is currently located (such as network port information, channel information), and any other information that needs to be used in the process of establishing a communication connection between the mobile phone 100 and the smart TV 200.

[0193] This application does not limit the order of 901 and 902 described above. For example, 902 can be executed after 901 or before 901.

[0194] 903: The second projection service module of the second electronic device sends the first target device information to the second NFC module of the third electronic device.

[0195] It is understood that after the smart TV 200 generates / updates authentication information, it can send the first target device information to the second NFC module of the remote control 300 through the second screen mirroring service module. In some embodiments, the second NFC module of the remote control 300 has active NFC functionality, and the first target device information can be carried in the second NFC module through active NFC functionality, and thus carried in the remote control 300.

[0196] 904: When the first electronic device and the third electronic device are connected via NFC, the second NFC module of the third electronic device sends NFC data to the first NFC module of the first electronic device.

[0197] The NFC connection between mobile phone 100 and remote control 300 can also be described as a communication connection between the first NFC module of mobile phone 100 and the second NFC module of remote control 300. It can be understood that after establishing an NFC connection, mobile phone 100 and remote control 300 can exchange NFC data.

[0198] It is understood that the remote control 300 can send all the NFC data in the second NFC module to the first NFC module of the mobile phone 100. The NFC data from the remote control 300 may include the first target device information of the smart TV 200.

[0199] 905: The first NFC module of the first electronic device sends the first target device information in the NFC data to the first screen projection service module of the first electronic device.

[0200] It is understandable that after the first NFC module of mobile phone 100 receives all the NFC data from remote control 300, it can send the NFC data related to the screen casting service (i.e., the first target device information of the smart TV 200 connected to remote control 300) to the first screen casting service module for use by the first screen casting service module, according to the data type of the NFC data.

[0201] 906: The first screen mirroring service module of the first electronic device searches for the screen mirroring device and obtains the identifier of the screen mirroring device found.

[0202] The method by which the first screen mirroring service module of mobile phone 100 searches for the device to be mirrored is the same as the principle described in step 201 above, so it will not be repeated here.

[0203] This application does not limit the timing of the first screen casting service module of mobile phone 100 searching for the screen casting device. In some embodiments, the first screen casting service module may start searching for the screen casting device after receiving the first target device information.

[0204] In some other embodiments, the first screen mirroring service module may also search for the screen mirroring device at fixed intervals to obtain the identifier of the screen mirroring device.

[0205] It is understandable that after the first screen mirroring service module obtains the information of the first target device and the identifier of the device to be mirrored, it can determine whether the identifier of the device to be mirrored includes the identifier of the smart TV 200 in the target device information.

[0206] 907: The first screen projection service module of the first electronic device, corresponding to the identifier of the screen projection device found, including the identifier of the second electronic device, sends the first target device information, connection request, and query request to the first connection processing module of the first electronic device.

[0207] It is understandable that if the identifier of the smart TV 200 exists among the identifiers of the devices to be cast to that are searched by the mobile phone 100, it means that the smart TV 200 is currently in a state where the casting service is enabled, that is, the smart TV 200 is in a state where it can be cast. At this time, the mobile phone 100 can send the first target device information, a connection request, and a query request to the first connection processing module. Among them, the connection request is used to request to establish a communication connection with the smart TV 200, and the query request is used to instruct the first connection processing module to query the database to see if there is second target device information that matches the first target device information, such as determining whether there is an identifier in the database that matches the identifier of the smart TV 200 in the first target device information (e.g., whether there is an identifier that is the same as the identifier of the smart TV 200). In addition, the database is used to store the identifiers of electronic devices that have established communication connections with the mobile phone 100 for transmitting casting information.

[0208] In some embodiments, the mobile phone 100 may not perform step 906. In this step, the first screen projection service module of the mobile phone 100 can directly send the first target device information, connection request and query request to the first connection processing module after receiving the first target device information.

[0209] 908: The first connection processing module of the first electronic device, corresponding to the second target device information that does not match the first target device information in the database, sends a connection request and authentication information to the second connection processing module of the second electronic device.

[0210] If no matching second target device information exists in the database, it means that mobile phone 100 has not yet established a communication connection with smart TV 200. Therefore, mobile phone 100 can send a connection request and authentication information to smart TV 200 based on the identifier of smart TV 200 in the first target device information. It can be understood that the process of mobile phone 100 sending authentication information to smart TV 200 can also be understood as the process of mobile phone 100 initiating authentication with smart TV 200.

[0211] 909: The second connection processing module of the second electronic device sends a connection request and authentication information to the second screen projection service module of the second electronic device.

[0212] It is understandable that the second connection processing module of the smart TV 200 sends a connection request and authentication information to the second screen casting service module, so that the second screen casting service module can perform subsequent authentication information matching operations and reply operations to the connection request.

[0213] 910: The second screen projection service module of the second electronic device determines that the received authentication information matches the authentication information stored internally.

[0214] This application does not limit the method by which the second screen mirroring service module of the smart TV 200 determines that the received authentication information matches the internally stored authentication information. For example, if the authentication information received by the second screen mirroring service module is exactly the same as the internally stored authentication information, it can be determined that the two match.

[0215] It is understandable that if the smart TV 200 determines that the received authentication information matches the authentication information stored internally, it can determine that the authentication is successful and proceed to the next step 911.

[0216] 911: The second screen projection service module of the second electronic device sends a request reply message to the second connection processing module of the second electronic device.

[0217] The request reply message is used to indicate agreement to the connection request from mobile phone 100.

[0218] 912: The second connection processing module of the second electronic device sends a request reply message to the first connection processing module of the first electronic device.

[0219] 913: After storing the first target device information in the database, the first connection processing module of the first electronic device sends a request reply message to the first screen projection service module of the first electronic device.

[0220] The operation of the mobile phone 100 storing the first target device information in the database can be understood as the mobile phone 100 storing the identifier of the smart TV 200 in the first target device information in the database, or the mobile phone 100 storing the identifier and authentication information of the smart TV 200 in the database in the form of data pairs. This application embodiment does not limit this.

[0221] In some embodiments, the first connection processing module may first send a request reply message to the first screen projection service module of the mobile phone 100 (i.e., the first electronic device), and then store the first target device information in the database. This application does not limit the order of sending the request reply message and storing the first target device information.

[0222] 914: The first screen projection service module of the first electronic device sends screen projection information to the first connection processing module of the first electronic device.

[0223] It is understandable that screen mirroring information can be used to display screen mirroring content on the phone's screen.

[0224] 915: The first connection processing module of the first electronic device sends screen projection information to the second connection processing module of the second electronic device.

[0225] 916: The second connection processing module of the second electronic device sends screen projection information to the second screen projection service module of the second electronic device.

[0226] 917: The second screen projection service module of the second electronic device displays the screen projection content corresponding to the screen projection information on the display screen.

[0227] It is understood that in the screen mirroring method shown in Figure 9, the smart TV 200 determines whether the received authentication information matches the internally stored authentication information based on the second screen mirroring service module. In some other embodiments, the smart TV 200 may also determine whether the received authentication information matches the internally stored authentication information based on the second connection processing module. In this case, after receiving the connection request and authentication information, the second connection processing module can directly determine whether the received authentication information matches the internally stored authentication information, and if they match, send a request reply message to the first connection processing module of the first electronic device.

[0228] In the screen mirroring method provided in this application, after the user taps the remote control 300 with their mobile phone 100, the mobile phone 100 can automatically establish a communication connection with the smart TV 200 to perform the screen mirroring task. This method eliminates the need for the user to manually select the smart TV 200 on the mobile phone 100's screen or to manually enter authentication information, making the screen mirroring method simpler and improving the user experience.

[0229] Furthermore, in some embodiments, since the remote control 300 is equipped with an active NFC module with active NFC functionality, and the active NFC module has pre-stored the first target device information of the smart TV 200 connected to the remote control 300, the mobile phone 100 can obtain the first target device information after establishing an NFC connection with the remote control 300, and then establish a communication connection with the smart TV 200 based on the first target device information. Compared with the method where the mobile phone 100 needs to obtain the first target device information through broadcast search, this method shortens the time for the mobile phone 100 to obtain the first target device information, thereby shortening the time for the mobile phone 100 and the smart TV 200 to establish a communication connection, reducing end-to-end latency in the connection process, and improving screen projection efficiency.

[0230] It is understood that the first target device information in the active NFC module of the remote control 300 is the information of the device connected to the remote control 300 (such as the smart TV 200). When the device connected to the remote control 300 changes, since the first target device information in the remote control 300 is updated in real time, the new device will still send its corresponding first target device information to the remote control 300. That is, the active NFC module of the remote control 300 will store the first target device information corresponding to the new device. In this case, the mobile phone 100 can obtain the first target device information of the new device from the remote control 300, and then establish a communication connection with the new device. Therefore, in the screen casting method provided in this application, even when the device connected to the remote control 300 changes, the mobile phone 100 can still establish a communication connection with the device connected to the remote control 300, thereby realizing the screen casting task, which improves screen casting efficiency.

[0231] Furthermore, even if the remote control 300 is lost, as long as the new remote control establishes a communication connection with the smart TV 200, the smart TV 200 will still send the corresponding first target device information to the new remote control. That is, the active NFC module of the new remote control will also store the first target device information corresponding to the smart TV 200. At this time, the mobile phone 100 can obtain the first target device information of the smart TV 200 from the new remote control and thus establish a communication connection with the smart TV 200. Therefore, in the screen casting method provided in this application, even if the remote control 300 is replaced, the mobile phone 100 can still establish a communication connection with the smart TV 200 based on the new remote control, thereby realizing the screen casting task and improving screen casting efficiency.

[0232] Figure 10 illustrates the interaction flow of the second screen projection method. Based on Figure 9, the interaction flow of the screen projection method for establishing a non-first-time communication connection between the first and second electronic devices will be described below using Figure 10.

[0233] 1001: The second projection service module of the second electronic device determines that the second electronic device and the third electronic device establish a communication connection.

[0234] It is understandable that the execution principle of this step is the same as that of step 901 above, so it will not be repeated here.

[0235] 1002: The second projection service module of the second electronic device updates the authentication information and determines the updated first target device information.

[0236] Taking authentication information as the connection code as an example, the smart TV 200 can generate / update the connection code at fixed time intervals. This application does not limit the length of the fixed time interval; it can be set based on experience or flexibly adjusted according to the actual application scenario.

[0237] 1003: The second projection service module of the second electronic device sends the updated first target device information to the second NFC module of the third electronic device.

[0238] 1004: When the first electronic device and the third electronic device are connected via NFC, the second NFC module of the third electronic device sends updated NFC data to the first NFC module of the first electronic device.

[0239] It is understood that the execution principle of steps 1003-1004 above is the same as that of steps 903-904 above, so it will not be repeated here.

[0240] 1005: The first NFC module of the first electronic device sends the updated first target device information from the NFC data to the first screen projection service module of the first electronic device.

[0241] The updated first target device information may include updated authentication information and the identifier of the smart TV 200.

[0242] 1006: The first screen mirroring service module of the first electronic device searches for the screen mirroring device and obtains the identifier of the screen mirroring device found.

[0243] 1007: The first screen projection service module of the first electronic device, corresponding to the identifier of the screen projection device including the identifier of the second electronic device, sends the updated first target device information, connection request and query request to the first connection processing module of the first electronic device.

[0244] It is understandable that the execution principle of steps 1006-1007 above is the same as that of steps 906-907 above, so it will not be repeated here.

[0245] 1008: The first connection processing module of the first electronic device, corresponding to the existence of second target device information in the database that matches the first target device information, sends a connection request to the second connection processing module of the second electronic device.

[0246] It is understandable that if the database contains information about a second target device that matches the information about the first target device, it means that the mobile phone 100 and the smart TV 200 have established a communication connection. Therefore, the first connection processing module can directly send a connection request to the second connection processing module instead of sending the updated authentication information to the second connection processing module (i.e., initiating authentication to the smart TV 200).

[0247] 1009: The second connection processing module of the second electronic device sends a connection request to the second screen projection service module of the second electronic device.

[0248] 1010: The second screen projection service module of the second electronic device sends a request reply message to the second connection processing module of the second electronic device.

[0249] 1011: The second connection processing module of the second electronic device sends a request reply message to the first connection processing module of the first electronic device.

[0250] 1012: The first connection processing module of the first electronic device sends a request reply message to the first screen projection service module of the first electronic device.

[0251] 1013: The first screen projection service module of the first electronic device sends screen projection information to the first connection processing module of the first electronic device.

[0252] 1014: The first connection processing module of the first electronic device sends screen projection information to the second connection processing module of the second electronic device.

[0253] 1015: The second connection processing module of the second electronic device sends screen projection information to the second screen projection service module of the second electronic device.

[0254] 1016: The second screen projection service module of the second electronic device displays the screen projection content corresponding to the screen projection information on the display screen.

[0255] It is understood that the execution principle of steps 1010-1016 above is the same as that of the corresponding steps in steps 911-917 above, so it will not be repeated here.

[0256] In some other embodiments, the second connection processing module of the smart TV 200 may also send a request reply message directly to the first connection processing module of the mobile phone 100 after receiving the connection request.

[0257] In the screen mirroring method provided in this application, during the process of establishing a communication connection between the mobile phone 100 and the smart TV 200 before the first time, the mobile phone 100 does not need to initiate authentication with the smart TV 200 based on updated authentication information. Instead, it can directly send a connection request to the smart TV 200 to establish a communication connection. This method further simplifies the screen mirroring process during the process of establishing a communication connection before the first time, thus further improving screen mirroring efficiency.

[0258] Method 2: The first electronic device obtains the information of the first target device from the information code.

[0259] It is understandable that the application scenario of the screen projection method under this second method can be the hotel scenario mentioned above, and the following description takes the information code as a QR code and the electronic device displaying the QR code as the second electronic device (such as a smart TV 200) as an example.

[0260] Figure 11 illustrates the interaction flow of the third screen mirroring method. This interaction method can be applied to a first electronic device (e.g., mobile phone 100) and a second electronic device (e.g., smart TV 200). The first electronic device includes a first screen mirroring service module and a first connection processing module; the second electronic device includes a second screen mirroring service module, a second connection processing module, and a QR code generation module. Based on Figure 11, the interaction flow of the screen mirroring method for the first electronic device and the second electronic device to establish an initial communication connection is described below.

[0261] 1101: The QR code generation module of the second electronic device generates a QR code based on the first target device information of the second electronic device and displays the QR code on the display screen.

[0262] The information about the first target device can be found in section 902 above, and will not be repeated here.

[0263] 1102: After the QR code generation module of the second electronic device determines that the first electronic device has scanned the QR code, it sends a scanning event to the second screen projection service module.

[0264] This application embodiment does not limit the method by which the smart TV 200 determines that the mobile phone 100 has scanned the QR code of the smart TV 200. For example, after the mobile phone 100 scans and obtains the first target device information in the QR code, it can send information such as the mobile phone 100's identifier, the scanning event of the mobile phone 100 scanning the QR code, and the obtained first target device information to the server. After receiving the above information, the server can send a scanning event to the QR code generation module of the smart TV 200 to indicate that the mobile phone 100 has scanned the QR code. After receiving the scanning event, the QR code generation module of the smart TV 200 can determine that the mobile phone 100 has scanned the QR code of the smart TV 200. Then, the QR code generation module of the smart TV 200 sends the scanning event to the second screen projection service module.

[0265] 1103: The second screen mirroring service module of the second electronic device has started screen mirroring service.

[0266] It is understandable that enabling the screen mirroring service on the Smart TV 200 means that the Smart TV 200 is in a state where screen mirroring is possible.

[0267] 1104: The second screen mirroring service module of the second electronic device sends a screen mirroring service activation message to the second connection processing module of the second electronic device.

[0268] The "Screen mirroring service enabled" message indicates that the screen mirroring service of the smart TV 200 has been enabled.

[0269] 1105: The second connection processing module of the second electronic device sends a screen mirroring service activation message to the first connection processing module of the first electronic device.

[0270] 1106: The first connection processing module of the first electronic device sends a screen casting service activation message to the first screen casting service module of the first electronic device.

[0271] 1107: The first screen projection service module of the first electronic device sends the first target device information, connection request and query request to the first connection processing module of the first electronic device.

[0272] It is understandable that after receiving the message indicating that the screen mirroring service of the smart TV 200 has been enabled, the mobile phone 100 can send connection request and other information to the first connection processing module to perform subsequent operations to establish a communication connection with the smart TV 200.

[0273] 1108: The first connection processing module of the first electronic device, corresponding to the second target device information that does not match the first target device information in the database, sends a connection request and authentication information to the second connection processing module of the second electronic device.

[0274] 1109: The second connection processing module of the second electronic device sends a connection request and authentication information to the second screen projection service module of the second electronic device.

[0275] 1110: The second screen projection service module of the second electronic device determines that the received authentication information matches the authentication information stored internally.

[0276] 1111: The second projection service module of the second electronic device sends a request reply message to the second connection processing module of the second electronic device.

[0277] 1112: The second connection processing module of the second electronic device sends a request reply message to the first connection processing module of the first electronic device.

[0278] 1113: After storing the first target device information in the database, the first connection processing module of the first electronic device sends a request reply message to the first screen projection service module of the first electronic device.

[0279] 1114: The first screen projection service module of the first electronic device sends screen projection information to the first connection processing module of the first electronic device.

[0280] 1115: The first connection processing module of the first electronic device sends screen projection information to the second connection processing module of the second electronic device.

[0281] 1116: The second connection processing module of the second electronic device sends screen projection information to the second screen projection service module of the second electronic device.

[0282] 1117: The second screen projection service module of the second electronic device displays the screen projection content corresponding to the screen projection information on the display screen.

[0283] It is understandable that the execution principle of steps 1107-1117 above is the same as the execution principle of the corresponding steps in steps 907-917 above, and will not be repeated here.

[0284] In the screen mirroring method provided in this application, after a user scans the QR code on a smart TV 200 with their mobile phone 100, the mobile phone 100 can automatically establish a communication connection with the smart TV 200 to perform the screen mirroring task. Compared to related technologies where the user needs to manually select the smart TV 200 on the mobile phone 100's screen in a hotel setting, this method eliminates the need for manual selection. Instead, it establishes a communication connection with the smart TV 200 based on the first target device information obtained from the QR code, making the screen mirroring method simpler and improving the user experience.

[0285] Furthermore, since the QR code already stores the first target device information of the smart TV 200, the mobile phone 100 can obtain the first target device information after scanning the QR code, and then establish a communication connection with the smart TV 200 based on the first target device information. Compared with the method where the mobile phone 100 needs to obtain the first target device information of the smart TV 200 through broadcasting or other means, this method shortens the time for the mobile phone 100 to obtain the first target device information, thereby shortening the time for the mobile phone 100 and the smart TV 200 to establish a communication connection, reducing the end-to-end latency in the connection process, and thus improving the screen projection efficiency.

[0286] Compared to related technologies where QR codes in hotel scenarios are generated by cloud servers, the QR codes in this application can be directly generated by the smart TV 200, reducing the interaction process with the cloud server, simplifying the screen casting method, and making the screen casting process more stable.

[0287] Furthermore, in related technologies, to ensure screen mirroring security in hotel scenarios, mobile phone 100 needs to be connected to the same public network as smart TV 200 in order to successfully search for and establish a communication connection with smart TV 200. However, in the method of this application, since mobile phone 100 can determine the first target device information of smart TV 200 by scanning a QR code, and mobile phone 100 establishes a communication connection with smart TV 200 through the soft bus capability of the connection processing module (i.e., soft bus module), mobile phone 100 does not need to be connected to the same public network as smart TV 200 during the screen mirroring task. This reduces the risk of attacks from the public network on mobile phone 100 while completing the screen mirroring task, thereby reducing the risk of data leakage and improving the security of the screen mirroring process.

[0288] Figure 12 shows a schematic diagram of the interaction flow for the fourth screen projection method. Based on Figure 11, the interaction flow of the screen projection method for establishing a non-first-time communication connection between the first and second electronic devices will be described below using Figure 12.

[0289] 1201: The QR code generation module of the second electronic device updates the QR code and displays the updated QR code on the screen.

[0290] It is understandable that the smart TV 200 can generate / update a QR code at fixed time intervals. This application does not limit the duration of the fixed time intervals; they can be set based on experience or flexibly adjusted according to actual application scenarios.

[0291] 1202: The QR code generation module of the second electronic device determines that the first electronic device has scanned the updated QR code and sends a scan event to the second screen projection service module.

[0292] 1203: The second screen mirroring service module of the second electronic device has started screen mirroring service.

[0293] 1204: The second screen mirroring service module of the second electronic device sends a screen mirroring service activation message to the second connection processing module of the second electronic device.

[0294] 1205: The second connection processing module of the second electronic device sends a screen mirroring service activation message to the first connection processing module of the first electronic device.

[0295] 1206: The first connection processing module of the first electronic device sends a screen casting service activation message to the first screen casting service module of the first electronic device.

[0296] 1207: The first projection service module of the first electronic device sends the updated first target device information, connection request and query request to the first connection processing module of the first electronic device.

[0297] It is understandable that the execution principle of steps 1202-1207 above is the same as the execution principle of the corresponding steps in steps 1102-1107 above, and will not be repeated here.

[0298] 1208: The first connection processing module of the first electronic device, corresponding to the existence of second target device information in the database that matches the first target device information, sends a connection request to the second connection processing module of the second electronic device.

[0299] 1209: The second connection processing module of the second electronic device sends a connection request to the second screen projection service module of the second electronic device.

[0300] 1210: The second screen projection service module of the second electronic device sends a request reply message to the second connection processing module of the second electronic device.

[0301] 1211: The second connection processing module of the second electronic device sends a request reply message to the first connection processing module of the first electronic device.

[0302] 1212: The first connection processing module of the first electronic device sends a request reply message to the first screen projection service module of the first electronic device.

[0303] 1213: The first screen projection service module of the first electronic device sends screen projection information to the first connection processing module of the first electronic device.

[0304] 1214: The first connection processing module of the first electronic device sends screen projection information to the second connection processing module of the second electronic device.

[0305] 1215: The second connection processing module of the second electronic device sends screen projection information to the second screen projection service module of the second electronic device.

[0306] 1216: The second screen projection service module of the second electronic device displays the screen projection content corresponding to the screen projection information on the display screen.

[0307] It is understood that the execution principle of steps 1208-1216 above is the same as that of the corresponding steps in steps 1008-1016 above, so it will not be repeated here.

[0308] In some other embodiments, the second connection processing module of the smart TV 200 may also send a request reply message directly to the first connection processing module of the mobile phone 100 after receiving the connection request.

[0309] In the screen mirroring method provided in this application, during the process of establishing a communication connection between the mobile phone 100 and the smart TV 200 before the first time, the mobile phone 100 does not need to initiate authentication with the smart TV 200 based on updated authentication information. Instead, it can directly send a connection request to the smart TV 200 to establish a communication connection. This method further simplifies the screen mirroring process during the process of establishing a communication connection before the first time, thus further improving screen mirroring efficiency.

[0310] It is understandable that in the screen mirroring method described in Figures 11 and 12 above, after the QR code generation module of the smart TV 200 determines from the server that the mobile phone 100 has scanned the QR code, the second screen mirroring service module starts the screen mirroring service of the smart TV 200. Then, after the first screen mirroring service module of the mobile phone 100 determines that the screen mirroring service of the smart TV 200 has been started, it sends a connection request and the first target device information to the smart TV 200.

[0311] In other embodiments, after scanning the QR code of the smart TV 200, the mobile phone 100 can obtain the first target device information and the connection request directly to the smart TV 200 without waiting for the smart TV 200 to start the screen mirroring service.

[0312] Therefore, based on Figure 13, the following describes the interaction flow of the screen projection method in which the first electronic device and the second electronic device establish a communication connection for the first time in this manner.

[0313] 1301: The QR code generation module of the second electronic device generates a QR code based on the first target device information of the second electronic device and displays the QR code on the display screen.

[0314] It is understandable that the execution principle of step 1301 is the same as that of step 1101 mentioned above, and will not be repeated here.

[0315] 1302: After the first electronic device scans the QR code, the first screen projection service module obtains the information of the first target device in the QR code.

[0316] This application does not limit the method by which the first screen mirroring service module obtains the first target device information. For example, mobile phone 100 can directly scan the QR code of smart TV 200 based on the first screen mirroring service module to obtain the first target device information. Alternatively, mobile phone 100 can also scan the QR code of smart TV 200 based on other internal modules (such as a QR code scanning module), thus allowing the QR code scanning module to obtain the first target device information from the QR code. Then, the QR code scanning module can send the obtained first target device information to the first screen mirroring service module of mobile phone 100, thereby enabling the first screen mirroring service module to obtain the first target device information.

[0317] 1303: The first screen projection service module of the first electronic device sends the first target device information, connection request and query request to the first connection processing module of the first electronic device.

[0318] 1304: The first connection processing module of the first electronic device, corresponding to the second target device information that does not match the first target device information in the database, sends a connection request and authentication information to the second connection processing module of the second electronic device.

[0319] 1305: The second connection processing module of the second electronic device sends a connection request and authentication information to the second screen projection service module of the second electronic device.

[0320] It is understandable that the execution principle of steps 1303-1305 above is the same as the execution principle of the corresponding steps in steps 1107-1109 above, and will not be repeated here.

[0321] 1306: The second screen projection service module of the second electronic device starts the screen projection service and determines that the received authentication information matches the authentication information stored internally.

[0322] It is understandable that after receiving the connection request, the second screen mirroring service module can determine that the mobile phone 100 requests to establish a communication connection with the smart TV 200. Therefore, the second screen mirroring service module can enable the screen mirroring service on the smart TV 200. Enabling the screen mirroring service on the smart TV 200 indicates that the smart TV 200 is in a state where screen mirroring is possible.

[0323] Furthermore, the execution principle of the second screen projection service module in determining whether the received authentication information matches the internally stored authentication information is the same as the execution principle of step 1110 above, and will not be repeated here.

[0324] 1307: The second screen projection service module of the second electronic device sends a request reply message to the second connection processing module of the second electronic device.

[0325] 1308: The second connection processing module of the second electronic device sends a request reply message to the first connection processing module of the first electronic device.

[0326] 1309: After storing the first target device information in the database, the first connection processing module of the first electronic device sends a request reply message to the first screen projection service module of the first electronic device.

[0327] 1310: The first screen projection service module of the first electronic device sends screen projection information to the first connection processing module of the first electronic device.

[0328] 1311: The first connection processing module of the first electronic device sends screen projection information to the second connection processing module of the second electronic device.

[0329] 1312: The second connection processing module of the second electronic device sends screen projection information to the second screen projection service module of the second electronic device.

[0330] 1313: The second screen projection service module of the second electronic device displays the screen projection content corresponding to the screen projection information on the display screen.

[0331] It is understandable that the execution principle of steps 1307-1313 above is the same as the execution principle of the corresponding steps in steps 1111-1117 above, and will not be repeated here.

[0332] Figure 14 shows a schematic diagram of the interaction flow for the sixth screen projection method. Based on Figure 13, the interaction flow of the screen projection method for establishing a non-first-time communication connection between the first and second electronic devices will be described below using Figure 14.

[0333] 1401: The QR code generation module of the second electronic device updates the QR code and displays the updated QR code on the screen.

[0334] It is understandable that the execution principle of step 1401 is the same as that of step 1201 mentioned above, and will not be repeated here.

[0335] 1402: After the first electronic device scans the updated QR code, the first screen projection service module obtains the first target device information from the updated QR code.

[0336] 1403: The first projection service module of the first electronic device sends the updated first target device information, connection request and query request to the first connection processing module of the first electronic device.

[0337] It is understood that the execution principle of steps 1402-1403 above is the same as the execution principle of the corresponding steps in steps 1302-1303 above, and will not be repeated here.

[0338] 1404: The first connection processing module of the first electronic device, corresponding to the existence of second target device information in the database that matches the first target device information, sends a connection request to the second connection processing module of the second electronic device.

[0339] 1405: The second connection processing module of the second electronic device sends a connection request to the second screen projection service module of the second electronic device.

[0340] 1406: The second screen mirroring service module of the second electronic device starts screen mirroring service.

[0341] 1407: The second screen projection service module of the second electronic device sends a request reply message to the second connection processing module of the second electronic device.

[0342] 1408: The second connection processing module of the second electronic device sends a request reply message to the first connection processing module of the first electronic device.

[0343] 1409: The first connection processing module of the first electronic device sends a request reply message to the first screen projection service module of the first electronic device.

[0344] 1410: The first screen projection service module of the first electronic device sends screen projection information to the first connection processing module of the first electronic device.

[0345] 1411: The first connection processing module of the first electronic device sends screen projection information to the second connection processing module of the second electronic device.

[0346] 1412: The second connection processing module of the second electronic device sends screen projection information to the second screen projection service module of the second electronic device.

[0347] 1413: The second screen projection service module of the second electronic device displays the screen projection content corresponding to the screen projection information on the display screen.

[0348] It is understandable that the execution principle of steps 1407-1413 above is the same as the execution principle of the corresponding steps in steps 1307-1313 above, and will not be repeated here.

[0349] In the method provided in this application, after mobile phone 100 scans the QR code of smart TV 200, it can directly send the obtained first target device information and connection request to smart TV 200, so that the second screen casting service module of smart TV 200 can start the screen casting service, thereby realizing the subsequent connection between smart TV 200 and mobile phone 100. In this method, smart TV 200 can directly determine the QR code scanned by mobile phone 100 based on the first target device information and connection request sent by mobile phone 100, without going through the server for determination, making the screen casting process simpler and further improving the screen casting efficiency.

[0350] In some embodiments, this application also provides a readable storage medium storing a program or instructions that, when executed on an electronic device, cause the electronic device to perform the screen projection method described in the above embodiments.

[0351] In some embodiments, this application also provides an electronic device, which includes: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the screen projection method described in the above embodiments.

[0352] In some embodiments, this application also provides a program product, including: a program or instructions, which, when run on an electronic device, cause the electronic device to execute the screen projection method described in the above embodiments.

[0353] Figure 15 shows a schematic diagram of the structure of the electronic device provided in an embodiment of this application. As shown in Figure 15, the electronic device (e.g., a first electronic device or a second electronic device) may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0354] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0355] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0356] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0357] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. The processor can be used to execute the screen projection method mentioned in this application.

[0358] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0359] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory disposed within the processor.

[0360] The SIM card interface 195 is used to connect the SIM card.

[0361] It is understood that, as used herein, the term “module” may refer to or include, or be part of, an application-specific integrated circuit (ASIC), electronic circuitry, a processor (shared, dedicated, or grouped) and / or memory that executes one or more software or firmware programs, combinational logic circuitry, and / or other suitable hardware components that provide the described functionality.

[0362] It is understood that in the various embodiments of this application, the processor may be a microprocessor, a digital signal processor, a microcontroller, etc., and / or any combination thereof. According to another aspect, the processor may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.

[0363] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0364] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.

[0365] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0366] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagated signals. Therefore, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0367] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0368] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0369] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.

[0370] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A screen projection method, characterized in that, Applied to a screen mirroring system, the screen mirroring system including a first electronic device and a second electronic device, the method includes: The first electronic device obtains first target device information from the carrier for authenticating the second electronic device; The first electronic device establishes a communication connection with the second electronic device based on the first target device information; The first electronic device sends screen projection information to the second electronic device, and the screen projection information is used to display the screen projection content on the second electronic device; The second electronic device displays the projected content on the display screen based on the projected information.

2. The method according to claim 1, characterized in that, The carrier includes a virtual carrier and / or a physical carrier; The virtual carrier is used to carry the first target device information of the second electronic device; The physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

3. The method according to claim 2, characterized in that, When the carrier is the physical carrier, the first electronic device obtains first target device information from the carrier for authenticating the second electronic device, including: When the first electronic device is in near-field communication connection with the physical carrier, it receives the first target device information sent by the physical carrier for authenticating the second electronic device.

4. The method according to claim 2 or 3, characterized in that, The physical carrier is a third electronic device or an electronic communication module.

5. The method according to any one of claims 2 to 4, characterized in that, The physical carrier is a carrier that supports active near-field communication (NFC) functionality, and the information of the first target device is carried on the physical carrier through the active NFC functionality.

6. The method according to claim 4, characterized in that, The third electronic device is a remote control, and the electronic communication module is an active near-field communication module.

7. The method according to claim 2, characterized in that, When the carrier is the virtual carrier, the virtual carrier is an information code used to carry the information of the first target device.

8. The method according to claim 7, characterized in that, Before the first electronic device establishes a communication connection with the second electronic device based on the first target device information, the method further includes: The first electronic device receives a screen mirroring service activation message sent by the second electronic device, the screen mirroring service activation message being used to indicate that the screen mirroring service of the second electronic device is in an activated state.

9. The method according to any one of claims 1 to 8, characterized in that, The first electronic device establishes a communication connection with the second electronic device based on the first target device information, including: When the first electronic device determines that there is no second target device information that matches the first target device information, it initiates authentication with the second electronic device based on the first target device information; Upon successful authentication, the first electronic device establishes a communication connection with the second electronic device.

10. The method according to claim 9, characterized in that, After the first electronic device establishes a communication connection with the second electronic device, the method further includes: The first electronic device stores the information of the first target device.

11. The method according to any one of claims 1 to 8, characterized in that, The first electronic device establishes a communication connection with the second electronic device based on the first target device information, including: When the first electronic device determines that there is second target device information that matches the first target device information, it does not initiate authentication with the second electronic device, but directly establishes a communication connection with the second electronic device.

12. The method according to any one of claims 1 to 11, characterized in that, The first target device information includes the identification and authentication information of the second electronic device.

13. The method according to any one of claims 1 to 12, characterized in that, The screen projection information includes any one of the following: The content displayed on the screen of the first electronic device; The interface content of the application running in the background in the first electronic device; The address information corresponding to the screen-projected content.

14. A screen projection method, characterized in that, The method is applied to a screen mirroring system, which includes a carrier and a second electronic device, wherein the carrier is a third electronic device, and the method includes: When the third electronic device is connected to the second electronic device, it obtains first target device information from the second electronic device for authenticating the second electronic device; The third electronic device sends the first target device information to the first electronic device; The second electronic device establishes a communication connection with the first electronic device; The second electronic device receives screen projection information sent by the first electronic device, and the screen projection information is used to display the screen projection content on the second electronic device; The second electronic device displays the projected content on the display screen based on the projected information.

15. The method according to claim 14, characterized in that, The third electronic device sends the first target device information to the first electronic device, including: When the third electronic device is in near-field communication connection with the first electronic device, it sends the first target device information to the first electronic device.

16. The method according to claim 14 or 15, characterized in that, The third electronic device is a device that supports active near-field communication (NFC) functionality, and the information of the first target device is carried on the third electronic device through the active near-field communication function.

17. The method according to any one of claims 14 to 16, characterized in that, The third electronic device is a remote control, and the first target device information includes the identification and authentication information of the second electronic device.

18. A screen projection method, characterized in that, Applied to a first electronic device, the method includes: Obtain first target device information from the carrier for authenticating the second electronic device; Based on the first target device information, a communication connection is established with the second electronic device; Send screen projection information to the second electronic device, the screen projection information being used to display the projected content on the second electronic device.

19. The method according to claim 18, characterized in that, The carrier includes a virtual carrier and / or a physical carrier; The virtual carrier is used to carry the first target device information of the second electronic device; The physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

20. The method according to claim 19, characterized in that, When the carrier is the physical carrier, obtaining the first target device information for authenticating the second electronic device from the carrier includes: When in near-field communication connection with the physical carrier, the system receives the first target device information sent by the physical carrier for authenticating the second electronic device.

21. The method according to claim 19, characterized in that, When the carrier is the virtual carrier, before establishing a communication connection with the second electronic device based on the first target device information, the method further includes: The device receives a screen mirroring service activation message from the second electronic device, which indicates that the screen mirroring service of the second electronic device is enabled.

22. The method according to any one of claims 18 to 21, characterized in that, The step of establishing a communication connection with the second electronic device based on the first target device information includes: If it is determined that there is no second target device information that matches the first target device information, authentication with the second electronic device is initiated based on the first target device information; Upon successful authentication, a communication connection is established with the second electronic device.

23. The method according to claim 22, characterized in that, After establishing a communication connection with the second electronic device, the method further includes: Store the information of the first target device.

24. The method according to any one of claims 18 to 21, characterized in that, The step of establishing a communication connection with the second electronic device based on the first target device information includes: When it is determined that there is second target device information that matches the first target device information, no authentication is initiated with the second electronic device, and a communication connection is directly established with the second electronic device.

25. The method according to any one of claims 18 to 24, characterized in that, The first target device information includes the identification and authentication information of the second electronic device.

26. The method according to any one of claims 18 to 25, characterized in that, The screen projection information includes any one of the following: The content displayed on the screen of the first electronic device; The interface content of the application running in the background in the first electronic device; The address information corresponding to the screen-projected content.

27. A screen projection method, characterized in that, Applied to a second electronic device, the method includes: Write first target device information for authenticating the second electronic device into the carrier; Establish a communication connection with the first electronic device; Receive screen projection information sent by the first electronic device, the screen projection information being used to display the screen projection content on the second electronic device; Based on the projection information, the projection content is displayed on the screen.

28. The method according to claim 27, characterized in that, The carrier includes a virtual carrier and / or a physical carrier; The virtual carrier is used to carry the first target device information of the second electronic device; The physical carrier is used to obtain the first target device information from the second electronic device when connected to the second electronic device.

29. The method according to claim 28, characterized in that, When the carrier is the physical carrier, writing the first target device information for authenticating the second electronic device into the carrier includes: When connected to the physical carrier, the first target device information for authenticating the second electronic device is sent to the physical carrier.

30. The method according to claim 28, characterized in that, When the carrier is the virtual carrier, the virtual carrier is an information code used to carry the information of the first target device; Before establishing a communication connection with the first electronic device, the method further includes: Once the first electronic device has obtained the first target device information from the information code, the screen mirroring service is activated. A screen mirroring service enable message is sent to the first electronic device, the screen mirroring service enable message being used to indicate that the screen mirroring service of the second electronic device is enabled.

31. The method according to any one of claims 27 to 30, characterized in that, The first target device information includes the identification and authentication information of the second electronic device.

32. The method according to any one of claims 27 to 31, characterized in that, The screen projection information includes any one of the following: The content displayed on the screen of the first electronic device; The interface content of the application running in the background in the first electronic device; The address information corresponding to the screen-projected content.

33. A screen projection method, characterized in that, Applied to a carrier, wherein the carrier is a third electronic device, the method includes: When connected to a second electronic device, first target device information for authenticating the second electronic device is obtained from the second electronic device; Send the first target device information to the first electronic device.

34. The method according to claim 33, characterized in that, Sending the first target device information to the first electronic device includes: When in near-field communication connection with the first electronic device, the first target device information is sent to the first electronic device.

35. The method according to claim 33 or 34, characterized in that, The third electronic device is a device that supports active near-field communication (NFC) functionality, and the information of the first target device is carried on the third electronic device through the active near-field communication function.

36. The method according to any one of claims 33 to 35, characterized in that, The third electronic device is a remote control, and the first target device information includes the identification and authentication information of the second electronic device.

37. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories store one or more programs that, when executed by the one or more processors, cause the electronic device to perform the screen projection method according to any one of claims 1 to 36.

38. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed on an electronic device, cause the electronic device to perform the screen projection method according to any one of claims 1 to 36.

39. A program product, characterized in that, include: A program or instruction that, when executed on an electronic device, causes the electronic device to perform the screen projection method as described in any one of claims 1 to 36.