Screen mirroring method and apparatus, and storage medium and electronic device
By searching for and generating virtual protocol receivers within a local area network or wide area network, the limitations of screen projection scenarios and weak security are resolved, enabling wider screen projection applications and higher security.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN FALCON NETWORK MEDIA CO LTD
- Filing Date
- 2025-11-19
- Publication Date
- 2026-07-23
AI Technical Summary
Existing screen mirroring solutions suffer from limited usage scenarios and weak security, resulting in a poor user experience.
The local private module searches for and enables the screen mirroring receiver of the peer private module within a local area network or wide area network, obtains the screen mirroring protocols supported by the peer private module, generates a virtual protocol receiver, transmits the screen mirroring content through the virtual protocol receiver, and finally transmits the content to the peer private module, thus realizing screen mirroring of the private protocol.
It avoids the limitations of local area networks on screen mirroring usage scenarios, improves screen mirroring security, and provides a wider range of usage scenarios and higher security guarantees.
Smart Images

Figure CN2025136083_23072026_PF_FP_ABST
Abstract
Description
Screen projection methods, devices, storage media and electronic equipment
[0001] This application claims priority to Chinese Patent Application No. 202510078030.2, filed on January 16, 2025, entitled “Screen projection method, apparatus, storage medium and electronic device”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of Internet of Things (IoT) technology, specifically to a screen projection method, device, storage medium, and electronic device. Background Technology
[0003] There are various screen mirroring protocols currently available, such as DLNA, AirPlay, and Miracast. These protocols typically restrict screen mirroring devices from communicating and transmitting data within the same local area network, limiting the use cases for screen mirroring. Furthermore, using these screen mirroring protocols in public network environments may pose security risks, resulting in poor screen mirroring security. Technical issues
[0004] Current screen mirroring solutions suffer from limited usage scenarios and weak security, resulting in a poor user experience. Technical solutions
[0005] This application provides a screen mirroring solution that avoids the limitations of local area networks on screen mirroring usage scenarios and improves security through a private protocol screen mirroring method.
[0006] The embodiments of this application provide the following technical solutions:
[0007] According to one embodiment of this application, a screen mirroring method includes: searching for a screen mirroring receiver that enables a peer private module within a local area network or wide area network using a local private module, to obtain the screen mirroring protocol supported by the peer private module enabled in the screen mirroring receiver; generating a virtual protocol receiver corresponding to the screen mirroring protocol supported by the peer private module; transmitting the screen mirroring content to the virtual protocol receiver, so that the screen mirroring content is transmitted to the local private module through the virtual protocol receiver; and transmitting the screen mirroring content to the peer private module in the screen mirroring receiver through the local private module.
[0008] In some embodiments of this application, transmitting the screen-projected content to the local private module via the virtual protocol receiving end includes: transmitting the screen-projected content to the data and command relay module via the virtual protocol receiving end; converting the screen-projected content into a protocol format via the data and command relay module to obtain the converted screen-projected content, and transmitting the converted screen-projected content to the local private module.
[0009] In some embodiments of this application, the step of searching for a screen-casting receiver with a peer private module enabled within a local area network (LAN) or wide area network (WAN) using the local private module to obtain the screen-casting protocol supported by the peer private module enabled in the screen-casting receiver includes: performing a private protocol receiving module search within the LAN to obtain a search result; if the search result finds the peer private module, then obtaining the screen-casting protocol supported by the peer private module through the LAN based on the local private module.
[0010] In some embodiments of this application, after performing a private protocol receiving module search within the local area network and obtaining the search results, the method further includes: if the search results do not find the peer private module, then sending a search request to the cloud via the wide area network based on the local private module; and receiving the screen projection protocol supported by the peer private module returned by the cloud via the wide area network.
[0011] In some embodiments of this application, the step of transmitting the screen-casting content to the peer private module in the screen-casting receiving end through the local private module includes: determining whether the peer private module can be found in the local area network through the local private module; if so, transmitting the screen-casting content to the peer private module in the screen-casting receiving end through the local area network.
[0012] In some embodiments of this application, after determining whether the peer private module can be found in the local area network through the local private module, the method further includes: if not, determining whether the wide area network private protocol receiving and forwarding module is enabled in the cloud; if yes, sending the screen projection content to the wide area network private protocol receiving and forwarding module through the wide area network, so that the wide area network private protocol receiving and forwarding module forwards the screen projection content to the peer private module.
[0013] In some embodiments of this application, before transmitting the screen-casting content to the virtual protocol receiving end, the method further includes one of the following: obtaining the screen-casting content through the local universal protocol screen-casting module; or receiving screen-casting content sent by the other universal protocol screen-casting module in other screen-casting devices.
[0014] In some embodiments of this application, generating a virtual protocol receiver corresponding to the screen casting protocol supported by the peer private module includes: obtaining protocol configuration parameters of the screen casting protocol supported by the peer private module; adding the protocol configuration parameters to a preset virtual receiver in the virtual general protocol receiver module to obtain a virtual protocol receiver corresponding to the screen casting protocol supported by the peer private module.
[0015] In some embodiments of this application, transmitting the screen-casting content to the virtual protocol receiving end includes: determining the virtual protocol receiving end corresponding to the screen-casting protocol of the screen-casting content in the virtual universal protocol receiving module to obtain the target virtual protocol receiving end; and transmitting the screen-casting content to the target virtual protocol receiving end.
[0016] According to one embodiment of this application, a screen mirroring method is applied to a screen mirroring receiving end. The method includes: enabling a peer private module; responding to a private module search request sent by a local private module in a screen mirroring sending end via a local area network or a wide area network, using the peer private module to feed back the screen mirroring protocol supported by the peer private module to the local private module via the local area network or wide area network; receiving screen mirroring content sent by the local private module in the screen mirroring sending end through the peer private module, wherein the screen mirroring content is transmitted to the local private module by a virtual protocol receiver in the screen mirroring sending end, and the virtual protocol receiver is generated by the screen mirroring sending end according to the screen mirroring protocol supported by the peer private module.
[0017] In some embodiments of this application, the step of responding to a private module search request sent by the local private module in the screen casting sending end via a local area network or a wide area network, and having the peer private module feed back the screen casting protocol supported by the peer private module to the local private module via the local area network or the wide area network, includes: receiving the private module search request sent by the local private module from the local area network through the peer private module; and responding to the private module search request by feeding back the screen casting protocol supported by the peer private module to the local private module via the local area network.
[0018] In some embodiments of this application, the step of responding to a private module search request sent by the local private module in the screen casting sending end via a local area network (LAN) or a wide area network (WAN), and having the peer private module feed back the screen casting protocol supported by the peer private module to the local private module via the LAN or WAN, includes: receiving a private module search request sent by a WAN private protocol receiving and forwarding module in the cloud via the WAN through the peer private module; responding to the private module search request, feeding back the screen casting protocol supported by the peer private module to the WAN private protocol receiving and forwarding module via the WAN, so that the WAN private protocol receiving and forwarding module forwards the screen casting protocol supported by the peer private module to the local private module.
[0019] According to one embodiment of this application, a screen mirroring device is applied to a screen mirroring sending end. The device includes: a local private module, configured to: search for a screen mirroring receiving end that enables a peer private module within a local area network or wide area network, to obtain the screen mirroring protocols supported by the peer private module enabled in the screen mirroring receiving end; a virtual universal protocol receiving module, configured to: generate a virtual protocol receiving end corresponding to the screen mirroring protocols supported by the peer private module; a screen mirroring content sending module, configured to: transmit screen mirroring content to the virtual protocol receiving end, so that the screen mirroring content is transmitted to the local private module through the virtual protocol receiving end; and a local private module, configured to: transmit the screen mirroring content to the peer private module in the screen mirroring receiving end through the local private module.
[0020] According to one embodiment of this application, a screen mirroring device is applied to a screen mirroring receiving end. The device includes: an activation module, configured to: activate a peer private module; the peer private module is configured to: respond to a private module search request sent by a local private module in a screen mirroring sending end via a local area network or a wide area network, and feed back the screen mirroring protocol supported by the peer private module to the local private module via the local area network or wide area network; receive screen mirroring content sent by the local private module in the screen mirroring sending end, wherein the screen mirroring content is transmitted to the local private module by a virtual protocol receiver in the screen mirroring sending end, and the virtual protocol receiver is generated by the screen mirroring sending end according to the screen mirroring protocol supported by the peer private module.
[0021] According to another embodiment of this application, a storage medium stores a computer program thereon, which, when executed by a device's processor, causes the device to perform the methods described in the embodiments of this application.
[0022] According to another embodiment of this application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the methods described in the embodiments of this application.
[0023] According to another embodiment of this application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of the device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the device to perform the methods provided in the various optional implementations described in the embodiments of this application. Beneficial effects
[0024] In this embodiment, the screen-casting sending end can: search for screen-casting receiving ends that enable peer private modules within a local area network or wide area network using its own private module, to obtain the screen-casting protocols supported by the peer private modules enabled in the screen-casting receiving end; generate a virtual protocol receiving end corresponding to the screen-casting protocols supported by the peer private modules; transmit the screen-casting content to the virtual protocol receiving end, so that the screen-casting content is transmitted to the own private module through the virtual protocol receiving end; and transmit the screen-casting content to the peer private module in the screen-casting receiving end through the own private module.
[0025] In this embodiment of the application, the screen-casting sending end generates a local virtual protocol receiving module corresponding to the screen-casting protocol supported by the peer's private module, transmits the screen-casting content to the virtual protocol receiving end, and further transmits it to the local private module. This reliably converts the general screen-casting protocol into a private protocol on the local end. Then, the local private module can transmit the content to the peer's private module via a local area network or a wide area network through the private protocol to achieve screen-casting. This avoids the limitations of the local area network on screen-casting usage scenarios and improves security by using the private protocol screen-casting method. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 shows a flowchart of a screen mirroring method according to an embodiment of this application.
[0028] Figure 2 shows an architecture diagram of a screen projection system according to an embodiment of this application.
[0029] Figure 3 shows an architecture diagram of a screen projection system according to another embodiment of this application.
[0030] Figure 4 shows a flowchart of protocol acquisition according to an embodiment of this application.
[0031] Figure 5 shows a flowchart of a screen projection method according to another embodiment of this application.
[0032] Figure 6 shows a block diagram of a screen projection device according to an embodiment of this application.
[0033] Figure 7 shows a block diagram of a screen projection device according to another embodiment of this application.
[0034] Figure 8 shows a block diagram of an electronic device according to an embodiment of this application.
[0035] Implementation methods of this application
[0036] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure. Furthermore, the embodiments provided below are some embodiments for implementing the present disclosure, and not all embodiments for implementing the present disclosure. Unless otherwise specified, the technical solutions described in the embodiments of the present disclosure can be implemented in any combination.
[0037] It should be noted that, in the embodiments of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly described, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus, such as portions of circuitry, processors, programs, or software, etc.) in the method or apparatus that includes that element.
[0038] For example, the screen projection method provided in this embodiment includes a series of steps, but the screen projection method provided in this embodiment is not limited to the steps described. Similarly, the screen projection device provided in this embodiment includes a series of units, but the device provided in this embodiment is not limited to the units explicitly described, and may also include units that need to be set up for obtaining relevant information or processing based on information.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure.
[0040] It is understood that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0041] Figure 1 schematically illustrates a flowchart of a screen mirroring method according to one embodiment of this application. Figure 2 schematically illustrates an architecture diagram of a screen mirroring system according to one embodiment of this application. Figure 3 schematically illustrates an architecture diagram of a screen mirroring system according to another embodiment of this application.
[0042] For example, the screen casting sender 110 shown in Figures 1, 2, or 3 can be a device such as a TV, computer, mobile phone, smartwatch, or home appliance. The screen casting sender needs to integrate a private protocol toolkit (private protocol SDK), which is the protocol proxy module 112 shown in Figures 2 and 3. The screen casting method described in the embodiments of this application can be implemented through the various modules included in the protocol proxy module.
[0043] As shown in Figure 1, the screen projection method executed by the screen projection sending end in this embodiment may include steps S110 to S140.
[0044] Step S110: Search for and enable the screen mirroring receiver of the peer private module within the local area network or wide area network using the local private module to obtain the screen mirroring protocols supported by the peer private module enabled in the screen mirroring receiver; Step S120: Generate a virtual protocol receiver corresponding to the screen mirroring protocol supported by the peer private module; Step S130: Transmit the screen mirroring content to the virtual protocol receiver so that the screen mirroring content can be transmitted to the local private module through the virtual protocol receiver; Step S140: Transmit the screen mirroring content to the peer private module in the screen mirroring receiver through the local private module.
[0045] The screen-casting sending end (e.g., screen-casting sending end 110 shown in Figure 1, 2, or 3) activates its local private module (e.g., local private module 1123 shown in Figure 2 or 3). This local private module is a sending module with private protocol sending functionality. The screen-casting receiving end (e.g., screen-casting receiving end 120 shown in Figure 1, 2, or 3) activates its peer private module (e.g., peer private module 121 shown in Figure 2 or 3). This peer private module is a receiving module with private protocol receiving functionality. The private protocol refers to a protocol that supports communication via local area network (e.g., UDP, Bluetooth, etc.) and wide area network.
[0046] The screen casting sending end can search for and enable the screen casting receiving end of the peer private module within the local area network or wide area network through its own private module, thereby obtaining the common screen casting protocols supported by the peer private module (such as DLNA protocol, AirPlay protocol or Miracast protocol, etc.), and generating a virtual protocol receiving end corresponding to the screen casting protocol supported by the peer private module on the screen casting sending end.
[0047] The virtual protocol receiver is a virtual protocol receiver for these common screen casting protocols (e.g., DLNA protocol, AirPlay protocol, or Miracast protocol). The virtual common protocol receiver module of the screen casting sender can specifically virtualize the virtual protocol receiver of these screen casting protocols (e.g., the DLNA receiver, AirPlay receiver, or Miracast receiver in the virtual common protocol receiver module 1121 shown in Figures 2 and 3).
[0048] The content to be cast to the casting receiver can be transmitted to the corresponding virtual protocol receiver in the virtual universal protocol receiving module through the general casting protocol. That is, the casting sender receives the casting content through the virtual protocol receiver first, instead of directly transmitting it to the casting receiver.
[0049] The virtual protocol receiver can further forward the projected content to its own private module. The local private module can then transmit the projected content to the peer private module in the projected receiver via a local area network or a wide area network. The peer private module can then transmit the projected content to the display module (e.g., the display module 122 shown in Figure 2 or Figure 3) in the projected receiver for display, thereby realizing the display of the projected content.
[0050] In this embodiment of the application, the screen-casting sending end generates a local virtual protocol receiving module corresponding to the screen-casting protocol supported by the peer's private module, transmits the screen-casting content to the virtual protocol receiving end, and further transmits it to the local private module. This reliably converts the general screen-casting protocol into a private protocol on the local end. Then, the local private module can transmit the content to the peer's private module via a local area network or a wide area network through the private protocol to achieve screen-casting. This avoids the limitations of the local area network on screen-casting usage scenarios and improves security by using the private protocol screen-casting method.
[0051] The following describes further optional embodiments of the steps performed during screen projection in the embodiment shown in Figure 1.
[0052] In one embodiment, referring to Figure 4, the step of searching for a screen-casting receiver with a peer private module enabled in a local area network (LAN) or wide area network (WAN) through the local private module to obtain the screen-casting protocol supported by the peer private module enabled in the screen-casting receiver includes: step S210, performing a private protocol receiving module search in the LAN to obtain a search result; step S220, if the search result finds the peer private module, then obtaining the screen-casting protocol supported by the peer private module through the LAN based on the local private module.
[0053] The screen-casting sending end can search for private protocol receiving modules within the local area network through its own private module. If the search result is a private module of the other end, the screen-casting sending end can interact with the searched private module of the other end through the local area network based on its own private module, thereby obtaining the screen-casting protocol supported by the private module of the other end.
[0054] Furthermore, in one embodiment, referring to Figure 4, after performing a private protocol receiving module search within the local area network and obtaining the search results, the method further includes: step S230, if the search results do not find the peer private module, then sending a search request to the cloud via the wide area network based on the local private module; step S240, receiving the screen projection protocol supported by the peer private module returned by the cloud via the wide area network.
[0055] The WAN private protocol receiving and forwarding module is a module with private protocol receiving and forwarding functions. The WAN private protocol receiving and forwarding module is started in advance in the cloud (for example, the WAN private protocol receiving and forwarding module 131 started in the cloud 130 shown in Figure 2 or Figure 3). The WAN private protocol receiving and forwarding module can serve as a bridge between the local private module in the screen projection sending end and the peer private module in the screen projection receiving end in the WAN.
[0056] If the search result indicates that no peer private module was found, it means that for some reason, the peer private module in the screen mirroring receiver cannot be found from within the local area network. In this case, the screen mirroring sender can send a search request to the WAN private protocol receiving and forwarding module launched in the cloud via the WAN based on its own private module.
[0057] The WAN private protocol receiving and forwarding module can search for the peer private module enabled in the screen casting receiver based on the search request via the WAN. The WAN private protocol receiving and forwarding module can obtain the screen casting protocols supported by the searched peer private module and reply with the screen casting protocols supported by the peer private module to the local private module in the screen casting receiver. In turn, the screen casting receiver obtains the screen casting protocols supported by the peer private module through the WAN search.
[0058] In one embodiment, generating a virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module may include: obtaining protocol configuration parameters of the screen projection protocol supported by the peer private module; adding the protocol configuration parameters to a preset virtual receiver in the virtual general protocol receiver module to obtain a virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module.
[0059] After obtaining the screen mirroring protocol supported by the peer's private module, you can further obtain the protocol configuration parameters of the screen mirroring protocol from the protocol, such as protocol name, version, data format and other protocol-related parameters.
[0060] The virtual universal protocol receiving module of the screen casting sending end can be configured with a preset virtual receiving end. If the preset virtual receiving end is not blank, the protocol configuration parameters can be added to the preset virtual receiving end in the virtual universal protocol receiving module to obtain the virtual protocol receiving end corresponding to the screen casting protocol supported by the peer's private module. Thus, the screen casting sending end can receive the screen casting content through the screen casting parsing via the virtual protocol receiving end.
[0061] Optionally, in one embodiment, generating the virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module may include: searching for and loading the virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module from a preset virtual receiver library.
[0062] A pre-stored virtual receiver library can store many virtual protocol receivers corresponding to various screen mirroring protocols. When needed, the library allows for quick searching and loading of the virtual protocol receiver corresponding to the screen mirroring protocol supported by the peer's private module. This pre-stored virtual receiver library can be located on another storage device within the screen mirroring sender.
[0063] In a further embodiment, transmitting the projected content to the virtual protocol receiver includes: determining the virtual protocol receiver corresponding to the projected protocol of the projected content in the virtual universal protocol receiving module to obtain the target virtual protocol receiver; and transmitting the projected content to the target virtual protocol receiver.
[0064] The virtual universal protocol receiving module can generate virtual protocol receivers corresponding to various screen projection protocols. It can first find the virtual protocol receiver corresponding to the screen projection protocol that transmits the screen projection content, and use the found virtual protocol receiver as the target virtual protocol receiver. Thus, the screen projection content can be reliably transmitted to the target virtual protocol receiver corresponding to its screen projection protocol.
[0065] In one embodiment, before transmitting the projected content to the virtual protocol receiver, the method may further include one of the following:
[0066] The first method is to obtain the screen-sharing content through the local universal protocol screen-sharing module;
[0067] The second method is to receive screen-sharing content sent by the screen-sharing module of another device using a common protocol.
[0068] In the first method, when the screen-casting sending end is casting content from its own end, the screen-casting module of the local end in the screen-casting sending end can obtain the screen-casting content to be cast and transmit it to the virtual protocol receiving end. Among them, the screen-casting module of the local end (such as the local end general protocol screen-casting module 111 shown in Figure 2) is a screen-casting module of a general screen-casting protocol (such as DLNA protocol, AirPlay protocol, or Miracast protocol, etc.).
[0069] In the second method, as shown in Figure 3, when other screen-sharing devices need to screen-shake, but these other screen-sharing devices (such as screen-sharing sender 140 in Figure 3) do not have a protocol proxy module, the other screen-sharing devices can send the screen-sharing content to the screen-sharing sender with a protocol proxy module (such as screen-sharing sender 110 in Figure 3) through their external universal protocol screen-sharing module (such as external universal protocol screen-sharing module 141 in Figure 3). Thus, the screen-sharing sender with a protocol proxy module can receive the screen-sharing content sent by the external universal protocol screen-sharing module in the other screen-sharing devices, thereby further proxying the other screen-sharing devices to screen-shake.
[0070] In one embodiment, transmitting the projected content to the local private module via the virtual protocol receiver may include: transmitting the projected content to a data and command relay module via the virtual protocol receiver; converting the projected content into a protocol format via the data and command relay module to obtain the converted projected content, and transmitting the converted projected content to the local private module.
[0071] The virtual protocol receiver receives the screen projection content sent based on the original screen projection protocol. The virtual protocol receiver then transmits the screen projection content to the data and command relay module (e.g., the data and command relay module 1122 shown in Figures 2 and 3). The data and command relay module performs protocol format conversion on the screen projection content to obtain the converted screen projection content, and then transmits the converted screen projection content to the local private module. The converted screen projection content is more compatible with the private protocol requirements of the local private module, and the local private module can reliably send the converted screen projection content to the peer private module.
[0072] Furthermore, in one embodiment, the step of transmitting the screen-casting content to the peer private module in the screen-casting receiving end through the local private module may include: determining whether the peer private module can be found in the local area network through the local private module; if so, transmitting the screen-casting content to the peer private module in the screen-casting receiving end through the local area network.
[0073] The screen-casting sending end can search for private protocol receiving modules within the local area network (LAN) using its own private module. If the search result finds a peer private module, the screen-casting sending end can interact with the found peer private module via the LAN based on its own private module. The local private module can then transmit the screen-cast content to the peer private module in the screen-casting receiving end via the LAN. For example, as shown in Figures 1 to 3, the local private module in screen-casting sending end 110 can directly send the screen-cast content to the peer private module in screen-casting receiving end 120 via the LAN.
[0074] Furthermore, in one embodiment, after determining whether the peer private module can be found in the local area network through the local private module, the method may further include: if not, determining whether the wide area network private protocol receiving and forwarding module is enabled in the cloud; if yes, sending the screen projection content to the wide area network private protocol receiving and forwarding module through the wide area network, so that the wide area network private protocol receiving and forwarding module forwards the screen projection content to the peer private module.
[0075] If the search result indicates that no peer private module was found, it means that for some reason, the peer private module in the screen mirroring receiver cannot be found from within the local area network. In this case, the screen mirroring sender can send the screen mirroring content to the WAN private protocol receiving and forwarding module launched in the cloud via the WAN based on its own private module. The WAN private protocol receiving and forwarding module can then forward the screen mirroring content to the peer private module.
[0076] For example, as shown in Figures 1 to 3, the local private module in the screen projection sending end 110 can send the screen projection content to the WAN private protocol receiving and forwarding module in the cloud 130 via the WAN. Then, the WAN private protocol receiving and forwarding module forwards the screen projection content to the peer private module in the screen projection receiving end 120 via the WAN.
[0077] The following further describes the screen projection method provided in this application embodiment from the perspective of the screen projection receiving end. The meanings of the terms involved are the same as those in the screen projection method from the perspective of the screen projection sending end. For implementation details, please refer to the description in the method embodiment.
[0078] Figure 5 schematically illustrates a flowchart of a screen mirroring method according to another embodiment of this application. The screen mirroring receiver shown in Figure 5 can specifically be, for example, the screen mirroring receiver 120 shown in Figures 1, 2, or 3. The screen mirroring receiver 120 can be a device such as a television, computer, mobile phone, smartwatch, or home appliance. The screen mirroring receiver is configured with a peer-to-peer private module (e.g., peer-to-peer private module 121 shown in Figures 2 or 3), which is a receiver module with a private protocol receiving function. This private protocol refers to a protocol that supports communication via a local area network (e.g., UDP, Bluetooth, etc.) and a wide area network.
[0079] As shown in Figure 5, the screen mirroring receiver can execute the following steps: Step S105, enable the peer private module; Step S115, in response to the private module search request sent by the local private module in the screen mirroring sender via LAN or WAN, use the peer private module to feed back the screen mirroring protocol supported by the peer private module to the local private module via LAN or WAN; Step S145, receive the screen mirroring content sent by the local private module in the screen mirroring sender through the peer private module, wherein the screen mirroring content is transmitted to the local private module by the virtual protocol receiver in the screen mirroring sender, and the virtual protocol receiver is generated by the screen mirroring sender according to the screen mirroring protocol supported by the peer private module.
[0080] In this embodiment of the application, the receiving end enables a peer-to-peer private module. Responding to a private module search request sent by the sending end's local private module via a LAN or WAN, the peer-to-peer private module feeds back the supporting projection protocols to the sending end via the LAN or WAN. The sending end generates a local virtual protocol receiving module corresponding to the projection protocol supported by the peer-to-peer private module, transmits the projection content to the virtual protocol receiving end, and further transmits it to the sending end's private module. This reliably converts the general projection protocol into a private protocol at the sending end. Then, the sending end's local private module can transmit the content to the receiving end's peer-to-peer private module via the private protocol through the LAN or WAN to achieve projection. This avoids the limitations of LAN on projection usage scenarios and improves security through private protocol projection.
[0081] In some embodiments, the step of responding to a private module search request sent by the local private module via a local area network (LAN) or a wide area network (WAN) at the screen casting sending end, and having the peer private module feed back the screen casting protocol supported by the peer private module to the local private module via the LAN or WAN, may specifically include: receiving the private module search request sent by the local private module from the LAN through the peer private module; and responding to the private module search request by feeding back the screen casting protocol supported by the peer private module to the local private module via the LAN.
[0082] The screen-casting sending end can search for private protocol receiving modules within the local area network through its own private module and send a private module search request to the peer private module. If the peer private module in the screen-casting receiving end within the local area network receives the private module search request, the peer private module will feed back the screen-casting protocols supported by the peer private module to the local private module through the local area network. At this time, the search result of the local private module in the screen-casting sending end within the local area network is that the peer private module has been found.
[0083] In some embodiments, the step of responding to a private module search request sent by the local private module via a local area network (LAN) or a wide area network (WAN) at the screen casting sending end, and having the peer private module feed back the screen casting protocol supported by the peer private module to the local private module via the LAN or WAN, may specifically include: receiving a private module search request sent by a WAN private protocol receiving and forwarding module in the cloud from the WAN via the peer private module; responding to the private module search request, feeding back the screen casting protocol supported by the peer private module to the WAN private protocol receiving and forwarding module via the WAN, so that the WAN private protocol receiving and forwarding module forwards the screen casting protocol supported by the peer private module to the local private module.
[0084] The WAN private protocol receiving and forwarding module is a module with private protocol receiving and forwarding functions. The WAN private protocol receiving and forwarding module is started in advance in the cloud (for example, the WAN private protocol receiving and forwarding module 131 started in the cloud 130 shown in Figure 2 or Figure 3). The WAN private protocol receiving and forwarding module can serve as a bridge between the local private module in the screen projection sending end and the peer private module in the screen projection receiving end in the WAN.
[0085] If the search results for the peer private module within the local area network (LAN) show no results for the peer private module in the sending end, it indicates that the peer private module in the receiving end cannot be found within the LAN for some reason. In this case, the sending end can send a search request to the WAN private protocol receiving and forwarding module launched in the cloud via the WAN, based on its own private module. The peer private module responds to this search request in the WAN by sending feedback on the screen casting protocols it supports to the WAN private protocol receiving and forwarding module, enabling the WAN private protocol receiving and forwarding module to forward the screen casting protocols supported by the peer private module to its own private module in the sending end.
[0086] To facilitate better implementation of the screen projection method provided in the embodiments of this application, the embodiments of this application also provide a screen projection device based on the above-described screen projection method. The meanings of the terms used are the same as in the screen projection method described above, and specific implementation details can be found in the descriptions in the method embodiments. Figure 6 shows a block diagram of a screen projection device according to an embodiment of this application.
[0087] As shown in Figure 6, the screen projection device 300 can be applied to a screen projection sending end. The screen projection device 300 may include: a local private module 310, which can be used to: search for and enable a screen projection receiving end of a peer private module in a local area network or wide area network, so as to obtain the screen projection protocol supported by the peer private module enabled in the screen projection receiving end; a virtual universal protocol receiving module 320, which can be used to: generate a virtual protocol receiving end corresponding to the screen projection protocol supported by the peer private module; a screen projection content sending module 330, which can be used to: transmit the screen projection content to the virtual protocol receiving end, so as to transmit the screen projection content to the local private module through the virtual protocol receiving end; and a local private module 310, which can be used to: transmit the screen projection content to the peer private module in the screen projection receiving end.
[0088] In some embodiments of this application, the virtual protocol receiving end can be used to: transmit the screen projection content to the data and command relay module; the data and command relay module can be used to: convert the screen projection content into a protocol format to obtain the converted screen projection content, and transmit the converted screen projection content to the local private module.
[0089] In some embodiments of this application, the local private module can be used to: perform a private protocol receiving module search within a local area network and obtain a search result; if the search result finds the peer private module, then obtain the screen projection protocol supported by the peer private module through the local area network based on the local private module.
[0090] In some embodiments of this application, after performing a private protocol receiving module search within the local area network and obtaining the search results, the local private module can be used to: if the search results do not find the peer private module, send a search request to the cloud via the wide area network based on the local private module; and receive the screen projection protocol supported by the peer private module returned by the cloud via the wide area network.
[0091] In some embodiments of this application, the local private module can be used to: determine whether the peer private module can be found in the local area network; if so, transmit the screen projection content to the peer private module in the screen projection receiving end through the local area network.
[0092] In some embodiments of this application, after the local private module determines whether the peer private module can be found in the local area network, the local private module can be used to: if not, determine whether the cloud has enabled the WAN private protocol receiving and forwarding module; if yes, send the screen projection content to the WAN private protocol receiving and forwarding module through the WAN, so that the WAN private protocol receiving and forwarding module forwards the screen projection content to the peer private module.
[0093] In some embodiments of this application, before transmitting the screen-casting content to the virtual protocol receiving end, the device further includes a local universal protocol screen-casting module to obtain the screen-casting content; or the device further includes a content receiving module for receiving screen-casting content sent by a local universal protocol screen-casting module in other screen-casting devices.
[0094] In some embodiments of this application, the virtual universal protocol receiving module is configured to: obtain the protocol configuration parameters of the screen casting protocol supported by the peer private module; add the protocol configuration parameters to a preset virtual receiving end in the virtual universal protocol receiving module to obtain the virtual protocol receiving end corresponding to the screen casting protocol supported by the peer private module.
[0095] In some embodiments of this application, the local private module is used to: determine the virtual protocol receiving end corresponding to the screen projection protocol of the screen projection content in the virtual general protocol receiving module, and obtain the target virtual protocol receiving end; and transmit the screen projection content to the target virtual protocol receiving end.
[0096] Figure 7 shows a block diagram of a screen mirroring device according to another embodiment of this application. As shown in Figure 7, the screen mirroring device 400 can be applied to a screen mirroring receiving end. The screen mirroring device 400 may include: an enabling module 410, which can be used to: enable a peer private module; the peer private module 420 can be used to: respond to a private module search request sent by the local private module in the screen mirroring sending end via a local area network or a wide area network, and feed back the screen mirroring protocol supported by the peer private module to the local private module via the local area network or wide area network; receive screen mirroring content sent by the local private module in the screen mirroring sending end, wherein the screen mirroring content is transmitted to the local private module by a virtual protocol receiver in the screen mirroring sending end, and the virtual protocol receiver is generated by the screen mirroring sending end according to the screen mirroring protocol supported by the peer private module.
[0097] In some embodiments of this application, the peer private module 420 can be used to: receive a private module search request sent by the local private module from the local area network; and in response to the private module search request, feed back the screen projection protocol supported by the peer private module to the local private module through the local area network.
[0098] In some embodiments of this application, the peer private module 420 can be used to: receive a private module search request sent by a WAN private protocol receiving and forwarding module in the cloud from the WAN; and in response to the private module search request, feed back the screen projection protocol supported by the peer private module to the WAN private protocol receiving and forwarding module through the WAN, so that the WAN private protocol receiving and forwarding module forwards the screen projection protocol supported by the peer private module to the local private module.
[0099] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0100] Furthermore, this application also provides an electronic device, as shown in FIG8, which is a block diagram of an electronic device according to an embodiment of this application. Specifically:
[0101] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will understand that the electronic device structure shown in FIG8 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0102] The processor 501 is the control center of the electronic device. It connects to various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, it performs various functions of the computer device and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.
[0103] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 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, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0104] The electronic device also includes a power supply 503 that supplies power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0105] The electronic device may also include an input unit 504, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0106] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable files corresponding to the processes of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 runs the computer programs stored in the memory 502, thereby realizing the various functions in the foregoing embodiments of this application.
[0107] If the electronic device is implemented as a screen projection transmitter, the processor 501 can perform the following steps:
[0108] The local private module searches for and enables a screen mirroring receiver for the peer private module within a local area network or wide area network to obtain the screen mirroring protocols supported by the peer private module enabled in the screen mirroring receiver; generates a virtual protocol receiver corresponding to the screen mirroring protocols supported by the peer private module; transmits the screen mirroring content to the virtual protocol receiver, so that the screen mirroring content is transmitted to the local private module through the virtual protocol receiver; and transmits the screen mirroring content to the peer private module in the screen mirroring receiver through the local private module.
[0109] If the electronic device is implemented as a screen mirroring receiver, the processor 501 can perform the following steps:
[0110] Enable the peer private module; in response to a private module search request sent by the local private module in the screen casting sending end via a local area network or a wide area network, use the peer private module to feed back the screen casting protocol supported by the peer private module to the local private module via the local area network or wide area network; receive the screen casting content sent by the local private module in the screen casting sending end through the peer private module, the screen casting content being transmitted to the local private module by a virtual protocol receiver in the screen casting sending end, the virtual protocol receiver being generated by the screen casting sending end according to the screen casting protocol supported by the peer private module.
[0111] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0112] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the methods provided in embodiments of this application.
[0113] The storage medium can be a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0114] Since the computer program stored in the storage medium can execute the steps of any of the methods provided in the embodiments of this application, the beneficial effects that the methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0115] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0116] It should be understood that this application is not limited to the embodiments described above and shown in the accompanying drawings, but various modifications and changes can be made without departing from its scope.
Claims
1. A screen mirroring method, wherein, Applied to the screen projection sending end, the method includes: The local private module searches for and enables the screen mirroring receiver of the peer private module within a local area network or wide area network, so as to obtain the screen mirroring protocol supported by the peer private module enabled in the screen mirroring receiver. Generate a virtual protocol receiver corresponding to the screen projection protocol supported by the peer's private module; The projected content is transmitted to the virtual protocol receiving end, so that the projected content can be transmitted to the local private module through the virtual protocol receiving end; The projected content is transmitted to the peer private module in the projected receiving end through the local private module.
2. The method according to claim 1, wherein, The step of transmitting the projected content to the local private module via the virtual protocol receiving end includes: The screen-projected content is transmitted to the data and command relay module via the virtual protocol receiving end; The data and instruction relay module converts the projection content into a protocol format to obtain the converted projection content, and then transmits the converted projection content to the local private module.
3. The method according to claim 1, wherein, The step of searching for and enabling a screen-casting receiver with a peer private module within a local area network or wide area network using the local private module, and obtaining the screen-casting protocols supported by the peer private module enabled in the screen-casting receiver, includes: Searching for private protocol receiving modules within the local area network yields search results. If the search result finds the peer private module, then the local private module obtains the screen mirroring protocol supported by the peer private module through the local area network.
4. The method according to claim 3, wherein, After performing a private protocol receiving module search within the local area network and obtaining the search results, the method further includes: If the search result indicates that the peer private module is not found, then a search request is sent to the cloud via the wide area network based on the local private module. Receive the screen mirroring protocol supported by the peer's private module, returned by the cloud via the wide area network.
5. The method according to claim 1, wherein, The step of transmitting the screen-projected content to the peer-end private module in the screen-projection receiving end through the local private module includes: The local private module determines whether the remote private module can be found on the local area network. If so, the projected content is transmitted to the peer private module in the projected receiving end via the local area network.
6. The method according to claim 5, wherein, After determining whether the peer's private module can be found on the local area network through the local private module, the method further includes: If not, determine whether the WAN private protocol receiving and forwarding module is enabled on the cloud. If so, the projected content is sent to the WAN private protocol receiving and forwarding module via the WAN, so that the WAN private protocol receiving and forwarding module forwards the projected content to the peer private module.
7. The method according to claim 1, wherein, Before transmitting the projected content to the virtual protocol receiver, the method further includes one of the following: The screen projection content is obtained through the local general protocol screen projection module; Receive screen projection content sent by the screen projection module of other screen projection devices using the common protocol.
8. The method according to claim 1, wherein, The process of generating a virtual protocol receiver corresponding to the screen mirroring protocol supported by the peer's private module includes: Obtain the protocol configuration parameters of the screen projection protocols supported by the peer's private module; The protocol configuration parameters are added to the preset virtual receiver in the virtual universal protocol receiver module to obtain the virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module.
9. The method according to claim 8, wherein, The step of transmitting the projected content to the virtual protocol receiver includes: In the virtual universal protocol receiving module, the virtual protocol receiving end corresponding to the screen projection protocol of the screen projection content is determined to obtain the target virtual protocol receiving end; The projected content is transmitted to the target virtual protocol receiver.
10. The method according to claim 1, wherein, The step of generating a virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module includes: searching for and loading the virtual protocol receiver corresponding to the screen projection protocol supported by the peer private module from a preset virtual receiver library.
11. A screen mirroring method, wherein, Applied to the screen mirroring receiver, the method includes: Enable the peer's private module; In response to a private module search request sent by the local private module in the screen projection sending end via a local area network or a wide area network, the peer private module feeds back the screen projection protocol supported by the peer private module to the local private module via the local area network or wide area network. The projected content is received by the peer private module from the local private module in the projected projecting end. The projected content is transmitted to the local private module by the virtual protocol receiver in the projected projecting end. The virtual protocol receiver is generated by the projected projecting end according to the projected projecting protocol supported by the peer private module.
12. The method according to claim 11, wherein, The response to a private module search request sent by the local private module via a local area network (LAN) or a wide area network (WAN) in the screen-sharing sending end includes the following: The peer private module feeds back the screen-sharing protocol supported by the peer private module to the local private module via the LAN or WAN. The peer private module receives a private module search request sent by the local private module from the local area network. In response to the private module search request, the local private module sends back the screen projection protocol supported by the peer private module via the local area network.
13. The method according to claim 12, wherein, The response to a private module search request sent by the local private module via a local area network (LAN) or a wide area network (WAN) in the screen-sharing sending end includes the following: The peer private module feeds back the screen-sharing protocol supported by the peer private module to the local private module via the LAN or WAN. The peer private module receives a private module search request from the cloud-based WAN private protocol receiving and forwarding module via the WAN private module. In response to the private module search request, the local private module receives and forwards the screen projection protocol supported by the peer private module through the WAN private protocol receiving and forwarding module, so that the WAN private protocol receiving and forwarding module forwards the screen projection protocol supported by the peer private module to the local private module.
14. A screen projection device, wherein, The device, used in screen projection sending, includes: The local private module is used to: search for screen mirroring receivers that have enabled the peer private module within a local area network or wide area network, and obtain the screen mirroring protocols supported by the peer private module enabled in the screen mirroring receiver. The virtual universal protocol receiving module is used to: generate a virtual protocol receiving end corresponding to the screen projection protocol supported by the peer private module; The screen projection content sending module is used to: transmit the screen projection content to the virtual protocol receiving end, so that the screen projection content can be transmitted to the local private module through the virtual protocol receiving end; The local private module is used to transmit the screen-casting content to the peer private module in the screen-casting receiving end.
15. The apparatus according to claim 14, wherein, When the screen projection content is transmitted to the local private module through the virtual protocol receiving end, the virtual protocol receiving end is used to: transmit the screen projection content to the data and command relay module; the data and command relay module can be used to: convert the screen projection content into a protocol format to obtain the converted screen projection content, and transmit the converted screen projection content to the local private module.
16. The apparatus according to claim 14, wherein, When the screen-casting content is transmitted to the peer private module in the screen-casting receiving end through the local private module, the local private module is used to: perform a private protocol receiving module search within the local area network to obtain a search result; if the search result finds the peer private module, then obtain the screen-casting protocol supported by the peer private module through the local area network based on the local private module.
17. The apparatus according to claim 16, wherein, After performing a private protocol receiving module search within the local area network and obtaining the search results, the local private module is used to: if the search results do not find the peer private module, send a search request to the cloud via the wide area network based on the local private module; and receive the screen projection protocol supported by the peer private module returned by the cloud via the wide area network.
18. A projection device, wherein, The device, used in a screen mirroring receiver, includes: Enable module, used to: enable peer's private modules; The peer private module is configured to: respond to a private module search request sent by the local private module in the screen casting sending end via a local area network or a wide area network, and feed back the screen casting protocol supported by the peer private module to the local private module via the local area network or wide area network; receive screen casting content sent by the local private module in the screen casting sending end, wherein the screen casting content is transmitted to the local private module by a virtual protocol receiver in the screen casting sending end, and the virtual protocol receiver is generated by the screen casting sending end according to the screen casting protocol supported by the peer private module.
19. A storage medium, wherein, It stores a computer program that, when executed by the device's processor, causes the device to perform the method described in any one of claims 1 to 10 or 11 to 13.
20. An electronic device, wherein, include: Memory, which stores computer programs; A processor reads a computer program stored in memory to perform the method according to any one of claims 1 to 10 or 11 to 13.