WO2022206772A1 - 连接建立方法、存储介质及相关设备 - Google Patents
连接建立方法、存储介质及相关设备 Download PDFInfo
- Publication number
- WO2022206772A1 WO2022206772A1 PCT/CN2022/083747 CN2022083747W WO2022206772A1 WO 2022206772 A1 WO2022206772 A1 WO 2022206772A1 CN 2022083747 W CN2022083747 W CN 2022083747W WO 2022206772 A1 WO2022206772 A1 WO 2022206772A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- receiving end
- rtsp
- local area
- area network
- connection
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 93
- 230000005540 biological transmission Effects 0.000 claims abstract description 45
- 230000008569 process Effects 0.000 claims description 28
- 230000006855 networking Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 17
- 230000004044 response Effects 0.000 claims description 7
- 238000004891 communication Methods 0.000 abstract description 10
- 238000012545 processing Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 13
- 238000005516 engineering process Methods 0.000 description 9
- 230000002452 interceptive effect Effects 0.000 description 9
- 230000008094 contradictory effect Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002085 persistent effect Effects 0.000 description 2
- 238000010897 surface acoustic wave method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000005674 electromagnetic induction Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/005—Discovery of network devices, e.g. terminals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/16—Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
Definitions
- the present application relates to communication technologies, and in particular, to a connection establishment method, storage medium and related devices.
- Miracast is a wireless display standard based on WiFi Direct (WiFi Direct or WiFi P2P).
- Electronic devices that support this wireless display standard can share media streams wirelessly, for example, mobile phones can play videos or photos directly on TV or other devices through Miracast without any cables.
- WiFi Direct WiFi Direct or WiFi P2P
- a user wishes to wirelessly share a media stream between electronic devices, he no longer needs to search for cables and converters of various specifications, and does not need to confirm the correct connector for connecting the electronic devices.
- Miracast is based on WiFi P2P, which enables the sender and the receiver to establish a wireless connection for communication.
- WiFi P2P networking network has problems such as network instability, packet loss or jitter.
- the present application provides a method for establishing a connection, a storage medium and related equipment to avoid the problems of network instability, packet loss or jitter.
- the technical solution is as follows:
- an embodiment of the present application provides a connection establishment method for establishing a wireless connection between electronic devices supporting Miracast.
- the electronic device includes a transmitter and a receiver, and the transmitter and receiver are located in the same local area network.
- the connection establishment method includes:
- the receiver obtains the Real Time Streaming Protocol (RTSP) port of the sender;
- RTSP Real Time Streaming Protocol
- the receiving end obtains the Internet Protocol (Internet Protocol, IP) address corresponding to the local area network of the sending end;
- IP Internet Protocol
- the receiver performs RTSP connection with the sender according to the RTSP port and IP address;
- the receiver and the sender conduct RTSP capability negotiation in the local area network
- the receiving end and the sending end perform Real-time Transport Protocol (RTP) data transmission in the local area network.
- RTP Real-time Transport Protocol
- obtaining the IP address of the local area network corresponding to the sending end by the receiving end may include: the receiving end sends a User Datagram Protocol (UDP) packet to a local area network device in the local area network; the receiving end obtains the local area network that successfully receives the UDP packet.
- the LAN device that successfully receives the UDP packet includes the sender.
- the above-mentioned receiving end performs an RTSP connection with the transmitting end according to the RTSP port and the IP address, which may include: the receiving end performs an RTSP connection with the transmitting end according to the RTSP port and the IP address of the local area network device that successfully receives the UDP packet.
- the receiving end sending the UDP packet to the local area network device in the local area network may include: the receiving end obtains the IP address of the routing device in the local area network; the receiving end sends the UDP packet to the local area network device in the local area network based on the IP address of the routing device.
- the receiving end acquiring the RTSP port of the transmitting end may include: the receiving end acquiring device information in the network; and the receiving end acquiring the RTSP port of the transmitting end according to the device information in the network.
- the receiving end acquires the RTSP port of the transmitting end, it may also include: based on WiFi P2P service discovery, the receiving end establishes a service connection with the transmitting end, performs networking, and in the service connection process, the transmitting end establishes an RTSP server, RTSP port. Port for RTSP server.
- an embodiment of the present application provides a connection establishment method for establishing a wireless connection between electronic devices supporting Miracast.
- the electronic device includes a transmitter and a receiver, and the transmitter and receiver are located in the same local area network.
- This connection establishment method includes:
- the sender discovers the receiver
- the sender displays the identification information of the receiver
- the sending end In response to the user's selection operation on the receiving end, the sending end establishes a service connection with the receiving end, and performs networking, wherein, in the service connection process, the sending end establishes an RTSP server, and the port of the RTSP server is an RTSP port;
- the sender receives the UDP packet from the receiver, and the successful reception of the UDP packet enables the receiver to obtain the IP address of the corresponding LAN of the sender;
- the sender and the receiver Based on the RTSP port and IP address, the sender and the receiver perform RTSP connection;
- the sending end and the receiving end conduct RTSP capability negotiation in the local area network
- the sender and receiver perform RTP data transmission in the local area network.
- an embodiment of the present application provides a connection establishment device for establishing a wireless connection between electronic devices supporting Miracast, where the electronic device includes a sending end and a receiving end, the sending end and the receiving end are located in the same local area network, the connection The establishment means are integrated in the receiver.
- the connection establishment means include:
- the first obtaining module is used to obtain the RTSP port of the sender
- the second obtaining module is used to obtain the IP address of the local area network corresponding to the sender
- the RTSP connection establishment module is used for RTSP connection with the sender according to the RTSP port and IP address;
- the capability negotiation module is used to conduct RTSP capability negotiation with the sender in the local area network
- the data transmission module is used for RTP data transmission with the sender in the local area network.
- the second obtaining module may include: a sending unit, used for sending a UDP packet to a local area network device in the local area network; an obtaining unit, used for obtaining the IP address of the local area network device that successfully received the UDP packet, and the local area network device that successfully received the UDP packet.
- the RTSP connection establishment module may be specifically used to: perform RTSP connection with the sender according to the RTSP port and the IP address of the local area network device that has successfully received the UDP packet.
- the sending unit is specifically configured to: obtain the IP address of the routing device in the local area network; and send the UDP packet to the local area network device in the local area network based on the IP address of the routing device.
- the first obtaining module is specifically configured to: obtain device information in the network; and obtain the RTSP port of the sender according to the device information in the network.
- connection establishment device may further include: a service connection establishment module, configured to establish a service connection with the sender based on WiFi P2P service discovery before the first obtaining module obtains the RTSP port of the sender, and perform networking.
- a service connection establishment module configured to establish a service connection with the sender based on WiFi P2P service discovery before the first obtaining module obtains the RTSP port of the sender, and perform networking.
- the sender establishes an RTSP server, and the RTSP port is the port of the RTSP server.
- an embodiment of the present application provides a connection establishment device for establishing a wireless connection between electronic devices supporting Miracast, where the electronic device includes a sending end and a receiving end, the sending end and the receiving end are located in the same local area network, and the connection The establishment means are integrated in the sender.
- the connection establishment means include:
- the display module is used to display the identification information of the receiving end
- the service connection establishment module is used for establishing a service connection with the receiving end in response to the user's selection operation on the receiving end, and performing networking, wherein, in the service connection process, the transmitting end establishes an RTSP server, and the port of the RTSP server is an RTSP port;
- the receiving module is used to receive the UDP packet from the receiving end.
- the successful reception of the UDP packet enables the receiving end to obtain the IP address of the local area network corresponding to the sending end;
- the RTSP connection establishment module is used for RTSP connection with the receiving end based on the RTSP port and IP address;
- the capability negotiation module is used to conduct RTSP capability negotiation with the receiver in the local area network
- the data transmission module is used for RTP data transmission with the receiver in the local area network.
- an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor and execute the connection establishment according to any one of the first aspect or the second aspect. method.
- an embodiment of the present application provides an electronic device, including: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute any one of the first aspect or the second aspect The connection establishment method described in item.
- an embodiment of the present application provides a program product, including a computer program, wherein the computer program is adapted to be loaded by a processor and execute the connection according to any one of the first aspect or the second aspect build method.
- the present application provides a connection establishment method, storage medium and related equipment for establishing a wireless connection between electronic equipment supporting Miracast, wherein the electronic equipment includes a sending end and a receiving end, and the sending end and the receiving end are located in the same local area network.
- the connection establishment method includes: the receiving end obtains the RTSP port of the transmitting end and the IP address of the corresponding local area network of the transmitting end, and performs an RTSP connection with the transmitting end according to the RTSP port and the IP address; after that, the receiving end and the transmitting end perform an RTSP connection in the local area network. Capability negotiation and RTP data transmission.
- the receiver Since the receiver connects with the sender according to the RTSP port of the sender and the IP address of the corresponding local area network of the sender, and the receiver and sender conduct RTSP capability negotiation and RTP data transmission in the local area network, it can guarantee the RTP data. Transmission, to avoid problems such as packet loss or jitter caused by the unstable network of WiFi P2P networking.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- FIG. 2 is a schematic flowchart of WiFi P2P networking
- FIG. 3 is a flowchart of a connection establishment method provided by an embodiment of the present application.
- connection establishment method 4 is a flowchart of a connection establishment method provided by another embodiment of the present application.
- connection establishment method provided by another embodiment of the present application.
- connection establishment device 6 is a schematic structural diagram of a connection establishment device provided by an embodiment of the present application.
- connection establishment apparatus 7 is a schematic structural diagram of a connection establishment apparatus provided by another embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a connection establishment apparatus provided by another embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the receiving end can be divided into a primary sink (Primary Sink) 12 and a secondary sink (Secondary Sink) 13, the difference is that the primary sink 12 can support video or audio data output; and the secondary sink 13 only It supports the data output of sound.
- Miracast proposes the operation structure of the paired sink (Coupled Sink), and the user can choose to split the video and audio of the sender 12 to different receivers (which may include the main receiver 12 and/or secondary receiving end 13) and present audio and video information at the same time.
- FIG. 1 is only a schematic diagram of an application scenario provided by the embodiment of the present application, and the embodiment of the present application does not limit the devices and the number of devices included in FIG. relationship is limited.
- the transmitting end 11 can also be a portable computer, a personal digital assistant (Personal Digital Assistant, PDA) and other devices;
- the main receiving end 12 can also be a smart interactive tablet, a smart TV, etc. with audio Devices with video playback capabilities.
- PDA Personal Digital Assistant
- the main receiving end 12 can also be a smart interactive tablet, a smart TV, etc. with audio Devices with video playback capabilities.
- only the sending end 11 and the main receiving end 12 may be included, that is, only one kind of receiving end may be included.
- the hardware part of the intelligent interactive white board is composed of a touch display module, an intelligent processing system (including a controller) and other parts, which are combined by the overall structural parts, and are also supported by a dedicated software system.
- the touch display module includes a display screen, a touch component and a backlight component.
- the backlight component is used to provide a backlight light source for the display screen.
- the display screen generally adopts a liquid crystal display device for screen display.
- the touch component is arranged in The display screen is arranged on the display screen or at the front end of the display screen, and is used to collect the touch operation data of the user, and send the collected touch operation data to the intelligent processing system for processing.
- screen data is displayed on the display screen of the intelligent interactive tablet.
- a touch object such as a finger or a stylus
- the intelligent interactive tablet The touch component will collect the touch data, so that the touch component converts the touch data into the coordinate data of the touch point and sends it to the intelligent processing system, or sends it to the intelligent processing system where the intelligent processing system converts the touch data into touch
- the intelligent processing system realizes the corresponding control operation according to the preset program, drives the display content of the display screen to change, and realizes various display and operation effects.
- touch components can be divided into five basic categories: vector pressure sensing technology touch components, resistive technology touch components, capacitive technology touch components, electromagnetic technology touch screens, infrared technology touch components, and surface acoustic wave technology touch components.
- touch components can be divided into four types: resistive type, capacitive induction type, electromagnetic induction type, infrared type and surface acoustic wave type.
- the touch component can collect the data of the touch point and send it to the intelligent processing system, and then realize different functional applications with the built-in software of the intelligent processing system, so as to realize the intelligent processing system. Touch control.
- the “screen” and “large screen” mentioned in this application all refer to the display screen of electronic devices such as smart interactive tablet and smart TV; interface/window.
- the process of WiFi P2P networking is shown in Figure 2.
- the sender finds the receiver based on WiFi P2P service discovery, and then communicates the information to the user.
- the user can select the device to be connected (ie, the receiver) from the devices found or previously connected to;
- the sender and the receiver are connected based on the WiFi P2P service to form a network; then, the sender and the receiver will negotiate the RSTP capability to select a suitable audio and video transmission format; after negotiating the RSTP capability, the sender and the receiver will Transmission of audio and video data based on RTP.
- Miracast is widely used in wireless display, and WiFi P2P networking enables the sender and receiver to establish wireless display transmission.
- WiFi P2P networking enables the sender and receiver to establish wireless display transmission.
- problems due to the fact that chip manufacturers do not pay much attention to WiFi P2P and the compatibility of network card drivers is poor, there are problems such as instability, packet loss or jitter when WiFi P2P networking network conducts data interaction and communication, resulting in Miracast wireless screen sharing. Bad experience.
- the present application provides a connection establishment method, storage medium and related equipment, which establishes a wireless connection between a sending end and a receiving end based on a local area network, so that there is no need to consider the compatibility of network card drivers with WiFi P2P and other issues, so that data can be stored in
- the stable transmission in the local area network makes Miracast wireless screen transmission more stable and smooth, thereby improving the user experience.
- Example 1 For example, in one embodiment of Example 1, one technical feature a is described, and in another embodiment of Example 1, another technical feature b is described. Since the above two technical features are not contradictory to each other, those skilled in the art should be able to think after reading the specification of the present application that an embodiment having both of these two features is also an optional embodiment, that is, a and b.
- Non-contradictory technical features described in different embodiments can also be combined arbitrarily to form optional embodiments.
- Embodiment 1 Embodiment 1, Embodiment 2, Embodiment 3 and Embodiment 4 will be described in detail below. It should be clear that the serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
- the embodiment of the present application discloses a connection establishment method for establishing a wireless connection between electronic devices supporting Miracast.
- the electronic device includes a sending end and a receiving end, and the sending end and the receiving end are located in the same local area network.
- the connection establishment method is applied to the receiving end. The connection establishment method performed by the receiving end will be described in detail below with reference to FIG. 3 .
- connection establishment method includes the following steps:
- the receiving end obtains the RTSP port of the transmitting end.
- Miracast-enabled electronic devices discover peer devices through WiFi P2P service discovery.
- the receiver waits for the user to select the receiver on the sender to trigger the connection establishment process.
- the sender establishes an RTSP server and provides an RTSP port to the receiver, so that the receiver obtains the RTSP port of the sender.
- the user inputs a wireless screen projection operation at the sending end, and selects the receiving end in the list of peer devices discovered by the WiFi P2P service discovery (discover) to trigger the connection establishment process.
- the receiving end obtains the IP address of the local area network corresponding to the transmitting end.
- both the receiving end and the sending end can obtain the IP address of the opposite end corresponding to the local area network.
- this embodiment of the present application does not limit the order in which the receiving end performs the two steps of S301 and S302.
- the receiving end may perform S301 first and then perform S302; in another implementation, the receiving end may perform S302 first and then perform S301; in another implementation, the receiving end may perform the two steps of S301 and S302 at the same time.
- the receiving end performs an RTSP connection with the transmitting end according to the RTSP port and the IP address.
- the receiving end establishes a connection through an RTSP socket (socket) through the obtained IP address and the RTSP port. Because only the correct sender can successfully establish and return to normal communication, the subsequent RTSP capability negotiation can be performed in the local area network.
- the receiving end is connected to the transmitting end via RTSP according to the RTSP port of the transmitting end and the IP address of the network corresponding to the WiFi P2P networking of the transmitting end (the receiving end is connected to the RTSP server of the transmitting end).
- the receiving end performs an RTSP connection with the transmitting end according to the RTSP port of the transmitting end and the IP address of the local area network corresponding to the transmitting end.
- the receiving end and the transmitting end perform RTSP capability negotiation in the local area network.
- the RTSP capability negotiation between the receiving end and the sending end in the local area network compared to the RTSP capability negotiation between the receiving end and the sending end in the WiFi P2P networking network, can be independent of whether the network card driver is compatible with the WiFi P2P capability. limits.
- the receiving end and the sending end perform RTP data transmission in the local area network.
- the RTP data transmission in the local area network avoids the instability caused by WiFi P2P networking and other factors, so that the data can be transmitted stably in the relatively reliable environment of the local area network.
- the receiving end performs RTSP connection with the sending end based on the IP address of the corresponding local area network of the sending end, and communicates with the sending end in the local area network.
- the terminal performs RTSP capability negotiation and RTP data transmission.
- the connection establishment method is used to establish a wireless connection between electronic devices supporting Miracast, wherein the electronic device includes a sending end and a receiving end, and the sending end and the receiving end are located in the same local area network.
- the connection establishment method includes: the receiving end obtains the RTSP port of the transmitting end and the IP address of the corresponding local area network of the transmitting end, and performs an RTSP connection with the transmitting end according to the RTSP port and the IP address; after that, the receiving end and the transmitting end perform an RTSP connection in the local area network. Capability negotiation and RTP data transmission.
- the receiver Since the receiver connects with the sender according to the RTSP port of the sender and the IP address of the corresponding local area network of the sender, and the receiver and sender conduct RTSP capability negotiation and RTP data transmission in the local area network, it can guarantee the RTP data. Transmission, to avoid problems such as packet loss or jitter caused by the unstable network of WiFi P2P networking.
- the receiving end obtains the IP address of the local area network corresponding to the sending end, which may include: the receiving end sends a UDP packet to a local area network device in the local area network; The IP address of the LAN device.
- the LAN device that successfully receives the UDP packet includes the sender.
- the receiver performs an RTSP connection with the sender according to the RTSP port and the IP address, which may include: the receiver performs an RTSP connection with the sender according to the RTSP port and the IP address of the local area network device that successfully receives the UDP packet.
- UDP is a non-connection-oriented and unreliable protocol. Because there is no connection and no retransmission confirmation, UDP has high transmission efficiency and low delay, and is suitable for applications with high real-time requirements, such as game servers, audio and video, etc. In addition, since both parties do not need to be continuously online, there is no need to maintain A large amount of concurrency saves system resources; in addition, UDP can utilize network bandwidth more efficiently. Therefore, the receiver obtains the IP address of the local area network corresponding to the sender by sending a UDP packet.
- sending the UDP packet to the local area network device in the local area network by the receiving end may include: the receiving end obtains the IP address of the routing device in the local area network; and the receiving end sends the UDP packet to the local area network device in the local area network based on the IP address of the routing device. That is to say, the receiver first obtains the IP address of the local area network, and sends a UDP packet to all the devices with this IP address. If there is a device in the local area network, this route changes back to record the MAC address and IP address of the local area network device, and passes the routing table. You can query the information of LAN devices.
- the receiving end sends UDP packets to 253 devices in the local area network with IP addresses ranging from 192.168.0.1 to 192.168.0.254.
- the receiving end obtains the RTSP port of the sending end, which may include: the receiving end obtains device information in the network; and the receiving end obtains the RTSP port of the sending end according to the device information in the network.
- the networking here refers to WiFi P2P networking.
- the connection establishment method may further include: based on WiFi P2P service discovery, the receiver establishes a service connection with the sender to perform networking.
- the sender establishes an RTSP server, and the RTSP port is the port of the RTSP server.
- the embodiment of the present application discloses a connection establishment method for establishing a wireless connection between electronic devices supporting Miracast.
- the electronic device includes a sending end and a receiving end, and the sending end and the receiving end are located in the same local area network.
- the connection establishment method is applied to the sending end. The connection establishment method performed by the sending end will be described in detail below with reference to FIG. 5 .
- connection establishment method includes the following steps:
- the sender can discover the peer device based on the WiFi P2P service discovery.
- the receiver since the receiver needs to perform Miracast wireless screen sharing with the sender, the receiver has also enabled the WiFi P2P service discovery function, so that the receiver is included in the peer devices discovered by the sender.
- the sender displays the identification information of the receiver.
- the transmitting end displays the identification information of the peer device searched through S501 on its screen, which includes the identification information of the receiving end.
- the user can act on the screen and select the receiver.
- the sender establishes a service connection with the receiver in response to the user's selection operation on the receiver, and performs networking, wherein the sender establishes an RTSP server during the service connection process, and the port of the RTSP server is an RTSP port.
- the sending end receives the UDP packet from the receiving end.
- the successful reception of the UDP packet enables the receiver to obtain the IP address of the local area network corresponding to the sender. Since the sending end and the receiving end are in the same local area network, the receiving end can query the information of the sending end through the routing table, including but not limited to the identification information of the sending end, the IP address and MAC address of the corresponding local area network of the sending end, and so on.
- the transmitting end and the receiving end perform an RTSP connection.
- the sending end and the receiving end perform RTP data transmission in the local area network.
- the steps performed by the sending end during the connection establishment process correspond to the steps performed by the receiving end, and therefore are not repeated here.
- the sending end since the sending end performs RTSP connection with the receiving end according to the RTSP port of the sending end and the IP address of the corresponding local area network of the sending end, and the sending end and the receiving end conduct RTSP capability negotiation and RTP data transmission in the local area network , so it can ensure the transmission of RTP data and avoid problems such as packet loss or jitter caused by the unstable network of WiFi P2P networking.
- FIG. 6 shows a schematic structural diagram of a connection establishment apparatus provided by an exemplary embodiment of the present application.
- the connection establishment device is used to establish a wireless connection between electronic devices supporting Miracast, wherein the electronic device includes a transmitter and a receiver, the transmitter and receiver are located in the same local area network, and the connection establishment device is integrated in the receiver.
- connection establishment apparatus can be implemented by software, hardware or a combination of the two to become all or a part of an electronic device such as an intelligent interactive tablet.
- the connection establishment device 60 includes a first acquisition module 61 , a second acquisition module 62 , an RTSP connection establishment module 63 , a capability negotiation module 64 and a data transmission module 65 . in:
- the first obtaining module 61 is used to obtain the RTSP port of the sending end;
- the second obtaining module 62 is configured to obtain the IP address of the local area network corresponding to the sending end;
- the RTSP connection establishment module 63 is used for performing RTSP connection with the sender according to the RTSP port and the IP address;
- the capability negotiation module 64 is used for performing RTSP capability negotiation with the sender in the local area network
- the data transmission module 65 is used to perform RTP data transmission with the sender in the local area network.
- the above modules are connected to each other.
- the second obtaining module 62 may include: a sending unit 621 for sending a UDP packet to a local area network device in a local area network; an obtaining unit 622 for obtaining the data of the local area network device that successfully receives the UDP packet IP address, the local area network device that receives the successful UDP packet includes the sender.
- the RTSP connection establishing module 63 may be specifically configured to: perform an RTSP connection with the sender according to the RTSP port and the IP address of the local area network device that has successfully received the UDP packet.
- the sending unit 621 is specifically configured to: obtain the IP address of the routing device in the local area network; and send the UDP packet to the local area network device in the local area network based on the IP address of the routing device.
- the first obtaining module 61 may be specifically configured to: obtain device information in the network; and obtain the RTSP port of the sender according to the device information in the network.
- the connection establishment device 70 may also include: a service connection establishment module 66 for establishing a service connection with the sender based on WiFi P2P service discovery before the first obtaining module 61 obtains the RTSP port of the sender, and performing grouping. network.
- a service connection establishment module 66 for establishing a service connection with the sender based on WiFi P2P service discovery before the first obtaining module 61 obtains the RTSP port of the sender, and performing grouping. network.
- the sender establishes an RTSP server, and the RTSP port is the port of the RTSP server.
- FIG. 8 shows a schematic structural diagram of a connection establishment apparatus provided by an exemplary embodiment of the present application.
- the connection establishment device is used to establish a wireless connection between electronic devices supporting Miracast, wherein the electronic device includes a sending end and a receiving end, the sending end and the receiving end are located in the same local area network, and the connection establishing device is integrated in the sending end.
- connection establishment apparatus can be implemented by software, hardware or a combination of the two to become all or a part of an electronic device such as an intelligent interactive tablet.
- the connection establishment device 80 includes a discovery module 81 , a display module 82 , a service connection establishment module 83 , a reception module 84 , an RTSP connection establishment module 85 , a capability negotiation module 86 and a data transmission module 87 . in:
- the discovery module 81 is used to discover the receiving end based on WiFi P2P service discovery
- the display module 82 is used to display the identification information of the receiving end
- the service connection establishment module 83 is used to establish a service connection with the receiving end in response to the user's selection operation on the receiving end, and carry out networking, wherein, in the service connection process, the transmitting end establishes an RTSP server, and the port of the RTSP server is an RTSP port;
- the receiving module 84 is used to receive the UDP packet from the receiving end, and the successful reception of the UDP packet enables the receiving end to obtain the IP address of the local area network corresponding to the transmitting end;
- the RTSP connection establishment module 85 is used for performing RTSP connection with the receiving end based on the RTSP port and the IP address;
- the capability negotiation module 86 is used for performing RTSP capability negotiation with the receiver in the local area network
- the data transmission module 87 is used to perform RTP data transmission with the receiving end in the local area network.
- connection establishment apparatus when the connection establishment apparatus provided in the above embodiments executes the connection establishment method, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions may be allocated to different functional modules as required. , that is, dividing the internal structure of the device into different functional modules to complete all or part of the functions described above.
- connection establishment apparatus and the connection establishment method embodiments provided by the above embodiments belong to the same concept, and the embodiment and implementation process thereof are detailed in the method embodiments, which will not be repeated here.
- the electronic device 90 may include: at least one processor 91 , at least one network interface 94 , user interface 93 , memory 95 , and at least one communication bus 92 .
- the communication bus 92 is used to realize the connection and communication between these components.
- the user interface 93 may include a display screen (Display) and a camera (Camera), and the optional user interface 93 may also include a standard wired interface and a wireless interface.
- Display display screen
- Camera Camera
- the optional user interface 93 may also include a standard wired interface and a wireless interface.
- the network interface 94 may optionally include a standard wired interface and a wireless interface (eg, a WiFi interface).
- the processor 91 may include one or more processing cores.
- the processor 91 uses various interfaces and lines to connect various parts of the entire electronic device 90, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 95, and calling the data stored in the memory 95.
- Various functions of the electronic device 90 and processing data may adopt at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
- DSP Digital Signal Processing
- FPGA Field-Programmable Gate Array
- PLA programmable logic array
- the processor 91 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a modem, and the like.
- CPU Central Processing Unit
- GPU Graphics Processing Unit
- the CPU mainly handles the operating system, user interface, and application programs
- the GPU is used to render and draw the content that needs to be displayed on the display screen
- the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 91, but is implemented by a single chip.
- the memory 95 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory).
- the memory 95 includes a non-transitory computer-readable storage medium.
- Memory 95 may be used to store instructions, programs, codes, sets of codes or sets of instructions.
- the memory 95 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like used to implement the above method embodiments; the storage data area may store the data and the like involved in the above method embodiments.
- the memory 95 can optionally also be at least one storage device located remote from the aforementioned processor 91 .
- the memory 95 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operation application program of the electronic device 90 .
- the operating system of the electronic device 90 is an Android system.
- the user interface 93 is mainly used to provide an input interface for the user to obtain the data input by the user; and the processor 91 can be used to call the operation application program of the electronic device 90 stored in the memory 95 , and specifically do the following:
- RTSP connection is made with the sender
- the processor 91 when acquiring the IP address of the local area network corresponding to the sending end, may be specifically used for: sending UDP packets to local area network devices in the local area network;
- the local area network device of the packet includes the sender.
- the processor 91 when performing an RTSP connection with the sender according to the RTSP port and the IP address, the processor 91 may be specifically configured to: perform an RTSP connection with the sender according to the RTSP port and the IP address of the local area network device that successfully received the UDP packet.
- the processor 91 when the processor 91 sends the UDP packet to the local area network device in the local area network, it may be specifically used to: obtain the IP address of the routing device in the local area network; based on the IP address of the routing device, send the UDP packet to the local area network device in the local area network Bag.
- the processor 91 when acquiring the RTSP port of the transmitting end, may be specifically configured to: acquire device information in the network; and acquire the RTSP port of the transmitting end according to the device information in the network.
- the processor 91 may also be configured to: before acquiring the RTSP port of the sender, based on WiFi P2P service discovery, the receiver establishes a service connection with the sender, performs networking, and the sender establishes RTSP during the service connection process Server, RTSP port is the port of RTSP server.
- the processor 91 can be used to call the operation application program of the electronic device 90 stored in the memory 95, and specifically perform the following operations:
- a service connection is established with the receiving end, and networking is performed, wherein, in the service connection process, the transmitting end establishes an RTSP server, and the port of the RTSP server is an RTSP port;
- RTSP connection is made with the receiving end
- the electronic device 90 performs the steps performed by the transmitting end and/or the receiving end in the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
- Embodiments of the present application further provide a computer storage medium, where the computer storage medium can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the method steps of the foregoing method embodiments.
- the specific execution process please refer to Method Implementation The specific description of the example will not be repeated here.
- the device where the storage medium is located may be an electronic device such as a mobile phone, a PDA, a smart TV, and a smart interactive tablet.
- the sending end is a small-screen device such as a mobile phone, tablet or PDA
- the receiving end is a large-screen device such as a smart TV or a smart interactive tablet.
- Embodiments of the present application further provide a program product including a computer program, where the computer program is adapted to be loaded by a processor and execute the method steps of the foregoing method embodiments.
- the computer program is adapted to be loaded by a processor and execute the method steps of the foregoing method embodiments.
- For the specific execution process please refer to the specific description of the method embodiments, which is not described here. Repeat.
- the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
- computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
- the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
- RAM random access memory
- ROM read only memory
- flash RAM flash memory
- Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology.
- Information may be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
- computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请公开了一种连接建立方法、存储介质及相关设备,属于通信技术领域,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中。此方法包括:接收端获取发送端的RTSP端口及发送端对应局域网的IP地址,并根据RTSP端口与IP地址,与发送端进行RTSP连接;之后,接收端与发送端在局域网内进行RTSP的能力协商及RTP数据传输。本申请基于局域网建立发送端与接收端之间的无线连接,可以在局域网内进行RTP数据传输,从而无需再考虑网卡驱动对WiFi P2P兼容性等问题,使得Miracast无线传屏变得更稳定、更流畅,进而提升用户体验感。
Description
说明书本申请要求于2021年03月30日提交中国专利局、申请号为202110338248.9、发明名称为“连接建立方法、存储介质及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术,尤其涉及一种连接建立方法、存储介质及相关设备。
Miracast是以WiFi直连(WiFi Direct或WiFi P2P)为基础的无线显示标准。支持此无线显示标准的电子设备可通过无线方式分享媒体流,例如,手机可通过Miracast将视频或照片直接在电视或其他设备播放而无需任何连接线。这样,当使用者希望在电子设备间无线分享媒体流时,不再需要寻找各种规格的线材与转换器,也无须确认用于连接电子设备的正确接头。
目前,Miracast基于WiFi P2P,使得发送端和接收端建立无线连接,进而进行通信。发明人在使用过程中发现:WiFi P2P组网的网络,存在网络不稳定、丢包或抖动等问题。
发明内容
本申请提供了一种连接建立方法、存储介质及相关设备,以避免网络不稳定、丢包或抖动的问题。所述技术方案如下:
第一方面,本申请实施例提供一种连接建立方法,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中。该连接建立方法包括:
接收端获取发送端的实时流传输协议(Real Time Streaming Protocol,RTSP)端口;
接收端获取发送端对应局域网的网际互连协议(Internet Protocol,IP)地址;
接收端根据RTSP端口与IP地址,与发送端进行RTSP连接;
接收端与发送端在局域网内进行RTSP的能力协商;
接收端与发送端在局域网内进行实时传输协议(Real-time Transport Protocol,RTP)数据传输。
可选地,上述接收端获取发送端对应局域网的IP地址,可以包括:接收端向局域网内的局域网设备发送用户数据包协议(User Datagram Protocol,UDP)包;接收端获取接收成功UDP包的局域网设备的IP地址,接收成功UDP包的局域网设备包括发送端。相应地,上述接收端根据RTSP端口与IP地址,与发送端进行RTSP连接,可以包括:接收端根据RTSP端口与接收成功UDP包的局域网设备的IP地址,与发送端进行RTSP连接。
可选地,上述接收端向局域网内的局域网设备发送UDP包,可以包括:接收端获取局域网内路由设备的IP地址;接收端基于路由设备的IP地址,向局域网内的局域网设备发送UDP包。
可选地,上述接收端获取发送端的RTSP端口,可以包括:接收端获取组网内设备信息;接收端根据组网内设备信息,获取发送端的RTSP端口。
可选地,上述接收端获取发送端的RTSP端口之前,还可以包括:基于WiFi P2P服务发现,接收端与发送端建立服务连接,进行组网,在服务连接过程中发送端建立RTSP服务器,RTSP端口为RTSP服务器的端口。
第二方面,本申请实施例提供一种连接建立方法,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中。此连接建立方法包括:
基于WiFi P2P服务发现,发送端发现接收端;
发送端显示接收端的标识信息;
发送端响应于用户对接收端的选中操作,与接收端建立服务连接,进行组网,其中,在服务连接过程中发送端建立RTSP服务器,RTSP服务器的端口为RTSP端口;
发送端接收来自接收端的UDP包,UDP包的接收成功使得接收端获取到发送端对应局域网的IP地址;
基于RTSP端口与IP地址,发送端与接收端进行RTSP连接;
发送端与接收端在局域网内进行RTSP的能力协商;
发送端与接收端在局域网内进行RTP数据传输。
第三方面,本申请实施例提供一种连接建立装置,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中,该连接建立装置集成在接收端中。连接建立装置包括:
第一获取模块,用于获取发送端的RTSP端口;
第二获取模块,用于获取发送端对应局域网的IP地址;
RTSP连接建立模块,用于根据RTSP端口与IP地址,与发送端进行RTSP连接;
能力协商模块,用于与发送端在局域网内进行RTSP的能力协商;
数据传输模块,用于与发送端在局域网内进行RTP数据传输。
可选地,第二获取模块可以包括:发送单元,用于向局域网内的局域网设备发送UDP包;获取单元,用于获取接收成功UDP包的局域网设备的IP地址,接收成功UDP包的局域网设备包括发送端。相应地,RTSP连接建立模块可以具体用于:根据RTSP端口与接收成功UDP包的局域网设备的IP地址,与发送端进行RTSP连接。
可选地,发送单元具体用于:获取局域网内路由设备的IP地址;基于路由设备的IP地址,向局域网内的局域网设备发送UDP包。
可选地,第一获取模块具体用于:获取组网内设备信息;根据组网内设备信息,获取发送端的RTSP端口。
可选地,连接建立装置还可以包括:服务连接建立模块,用于在第一获取模块获取发送端的RTSP端口之前,基于WiFi P2P服务发现与发送端建立服务连接,进行组网。在服务连接过程中发送端建立RTSP服务器,RTSP端口为RTSP服务器的端口。
第四方面,本申请实施例提供一种连接建立装置,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中,该连接建立装置集成在发送端中。连接建立装置包括:
发现模块,用于基于WiFi P2P服务发现,发现接收端;
显示模块,用于显示接收端的标识信息;
服务连接建立模块,用于响应于用户对接收端的选中操作,与接收端建立服务连接,进行组网,其中,在服务连接过程中发送端建立RTSP服务器,RTSP服务器的端口为RTSP端口;
接收模块,用于接收来自接收端的UDP包,UDP包的接收成功使得接收端获取到发送端对应局域网的IP地址;
RTSP连接建立模块,用于基于RTSP端口与IP地址,与接收端进行RTSP连接;
能力协商模块,用于与接收端在局域网内进行RTSP的能力协商;
数据传输模块,用于与接收端在局域网内进行RTP数据传输。
第五方面,本申请实施例提供一种计算机存储介质,计算机存储介质存储有多条指令,指令适于由处理器加载并执行如第一方面或第二方面中任一项所述的连接建立方法。
第六方面,本申请实施例提供一种电子设备,包括:处理器和存储器;其中,存储器存储有计算机程序,计算机程序适于由处理器加载并执行如第一方面或第二方面中任一项所述的连接建立方法。
第七方面,本申请实施例提供一种程序产品,包括计算机程序,其特征在于,所述计算机程序适于由处理器加载并执行如第一方面或第二方面中任一项所述的连接建立方法。
本申请提供一种连接建立方法、存储介质及相关设备,用于建立支持Miracast的电子设备之间的无线连接,其中,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中。此连接建立方法包括:接收端获取发送端的RTSP端口及发送端对应局域网的IP地址,并根据RTSP端口与IP地址,与发送端进行RTSP连接;之后,接收端与发送端在局域网内进行RTSP的能力协商及RTP数据传输。由于接收端是根据发送端的RTSP端口与发送端对应局域网的IP地址,与发送端进行RTSP连接,且接收端与发送端在局域网内进行RTSP的能力协商及RTP数据传输,因此可保障RTP数据的传输,避免因WiFi P2P组网的网络不稳定所导致的丢包或抖动等问题。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例提供的应用场景示意图;
图2是WiFi P2P组网的流程示意图;
图3是本申请一实施例提供的连接建立方法的流程图;
图4是本申请另一实施例提供的连接建立方法的流程图;
图5是本申请又一实施例提供的连接建立方法的流程图;
图6是本申请一实施例提供的连接建立装置的结构示意图;
图7是本申请另一实施例提供的连接建立装置的结构示意图;
图8是本申请又一实施例提供的连接建立装置的结构示意图;
图9是本申请实施例提供的一种电子设备的结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例方式做进一步地详细描述。
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请的描述中,需要理解的是,术语“第一”、“第二”、“第三”等仅用于区别类似的对象,而不必用于描述特定的顺序或先后次序,也不能理解为指示或暗示相对重要性。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
在Miracast规格中,将电子设备分为两类,一类称为发送端或者传送端(Source),另一类称为接收端(Sink)。如图1所示,接收端可以分为主接收端(Primary Sink)12及次接收端(Secondary Sink)13,差别在于主接收端12能支持影像或声音的数据输出;而次接收端13只支持声音的数据输出,这样的区别是由于Miracast提出配对接收端(Coupled Sink)的操作架构,使用者可选择将发送端12的影音分流至不同的接收端(可以包括主接收端12和/或次接收端13)并同时呈现影音信息。
需要说明的是,图1仅是本申请实施例提供的一种应用场景的示意图,本申请实施例不对图1中包括的设备及设备个数进行限定,也不对图1中设备之 间的位置关系进行限定。例如,在图1所示的应用场景中,发送端11还可以为便携电脑、个人数字助理(Personal Digital Assistant,PDA)等设备;主接收端12还可以是智能交互平板、智能电视等具有音视频播放功能的设备。又例如,在图1所示的应用场景中,可以仅包含发送端11和主接收端12,即仅包含一种接收端。
其中,智能交互平板(interactive white board)的硬件部分由触控显示模组、智能处理系统(包括控制器)等部分所构成,由整体结构件结合到一起,同时也由专用的软件系统作为支撑,其中触控显示模组包括显示屏、触控组件和背光灯组件,背光灯组件用于为显示屏提供背光光源,显示屏一般采用液晶显示装置,用于进行画面展示,触控组件设置在显示屏上或者设置在显示屏前端,用于采集用户的触控操作数据,并将采集的触控操作数据发送到智能处理系统进行处理。
在实际使用中,智能交互平板的显示屏上显示画面数据,当用户通过手指或者触控笔等触控物体点击显示屏上显示的内容,例如点击显示屏上显示的图形按钮时,智能交互平板的触控组件将采集到触控数据,从而触控组件将该触控数据转换为触控点的坐标数据后发送到智能处理系统,或者发送到智能处理系统处由智能处理系统转换为触控点的坐标数据,智能处理系统获得触控点的坐标数据后,根据预先设定的程序实现相应的控制操作,驱动显示屏显示内容发生变化,实现多样化的显示、操作效果。
从技术原理来区别触摸组件,可以分为五个基本种类;矢量压力传感技术触摸组件、电阻技术触摸组件、电容技术触摸组件、电磁技术触摸屏、红外线技术触摸组件、表面声波技术触摸组件。按照触摸组件的工作原理和传输信息的介质,可以把触摸组件分为四个种类:电阻式、电容感应式、电磁感应式、红外线式以及表面声波式。
当用户用手指或笔触摸显示屏时,触摸组件可以采集触控点的数据并发送到智能处理系统,然后随着智能处理系统内置的软件来实现不同的功能应用,从而实现对智能处理系统的触控控制。
在本申请中所提到的“屏幕”、“大屏”均指智能交互平板、智能电视等电子设备的显示屏;智能交互平板显示某个界面/窗口是指智能交互平板的显示屏显示该界面/窗口。
WiFi P2P组网的流程,如图2所示。首先,发送端基于WiFi P2P服务发现 寻找接收端,然后将寻找的信息传达给使用者,使用者可以从寻找到或是先前联机过的装置中,选择想要连接的装置(即接收端);之后,发送端和接收端基于WiFi P2P服务连接,进行组网;然后,发送端和接收端会进行RSTP能力协商,以选择适合的影音传输格式;在协商好RSTP能力后,发送端和接收端基于RTP传输音视频数据。
目前,Miracast广泛用于无线显示方面,WiFi P2P组网使得发送端和接收端建立无线显示传输。然而,由于芯片厂商对WiFi P2P并不是很重视和网卡驱动兼容性较差,WiFi P2P组网的网络进行数据交互和通信时,有不稳定、丢包或抖动等问题,导致了Miracast无线传屏体验感差。
基于上述问题,本申请提供一种连接建立方法、存储介质及相关设备,基于局域网建立发送端与接收端之间的无线连接,从而无需再考虑网卡驱动对WiFi P2P兼容性等问题,使得数据在局域网内稳定传输,使得Miracast无线传屏变得更稳定、更流畅,进而提升用户体验感。
需要注意的是,由于篇幅所限,本申请说明书没有穷举所有可选的实施方式,本领域技术人员在阅读本申请说明书后,应该能够想到,只要技术特征不互相矛盾,那么技术特征的任意组合均可以构成可选的实施方式。
例如,在实施例1的一个实施方式中,记载了一个技术特征a,在实施例1的另一个实施方式中,记载了另一个技术特征b。由于以上两个技术特征不互相矛盾,本领域技术人员在阅读本申请说明书后,应该能够想到,同时具有这两个特征的实施方式也是一种可选的实施方式,即a且b。
记载在不同实施例中的不互相矛盾的技术特征也可以任意组合,构成可选的实施方式。
例如,实施例1中记载了技术特征c。为了控制本申请说明书的篇幅,在实施例2、实施例3和实施例4中,并没有记载这个技术特征。但是本领域技术人员在阅读本申请说明书后,应该能够想到,实施例2、实施例3和实施例4所提供的连接建立方法也可以包括该技术特征。
下面对实施例1、实施例2、实施例3和实施例4进行详细说明。需明确的是,本申请实施例序号仅仅为了描述,不代表实施例的优劣。
实施例1
本申请实施例公开了一种连接建立方法,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一 局域网中。在本申请实施例中,连接建立方法应用于接收端。下面将结合图3,对接收端执行的连接建立方法进行详细介绍。
请参见图3,该连接建立方法包括以下步骤:
S301、接收端获取发送端的RTSP端口。
在实际应用中,支持Miracast的电子设备通过WiFi P2P服务发现(discover)发现对等设备。接收端等待用户在发送端选中接收端触发连接建立过程。在连接过程中,发送端建立RTSP服务器并提供RTSP端口给接收端,使得接收端获取到发送端的RTSP端口。
一种示例的实施方式中,使用者在发送端输入无线投屏操作,在WiFi P2P服务发现(discover)发现的对等设备列表中选中接收端触发连接建立过程。
S302、接收端获取发送端对应局域网的IP地址。
由于接收端与发送端位于同一局域网中,接收端和发送端均可以获取到对端对应该局域网的IP地址。
需说明的是,本申请实施例不限制接收端执行S301和S302两个步骤的顺序。一种实现中,接收端可以先执行S301再执行S302;再一种实现中,接收端可以先执行S302再执行S301;又一种实现中,接收端可以同时执行S301和S302这两个步骤。
S303、接收端根据RTSP端口与IP地址,与发送端进行RTSP连接。
具体地,接收端通过上述获取的IP地址和RTSP端口进行RTSP的套接字(socket)建立连接。因为只有正确的发送端才会建立成功和返回正常的通信,因此,后续可以在局域网内进行RTSP的能力协商。
在WiFi P2P组网的网络中,接收端是根据发送端的RTSP端口与发送端对应WiFi P2P组网的网络的IP地址,与发送端的进行RTSP连接(接收端与发送端的RTSP服务器连接)。而在本申请实施例中,接收端根据发送端的RTSP端口与发送端对应局域网的IP地址,与发送端进行RTSP连接。
S304、接收端与发送端在局域网内进行RTSP的能力协商。
该步骤中,接收端与发送端在局域网内进行RTSP的能力协商,相比接收端与发送端在WiFi P2P组网的网络内进行RTSP的能力协商,可以不受网卡驱动是否兼容WiFi P2P的能力的限制。
S305、接收端与发送端在局域网内进行RTP数据传输。
在局域网内进行RTP数据传输,避开了WiFi P2P组网导致的不稳定等因素, 使得数据可以在局域网这种相对靠谱的环境下进行稳定传输。
同时参考图2和图4,本申请实施例相对图2所示流程的区别在于虚线框内部分:接收端基于发送端对应局域网的IP地址,与发送端进行RTSP连接,并在局域网内与发送端进行RTSP的能力协商及RTP数据传输。
在本申请实施例中,连接建立方法用于建立支持Miracast的电子设备之间的无线连接,其中,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中。此连接建立方法包括:接收端获取发送端的RTSP端口及发送端对应局域网的IP地址,并根据RTSP端口与IP地址,与发送端进行RTSP连接;之后,接收端与发送端在局域网内进行RTSP的能力协商及RTP数据传输。由于接收端是根据发送端的RTSP端口与发送端对应局域网的IP地址,与发送端进行RTSP连接,且接收端与发送端在局域网内进行RTSP的能力协商及RTP数据传输,因此可保障RTP数据的传输,避免因WiFi P2P组网的网络不稳定所导致的丢包或抖动等问题。
实施例2
在上述实施例的基础上,本申请实施例中,S302、接收端获取发送端对应局域网的IP地址,可以包括:接收端向局域网内的局域网设备发送UDP包;接收端获取接收成功UDP包的局域网设备的IP地址,接收成功UDP包的局域网设备包括发送端。相应地,S303、接收端根据RTSP端口与IP地址,与发送端进行RTSP连接,可以包括:接收端根据RTSP端口与接收成功UDP包的局域网设备的IP地址,与发送端进行RTSP连接。
其中,UDP是非面向连接的不可靠的协议。由于无连接及无重传确认,所以,UDP的传输效率高、延时小,适合实时性要求高的应用,如游戏服务器、音频和视频等;另外,由于不需要双方持续在线,所以不用维持大的并发量,节省了系统资源;再者就是,UDP可以更高效的利用网络带宽。因此,接收端通过发送UDP包获取发送端对应局域网的IP地址。
进一步地,上述接收端向局域网内的局域网设备发送UDP包,可以包括:接收端获取局域网内路由设备的IP地址;接收端基于路由设备的IP地址,向局域网内的局域网设备发送UDP包。也就是说,接收端首先获取局域网的IP地址,向该IP地址的所有设备发送一个UDP包,若局域网内有设备,此路由变回记录下该局域网设备的MAC地址和IP地址,通过路由表可以查询得到局域网设备的信息。示例地,接收端获取的路由设备的IP地址为192.168.0.101, 则接收端向局域网内IP地址为192.168.0.1至192.168.0.254范围内的253台设备发送UDP包。
实施例3
本申请实施例中,S301、接收端获取发送端的RTSP端口,可以包括:接收端获取组网内设备信息;接收端根据组网内设备信息,获取发送端的RTSP端口。示例地,这里的组网是指WiFi P2P组网。
可选地,在接收端获取发送端的RTSP端口之前,连接建立方法还可以包括:基于WiFi P2P服务发现,接收端与发送端建立服务连接,进行组网。在服务连接过程中发送端建立RTSP服务器,RTSP端口为RTSP服务器的端口。
实施例4
本申请实施例公开了一种连接建立方法,用于建立支持Miracast的电子设备之间的无线连接,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中。在本申请实施例中,连接建立方法应用于发送端。下面将结合图5,对发送端执行的连接建立方法进行详细介绍。
请参见图5,该连接建立方法包括以下步骤:
S501、基于WiFi P2P服务发现,发送端发现接收端。
实际应用中,在发送端开启WiFi P2P服务发现功能后,发送端即可基于WiFi P2P服务发现发现对端设备。另外,由于接收端要与发送端进行Miracast无线传屏,因此,接收端也已开启WiFi P2P服务发现功能,这样,发送端发现的对等设备中包含有该接收端。
S502、发送端显示接收端的标识信息。
具体地,发送端通过其屏幕显示通过S501搜寻到的对等设备的标识信息,其中包含接收端的标识信息。用户即可作用于屏幕,选中该接收端。
S503、发送端响应于用户对接收端的选中操作,与接收端建立服务连接,进行组网,其中,在服务连接过程中发送端建立RTSP服务器,RTSP服务器的端口为RTSP端口。
S504、发送端接收来自接收端的UDP包。
其中,UDP包的接收成功使得接收端获取到发送端对应局域网的IP地址。由于发送端与接收端处于同一局域网,因此,接收端通过路由表可以查询得到发送端的信息,包括但不限于发送端的标识信息、发送端对应局域网的IP地址、MAC地址,等等。
S505、基于RTSP端口与IP地址,发送端与接收端进行RTSP连接。
S506、发送端与接收端在局域网内进行RTSP的能力协商。
S507、发送端与接收端在局域网内进行RTP数据传输。
该实施例是连接建立过程中,发送端执行的步骤,与上述接收端执行的步骤对应,因此,此处不再赘述。
在本申请实施例中,由于发送端是根据发送端的RTSP端口与发送端对应局域网的IP地址,与接收端进行RTSP连接,且发送端与接收端在局域网内进行RTSP的能力协商及RTP数据传输,因此可保障RTP数据的传输,避免因WiFi P2P组网的网络不稳定所导致的丢包或抖动等问题。
需要注意的是,由于篇幅所限,本申请中并没有穷举所有的实施方式,只要是不互相矛盾的特征,均可以自由随意组合,成为本申请可选的实施方式。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
实施例5
请参见图6,其示出了本申请一个示例性实施例提供的连接建立装置的结构示意图。该连接建立装置用于建立支持Miracast的电子设备之间的无线连接,其中,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中,该连接建立装置集成在接收端中。
该连接建立装置可以通过软件、硬件或者两者的结合实现成为智能交互平板等电子设备的全部或一部分。该连接建立装置60包括第一获取模块61、第二获取模块62、RTSP连接建立模块63、能力协商模块64和数据传输模块65。其中:
第一获取模块61,用于获取发送端的RTSP端口;
第二获取模块62,用于获取发送端对应局域网的IP地址;
RTSP连接建立模块63,用于根据RTSP端口与IP地址,与发送端进行RTSP连接;
能力协商模块64,用于与发送端在局域网内进行RTSP的能力协商;
数据传输模块65,用于与发送端在局域网内进行RTP数据传输。
可选地,上述各模块之间相互连接。
实施例6
一些实施例中,如图7所示,第二获取模块62可以包括:发送单元621, 用于向局域网内的局域网设备发送UDP包;获取单元622,用于获取接收成功UDP包的局域网设备的IP地址,接收成功UDP包的局域网设备包括发送端。相应地,RTSP连接建立模块63可以具体用于:根据RTSP端口与接收成功UDP包的局域网设备的IP地址,与发送端进行RTSP连接。
可选地,发送单元621具体用于:获取局域网内路由设备的IP地址;基于路由设备的IP地址,向局域网内的局域网设备发送UDP包。
一些实施例中,第一获取模块61可以具体用于:获取组网内设备信息;根据组网内设备信息,获取发送端的RTSP端口。
进一步地,参考图7,连接建立装置70还可以包括:服务连接建立模块66,用于在第一获取模块61获取发送端的RTSP端口之前,基于WiFi P2P服务发现与发送端建立服务连接,进行组网。在服务连接过程中发送端建立RTSP服务器,RTSP端口为RTSP服务器的端口。
实施例7
请参见图8,其示出了本申请一个示例性实施例提供的连接建立装置的结构示意图。该连接建立装置用于建立支持Miracast的电子设备之间的无线连接,其中,电子设备包括发送端和接收端,发送端和接收端位于同一局域网中,该连接建立装置集成在发送端中。
该连接建立装置可以通过软件、硬件或者两者的结合实现成为智能交互平板等电子设备的全部或一部分。该连接建立装置80包括发现模块81、显示模块82、服务连接建立模块83、接收模块84、RTSP连接建立模块85、能力协商模块86和数据传输模块87。其中:
发现模块81,用于基于WiFi P2P服务发现,发现接收端;
显示模块82,用于显示接收端的标识信息;
服务连接建立模块83,用于响应于用户对接收端的选中操作,与接收端建立服务连接,进行组网,其中,在服务连接过程中发送端建立RTSP服务器,RTSP服务器的端口为RTSP端口;
接收模块84,用于接收来自接收端的UDP包,UDP包的接收成功使得接收端获取到发送端对应局域网的IP地址;
RTSP连接建立模块85,用于基于RTSP端口与IP地址,与接收端进行RTSP连接;
能力协商模块86,用于与接收端在局域网内进行RTSP的能力协商;
数据传输模块87,用于与接收端在局域网内进行RTP数据传输。
需要说明的是,上述实施例提供的连接建立装置在执行连接建立方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的连接建立装置与连接建立方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。
实施例8
请参见图9,为本申请实施例提供了一种电子设备的结构示意图。如图9所示,电子设备90可以包括:至少一个处理器91,至少一个网络接口94,用户接口93,存储器95,至少一个通信总线92。
其中,通信总线92用于实现这些组件之间的连接通信。
其中,用户接口93可以包括显示屏(Display)、摄像头(Camera),可选用户接口93还可以包括标准的有线接口、无线接口。
其中,网络接口94可选的可以包括标准的有线接口、无线接口(如WiFi接口)。
其中,处理器91可以包括一个或者多个处理核心。处理器91利用各种接口和线路连接整个电子设备90内的各个部分,通过运行或执行存储在存储器95内的指令、程序、代码集或指令集,以及调用存储在存储器95内的数据,执行电子设备90的各种功能和处理数据。可选的,处理器91可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器91可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器91中,单独通过一块芯片进行实现。
其中,存储器95可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器95包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储 器95可用于存储指令、程序、代码、代码集或指令集。存储器95可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器95可选的还可以是至少一个位于远离前述处理器91的存储装置。如图9所示,作为一种计算机存储介质的存储器95中可以包括操作系统、网络通信模块、用户接口模块以及电子设备90的操作应用程序。可选地,电子设备90的操作系统为安卓系统。
在图9所示的电子设备90中,用户接口93主要用于为用户提供输入的接口,获取用户输入的数据;而处理器91可以用于调用存储器95中存储的电子设备90的操作应用程序,并具体执行以下操作:
获取发送端的RTSP端口;
获取发送端对应局域网的IP地址;
根据RTSP端口与IP地址,与发送端进行RTSP连接;
与发送端在局域网内进行RTSP的能力协商;
与发送端在局域网内进行RTP数据传输。
在一些实施例中,处理器91在获取发送端对应局域网的IP地址时,可以具体用于:向局域网内的局域网设备发送UDP包;获取接收成功UDP包的局域网设备的IP地址,接收成功UDP包的局域网设备包括发送端。
相应地,处理器91在根据RTSP端口与IP地址,与发送端进行RTSP连接时,可以具体用于:根据RTSP端口与接收成功UDP包的局域网设备的IP地址,与发送端进行RTSP连接。
在一些实施例中,处理器91在向局域网内的局域网设备发送UDP包时,可以具体用于:获取局域网内路由设备的IP地址;基于路由设备的IP地址,向局域网内的局域网设备发送UDP包。
在一些实施例中,处理器91在获取发送端的RTSP端口时,可以具体用于:获取组网内设备信息;根据组网内设备信息,获取发送端的RTSP端口。
在一些实施例中,处理器91还可以用于:在获取发送端的RTSP端口之前,基于WiFi P2P服务发现,接收端与发送端建立服务连接,进行组网,在服务连接过程中发送端建立RTSP服务器,RTSP端口为RTSP服务器的端口。
或者,处理器91可以用于调用存储器95中存储的电子设备90的操作应用 程序,并具体执行以下操作:
基于WiFi P2P服务发现,发现接收端;
显示接收端的标识信息;
响应于用户对接收端的选中操作,与接收端建立服务连接,进行组网,其中,在服务连接过程中发送端建立RTSP服务器,RTSP服务器的端口为RTSP端口;
接收来自接收端的UDP包,UDP包的接收成功使得接收端获取到发送端对应局域网的IP地址;
基于RTSP端口与IP地址,与接收端进行RTSP连接;
与接收端在局域网内进行RTSP的能力协商;
与接收端在局域网内进行RTP数据传输。
本申请实施例中,电子设备90执行上述方法实施例中发送端和/或接收端执行的步骤,其实现原理和技术效果类似,在此不再赘述。
实施例9
本申请实施例还提供了一种计算机存储介质,计算机存储介质可以存储有多条指令,所述指令适于由处理器加载并执行如上述方法实施例的方法步骤,具体执行过程可以参见方法实施例的具体说明,在此不进行赘述。
存储介质所在设备可以是手机、PDA、智能电视、智能交互平板等电子设备。例如,发送端为手机、平板或PDA等小屏设备,接收端为智能电视或智能交互平板等大屏设备。
实施例10
本申请实施例还提供一种包括计算机程序的程序产品,该计算机程序适于由处理器加载并执行如上述方法实施例的方法步骤,具体执行过程可以参见方法实施例的具体说明,在此不进行赘述。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和 /或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过 程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。
Claims (11)
- 一种连接建立方法,其特征在于,用于建立支持Miracast的电子设备之间的无线连接,所述电子设备包括发送端和接收端,所述发送端和所述接收端位于同一局域网中,所述连接建立方法包括:所述接收端获取所述发送端的实时流传输协议RTSP端口;所述接收端获取所述发送端对应所述局域网的网际互连协议IP地址;所述接收端根据所述RTSP端口与所述IP地址,与所述发送端进行RTSP连接;所述接收端与所述发送端在局域网内进行RTSP的能力协商;所述接收端与所述发送端在局域网内进行实时传输协议RTP数据传输。
- 根据权利要求1所述的连接建立方法,其特征在于,所述接收端获取所述发送端对应所述局域网的IP地址,包括:所述接收端向所述局域网内的局域网设备发送用户数据包协议UDP包;所述接收端获取接收成功所述UDP包的局域网设备的IP地址,所述接收成功所述UDP包的局域网设备包括所述发送端;相应地,所述接收端根据所述RTSP端口与所述IP地址,与所述发送端进行RTSP连接,包括:所述接收端根据所述RTSP端口与所述接收成功所述UDP包的局域网设备的IP地址,与所述发送端进行RTSP连接。
- 根据权利要求2所述的连接建立方法,其特征在于,所述接收端向所述局域网内的局域网设备发送UDP包,包括:所述接收端获取所述局域网内路由设备的IP地址;所述接收端基于所述路由设备的IP地址,向所述局域网内的局域网设备发送UDP包。
- 根据权利要求1至3中任一项所述的连接建立方法,其特征在于,所述接收端获取所述发送端的RTSP端口,包括:所述接收端获取组网内设备信息;所述接收端根据所述组网内设备信息,获取所述发送端的RTSP端口。
- 根据权利要求1至3中任一项所述的连接建立方法,其特征在于,所述接收端获取所述发送端的RTSP端口之前,还包括:基于WiFi P2P服务发现,所述接收端与所述发送端建立服务连接,进行组网,在服务连接过程中所述发送端建立RTSP服务器,所述RTSP端口为所述 RTSP服务器的端口。
- 一种连接建立方法,其特征在于,用于建立支持Miracast的电子设备之间的无线连接,所述电子设备包括发送端和接收端,所述发送端和所述接收端位于同一局域网中,所述连接建立方法包括:基于WiFi P2P服务发现,所述发送端发现所述接收端;所述发送端显示所述接收端的标识信息;所述发送端响应于用户对所述接收端的选中操作,与所述接收端建立服务连接,进行组网,其中,在服务连接过程中所述发送端建立实时流传输协议RTSP服务器,所述RTSP服务器的端口为RTSP端口;所述发送端接收来自所述接收端的用户数据包协议UDP包,所述UDP包的接收成功使得所述接收端获取到所述发送端对应所述局域网的网际互连协议IP地址;基于所述RTSP端口与所述IP地址,所述发送端与所述接收端进行RTSP连接;所述发送端与所述接收端在局域网内进行RTSP的能力协商;所述发送端与所述接收端在局域网内进行实时传输协议RTP数据传输。
- 一种连接建立装置,其特征在于,用于建立支持Miracast的电子设备之间的无线连接,所述电子设备包括发送端和接收端,所述发送端和所述接收端位于同一局域网中,所述连接建立装置集成在所述接收端中,所述连接建立装置包括:第一获取模块,用于获取所述发送端的实时流传输协议RTSP端口;第二获取模块,用于获取所述发送端对应所述局域网的网际互连协议IP地址;RTSP连接建立模块,用于根据所述RTSP端口与所述IP地址,与所述发送端进行RTSP连接;能力协商模块,用于与所述发送端在局域网内进行RTSP的能力协商;数据传输模块,用于与所述发送端在局域网内进行实时传输协议RTP数据传输。
- 一种连接建立装置,其特征在于,用于建立支持Miracast的电子设备之间的无线连接,所述电子设备包括发送端和接收端,所述发送端和所述接收端位于同一局域网中,所述连接建立装置集成在所述发送端中,所述连接建立装 置包括:发现模块,用于基于WiFi P2P服务发现,发现所述接收端;显示模块,用于显示所述接收端的标识信息;服务连接建立模块,用于响应于用户对所述接收端的选中操作,与所述接收端建立服务连接,进行组网,其中,在服务连接过程中所述发送端建立实时流传输协议RTSP服务器,所述RTSP服务器的端口为RTSP端口;接收模块,用于接收来自所述接收端的用户数据包协议UDP包,所述UDP包的接收成功使得所述接收端获取到所述发送端对应所述局域网的网际互连协议IP地址;RTSP连接建立模块,用于基于所述RTSP端口与所述IP地址,所述发送端与所述接收端进行RTSP连接;能力协商模块,用于与所述接收端在局域网内进行RTSP的能力协商;数据传输模块,用于与所述接收端在局域网内进行实时传输协议RTP数据传输。
- 一种计算机存储介质,其特征在于,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1至6中任一项所述的连接建立方法。
- 一种电子设备,其特征在于,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如权利要求1至6中任一项所述的连接建立方法。
- 一种程序产品,包括计算机程序,其特征在于,所述计算机程序适于由处理器加载并执行如权利要求1至6中任一项所述的连接建立方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110338248.9A CN115150804B (zh) | 2021-03-30 | 2021-03-30 | 连接建立方法、存储介质及相关设备 |
CN202110338248.9 | 2021-03-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022206772A1 true WO2022206772A1 (zh) | 2022-10-06 |
Family
ID=83404608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/083747 WO2022206772A1 (zh) | 2021-03-30 | 2022-03-29 | 连接建立方法、存储介质及相关设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115150804B (zh) |
WO (1) | WO2022206772A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150222474A1 (en) * | 2014-02-06 | 2015-08-06 | Broadcom Corporation | Discovery of services over infrastructure networks |
CN105430433A (zh) * | 2015-10-29 | 2016-03-23 | 小米科技有限责任公司 | 信息处理方法及装置 |
CN108029075A (zh) * | 2015-07-02 | 2018-05-11 | 高通股份有限公司 | 服务发现和拓扑管理 |
CN108881802A (zh) * | 2018-07-09 | 2018-11-23 | 深圳市潮流网络技术有限公司 | 一种sip视频会议的演示源输入方法 |
-
2021
- 2021-03-30 CN CN202110338248.9A patent/CN115150804B/zh active Active
-
2022
- 2022-03-29 WO PCT/CN2022/083747 patent/WO2022206772A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150222474A1 (en) * | 2014-02-06 | 2015-08-06 | Broadcom Corporation | Discovery of services over infrastructure networks |
CN108029075A (zh) * | 2015-07-02 | 2018-05-11 | 高通股份有限公司 | 服务发现和拓扑管理 |
CN105430433A (zh) * | 2015-10-29 | 2016-03-23 | 小米科技有限责任公司 | 信息处理方法及装置 |
CN108881802A (zh) * | 2018-07-09 | 2018-11-23 | 深圳市潮流网络技术有限公司 | 一种sip视频会议的演示源输入方法 |
Also Published As
Publication number | Publication date |
---|---|
CN115150804A (zh) | 2022-10-04 |
CN115150804B (zh) | 2024-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10284644B2 (en) | Information processing and content transmission for multi-display | |
WO2017097088A1 (zh) | 多屏投影控制方法、系统、终端设备及计算机存储介质 | |
TWI509544B (zh) | 經由虛擬存取點介面廣告,探索,及使用服務 | |
WO2021027610A1 (zh) | 一种切换通信协议的方法、装置和系统 | |
US11757950B2 (en) | Method and system for sharing an output device between multimedia devices to transmit and receive data | |
WO2019200928A1 (zh) | 智能交互一体机 | |
JP2018506874A (ja) | ワイヤレスディスプレイシステム中の複数のシンクへの同期オーディオまたはビデオストリーミングサービスの発見および管理 | |
KR20150067240A (ko) | 와이파이 네트워크 환경에서 와이파이 다이렉트 연결을 설정하기 위한 방법 및 시스템 | |
WO2022078056A1 (zh) | 音频播放方法、装置、电子设备及存储介质 | |
CN112153457A (zh) | 无线投屏连接方法、装置、计算机存储介质及电子设备 | |
CN110752999B (zh) | 屏幕广播方法、装置、系统、电子设备以及存储介质 | |
JP2017076261A (ja) | 画面共有システム及び画面共有方法 | |
WO2017092323A1 (zh) | 一种主控设备、播放设备,及其数据传输方法 | |
CN112261096B (zh) | 物联网设备的控制方法、装置、物联网设备及存储介质 | |
WO2022206772A1 (zh) | 连接建立方法、存储介质及相关设备 | |
US20190132398A1 (en) | Networked User Interface Back Channel Discovery Via Wired Video Connection | |
CN111954162B (zh) | 多设备间自主联网实现无线传屏的方法、传屏端和接收端 | |
JP2016506098A (ja) | デバイス間ワイヤレス・データ通信のための接続情報 | |
US9282148B2 (en) | Multi-user peer-to-peer collaboration system and method | |
US20240039750A1 (en) | Streaming Secondary Device Content On A Web Conference | |
AU2015375056B2 (en) | Method and system for self-adaptive pairing communication between intelligent devices | |
JP7261075B2 (ja) | 付加価値遠隔表示サービスの無線ルーティングサーボシステムおよびそのサービス方法 | |
WO2016070371A1 (zh) | 移动终端和web终端之间互连及流传输和流媒体播放的方法 | |
TWI538493B (zh) | Multimedia system, cross - platform real - time sharing system and method | |
CN115328419A (zh) | 一种多设备投屏的方法、装置及计算设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22778954 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22778954 Country of ref document: EP Kind code of ref document: A1 |