CN116962369A - Screen projection control method and device, screen projection equipment and playing equipment - Google Patents

Screen projection control method and device, screen projection equipment and playing equipment Download PDF

Info

Publication number
CN116962369A
CN116962369A CN202211311835.XA CN202211311835A CN116962369A CN 116962369 A CN116962369 A CN 116962369A CN 202211311835 A CN202211311835 A CN 202211311835A CN 116962369 A CN116962369 A CN 116962369A
Authority
CN
China
Prior art keywords
screen
throwing
message
address
discovery
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211311835.XA
Other languages
Chinese (zh)
Inventor
张涛
董先存
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202211311835.XA priority Critical patent/CN116962369A/en
Publication of CN116962369A publication Critical patent/CN116962369A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a screen projection control method, a device, screen projection equipment and playing equipment, wherein the method comprises the following steps: the device discovery message is transmitted to the playing device after being packaged in a tunnel; receiving an encapsulation discovery response message sent by a first playing device through a tunnel; decapsulating the encapsulation discovery response message to obtain an IP address of the virtual network card of the first playing device; and transmitting the screen throwing data to the first playing device for screen throwing according to the IP address. Thus, by establishing a tunnel of the first network where the screen throwing device is located and the second network where the playing device is located, a large two-layer network based on the Internet can be opened, so that the package device discovery message and the package discovery response message of the first playing device can be transmitted across the Internet; the IP address of the virtual network card of the first playing device is obtained through the discovery response message, the screen projection data can be transmitted to the first playing device through the tunnel to carry out screen projection, and remote screen projection across the Internet is realized.

Description

Screen projection control method and device, screen projection equipment and playing equipment
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a screen projection control method and apparatus, a screen projection device, and a playing device.
Background
The main stream screen projection protocol in the prior art mainly comprises: the Digital Living NETWORK ALLIANCE (DLNA) protocol, airPlay, etc. protocols have a device discovery process in the first step, which is usually performed using a screen-drop protocol. DLNA uses simple service discovery protocol (Simple Service Discovery Protocol, SSDP) to discover playback devices, airPlay uses Multicast DNS (mDNS) to discover playback devices. These discovery protocols are all device discovery using multicast protocols. Under normal conditions, the multicast protocol can be normally sent and received in the local area network, and if the inter-internet communication is to be realized, the opposite end host computer needs to send a message notification of joining a certain multicast group to the router to receive the corresponding multicast message. However, in a home broadband scenario or a cross-internet scenario, a device that modifies the entire path is required to implement a cross-internet screen delivery through multiple operator networks and network forwarding devices between the screen delivery device and the playing device, and there is a potential safety hazard. Therefore, it is generally only possible to perform local screen casting, and remote screen casting across the internet cannot be performed.
Disclosure of Invention
In order to solve the technical problems, the embodiment of the application is expected to provide a screen projection control method, a device, a screen projection device and a playing device.
The technical scheme of the application is realized as follows:
in a first aspect, a screen projection control method is provided, and is applied to a screen projection device, and the method includes:
acquiring a device discovery message; wherein, the device discovery message is a multicast message;
encapsulating the equipment discovery message according to the Internet Protocol (IP) address of the first network where the screen throwing equipment is located and the IP address of the second network where the at least one playing equipment is located to obtain an encapsulated discovery message;
transmitting the encapsulation discovery message to the at least one playing device through a tunnel between the first network and the second network;
receiving an encapsulation discovery response message sent by a first playing device through the tunnel;
unpacking the packed discovery response message to obtain a discovery response message of the first playing device; the discovery response message comprises an IP address of a virtual network card of the first playing device, and the response message is a unicast message;
transmitting the screen throwing data to the first playing device for screen throwing according to the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device; the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device are the IP addresses of the same network segment.
In a second aspect, a screen projection control method is provided and applied to a playing device, and the method includes:
receiving an encapsulation discovery message of the screen throwing equipment through a tunnel between a first network where the screen throwing equipment is positioned and a second network where the playing equipment is positioned;
decapsulating the encapsulated discovery message to obtain a device discovery message of the screen-throwing device; the device discovery message comprises an IP address of a virtual network card of the screen throwing device;
responding to the equipment discovery message, and generating a discovery response message according to the IP address of the virtual network card of the playing equipment; wherein, the discovery response message is a unicast message;
encapsulating the discovery response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated discovery response message;
and sending the encapsulation discovery response message to the screen throwing equipment through the tunnel.
In a third aspect, a first screen-projection control device is provided and applied to a screen-projection apparatus, and the first screen-projection control device includes: the system comprises a screen throwing client, a first virtual network card module and a first screen throwing tunnel module;
the screen throwing client is used for generating a device discovery message and sending the device discovery message to the first virtual network card module; wherein, the device discovery message is a multicast message;
The first virtual network card module is used for sending the equipment discovery message to the first screen-throwing tunnel module;
the first screen-throwing tunnel module is used for packaging the equipment discovery message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the at least one playing equipment is located, so as to obtain a packaged discovery message;
the first screen-throwing tunnel module is used for transmitting the encapsulation discovery message to the at least one playing device through a tunnel between the first network and the second network;
the first screen-throwing tunnel module is used for receiving the package discovery response message sent by the first playing device through the tunnel;
the first screen-throwing tunnel module is used for decapsulating the encapsulated discovery response message to obtain a discovery response message of the first playing device; sending the discovery response message to the first virtual network card module; the discovery response message comprises an IP address of a virtual network card of the first playing device;
the first virtual network card module is used for sending the discovery response message to the screen-throwing client;
the screen throwing client is used for transmitting screen throwing data to the first playing device for screen throwing according to the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device; the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device are the IP addresses of the same network segment.
In a fourth aspect, a second screen projection control device is provided and applied to a playing device, where the second screen projection control device includes: the system comprises a screen-throwing server, a second virtual network card module and a second screen-throwing tunnel module;
the second screen-throwing tunnel module is used for receiving the encapsulation discovery message of the screen-throwing equipment through a tunnel between a first network where the screen-throwing equipment is positioned and a second network where the playing equipment is positioned;
the second screen-throwing tunnel module is used for decapsulating the encapsulation discovery message to obtain a device discovery message of the screen-throwing device; sending the device discovery message to the second virtual network card module; the device discovery message comprises an IP address of a virtual network card of the screen throwing device;
the second virtual network card module is used for sending the equipment discovery message to the screen-throwing server;
the screen-throwing server is used for responding to the equipment discovery message and generating a discovery response message according to the IP address of the virtual network card of the playing equipment; sending the discovery response message to the second virtual network card module; wherein, the discovery response message is a unicast message;
the second virtual network card module is used for sending the discovery response message to the second screen-throwing tunnel module;
The second screen-throwing tunnel module is used for packaging the discovery response message according to the IP address of the first network and the IP address of the second network to obtain a packaged discovery response message; and sending the encapsulation discovery response message to the screen throwing equipment through the tunnel.
In a fifth aspect, there is provided a screen projection apparatus, comprising: a processor and a memory configured to store a computer program capable of running on the processor, wherein the processor is configured to perform the steps of the screen shot control method of the aforementioned first aspect when the computer program is run.
In a sixth aspect, there is provided a playback apparatus including: a processor and a memory configured to store a computer program capable of running on the processor, wherein the processor is configured to perform the steps of the screen shot control method of the aforementioned second aspect when the computer program is run.
The application discloses a screen-throwing control method, a screen-throwing control device, screen-throwing equipment and playing equipment, wherein a large two-layer network based on Internet can be opened by establishing a tunnel of a first network where the screen-throwing equipment is positioned and a second network where the playing equipment is positioned, so that a package equipment discovery message and a package discovery response message of the first playing equipment can be transmitted across the Internet; the IP address of the virtual network card of the first playing device is obtained through the discovery response message, the screen projection data can be transmitted to the first playing device through the tunnel to carry out screen projection, and remote screen projection across the Internet is realized.
Drawings
FIG. 1 is a schematic diagram of a first process of a screen shot control method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a format of an encapsulated discovery message according to an embodiment of the application;
FIG. 3 is a schematic diagram of a format of an encapsulated ARP learn message and an encapsulated RARP response message according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a format of an encapsulated screen-cast message according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a second flow chart of a screen shot control method according to an embodiment of the application;
fig. 6 is a schematic structural diagram of a screen-projection control device of a screen-projection end and a play end in an embodiment of the present application;
FIG. 7 is an interaction schematic diagram of a screen-projection control device of a screen-projection end and a play end in an embodiment of the present application;
FIG. 8 is a schematic diagram of a composition structure of a screen projection device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a composition structure of a playback device according to an embodiment of the present application.
Detailed Description
For a more complete understanding of the nature and the technical content of the embodiments of the present application, reference should be made to the following detailed description of embodiments of the application, taken in conjunction with the accompanying drawings, which are meant to be illustrative only and not limiting of the embodiments of the application.
The embodiment of the application provides a screen projection control method which is applied to screen projection equipment. The screen projection device is an electronic device with a screen projection function, such as a smart phone, a tablet personal computer and the like. Illustratively, a screen-throwing client APP is installed in the screen-throwing device. Fig. 1 is a schematic flow chart of a screen projection control method in an embodiment of the present application, as shown in fig. 1, the screen projection control method specifically may include:
Step 101: acquiring a device discovery message; wherein, the device discovery message is a multicast message.
Here, the device discovery packet is a multicast packet including a device discovery protocol and a first ethernet header, and is used for discovering, by multicast, a playback device capable of implementing screen casting. Exemplary device discovery protocols are SSDP protocol, mDNS, and the like. The main stream screen projection protocol at present mainly comprises: the DLNA, airPlay, etc. protocols have a device discovery procedure in the first step, which is usually done using a screen-drop protocol. The DLNA uses the SSDP protocol to discover the playing device; airPlay finds the playback device using mDNS.
Illustratively, in some embodiments, the device discovery message includes: a first ethernet header and a device discovery protocol, wherein the first ethernet header comprises: the method comprises the steps of MAC address of a virtual network card of the local terminal equipment, multicast MAC address, ip address of the virtual network card of the local terminal equipment and multicast ip address.
Step 102: and encapsulating the equipment discovery message according to the Internet Protocol (IP) address of the first network where the screen throwing equipment is located and the IP address of the second network where the at least one playing equipment is located, so as to obtain an encapsulated discovery message.
Here, the device discovery message is specifically packaged based on a tunnel IP header, a tunnel of a first network where the screen throwing device is located and a second network where the playing device is located is established, and a large two-layer message based on the internet is opened, so that the two-layer message can be transmitted across the internet. In an exemplary embodiment, the second network includes one or more playback devices.
Specifically, tunnel encapsulation of the device discovery message is: the user datagram protocol (User Datagram Protocol, UDP) header and tunnel IP header are encapsulated again on the original device discovery two-layer message format and converted into three-layer IP message so that it can be transmitted on the Internet.
Illustratively, in some embodiments, the encapsulating discovery message includes: tunnel IP header, user datagram protocol UDP header and device discovery message; wherein, the tunnel IP header includes: an IP address of the first network and an IP address of the second network; the device discovery message includes: a first ethernet header and a device discovery protocol, the first ethernet header comprising: multicast MAC address, MAC address of virtual network card of the said equipment, multicast IP address, IP address of virtual network card of the said equipment.
Fig. 2 is a schematic diagram illustrating a format of an encapsulated discovery packet according to an embodiment of the application. As shown in fig. 2, in the first ethernet header, the destination MAC (Dst MAC) is a multicast MAC address, and the source MAC (Src MAC) is a MAC address of the local virtual network card (the local virtual network card is a virtual network card of the screen-throwing device); the destination IP (dstep) is the multicast IP address, and the source IP (Src IP) is the IP address of the local virtual network card. Illustratively, in practical applications, the multicast MAC address may be: ff.ff.ff.ff.ff.ff, the multicast IP address range may be from 224.0.0.0 to 239.255.255.255.
Step 103: and transmitting the encapsulation discovery message to the at least one playing device through a tunnel between the first network and the second network.
Here, the at least one playing device is a device having a function of playing the screen content in the second network, such as a television, a computer, and the like. The playing device is provided with a screen throwing server, and the screen throwing server is used for responding to the message of the screen throwing device to realize interaction with the screen throwing device.
Step 104: and receiving the encapsulation discovery response message sent by the first playing device through the tunnel.
Here, the first playing device is a playing device in the second network, which can perform screen interaction with the screen throwing device. And the encapsulated discovery response message is a discovery response message after the first playing device is encapsulated in the tunnel. Illustratively, in some embodiments, encapsulating the discovery response message includes: tunnel IP header, user datagram protocol UDP header and discovery response message.
Step 105: unpacking the packed discovery response message to obtain a discovery response message of the first playing device; the discovery response message comprises an IP address of the virtual network card of the first playing device, and the response message is a unicast message.
Here, the unpacked discovery response message is a message generated by the first playing device in response to the device discovery message sent by the screen throwing device. The discovery response message includes the IP address of the virtual network card of the first playback device. The target IP address in the discovery response message is the IP address of the virtual network card of the screen throwing device, and is a unicast message.
Step 106: transmitting the screen throwing data to the first playing device for screen throwing according to the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device; the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device are the IP addresses of the same network segment.
Illustratively, the method further comprises: and distributing the IP address of the same network segment as the virtual network card of the first playing device to the virtual network card of the screen throwing device.
The same network segment IP is distributed to the virtual network cards at two ends (a screen throwing device end and a playing device end), and any multicast group is not required to be added by announcement, so that the information of the multicast group added by a plurality of routing forwarding devices in the middle of the three-layer announcement Internet of the multicast message can be avoided, and the problem of forwarding the multicast message across the three-layer Internet can be solved.
Exemplary, the screen projection process further includes: and the ARP learning stage is used for learning the MAC address of the playing device.
Illustratively, in some embodiments, the method further comprises: generating an address resolution protocol ARP learning message according to the IP address of the virtual network card of the first playing device; encapsulating the ARP learning message according to the IP address of the first network where the screen throwing equipment is located and the IP address of the second network where the first playing equipment is located to obtain an encapsulated ARP learning message; transmitting the encapsulated ARP learning message to the first playing device through a tunnel between the first network and the second network; receiving an encapsulated RARP response message sent by the first playing device through the tunnel; decapsulating the encapsulated RARP response message to obtain an RARP response message of the first playing device; the RARP response message includes the MAC address of the virtual network card of the first playback device.
Here, the ARP learning message is configured to learn, according to the IP address of the virtual network card of the first playback device, the MAC address of the virtual network card of the first playback device.
Illustratively, in some embodiments, the encapsulating ARP learn message includes: tunnel IP header, user datagram protocol UDP header, ARP learn message; the encapsulated RARP response message includes: tunnel IP header, user datagram protocol UDP header, RARP response message.
Here, the tunnel IP header includes: an IP address of the first network and an IP address of the second network. Fig. 3 is a schematic diagram of a format of an encapsulated ARP learn message and an encapsulated RARP response message according to an embodiment of the application. Wherein (a) part shows the format of the encapsulated ARP learn message and (b) part shows the format of the encapsulated RARP response message.
By establishing a tunnel of a first network where the screen throwing equipment is located and a second network where the playing equipment is located, two large layers based on the Internet can be opened, so that an encapsulated ARP learning message and an encapsulated RARP response message of the first playing equipment crossing the Internet can be transmitted across the Internet, and the cross-Internet transmission of an ARP/RARP protocol is realized.
In some embodiments, the transmitting the screen-throwing data to the first playing device for screen throwing according to the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device includes: generating a screen throwing message according to the IP address and the MAC address of the virtual network card of the first playing device; encapsulating the screen-throwing message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the first playing equipment is located to obtain an encapsulated screen-throwing message; transmitting the encapsulation screen-throwing message to the first playing device through a tunnel between the first network and the second network; receiving an encapsulation screen response message sent by the first playing device through the tunnel; and decapsulating the encapsulated screen response message to obtain the screen response message of the first playing device.
Here, the screen-throwing message of the screen-throwing device is a message including a screen-throwing protocol.
Exemplary, in some embodiments, the generating a screen-throwing message according to the IP address and the MAC address of the virtual network card of the first playing device includes: generating an initial screen throwing message according to the IP address of the virtual network card of the first playing device; and updating the initial screen-throwing message based on the MAC address of the virtual network card of the first playing device to obtain the screen-throwing message.
Here, the screen-throwing response message of the first playing device is a response message generated by the first playing device in response to the screen-throwing message, and based on the screen-throwing message and the screen-throwing response message, transmission interaction of a screen-throwing protocol between the device and the playing device is realized.
Illustratively, in some embodiments, the encapsulating the screen shot message includes: tunnel IP header, UDP header and screen message; wherein, the tunnel IP header includes: an IP address of the first network and an IP address of the second network; the screen-throwing message comprises: a second ethernet header and a screen-drop protocol, the second ethernet header comprising: the MAC address of the virtual network card of the first playing device, the MAC address of the virtual network card of the screen throwing device, the IP address of the virtual network card of the first playing device and the IP address of the virtual network card of the screen throwing device.
Illustratively, the screen-drop protocol may be a digital living NETWORK ALLIANCE protocol (DIGITAL LIVING NETWORK ALLIANCE, DLNA), airPlay, or the like.
Fig. 4 is a schematic diagram illustrating a format of an encapsulated screen-cast message according to an embodiment of the present application. As shown in fig. 4, the package screen-cast message includes: tunnel IP header, UDP header, second ethernet header, and screen-drop protocol (DLNA, airPlay, etc.). In the second ethernet header, the destination MAC (Dst MAC) is the MAC address of the opposite-end virtual network card (the virtual network card of the first playing device), and the source MAC (Src MAC) is the MAC address of the local-end virtual network card (the virtual network card of the screen throwing device); the destination IP (Dst IP) is the IP address of the opposite terminal virtual network card, and the source IP (Src IP) is the IP address of the home terminal virtual network card.
By establishing a tunnel of a first network where the screen throwing equipment is located and a second network where the playing equipment is located, two large layers based on the Internet can be opened, so that a packaging screen throwing message and a packaging screen throwing response message of the first playing equipment crossing the Internet can be transmitted across the Internet, and the cross-Internet transmission of a screen throwing protocol is realized.
Here, the execution body of steps 101 to 106 may be a processor of the screen projection device implementing the screen projection control method according to the embodiment of the present application.
According to the technical scheme, the large two layers based on the Internet can be opened by establishing the tunnel of the first network where the screen throwing device is located and the second network where the playing device is located, so that the package device discovery message and the package discovery response message of the first playing device crossing the Internet can be transmitted across the Internet, and the cross-Internet transmission of the device discovery protocol is realized; the IP address of the virtual network card of the first playing device is obtained through the discovery response message, the screen projection data can be transmitted to the first playing device through the tunnel to carry out screen projection, and remote screen projection across the Internet is realized.
Further examples are given on the basis of embodiments of the present application in order to further embody the objects of the present application. Fig. 5 is a schematic diagram of a second flow of a screen projection control method in an embodiment of the present application, which is applied to a playing device. The playing device is a device with the function of playing the screen content, such as a television, a computer and the like. As shown in fig. 5, the screen projection control method includes:
step 501: and receiving the encapsulation discovery message of the screen throwing device through a tunnel between the first network where the screen throwing device is positioned and the second network where the playing device is positioned.
Illustratively, in some embodiments, encapsulating the discovery message includes: tunnel IP header, user datagram protocol UDP header and device discovery message; wherein, tunnel IP header includes: an IP address of the first network and an IP address of the second network; the device discovery message includes: a first ethernet header and a device discovery protocol, the first ethernet header comprising: multicast MAC address, MAC address of virtual network card of the screen throwing device, multicast IP address, IP address of virtual network card of the screen throwing device.
Step 502: decapsulating the encapsulated discovery message to obtain a device discovery message of the screen throwing device; the device discovery message comprises an IP address of a virtual network card of the screen throwing device.
Step 503: responding to the device discovery message, and generating a discovery response message according to the IP address of the virtual network card of the playing device; wherein, the discovery response message is a unicast message.
Here, the discovery response message is a message generated by the playing device in response to the device discovery message sent by the screen throwing device. The discovery response message includes the IP address of the virtual network card of the playback device. The target IP address in the discovery response message is the IP address of the virtual network card of the screen throwing device, and is a unicast message.
Step 504: and encapsulating the discovery response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated discovery response message.
And the encapsulated discovery response message is a discovery response message after the playing device tunnel encapsulation. Illustratively, in some embodiments, encapsulating the discovery response message includes: tunnel IP header, user datagram protocol UDP header and discovery response message.
Step 505: and sending the package discovery response message to the screen throwing equipment through the tunnel.
The method further comprises: and distributing the IP address of the same network segment as the virtual network card of the screen throwing device for the virtual network card of the playing device.
The same network segment IP is distributed to the virtual network cards at two ends (a screen throwing device end and a playing device end), and any multicast group is not required to be added by announcement, so that the information of the multicast group added by a plurality of routing forwarding devices in the middle of the three-layer announcement Internet of the multicast message can be avoided, and the problem of forwarding the multicast message across the three-layer Internet can be solved.
Illustratively, in some embodiments, the method further comprises: receiving an encapsulated ARP learning message of the screen throwing device through a tunnel between a first network where the screen throwing device is positioned and a second network where the playing device is positioned; decapsulating the encapsulated ARP learning message to obtain an ARP learning message of the screen throwing equipment; the ARP learning message comprises the MAC address of the virtual network card of the screen throwing equipment; responding to the ARP learning message, and generating an RARP response message according to the MAC address of the virtual network card of the playing device; encapsulating the RARP response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated RARP response message; and sending the encapsulated RARP response message to the screen throwing equipment through the tunnel.
Illustratively, in some embodiments, encapsulating the ARP learn message includes: tunnel IP header, user datagram protocol UDP header, ARP learn message; the encapsulating RARP response message comprises the following steps: tunnel IP header, user datagram protocol UDP header, RARP response message.
Here, the tunnel IP header includes: an IP address of the first network and an IP address of the second network. Fig. 3 is a schematic diagram illustrating the format of an ARP learn message and an RARP response message according to an embodiment of the present application.
Illustratively, in some embodiments, the method further comprises: receiving an encapsulation screen throwing message of the screen throwing device through a tunnel between a first network where the screen throwing device is positioned and a second network where the playing device is positioned; unpacking the packed screen-throwing message to obtain a screen-throwing message of the screen-throwing equipment; responding to the screen-throwing message, and generating a screen-throwing response message; according to the IP address of the first network and the IP address of the second network, packaging the screen-throwing response message to obtain a packaged screen-throwing response message; and sending the encapsulation screen-throwing response message to the screen-throwing equipment through the tunnel.
Here, the screen-throwing message of the screen-throwing device is a message including a screen-throwing protocol. The screen-throwing response message of the playing device is a response message generated by the playing device in response to the screen-throwing message, and based on the screen-throwing message and the screen-throwing response message, transmission interaction of a screen-throwing protocol between the device and the playing device is realized.
Illustratively, in some embodiments, encapsulating the screen-cast message includes: tunnel IP header, UDP header and screen message; wherein, tunnel IP header includes: an IP address of the first network and an IP address of the second network; the screen throwing message comprises the following steps: the second Ethernet head and the screen throwing protocol, the second Ethernet head comprises: the method comprises the steps of MAC address of a virtual network card of a first playing device, MAC address of a virtual network card of a screen throwing device, IP address of the virtual network card of the first playing device and IP address of the virtual network card of the screen throwing device.
Illustratively, the screen-drop protocol may be a digital living NETWORK ALLIANCE protocol (DIGITAL LIVING NETWORK ALLIANCE, DLNA), airPlay, or the like.
Here, the execution body of step 501 to step 505 may be a processor of a playback device that implements the projection control method according to the embodiment of the present application.
According to the technical scheme, the package equipment discovery message of the screen throwing equipment crossing the Internet is received through the tunnel of the first network where the screen throwing equipment is located and the second network where the playing equipment is located; responding to the unpacked device discovery message, and sending the generated discovery response message to the screen throwing device through a tunnel after packaging, so that cross-Internet transmission of the packaged device discovery message and the packaged discovery response message can be realized, cross-Internet message interaction is realized, and further, cross-Internet remote screen throwing is realized.
Further examples are given on the basis of embodiments of the present application in order to further embody the objects of the present application. Fig. 6 is a schematic structural diagram of a screen-projection control device of a screen-projection end and a play end in an embodiment of the application.
As shown in fig. 6, the first screen-projection control device 60 located at the screen-projection end includes: the system comprises a screen client 601, a first virtual network card module 602 and a first screen tunnel module 603. The first screen-throwing control device 60 sends and receives information through the local physical network card.
Here, the screen-casting client may be APP software with a video screen-casting function. The first virtual network card module may include a virtual network card of the screen-throwing device, and the module may configure an IP address of the same network segment as the playing device for the virtual network card of the screen-throwing device. Here, the first screen-throwing tunnel module may perform tunnel encapsulation on the received message based on the IP of the first network where the screen-throwing device is located and the IP of the second network where the playing device is located, and then send the message, so as to implement cross-internet transmission of the message.
The same network segment IP is distributed to the virtual network cards at two ends (a screen throwing device end and a playing device end), and any multicast group is not required to be added by announcement, so that the information of the multicast group added by a plurality of routing forwarding devices in the middle of the three-layer announcement Internet of the multicast message can be avoided, and the problem of forwarding the multicast message across the three-layer Internet can be solved.
The screen-throwing client 601 is configured to generate a device discovery message, and send the device discovery message to the first virtual network card module; wherein, the device discovery message is a multicast message.
The first virtual network card module 602 is configured to send a device discovery message to the first screen-drop tunnel module.
The first screen-throwing tunnel module 603 is configured to encapsulate the device discovery packet according to an IP address of a first network where the screen-throwing device is located and an IP address of a second network where the at least one playback device is located, to obtain an encapsulated discovery packet; transmitting the encapsulation discovery message to at least one playing device through a tunnel between the first network and the second network; receiving an encapsulation discovery response message sent by a first playing device through a tunnel; unpacking the packed discovery response message to obtain a discovery response message of the first playing device; sending a discovery response message to the first virtual network card module 602; the discovery response message comprises the IP address of the virtual network card of the first playing device; the first virtual network card module 602 is configured to send a discovery response message to the screen-throwing client 601.
The screen-throwing client 601 is configured to transmit screen-throwing data to the first playing device for screen throwing according to an IP address of a virtual network card of the screen-throwing device and an IP address of a virtual network card of the first playing device; the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device are the same network segment IP addresses.
Exemplary, in some embodiments, the screen-throwing client is further configured to generate an initial screen-throwing message based on an IP address of a virtual network card of the first playing device; sending the initial screen-throwing message to the first virtual network card module; the first virtual network card module is further used for generating an ARP learning message according to the IP address of the virtual network card of the first playing device; and sending an ARP learning message to the first screen-throwing tunnel module. The first screen-throwing tunnel module is further used for packaging the ARP learning message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the at least one playing equipment is located, so as to obtain a packaged ARP learning message; transmitting the encapsulated ARP learning message to the first playing device through a tunnel between the first network and the second network; receiving an encapsulated RARP response message sent by a first playing device through a tunnel; decapsulating the encapsulated RARP response message to obtain an RARP response message of the first playing device; transmitting an RARP response message to the first virtual network card module; the RARP response message comprises the MAC address of the virtual network card of the first playing device; the first virtual network card module is further configured to update the initial screen-throwing message based on a MAC address of a virtual network card of the first playing device, so as to obtain a screen-throwing message.
By establishing a tunnel of a first network where the screen throwing equipment is located and a second network where the playing equipment is located, two large layers based on the Internet can be opened, so that an encapsulated ARP learning message and an encapsulated RARP response message of the first playing equipment crossing the Internet can be transmitted across the Internet, and the cross-Internet transmission of an ARP/RARP protocol is realized.
Exemplary, in some embodiments, the first virtual network card module is further configured to send a screen-throwing message to the first screen-throwing tunnel module; the first screen-throwing tunnel module is further used for packaging the screen-throwing message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the first playing equipment is located, so as to obtain a packaged screen-throwing message; transmitting the encapsulation screen-throwing message to first playing equipment through a tunnel between a first network and a second network; receiving an encapsulation screen response message sent by first playing equipment through a tunnel; unpacking the packed screen response message to obtain a screen response message of the first playing device; and sending a screen-throwing response message to the first virtual network card module. The first virtual network card module is also used for sending a screen-throwing response message to the screen-throwing client.
By establishing a tunnel of a first network where the screen throwing equipment is located and a second network where the playing equipment is located, two large layers based on the Internet can be opened, so that a packaging screen throwing message and a packaging screen throwing response message of the first playing equipment crossing the Internet can be transmitted across the Internet, and the cross-Internet transmission of a screen throwing protocol is realized.
According to the technical scheme, the large two layers based on the Internet can be opened by establishing the tunnel of the first network where the screen throwing device is located and the second network where the playing device is located, so that the package device discovery message and the package discovery response message of the first playing device crossing the Internet can be transmitted across the Internet, the cross-Internet transmission of the device discovery protocol is realized, and further the screen throwing data is transmitted to the first playing device for screen throwing based on the IP address of the virtual network card of the first playing device, and the remote screen throwing across the Internet is realized.
As shown in fig. 6, the second screen projection control device 61 applied to the playing end includes: the screen-casting server 611, the second virtual network card module 612 and the second screen-casting tunnel module 613. The second screen projection control device 61 realizes sending and receiving of information through a physical network card of the local terminal.
Here, the second virtual network card module may include a virtual network card of the screen throwing device, and the module may configure an IP address of a same network segment as the screen throwing device for the virtual network card of the playing device. Here, the second screen-throwing tunnel module may perform tunnel encapsulation on the received message based on the IP of the first network where the screen-throwing device is located and the IP of the second network where the playing device is located, and then send the message, so as to implement cross-internet transmission of the message.
The second screen-throwing tunnel module is used for receiving the encapsulation discovery message of the screen-throwing equipment through a tunnel between a first network where the screen-throwing equipment is located and a second network where the playing equipment is located; decapsulating the encapsulated discovery message to obtain a device discovery message of the screen-throwing device; sending the device discovery message to the second virtual network card module; the device discovery message comprises an IP address of a virtual network card of the screen throwing device.
The second virtual network card module is used for sending the equipment discovery message to the screen-throwing server;
the screen-throwing server is used for responding to the equipment discovery message and generating a discovery response message according to the IP address of the virtual network card of the playing equipment; sending the discovery response message to the second virtual network card module; wherein, the discovery response message is a unicast message.
The second virtual network card module is further configured to send the discovery response message to the second screen-throwing tunnel module.
The second screen-throwing tunnel module is further configured to encapsulate the discovery response packet according to the IP address of the first network and the IP address of the second network, to obtain an encapsulated discovery response packet; and sending the encapsulation discovery response message to the screen throwing equipment through the tunnel.
In some embodiments, the second screen-throwing tunnel module is further configured to receive, through a tunnel between a first network where the screen-throwing device is located and a second network where the playing device is located, an encapsulated ARP learn message of the screen-throwing device; decapsulating the encapsulated ARP learning message to obtain an ARP learning message of the screen throwing equipment; sending the ARP learning message to the second virtual network card module; the ARP learning message comprises the MAC address of the virtual network card of the screen throwing device. The second virtual network card module is further configured to respond to the ARP learn message, and generate an RARP response message according to the MAC address of the virtual network card of the playback device; and sending the RARP response message to the second screen-throwing tunnel module. The second screen-throwing tunnel module is further configured to encapsulate the RARP response message according to the IP address of the first network and the IP address of the second network, to obtain an encapsulated RARP response message; and sending the encapsulated RARP response message to the screen throwing equipment through the tunnel.
In some embodiments, the second screen-throwing tunnel module is further configured to receive, through a tunnel between a first network where the screen-throwing device is located and a second network where the playing device is located, an encapsulated screen-throwing message of the screen-throwing device; unpacking the packed screen-throwing message to obtain a screen-throwing message of the screen-throwing equipment; and sending the screen throwing message to the second virtual network card module. The second virtual network card module is further configured to send the screen-throwing message to the screen-throwing server. The screen-throwing server is used for responding to the screen-throwing message and generating a screen-throwing response message; sending the screen-throwing response message to the second virtual network card module; and sending the screen-throwing response message to the second screen-throwing tunnel module. The second screen-throwing tunnel module is further used for packaging the screen-throwing response message according to the IP address of the first network and the IP address of the second network to obtain a packaged screen-throwing response message; and sending the encapsulation screen-throwing response message to the screen-throwing equipment through the tunnel.
According to the technical scheme, the package equipment discovery message of the screen throwing equipment crossing the Internet is received through the tunnel of the first network where the screen throwing equipment is located and the second network where the playing equipment is located; responding to the unpacked device discovery message, and sending the generated discovery response message to the screen throwing device through a tunnel after packaging, so that cross-Internet transmission of the packaged device discovery message and the packaged discovery response message can be realized, cross-Internet message interaction is realized, and further, cross-Internet remote screen throwing is realized.
Fig. 7 is an interaction schematic diagram of a screen-projection control device of a screen-projection end and a play end in an embodiment of the present application. As shown in fig. 7, the message interaction in the screen-throwing process is mainly divided into three phases, namely, a device discovery phase, an ARP learning phase and a screen-throwing protocol transmission phase.
In particular, during the device discovery phase,
the screen throwing client generates an equipment discovery message; transmitting a device discovery message to a first virtual network card module; wherein, the device discovery message is a multicast message;
the first virtual network card module sends a device discovery message to the first screen-throwing tunnel module;
the first screen-throwing tunnel module encapsulates the equipment discovery message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the at least one playing equipment is located, so as to obtain an encapsulated discovery message; transmitting the encapsulation discovery message to at least one playing device through a tunnel between the first network and the second network;
The second screen-throwing tunnel module receives the encapsulation discovery message of the screen-throwing equipment through a tunnel between a first network where the screen-throwing equipment is positioned and a second network where the playing equipment is positioned; decapsulating the encapsulated discovery message to obtain a device discovery message of the screen-throwing device; sending the device discovery message to the second virtual network card module; the device discovery message comprises an IP address of a virtual network card of the screen throwing device;
the second virtual network card module sends the equipment discovery message to the screen-throwing server;
the screen-throwing server responds to the equipment discovery message and generates a discovery response message according to the IP address of the virtual network card of the playing equipment; sending the discovery response message to the second virtual network card module; wherein, the discovery response message is a unicast message;
and the second virtual network card module sends the discovery response message to the second screen-throwing tunnel module.
The second screen-throwing tunnel module encapsulates the discovery response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated discovery response message; and sending the encapsulation discovery response message to the screen throwing equipment through the tunnel.
The second virtual network card module sends the discovery response message to the second screen-throwing tunnel module, specifically, the second virtual network card module sends the message to an operating system TCP/IP protocol stack of the playing device, and the message is sent to the screen-throwing server end by the operating system protocol stack.
The first screen-throwing tunnel module receives the encapsulation discovery response message sent by the first playing device through a tunnel; unpacking the packed discovery response message to obtain a discovery response message of the first playing device; sending a discovery response message to the first virtual network card module; the discovery response message comprises the IP address of the virtual network card of the first playing device;
and the first virtual network card module sends a discovery response message to the screen throwing client.
In particular, in the ARP learning phase,
the screen throwing client generates an initial screen throwing message based on the IP address of the virtual network card of the first playing device; sending the initial screen-throwing message to the first virtual network card module;
the first virtual network card module generates an ARP learning message according to the IP address of the virtual network card of the first playing device; sending an ARP learning message to a first screen-throwing tunnel module;
the first screen-throwing tunnel module encapsulates the ARP learning message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the at least one playing equipment is located, so as to obtain an encapsulated ARP learning message; transmitting the encapsulated ARP learning message to the first playing device through a tunnel between the first network and the second network;
The second screen-throwing tunnel module receives the packaging ARP learning message of the screen-throwing equipment through a tunnel between a first network where the screen-throwing equipment is positioned and a second network where the playing equipment is positioned; decapsulating the encapsulated ARP learning message to obtain an ARP learning message of the screen throwing equipment; sending the ARP learning message to the second virtual network card module; the ARP learning message comprises the MAC address of the virtual network card of the screen throwing equipment;
the second virtual network card module responds to the ARP learning message and generates an RARP response message according to the MAC address of the virtual network card of the playing device; sending the RARP response message to the second screen-throwing tunnel module;
the second screen-throwing tunnel module encapsulates the RARP response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated RARP response message; sending the encapsulated RARP response message to the screen throwing equipment through the tunnel;
the first screen-throwing tunnel module receives an encapsulated RARP response message sent by the first playing device through a tunnel; decapsulating the encapsulated RARP response message to obtain an RARP response message of the first playing device; transmitting an RARP response message to the first virtual network card module; the RARP response message comprises the MAC address of the virtual network card of the first playing device;
And the first virtual network card module updates the initial screen-throwing message based on the MAC address of the virtual network card of the first playing device to obtain the screen-throwing message.
In particular, in the transmission phase of the screen-throwing protocol,
the first virtual network card module sends a screen-throwing message to the first screen-throwing tunnel module;
the first screen-throwing tunnel module encapsulates the screen-throwing message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the first playing equipment is located, so as to obtain an encapsulated screen-throwing message; the first screen-throwing tunnel module is further used for transmitting the encapsulated screen-throwing message to the first playing device through a tunnel between the first network and the second network;
the second screen-throwing tunnel module receives the encapsulated screen-throwing message of the screen-throwing device through a tunnel between a first network where the screen-throwing device is located and a second network where the playing device is located, and decapsulates the encapsulated screen-throwing message to obtain the screen-throwing message of the screen-throwing device; sending the screen throwing message to the second virtual network card module;
the second virtual network card module sends the screen-throwing message to the screen-throwing server;
the screen-throwing server responds to the screen-throwing message and generates a screen-throwing response message; sending the screen-throwing response message to the second virtual network card module;
The second virtual network card module sends the screen-throwing response message to the second screen-throwing tunnel module;
the second screen-throwing tunnel module encapsulates the screen-throwing response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated screen-throwing response message; sending the encapsulation screen-throwing response message to the screen-throwing equipment through the tunnel;
the first screen-throwing tunnel module receives the encapsulation screen-throwing response message sent by the first playing device through the tunnel; unpacking the packed screen response message to obtain a screen response message of the first playing device; transmitting a screen-throwing response message to the first virtual network card module;
the first virtual network card module is also used for sending a screen-throwing response message to the screen-throwing client.
Specifically, the first virtual network card module sends a screen-throwing response message to the corresponding screen-throwing client APP through an operating system of the screen-throwing equipment.
According to the technical scheme, the large two layers based on the Internet can be opened by establishing the tunnels of the first network where the screen throwing equipment is located and the second network where the playing equipment is located, so that the packaging screen throwing message and the packaging screen throwing response message of the first playing equipment crossing the Internet can be transmitted across the Internet, and the cross-Internet transmission of the screen throwing protocol is realized; by establishing a tunnel of a first network where the screen throwing device is located and a second network where the playing device is located, two layers based on the Internet can be opened, so that an encapsulation device discovery message and an encapsulation discovery response message of a first playing device crossing the Internet can be transmitted across the Internet, cross-Internet transmission of a device discovery protocol is realized, further screen throwing data are transmitted to the first playing device through the tunnel based on an IP address of a virtual network card of the first playing device to throw screens, and remote screen throwing across the Internet is realized.
Based on the hardware implementation of each unit in the first screen projection control device, the embodiment of the application further provides screen projection equipment. Fig. 8 is a schematic diagram of a composition structure of a screen projection device according to an embodiment of the present application. As shown in fig. 8, the screen projection device 80 includes: a processor 801 and a memory 802 configured to store a computer program capable of running on the processor;
wherein the processor 801 is configured to execute the steps of the screen projection control method applied to the screen projection device in the foregoing embodiment when running a computer program.
Of course, in practice, as shown in FIG. 8, the various components of the screening apparatus are coupled together by a bus system 803. It is appreciated that the bus system 803 provides for a connected communication between these components. The bus system 803 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled as bus system 803 in fig. 8.
Based on the hardware implementation of each unit in the second screen projection control device, the embodiment of the application also provides a playing device. Fig. 9 is a schematic diagram of a composition structure of a playback device according to an embodiment of the present application. As shown in fig. 9, the playback apparatus 90 includes: a processor 901 and a memory 902 configured to store a computer program capable of running on the processor;
Wherein the processor 901 is configured to execute the steps of the method for controlling the projection screen of the playback device according to the foregoing embodiment when running the computer program.
Of course, in practice, as shown in FIG. 9, the various components of the projection device are coupled together by a bus system 903. It is appreciated that the bus system 903 is used to facilitate connected communications between these components. The bus system 903 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus system 903 in fig. 9.
In practical applications, the processor may be at least one of an application specific integrated circuit (ASIC, application Specific Integrated Circuit), a digital signal processing device (DSPD, digital Signal Processing Device), a programmable logic device (PLD, programmable Logic Device), a Field-programmable gate array (Field-Programmable Gate Array, FPGA), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronics for implementing the above-described processor functions may be other for different devices, and embodiments of the present application are not particularly limited.
The Memory may be a volatile Memory (RAM) such as Random-Access Memory; or a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid State Drive (SSD); or a combination of the above types of memories and provide instructions and data to the processor.
In an exemplary embodiment, the present application also provides a computer readable storage medium, for example a memory comprising a computer program executable by a processor of a projection device/playback device to perform the steps of the aforementioned method.
It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items. The terms "having," "including," and "containing," or "may include" and "including" are used herein to indicate the presence of a corresponding feature (e.g., an element such as a numerical value, function, operation, or component), but do not exclude the presence of additional features.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not necessarily describe a particular order or sequence. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. The technical schemes described in the embodiments of the present application may be arbitrarily combined without any collision. In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus and device may be implemented in other manners. The above-described embodiments are merely illustrative, and for example, the division of units is merely a logical function division, and other divisions may be implemented in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
The foregoing is merely illustrative embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the technical scope of the present application, and the application should be covered.

Claims (10)

1. A screen projection control method, characterized by being applied to a screen projection device, the method comprising:
Acquiring a device discovery message; wherein, the device discovery message is a multicast message;
encapsulating the equipment discovery message according to the Internet Protocol (IP) address of the first network where the screen throwing equipment is located and the IP address of the second network where the at least one playing equipment is located to obtain an encapsulated discovery message;
transmitting the encapsulation discovery message to the at least one playing device through a tunnel between the first network and the second network;
receiving an encapsulation discovery response message sent by a first playing device through the tunnel;
unpacking the packed discovery response message to obtain a discovery response message of the first playing device; the discovery response message comprises an IP address of a virtual network card of the first playing device, and the response message is a unicast message;
transmitting the screen throwing data to the first playing device for screen throwing according to the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device; the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device are the IP addresses of the same network segment.
2. The method according to claim 1, wherein the method further comprises:
Generating an address resolution protocol ARP learning message according to the IP address of the virtual network card of the first playing device;
encapsulating the ARP learning message according to the IP address of the first network where the screen throwing equipment is located and the IP address of the second network where the first playing equipment is located to obtain an encapsulated ARP learning message;
transmitting the encapsulated ARP learning message to the first playing device through a tunnel between the first network and the second network;
receiving an encapsulated RARP response message sent by the first playing device through the tunnel;
decapsulating the encapsulated RARP response message to obtain an RARP response message of the first playing device; the RARP response message includes the MAC address of the virtual network card of the first playback device.
3. The method according to claim 2, wherein the transmitting the screen-casting data to the first playing device for screen casting according to the IP address of the virtual network card of the screen-casting device and the IP address of the virtual network card of the first playing device includes:
generating a screen throwing message according to the IP address and the MAC address of the virtual network card of the first playing device;
encapsulating the screen-throwing message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the first playing equipment is located to obtain an encapsulated screen-throwing message;
Transmitting the encapsulation screen-throwing message to the first playing device through a tunnel between the first network and the second network;
receiving an encapsulation screen response message sent by the first playing device through the tunnel;
and decapsulating the encapsulated screen response message to obtain the screen response message of the first playing device.
4. A screen projection control method, characterized in that it is applied to a playing device, the method comprising:
receiving an encapsulation discovery message of the screen throwing equipment through a tunnel between a first network where the screen throwing equipment is positioned and a second network where the playing equipment is positioned;
decapsulating the encapsulated discovery message to obtain a device discovery message of the screen-throwing device; the device discovery message comprises an IP address of a virtual network card of the screen throwing device;
responding to the equipment discovery message, and generating a discovery response message according to the IP address of the virtual network card of the playing equipment; wherein, the discovery response message is a unicast message;
encapsulating the discovery response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated discovery response message;
And sending the encapsulation discovery response message to the screen throwing equipment through the tunnel.
5. The method according to claim 4, wherein the method further comprises:
receiving an encapsulation ARP learning message of the screen throwing equipment through a tunnel between a first network where the screen throwing equipment is located and a second network where the playing equipment is located;
decapsulating the encapsulated ARP learning message to obtain an ARP learning message of the screen throwing equipment; the ARP learning message comprises the MAC address of the virtual network card of the screen throwing equipment;
responding to the ARP learning message, and generating an RARP response message according to the MAC address of the virtual network card of the playing device;
encapsulating the RARP response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated RARP response message;
and sending the encapsulated RARP response message to the screen throwing equipment through the tunnel.
6. The method according to claim 4, wherein the method further comprises:
receiving an encapsulation screen throwing message of the screen throwing device through a tunnel between a first network where the screen throwing device is positioned and a second network where the playing device is positioned;
Unpacking the packed screen-throwing message to obtain a screen-throwing message of the screen-throwing equipment;
responding to the screen-throwing message to generate a screen-throwing response message;
encapsulating the screen-throwing response message according to the IP address of the first network and the IP address of the second network to obtain an encapsulated screen-throwing response message;
and sending the encapsulation screen-throwing response message to the screen-throwing equipment through the tunnel.
7. A first screen-throwing control device, characterized in that is applied to a screen-throwing apparatus, the first screen-throwing control device comprising: the system comprises a screen throwing client, a first virtual network card module and a first screen throwing tunnel module;
the screen throwing client is used for generating a device discovery message and sending the device discovery message to the first virtual network card module; wherein, the device discovery message is a multicast message;
the first virtual network card module is used for sending the equipment discovery message to the first screen-throwing tunnel module;
the first screen-throwing tunnel module is used for packaging the equipment discovery message according to the IP address of the first network where the screen-throwing equipment is located and the IP address of the second network where the at least one playing equipment is located, so as to obtain a packaged discovery message;
The first screen-throwing tunnel module is used for transmitting the encapsulation discovery message to the at least one playing device through a tunnel between the first network and the second network;
the first screen-throwing tunnel module is used for receiving the package discovery response message sent by the first playing device through the tunnel;
the first screen-throwing tunnel module is used for decapsulating the encapsulated discovery response message to obtain a discovery response message of the first playing device; sending the discovery response message to the first virtual network card module; the discovery response message comprises an IP address of a virtual network card of the first playing device;
the first virtual network card module is used for sending the discovery response message to the screen-throwing client;
the screen throwing client is used for transmitting screen throwing data to the first playing device for screen throwing according to the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device; the IP address of the virtual network card of the screen throwing device and the IP address of the virtual network card of the first playing device are the IP addresses of the same network segment.
8. A second screen projection control device, applied to a playing device, the second screen projection control device comprising: the system comprises a screen-throwing server, a second virtual network card module and a second screen-throwing tunnel module;
The second screen-throwing tunnel module is used for receiving the encapsulation discovery message of the screen-throwing equipment through a tunnel between a first network where the screen-throwing equipment is positioned and a second network where the playing equipment is positioned;
the second screen-throwing tunnel module is used for decapsulating the encapsulation discovery message to obtain a device discovery message of the screen-throwing device; sending the device discovery message to the second virtual network card module; the device discovery message comprises an IP address of a virtual network card of the screen throwing device;
the second virtual network card module is used for sending the equipment discovery message to the screen-throwing server;
the screen-throwing server is used for responding to the equipment discovery message and generating a discovery response message according to the IP address of the virtual network card of the playing equipment; sending the discovery response message to the second virtual network card module; wherein, the discovery response message is a unicast message;
the second virtual network card module is used for sending the discovery response message to the second screen-throwing tunnel module;
the second screen-throwing tunnel module is used for packaging the discovery response message according to the IP address of the first network and the IP address of the second network to obtain a packaged discovery response message; and sending the encapsulation discovery response message to the screen throwing equipment through the tunnel.
9. A screen projection device, the screen projection device comprising: a processor and a memory configured to store a computer program capable of running on the processor,
wherein the processor is configured to perform the steps of the method of any of claims 1 to 3 when the computer program is run.
10. A playback device, the playback device comprising: a processor and a memory configured to store a computer program capable of running on the processor,
wherein the processor is configured to perform the steps of the method of any of claims 4 to 6 when the computer program is run.
CN202211311835.XA 2022-10-25 2022-10-25 Screen projection control method and device, screen projection equipment and playing equipment Pending CN116962369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211311835.XA CN116962369A (en) 2022-10-25 2022-10-25 Screen projection control method and device, screen projection equipment and playing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211311835.XA CN116962369A (en) 2022-10-25 2022-10-25 Screen projection control method and device, screen projection equipment and playing equipment

Publications (1)

Publication Number Publication Date
CN116962369A true CN116962369A (en) 2023-10-27

Family

ID=88444987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211311835.XA Pending CN116962369A (en) 2022-10-25 2022-10-25 Screen projection control method and device, screen projection equipment and playing equipment

Country Status (1)

Country Link
CN (1) CN116962369A (en)

Similar Documents

Publication Publication Date Title
JP7312210B2 (en) GATEWAY DEVICE, VEHICLE NETWORK SYSTEM, TRANSFER METHOD AND PROGRAM
JP7289332B2 (en) Electronic control unit, frame generation method and program
CN108370343B (en) Network hub, transfer method, and vehicle-mounted network system
US10757229B2 (en) Apparatus and method for converting protocol by type of data and vehicle system
JP6106750B2 (en) Method and system for integrating virtual and physical networks
CN109218261B (en) Data processing method and data processing device
CN105591982B (en) A kind of method and apparatus of message transmissions
US8645567B2 (en) Method and system for packet filtering for local host-management controller pass-through communication via network controller
US7969996B2 (en) Tunneling apparatus and tunnel frame sorting method and its program for use therein
US8102847B2 (en) Frame processing method and frame processing apparatus
JP7192074B2 (en) Network hub, transfer method and in-vehicle network system
EP1931087A1 (en) Information processing system, tunnel communication device, tunnel communication method, and program
US11431671B2 (en) Method and apparatus for dynamic discovery of a blockchain component in a cloud computing system
JP2007159012A (en) Relay device and method of connecting client device and server
CN107659484B (en) Method, device and system for accessing VXLAN network from VLAN network
WO2017203902A1 (en) Gateway device, in-vehicle network system, transfer method, and program
US20170180397A1 (en) Thin Client Unit apparatus to transport intra-vehicular data on a communication network
CN107332772B (en) Forwarding table item establishing method and device
CN111835764B (en) ARP anti-spoofing method, tunnel endpoint and electronic equipment
US10819617B1 (en) Loop-back packet for determining operational capabilities of border relay device
JP2022516355A (en) Data transmission method and equipment
WO2016042397A1 (en) Enhanced dynamic host configuration protocol (dhcp)
CN102907046B (en) For the treatment of the method for message
CN116962369A (en) Screen projection control method and device, screen projection equipment and playing equipment
US9998376B2 (en) Control device, communication system, control method, and non-transitory recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination