CN106941732A - Reconnection method, system and WFD equipment - Google Patents

Reconnection method, system and WFD equipment Download PDF

Info

Publication number
CN106941732A
CN106941732A CN201610004338.3A CN201610004338A CN106941732A CN 106941732 A CN106941732 A CN 106941732A CN 201610004338 A CN201610004338 A CN 201610004338A CN 106941732 A CN106941732 A CN 106941732A
Authority
CN
China
Prior art keywords
reconnection
wfd
session identifier
identifier
wfd device
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.)
Granted
Application number
CN201610004338.3A
Other languages
Chinese (zh)
Other versions
CN106941732B (en
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
Original Assignee
China Mobile Communications Group 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 filed Critical China Mobile Communications Group Co Ltd
Priority to CN201610004338.3A priority Critical patent/CN106941732B/en
Publication of CN106941732A publication Critical patent/CN106941732A/en
Application granted granted Critical
Publication of CN106941732B publication Critical patent/CN106941732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Landscapes

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

Abstract

本发明公开了一种重连接方法,包括:需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;所述重连接标识用于指示所述第二WFD设备本次连接为重连接;所述会话标识用于指示所述第二WFD设备获取与所述会话标识对应的能力协商后的参数集;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备为所述第一WFD设备的接收端设备;接收所述第二WFD设备返回的重连接应答;所述重连接应答表征重连接成功。本发明同时还公开了一种第一WFD设备、第二WFD设备及重连接系统。

The invention discloses a reconnection method, comprising: when reconnection is required, a first WFD device sends a reconnection identifier and a corresponding session identifier to a second WFD device; the reconnection identifier is used to indicate the second WFD device This connection is a reconnection; the session identifier is used to instruct the second WFD device to obtain a negotiated parameter set corresponding to the capability of the session identifier; the session identifier is a session identifier that identifies the uniqueness of the connection; the The second WFD device is the receiving end device of the first WFD device; receives the reconnection response returned by the second WFD device; the reconnection response indicates that the reconnection is successful. The invention also discloses a first WFD device, a second WFD device and a reconnection system.

Description

重连接方法、系统及WFD设备Reconnection method, system and WFD device

技术领域technical field

本发明涉及通信技术的重连接领域,尤其涉及一种重连接方法、系统及WFD(Wi-Fi Direct)设备。The present invention relates to the field of reconnection of communication technology, in particular to a reconnection method, system and WFD (Wi-Fi Direct) equipment.

背景技术Background technique

Wi-Fi联盟最新公布的Wi-Fi Direct(WFD)项目,可以让用户笔记本电脑上的无线保真卡绕过访问点,直接连接到无线打印机、数码相机、投影仪、传感器或等离子屏幕等。相应地,能直接实现这些功能的设备称为WFD设备。The Wi-Fi Alliance's newly announced Wi-Fi Direct (WFD) project allows the Wi-Fi card on the user's laptop to bypass the access point and connect directly to a wireless printer, digital camera, projector, sensor or plasma screen. Correspondingly, devices that can directly implement these functions are called WFD devices.

WFD设备之间进行同屏过程或音视频传输过程中,会遇到设备切换或者设备故障断开需要重新连接的情况,此时,两个WFD设备需要从设备发现开始从头进行设备、能力协商等信息交互,即实现连接新发现设备的过程。这样,重新连接需要的时间就会比较长,大大降低了连接速度。During the process of sharing the same screen or audio and video transmission between WFD devices, there will be a situation where the device is switched or disconnected due to a device failure and needs to be reconnected. At this time, the two WFD devices need to perform device and capability negotiation from the beginning from the device discovery. Information exchange, that is, the process of connecting newly discovered devices. In this way, the time required to reconnect will be relatively long, greatly reducing the connection speed.

发明内容Contents of the invention

为解决现有存在的技术问题,本发明实施例提供一种重连接方法、系统及WFD设备。In order to solve existing technical problems, embodiments of the present invention provide a reconnection method, system, and WFD equipment.

为达到上述目的,本发明实施例的技术方案是这样实现的:In order to achieve the above object, the technical solution of the embodiment of the present invention is achieved in this way:

本发明实施例提供了一种重连接方法,应用于第一WFD设备,所述方法包括:An embodiment of the present invention provides a reconnection method, which is applied to a first WFD device, and the method includes:

需要重连接时,向第二WFD设备发送重连接标识及对应的会话标识;所述重连接标识用于指示所述第二WFD设备本次连接为重连接;所述会话标识用于指示所述第二WFD设备获取与所述会话标识对应的能力协商后的参数集;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备为所述第一WFD设备的接收端设备;When reconnection is required, send a reconnection identifier and a corresponding session identifier to the second WFD device; the reconnection identifier is used to indicate that the second WFD device is reconnected this time; the session identifier is used to indicate the The second WFD device obtains a negotiated parameter set corresponding to the capability of the session identifier; the session identifier is a session identifier that identifies the uniqueness of the connection; the second WFD device is the receiving end device of the first WFD device;

接收所述第二WFD设备返回的重连接应答;所述重连接应答表征重连接成功。receiving a reconnection response returned by the second WFD device; the reconnection response indicates that the reconnection is successful.

上述方案中,所述重连接标识及对应的会话标识携带在实时流传输协议(RTSP,Real Time Streaming Protocol)选择(OPTIONS)请求消息中,所述RTSP OPTIONS请求消息用于获取所述第二WFD设备支持的RTSP方法集;In the above solution, the reconnection identifier and the corresponding session identifier are carried in a Real Time Streaming Protocol (RTSP, Real Time Streaming Protocol) option (OPTIONS) request message, and the RTSP OPTIONS request message is used to obtain the second WFD RTSP method set supported by the device;

相应地,所述重连接应答为RTSP OPTIONS应答。Correspondingly, the reconnection response is an RTSP OPTIONS response.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

所述重连接前的点对点(P2P,Peer to Peer)连接建立阶段,向所述第二WFD设备发送所述会话标识。In the stage of establishing a point-to-point (P2P, Peer to Peer) connection before the reconnection, the session identifier is sent to the second WFD device.

上述方案中,向所述第二WFD设备发送的会话标识携带在联接/重联请求帧中。In the above solution, the session identifier sent to the second WFD device is carried in the connection/reconnection request frame.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

所述P2P连接建立之前,生成所述会话标识;Before the P2P connection is established, generate the session identifier;

在本地存储所述会话标识。The session identification is stored locally.

本发明实施例还提供了一种重连接方法,应用于第二WFD设备,所述方法包括:The embodiment of the present invention also provides a reconnection method, which is applied to the second WFD device, and the method includes:

接收第一WFD设备发送的重连接标识及对应的会话标识;所述第二WFD设备为所述第一WFD设备的接收端设备;所述会话标识为标识连接唯一性的会话标识;Receiving the reconnection identifier and the corresponding session identifier sent by the first WFD device; the second WFD device is the receiving end device of the first WFD device; the session identifier is a session identifier that identifies the uniqueness of the connection;

根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;Determining that the connection with the first WFD device is a reconnection according to the reconnection identifier;

根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;According to the session identifier, search locally for the negotiated parameter set corresponding to the capability of the session identifier;

查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功。After the search is successful, a reconnection response is sent to the first WFD device; the reconnection response indicates that the reconnection is successful.

上述方案中,所述重连接标识及对应的会话标识携带在RTSP OPTIONS请求消息中,所述RTSP OPTIONS请求消息用于获取所述第二WFD设备支持的RTSP方法集;In the above solution, the reconnection identifier and the corresponding session identifier are carried in the RTSP OPTIONS request message, and the RTSP OPTIONS request message is used to obtain the RTSP method set supported by the second WFD device;

相应地,从所述RTSP OPTIONS请求消息中提取所述重连接标识及对应的会话标识;Correspondingly, extracting the reconnection identifier and the corresponding session identifier from the RTSP OPTIONS request message;

所述重连接应答为RTSP OPTIONS应答。The reconnection response is an RTSP OPTIONS response.

上述方案中,所述方法还包括:In the above scheme, the method also includes:

所述重连接前的P2P连接建立阶段,接收所述第一WFD设备发送的所述会话标识;In the P2P connection establishment stage before the reconnection, receiving the session identifier sent by the first WFD device;

在本地保存接收的所述会话标识;saving the received session identifier locally;

在所述重连接前的会话建立阶段,与所述第一WFD设备进行能力协商后,保存所述会话标识与能力协商后的参数集的对应关系。In the session establishment phase before the reconnection, after performing capability negotiation with the first WFD device, the corresponding relationship between the session identifier and the parameter set after capability negotiation is saved.

上述方案中,接收的会话标识携带在联接/重联请求帧中;In the above solution, the received session identifier is carried in the connection/reconnection request frame;

相应地,从所述联接/重联请求帧中提取所述会话标识。Correspondingly, the session identifier is extracted from the connection/reconnection request frame.

本发明实施例又提供了一种第一WFD设备,包括:第一发送单元及第一接收单元;其中,The embodiment of the present invention further provides a first WFD device, including: a first sending unit and a first receiving unit; wherein,

所述第一发送单元,用于需要重连接时,向第二WFD设备发送重连接标识及对应的会话标识;所述重连接标识用于指示所述第二WFD设备本次连接为重连接;所述会话标识用于指示所述第二WFD设备获取与所述会话标识对应的能力协商后的参数集;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备为所述第一WFD设备的接收端设备;The first sending unit is configured to send a reconnection identifier and a corresponding session identifier to the second WFD device when reconnection is required; the reconnection identifier is used to indicate that the second WFD device is reconnecting this time; The session ID is used to instruct the second WFD device to acquire a negotiated parameter set corresponding to the capability of the session ID; the session ID is a session ID that identifies the uniqueness of the connection; the second WFD device is the a receiving end device of the first WFD device;

所述第一接收单元,用于接收所述第二WFD设备返回的重连接应答;所述重连接应答表征重连接成功。The first receiving unit is configured to receive a reconnection response returned by the second WFD device; the reconnection response indicates that the reconnection is successful.

上述方案中,所述第一WFD设备还包括:第二发送单元,用于所述重连接前的P2P连接建立阶段,向所述第二WFD发送所述会话标识。In the above solution, the first WFD device further includes: a second sending unit, configured to send the session identifier to the second WFD during the P2P connection establishment phase before the reconnection.

上述方案中,所述第一WFD设备还包括:生成单元,用于所述P2P连接建立之前,生成所述会话标识;并在本地存储所述会话标识。In the above solution, the first WFD device further includes: a generating unit, configured to generate the session identifier before establishing the P2P connection; and store the session identifier locally.

本发明实施例还提供了一种第二WFD设备,包括:第二接收单元、确定单元、查找单元及第三发送单元;其中,The embodiment of the present invention also provides a second WFD device, including: a second receiving unit, a determining unit, a searching unit, and a third sending unit; wherein,

所述第二接收单元,用于接收第一WFD设备发送的重连接标识及对应的会话标识;所述第二WFD设备为所述第一WFD设备的接收端设备;所述会话标识为标识连接唯一性的会话标识;The second receiving unit is configured to receive the reconnection identifier and the corresponding session identifier sent by the first WFD device; the second WFD device is the receiving end device of the first WFD device; the session identifier is an identification connection Unique session ID;

所述确定单元,用于根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;The determining unit is configured to determine that the connection with the first WFD device is a reconnection according to the reconnection identifier;

所述查找单元,用于根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;The searching unit is configured to search locally for the negotiated capability parameter set corresponding to the session ID stored according to the session ID;

所述第三发送单元,用于查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功。The third sending unit is configured to send a reconnection response to the first WFD device after the search is successful; the reconnection response indicates that the reconnection is successful.

上述方案中,所述第二WFD设备还包括:第三接收单元及存储单元;其中,In the above solution, the second WFD device further includes: a third receiving unit and a storage unit; wherein,

所述第三接收单元,用于所述重连接前的P2P连接建立阶段,接收所述第一WFD设备发送的所述会话标识;The third receiving unit is used for the P2P connection establishment stage before the reconnection, and receives the session identifier sent by the first WFD device;

所述存储单元,用于在本地保存接收的所述会话标识;并在所述重连接前的会话建立阶段,与所述第一WFD设备进行能力协商后,保存所述会话标识与能力协商后的参数集的对应关系。The storage unit is configured to store the received session identifier locally; and after performing capability negotiation with the first WFD device in the session establishment phase before the reconnection, save the session identifier and the capability negotiation The corresponding relationship of the parameter set.

本发明实施例又提供了一种重连接系统,包括:第一WFD设备及第二WFD设备;其中,An embodiment of the present invention further provides a reconnection system, including: a first WFD device and a second WFD device; wherein,

所述第一WFD设备,用于需要重连接时,向所述第二WFD设备发送重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;并接收所述第二WFD设备返回的重连接应答;The first WFD device is configured to send a reconnection identifier and a corresponding session identifier to the second WFD device when reconnection is required; the session identifier is a session identifier that identifies the uniqueness of the connection; and receives the second The reconnection response returned by the WFD device;

所述第二WFD设备,为所述第一WFD设备的数据接收端设备,用于接收所述第一WFD设备发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功。The second WFD device is a data receiving end device of the first WFD device, configured to receive the reconnection identifier and the corresponding session identifier sent by the first WFD device; determine the connection with the reconnection identifier according to the reconnection identifier The connection between the first WFD devices is a reconnection; according to the session identifier, search locally for the negotiated parameter set corresponding to the capability corresponding to the session identifier; and after the search is successful, report to the first WFD The device sends a reconnection response; the reconnection response indicates that the reconnection is successful.

本发明实施例提供的重连接方法、系统及WFD设备,需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备为所述第一WFD设备的数据接收端设备所述第二WFD设备接收第一WFD设备发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功,由于重连接时,所述第二WFD设备仅根据收到的重连接标识,来确定本次连接为重连接,且仅根据会话标识查找对应的能力协商后的参数集,从而省去了WFD能力协商阶段所进行的消息交互过程,如此,大大提高了连接速度,能加速重连接过程。In the reconnection method, system, and WFD device provided by the embodiments of the present invention, when reconnection is required, the first WFD device sends a reconnection identifier and a corresponding session identifier to the second WFD device; the session identifier is a session that identifies the uniqueness of the connection ID; the second WFD device is the data receiving end device of the first WFD device. The second WFD device receives the reconnection ID and the corresponding session ID sent by the first WFD device; according to the reconnection ID, determine The connection with the first WFD device is a reconnection; according to the session identifier, search locally for the negotiated parameter set corresponding to the capability corresponding to the session identifier; A WFD device sends a reconnection response; the reconnection response indicates that the reconnection is successful, because during reconnection, the second WFD device only determines that this connection is a reconnection according to the received reconnection identifier, and only according to The session identifier searches for the corresponding parameter set after capability negotiation, thereby eliminating the message interaction process in the WFD capability negotiation stage, thus greatly improving the connection speed and accelerating the reconnection process.

附图说明Description of drawings

在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings (which are not necessarily drawn to scale), like reference numerals may describe like parts in different views. Similar reference numbers with different letter suffixes may indicate different instances of similar components. The drawings generally illustrate the various embodiments discussed herein, by way of example and not limitation.

图1为相关技术中两个WFD设备之间建立连接的过程示意图;Fig. 1 is a schematic diagram of the process of establishing a connection between two WFD devices in the related art;

图2为相关技术中WFD设备之间进行会话连接过程示意图;FIG. 2 is a schematic diagram of a session connection process between WFD devices in the related art;

图3为本发明实施例一第一WFD侧的重连接方法流程示意图;3 is a schematic flowchart of a reconnection method on the first WFD side according to Embodiment 1 of the present invention;

图4为本发明实施例一第二WFD侧的重连接方法流程示意图;4 is a schematic flowchart of a reconnection method on the second WFD side according to Embodiment 1 of the present invention;

图5为本发明实施例一重连接方法流程示意图;5 is a schematic flow chart of a reconnection method according to an embodiment of the present invention;

图6为本发明实施例二第一WFD结构示意图;Fig. 6 is a schematic structural diagram of the first WFD in Embodiment 2 of the present invention;

图7为本发明实施例二第二WFD结构示意图;FIG. 7 is a schematic structural diagram of a second WFD according to Embodiment 2 of the present invention;

图8为本发明实施例二重连接系统结构示意图。FIG. 8 is a schematic structural diagram of a double connection system according to an embodiment of the present invention.

具体实施方式detailed description

下面结合附图及实施例对本发明再作进一步详细的描述。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

在描述本发明实施例之前,先详细了解一下目前相关技术。Before describing the embodiments of the present invention, let us have a detailed understanding of the current related technologies.

如图1所示,两个WFD设备之间建立连接的过程主要包括:WFD设备发现过程、WFD连接建立过程以及能力协商过程(即会话建立过程)。另外,还可以进一步包括WFD服务发现过程。实际应用时,WFD服务发现过程不是一定要执行的过程,可以根据服务需要来确定是否需要进行WFD服务发现过程。As shown in FIG. 1 , the process of establishing a connection between two WFD devices mainly includes: a WFD device discovery process, a WFD connection establishment process, and a capability negotiation process (that is, a session establishment process). In addition, it may further include a WFD service discovery process. In actual application, the WFD service discovery process is not a mandatory process, and it can be determined according to service requirements whether to perform the WFD service discovery process.

其中,在上述这些过程中所交互的信息中都包含WFD信息(Information)标识(ID)(即WFD信元(IE,Information Element)),比如WFD设备为进行连接所发送的信标(beacon)包、侦测请求(probe request)和侦测响应(proberesponse)消息中均包含WFD IE这个数据结构。WFD IE携带的一些基本信息可以使得两个设备之间进行最佳连接。Among them, the information exchanged in the above-mentioned processes all include WFD information (Information) identification (ID) (that is, WFD information element (IE, Information Element)), such as the beacon (beacon) sent by the WFD device for connection The data structure of WFD IE is included in the packet, probe request and probe response message. Some basic information carried by WFD IE can make an optimal connection between two devices.

同时,图2示出了WFD设备之间进行会话连接即WFD能力协商阶段(WFDCapability Negotiation)的过程,该过程也可以称为WFD设备双方能力信息交互过程,此时WFD设备称为miracast设备。如图2所示,该过程包括以下步骤:At the same time, FIG. 2 shows the process of session connection between WFD devices, that is, the WFD Capability Negotiation stage (WFD Capability Negotiation), which can also be called the process of exchanging capability information between WFD devices. At this time, the WFD device is called a miracast device. As shown in Figure 2, the process includes the following steps:

步骤201:源(Source)设备向接收(Sink)设备发送M1请求消息;Step 201: the source (Source) device sends an M1 request message to the receiving (Sink) device;

换句话说,发送RTSP OPTIONS请求消息,以获取Sink设备支持的RTSP方法集。In other words, send an RTSP OPTIONS request message to obtain the RTSP method set supported by the Sink device.

步骤202:Sink设备收到M1请求消息后发送M1应答消息。Step 202: the sink device sends an M1 response message after receiving the M1 request message.

步骤203:M1应答消息发送成功后,Sink设备向Source设备发送M2请求消息;Step 203: After the M1 response message is sent successfully, the Sink device sends an M2 request message to the Source device;

换句话说,发送RTSP OPTIONS请求消息,以获取Source设备所支持的RTSP方法集。In other words, send an RTSP OPTIONS request message to obtain the RTSP method set supported by the Source device.

步骤204:Source设备收到M2请求消息后向Source设备发送M2应答消息;Step 204: After the Source device receives the M2 request message, it sends the M2 response message to the Source device;

步骤205:M2应答消息发送成功后,Source设备向Sink设备发送M3请求消息;Step 205: After the M2 response message is sent successfully, the Source device sends the M3 request message to the Sink device;

换句话说,发送RTSP参数获取(GET_PARAMETER)请求消息,以获取自身感兴趣的Sink设备的WFD能力列表。In other words, send an RTSP parameter acquisition (GET_PARAMETER) request message to obtain the WFD capability list of the Sink device of interest.

其中,WFD能力列表的具体内容可以包括音频格式、视频格式、几种分辨率(如1080p,720p,480p等),以及对应的帧率,支持的内容保护方式。The specific content of the WFD capability list may include audio format, video format, several resolutions (such as 1080p, 720p, 480p, etc.), corresponding frame rate, and supported content protection methods.

步骤206:收到M3请求消息后,Sink设备向Source设备发送M3应答消息;Step 206: After receiving the M3 request message, the Sink device sends an M3 response message to the Source device;

步骤207:收到M3应答消息后,Source设备通过向Sink设备发送M4请求消息来设置参数;Step 207: After receiving the M3 response message, the Source device sets parameters by sending an M4 request message to the Sink device;

这里,收到M3应答消息后,根据应答消息携带的信息,Source设备决定后续WFD会话(方向为Source设备发送,Sink设备接收)的参数集并通过向Sink设备发送RTSP设置参数(SET_PARAMETER)请求消息即M4请求消息,来让Sink设备设置相应的参数。Here, after receiving the M3 response message, according to the information carried in the response message, the Source device determines the parameter set of the subsequent WFD session (the direction is sent by the Source device and received by the Sink device) and sends an RTSP setting parameter (SET_PARAMETER) request message to the Sink device That is, the M4 request message to allow the Sink device to set the corresponding parameters.

步骤208:收到M4请求消息后,Sink设备回复M4应答消息;Step 208: After receiving the M4 request message, the Sink device replies with an M4 response message;

步骤209:收到M4应答消息且应答消息为肯定的消息回复后,Source设备向Sink设备发送M5请求消息;Step 209: After receiving the M4 response message and the response message is a positive message reply, the Source device sends an M5 request message to the Sink device;

换句话说,发送RTSP SET_PARAMETER(WFD-trigger-method)请求消息,用于触发后续连接建立、播放等功能。In other words, send RTSP SET_PARAMETER (WFD-trigger-method) request message to trigger subsequent connection establishment, playback and other functions.

步骤210:收到M5请求消息后,Sink设备向Source设备回复M5应答消息;Step 210: After receiving the M5 request message, the Sink device replies an M5 response message to the Source device;

步骤211:收到M5应答消息且应答消息为肯定的消息回复后,Source设备向Sink设备发送M6请求消息;Step 211: After receiving the M5 response message and the response message is an affirmative message reply, the Source device sends an M6 request message to the Sink device;

换句话说,发送RTSP建立(SETUP)请求消息,该消息中携带连接建立功能的消息内容。In other words, an RTSP establishment (SETUP) request message is sent, and the message carries the message content of the connection establishment function.

步骤212:收到M6请请求消息后,Sink设备向Source设备回复M6应答消息;Step 212: After receiving the M6 please request message, the Sink device replies an M6 response message to the Source device;

步骤213:收到M6应答消息且应答消息为肯定的消息回复后,Source设备向Sink设备发送M7请求消息;Step 213: After receiving the M6 response message and the response message is a positive message reply, the Source device sends the M7 request message to the Sink device;

换句话说,发送RTSP建立(PLAY)请求消息,该消息中携带连接播放等功能的消息内容。In other words, an RTSP establishment (PLAY) request message is sent, and the message carries message content of functions such as connection playback.

步骤214:收到M7请请求消息后,Sink设备向Source设备回复M7应答消息。Step 214: After receiving the M7 Please request message, the Sink device replies an M7 Reply message to the Source device.

当收到M7应答消息且应答消息为肯定的消息回复后,说明WFD设备之间会话连接过程完成。完成后,Source设备与Sink设备之间即可进行同频或或音视频传输过程。When the M7 response message is received and the response message is an affirmative reply, it means that the session connection process between the WFD devices is completed. After completion, the same frequency or audio and video transmission process can be carried out between the Source device and the Sink device.

WFD设备之间进行同屏或音视频传输过程中,一方面,经常会遇到设备切换的问题,举个例子来说,假设设备A和设备B进行连接,之后又切换到设备A和设备C进行连接,但是随后又可能切换至设备B,此过程中设备A和设备B之间要进行重连接;另一方面,也可能会存在着网络故障断线重连接的问题;这些情况下,在现有的技术方案中,需要重新进行RTSP协商,即需要重新执行步骤201~214,即miracast中的M1-M7相关过程步骤。如此,就会大大降低连接速度,从而降低了用户体验。During the same screen or audio and video transmission between WFD devices, on the one hand, the problem of device switching is often encountered. For example, suppose device A is connected to device B, and then switched to device A and device C Connect, but then may switch to device B, during which device A and device B need to be reconnected; on the other hand, there may also be a problem of network failure disconnection and reconnection; in these cases, in In the existing technical solution, the RTSP negotiation needs to be performed again, that is, steps 201-214 need to be performed again, that is, M1-M7 related process steps in miracast. In this way, the connection speed will be greatly reduced, thereby reducing the user experience.

基于此,在本发明的各种实施例中:需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备接收第一WFD设备发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功。Based on this, in various embodiments of the present invention: when reconnection is required, the first WFD device sends a reconnection identifier and a corresponding session identifier to the second WFD device; the session identifier is a session identifier that identifies the uniqueness of the connection; The second WFD device receives the reconnection identifier and the corresponding session identifier sent by the first WFD device; according to the reconnection identifier, determine that the connection with the first WFD device is a reconnection; according to the session identifier , searching locally for the negotiated capability parameter set corresponding to the session identifier stored; and after the search is successful, sending a reconnection response to the first WFD device; the reconnection response indicates that the reconnection is successful.

其中,所述第二WFD设备为所述第一WFD设备的数据接收端设备。Wherein, the second WFD device is a data receiving end device of the first WFD device.

实施例一Embodiment one

本实施例提供一种重连接方法,应用于第一WFD设备,如图3所示,该方法包括以下步骤:This embodiment provides a reconnection method, which is applied to the first WFD device. As shown in FIG. 3, the method includes the following steps:

步骤301:需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;Step 301: When reconnection is required, the first WFD device sends a reconnection identifier and a corresponding session identifier to the second WFD device;

这里,所述重连接标识用于指示所述第二WFD设备本次连接为重连接,并非新连接;所述会话标识用于指示所述第二WFD设备获取与所述会话标识对应的能力协商后的参数集;所述会话标识为标识连接唯一性的会话标识。Here, the reconnection identifier is used to indicate that the second WFD device is reconnecting this time, not a new connection; the session identifier is used to instruct the second WFD device to obtain the capability negotiation corresponding to the session identifier The following parameter set; the session identifier is a session identifier that identifies the uniqueness of the connection.

所述第二WFD设备为所述第一WFD设备的接收端设备。换句话说,所述第一WFD设备为发送端设备,所述第二WFD设备接收端设备。也就是说,由所述第一WFD设备发送多媒体数据,由所述第二WFD设备接收所述第一WFD设备发送的多媒体数据。The second WFD device is a receiving end device of the first WFD device. In other words, the first WFD device is a sending end device, and the second WFD device is a receiving end device. That is, the multimedia data sent by the first WFD device is sent, and the multimedia data sent by the first WFD device is received by the second WFD device.

所述需要进行重连接的时机可以是:所述第一WFD设备进行切换或者设备故障断开需要重新连接。The timing when reconnection is required may be: the first WFD device needs to be reconnected when it is switched or disconnected due to a device failure.

在一实施例中,所述重连接标识及对应的会话标识可以携带在RTSPOPTIONS请求消息中,所述RTSP OPTIONS请求消息用于获取所述第二WFD设备支持的RTSP方法集。In an embodiment, the reconnection identifier and the corresponding session identifier may be carried in an RTSP OPTIONS request message, and the RTSP OPTIONS request message is used to obtain the RTSP method set supported by the second WFD device.

换句话说,可以将重连接标识及对应的会话标识可以携带在图2所示的M1请求消息中。In other words, the reconnection identifier and the corresponding session identifier can be carried in the M1 request message shown in FIG. 2 .

此时,在M1请求消息中携带的内容如表1所示。At this time, the content carried in the M1 request message is shown in Table 1.

表1Table 1

其中,在表1中,Reconnect和Session ID是新增加的内容。Reconnect为重连接标识,Session ID为会话标识。Among them, in Table 1, Reconnect and Session ID are newly added contents. Reconnect is the reconnection identifier, and Session ID is the session identifier.

在表1中,Required表示必须携带的意思。From Source to Sink表示所述第一WFD设备向所述第二WFD设备发送的M1请求消息;From Sink to Source表示所述第二WFD设备向所述第一WFD设备发送的M1应答消息。发送M1应答消息的目的是:让所述第一WFD设备获知重连接成功。In Table 1, Required means that it must be carried. From Source to Sink represents the M1 request message sent by the first WFD device to the second WFD device; From Sink to Source represents the M1 response message sent by the second WFD device to the first WFD device. The purpose of sending the M1 response message is to let the first WFD device know that the reconnection is successful.

实际应用时,在进行重连接之前,所述第一WFD设备及所述第二WFD设备均需要设置并保存所述会话标识,以便进行后续处理。In practical applications, before reconnection, both the first WFD device and the second WFD device need to set and save the session identifier for subsequent processing.

基于此,该方法还可以包括:Based on this, the method may also include:

所述重连接前的P2P连接建立阶段,向所述第二WFD设备发送所述会话标识。In the P2P connection establishment phase before the reconnection, the session identifier is sent to the second WFD device.

具体地,向所述第二WFD设备发送的会话标识可以携带在联接/重联请求帧(Association/Reassociation Request Frame)中。Specifically, the session identifier sent to the second WFD device may be carried in an association/reassociation request frame (Association/Reassociation Request Frame).

这里,所述P2P连接建立阶段就是指图1中的WFD连接建立过程。Here, the P2P connection establishment phase refers to the WFD connection establishment process in FIG. 1 .

在Association/Reassociation Request Frame中携带所述会话标识,可以按照以下方法实现:Carrying the session identifier in the Association/Reassociation Request Frame can be implemented in the following way:

由于WFD IE中携带的一些基本信息可以使得两个设备之间进行最佳连接,因此,为了实现为两个WFD设备之间连接唯一的会话标识,可以对WFDIE中的WFD子元素(subelements)进行扩展,从而使得WFD subelements包含了会话标识(Session ID)的内容,扩展的具体内容可以如表2中的SubelementID为11所示的内容。Since some basic information carried in WFD IE can make the best connection between two devices, in order to realize a unique session identifier for the connection between two WFD devices, WFD subelements (subelements) in WFDIE can be extension, so that the WFD subelements include the content of the session ID (Session ID).

表2Table 2

同时,为了使进行连接的两个WFD设备设置并保存上述会话标识(SessionID),需要在设备连接建立阶段所发送的Association/Reassociation Request Frame和Association/Reassociation Response Frame中扩充内容。在Association/Reassociation Request Frame中扩充的具体内容可以如表3中的Subelements为Session ID对应行所示的内容,在Association/ReassociationResponse Frame中扩充的具体内容可以如表4中Subelements为Session ID对应行所示的内容。At the same time, in order to enable the two connected WFD devices to set and save the above-mentioned session ID (SessionID), it is necessary to expand the contents of the Association/Reassociation Request Frame and Association/Reassociation Response Frame sent during the device connection establishment phase. The specific content expanded in the Association/Reassociation Request Frame can be shown in the row corresponding to the Session ID in Subelements in Table 3, and the specific content expanded in the Association/ReassociationResponse Frame can be shown in the row corresponding to the Session ID in Table 4. displayed content.

表3table 3

表4Table 4

其中,Association/Reassociation Response Frame携带上述会话标识(SessionID)的作用是:让所述第一WFD设备获知所述第二WFD设备收到了所述会话标识。Wherein, the role of the Association/Reassociation Response Frame carrying the session ID (SessionID) is to let the first WFD device know that the second WFD device has received the session ID.

在一实施例中,该方法还可以包括:In one embodiment, the method may also include:

所述P2P连接建立之前,生成所述会话标识;Before the P2P connection is established, generate the session identifier;

在本地存储所述会话标识。The session identification is stored locally.

这里,所述第一WFD设备生成的会话标识可以是一串随机数,只要是唯一标识即可。Here, the session identifier generated by the first WFD device may be a string of random numbers, as long as it is a unique identifier.

步骤302:接收所述第二WFD设备返回的重连接应答;所述重连接应答表征重连接成功。Step 302: Receive a reconnection response returned by the second WFD device; the reconnection response indicates that the reconnection is successful.

这里,所述第二WFD设备收到重连接标识及对应的会话标识后,根据所述重连接标识获知本次连接为重连接,因此在本地查找存储的与所述会话标识对应的能力协商后的参数集;当查找到对应的参数集后,会向所述第一WFD设备发送重连接应答,此时当重连接标识及对应的会话标识携带在M1请求消息中时,所述第二WFD设备会向所述第一WFD设备返回M1应答消息,即所述重连接应答为RTSP OPTIONS应答。Here, after the second WFD device receives the reconnection identifier and the corresponding session identifier, it knows that this connection is a reconnection according to the reconnection identifier, so after searching and storing the capability negotiation corresponding to the session identifier locally, parameter set; when the corresponding parameter set is found, it will send a reconnection response to the first WFD device. At this time, when the reconnection identifier and the corresponding session identifier are carried in the M1 request message, the second WFD The device returns an M1 response message to the first WFD device, that is, the reconnection response is an RTSP OPTIONS response.

其中,当所述第二WFD设备在本地不能查找到对应的参数集时,即查找失败时,会与所述第一WFD设备进行图2所示的完整流程,以完成会话建立过程。Wherein, when the second WFD device cannot find the corresponding parameter set locally, that is, when the search fails, it will perform the complete process shown in FIG. 2 with the first WFD device to complete the session establishment process.

需要说明的是:所述会话标识(Session ID)与普通的设备标识不同,其更像一个管理者(Handler),所述会话标识关联了一次通话过程中WFD设备之间能力协商后的参数集,正是因为关联了这种参数集,才使得所述第二WFD设备可能实现快速重连的效果。It should be noted that: the session ID (Session ID) is different from an ordinary device ID, it is more like a manager (Handler), and the session ID is associated with the parameter set after capability negotiation between WFD devices during a call , it is precisely because of the association of this parameter set that the second WFD device may realize the effect of fast reconnection.

本实施例还提供了一种重连接方法,应用于第二WFD设备,如图4所示该方法包括以下步骤:This embodiment also provides a reconnection method, which is applied to the second WFD device. As shown in FIG. 4, the method includes the following steps:

步骤401:接收第一WFD设备发送的重连接标识及对应的会话标识;Step 401: Receive the reconnection identifier and the corresponding session identifier sent by the first WFD device;

这里,所述会话标识为标识连接唯一性的会话标识。Here, the session identifier is a session identifier that identifies the uniqueness of the connection.

所述第二WFD设备为所述第一WFD设备的接收端设备。换句话说,所述第一WFD设备为发送端设备,所述第二WFD设备接收端设备。也就是说,由所述第一WFD设备发送多媒体数据,由所述第二WFD设备接收所述第一WFD设备发送的多媒体数据。The second WFD device is a receiving end device of the first WFD device. In other words, the first WFD device is a sending end device, and the second WFD device is a receiving end device. That is, the multimedia data sent by the first WFD device is sent, and the multimedia data sent by the first WFD device is received by the second WFD device.

在一实施例中,所述重连接标识及对应的会话标识可以携带在RTSPOPTIONS请求消息中,所述RTSP OPTIONS请求消息用于获取所述第二WFD设备支持的RTSP方法集;In an embodiment, the reconnection identifier and the corresponding session identifier may be carried in an RTSP OPTIONS request message, and the RTSP OPTIONS request message is used to obtain the RTSP method set supported by the second WFD device;

相应地,所述第二WFD设备从所述RTSP OPTIONS请求消息中提取所述重连接标识及对应的会话标识。Correspondingly, the second WFD device extracts the reconnection identifier and the corresponding session identifier from the RTSP OPTIONS request message.

换句话说,可以将重连接标识及对应的会话标识可以携带在图2所示的M1请求消息中。In other words, the reconnection identifier and the corresponding session identifier can be carried in the M1 request message shown in FIG. 2 .

此时,在M1请求消息中携带的内容如表1所示。At this time, the content carried in the M1 request message is shown in Table 1.

其中,在表1中,Reconnect和Session ID是新增加的内容。Reconnect为重连接标识,Session ID为会话标识。Among them, in Table 1, Reconnect and Session ID are newly added contents. Reconnect is the reconnection identifier, and Session ID is the session identifier.

在表1中,Required表示必须携带的意思。From Source to Sink表示所述第一WFD设备向所述第二WFD设备发送的M1请求消息;From Sink to Source表示所述第二WFD设备向所述第一WFD设备发送的M1应答消息。发送M1应答消息的目的是:让所述第一WFD设备获知重连接成功。In Table 1, Required means that it must be carried. From Source to Sink represents the M1 request message sent by the first WFD device to the second WFD device; From Sink to Source represents the M1 response message sent by the second WFD device to the first WFD device. The purpose of sending the M1 response message is to let the first WFD device know that the reconnection is successful.

实际应用时,在进行重连接之前,所述第一WFD设备及所述第二WFD设备均需要设置并保存所述会话标识,以便进行后续处理。In practical applications, before reconnection, both the first WFD device and the second WFD device need to set and save the session identifier for subsequent processing.

基于此,该方法还可以包括:Based on this, the method may also include:

所述重连接前的P2P连接建立阶段,所述第二WFD设备接收所述第一WFD设备发送的所述会话标识;In the P2P connection establishment stage before the reconnection, the second WFD device receives the session identifier sent by the first WFD device;

在本地保存接收的所述会话标识;saving the received session identifier locally;

在所述重连接前的会话建立阶段,与所述第一WFD设备进行能力协商后,所述第二WFD设备保存所述会话标识与能力协商后的参数集的对应关系。In the session establishment phase before the reconnection, after performing capability negotiation with the first WFD device, the second WFD device saves the correspondence between the session identifier and the parameter set after capability negotiation.

其中,所述第二WFD设备接收的会话标识可以携带在Association/Reassociation Request Frame中;Wherein, the session identifier received by the second WFD device may be carried in the Association/Reassociation Request Frame;

相应地,所述第二WFD设备从Association/Reassociation Request Frame中提取所述会话标识。Correspondingly, the second WFD device extracts the session identifier from the Association/Reassociation Request Frame.

这里,所述P2P连接建立阶段就是指图1中的WFD连接建立过程。Here, the P2P connection establishment phase refers to the WFD connection establishment process in FIG. 1 .

在Association/Reassociation Request Frame中携带所述会话标识,可以按照以下方法实现:Carrying the session identifier in the Association/Reassociation Request Frame can be implemented in the following way:

由于WFD IE中携带的一些基本信息可以使得两个设备之间进行最佳连接,因此,为了实现为两个WFD设备之间连接唯一的会话标识,可以对WFDIE中的WFD subelements进行扩展,从而使得WFD subelements包含了会话标识(Session ID)的内容,扩展的具体内容可以如表2中的Subelement ID为11所示的内容。Since some basic information carried in WFD IE can make an optimal connection between two devices, in order to realize a unique session identifier for the connection between two WFD devices, the WFD subelements in WFDIE can be extended, so that The WFD subelements include the content of the session ID (Session ID), and the specific content of the extension may be as shown in Table 2 where the Subelement ID is 11.

同时,为了使进行连接的两个WFD设备设置并保存上述会话标识(SessionID),需要在设备连接建立阶段所发送的Association/Reassociation Request Frame和Association/Reassociation Response Frame中扩充内容。在Association/Reassociation Request Frame中扩充的具体内容可以如表3中的Subelements为Session ID对应行所示的内容,在Association/ReassociationResponse Frame中扩充的具体内容可以如表4中的Subelements为Session ID对应行所示的内容。At the same time, in order to enable the two connected WFD devices to set and save the above-mentioned session ID (SessionID), it is necessary to expand the contents of the Association/Reassociation Request Frame and Association/Reassociation Response Frame sent during the device connection establishment phase. The specific content expanded in the Association/Reassociation Request Frame can be as shown in the row corresponding to the Session ID in the Subelements in Table 3, and the specific content expanded in the Association/ReassociationResponse Frame can be shown in the row corresponding to the Session ID in the Subelements in Table 4 content shown.

其中,Association/Reassociation Response Frame携带上述会话标识(SessionID)的作用是:让所述第一WFD设备获知所述第二WFD设备收到了所述会话标识。Wherein, the role of the Association/Reassociation Response Frame carrying the session ID (SessionID) is to let the first WFD device know that the second WFD device has received the session ID.

步骤402:根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;Step 402: According to the reconnection identifier, determine that the connection with the first WFD device is a reconnection;

步骤403:根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;Step 403: According to the session ID, search locally for the negotiated parameter set corresponding to the capability of the session ID;

步骤404:查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功。Step 404: After the search succeeds, send a reconnection response to the first WFD device; the reconnection response indicates that the reconnection is successful.

这里,当所述第二WFD设备是通过M1请求消息获取到重连接标识及对应的会话标识时,查找参数集成功后,所述第二WFD设备会向所述第一WFD设备返回M1应答消息,即所述重连接应答为RTSP OPTIONS应答。Here, when the second WFD device obtains the reconnection identifier and the corresponding session identifier through the M1 request message, after finding the parameter set successfully, the second WFD device will return an M1 response message to the first WFD device , that is, the reconnection response is an RTSP OPTIONS response.

其中,当所述第二WFD设备在本地不能查找到对应的参数集时,即查找失败时,会与所述第一WFD设备进行图2所示的完整流程,以完成会话建立过程。Wherein, when the second WFD device cannot find the corresponding parameter set locally, that is, when the search fails, it will perform the complete process shown in FIG. 2 with the first WFD device to complete the session establishment process.

需要说明的是:所述会话标识(Session ID)与普通的设备标识不同,其更像一个Handler,所述会话标识关联了一次通话过程中WFD设备之间能力协商后的参数集,正是因为关联了这种参数集,才使得所述第二WFD设备可能实现快速重连的效果。It should be noted that: the session ID (Session ID) is different from ordinary device IDs, it is more like a Handler, and the session ID is associated with the parameter set after capability negotiation between WFD devices during a call, precisely because Only by associating such a parameter set can the second WFD device realize the effect of fast reconnection.

本实施例还提供了一种重连接方法,如图5所示,该方法包括以下步骤:This embodiment also provides a reconnection method, as shown in Figure 5, the method includes the following steps:

步骤501:需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;Step 501: When reconnection is required, the first WFD device sends a reconnection identifier and a corresponding session identifier to the second WFD device;

这里,所述会话标识为标识连接唯一性的会话标识。Here, the session identifier is a session identifier that identifies the uniqueness of the connection.

步骤502:所述第二WFD设备接收第一WFD设备发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备发送重连接应答;Step 502: The second WFD device receives the reconnection identifier and the corresponding session identifier sent by the first WFD device; according to the reconnection identifier, determine that the connection with the first WFD device is a reconnection; according to the The session identifier, searching locally for the negotiated parameter set corresponding to the capability corresponding to the session identifier; and after the search succeeds, sending a reconnection response to the first WFD device;

这里,所述重连接应答表征重连接成功。Here, the reconnection response indicates that the reconnection is successful.

需要说明的是:所述第一WFD设备与所述第二WFD设备的具体处理过程已在上文详述,这里不再赘述。It should be noted that: the specific processing procedures of the first WFD device and the second WFD device have been described in detail above, and will not be repeated here.

本发明实施例提供的重连接方法,需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备为所述第一WFD设备的数据接收端设备所述第二WFD设备接收第一WFD设备发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功,由于重连接时,所述第二WFD设备仅根据收到的重连接标识,来确定本次连接为重连接,且仅根据会话标识查找对应的能力协商后的参数集,从而省去了WFD能力协商阶段所进行的消息交互过程,如此,大大提高了连接速度,能加速重连接过程,进而提升了用户体验,提升了WFD设备互联的实用性。In the reconnection method provided by the embodiment of the present invention, when reconnection is required, the first WFD device sends a reconnection identifier and a corresponding session identifier to the second WFD device; the session identifier is a session identifier that identifies the uniqueness of the connection; the second WFD device The second WFD device is the data receiving end device of the first WFD device. The second WFD device receives the reconnection identifier and the corresponding session identifier sent by the first WFD device; according to the reconnection identifier, determine the connection with the first WFD device. The connection between WFD devices is a reconnection; according to the session identifier, search locally for the parameter set after negotiation of the capability corresponding to the session identifier; and after the search succeeds, send a reconnection to the first WFD device Connection response; the reconnection response indicates that the reconnection is successful, because during reconnection, the second WFD device only determines that this connection is a reconnection according to the received reconnection identifier, and only searches for the corresponding session identifier according to the session identifier. The parameter set after capability negotiation saves the message interaction process in the WFD capability negotiation stage, thus greatly improving the connection speed and speeding up the reconnection process, thereby improving user experience and improving the practicability of WFD device interconnection .

实施例二Embodiment two

为实现本发明实施例的方法,本实施例提供一种第一WFD设备,如图6所示,该第一WFD设备包括:第一发送单元61及第一接收单元62;其中,In order to implement the method of the embodiment of the present invention, this embodiment provides a first WFD device. As shown in FIG. 6, the first WFD device includes: a first sending unit 61 and a first receiving unit 62; wherein,

所述第一发送单元61,用于需要重连接时,向第二WFD设备发送重连接标识及对应的会话标识;所述重连接标识用于指示所述第二WFD设备本次连接为重连接;所述会话标识用于指示所述第二WFD设备获取与所述会话标识对应的能力协商后的参数集;所述会话标识为标识连接唯一性的会话标识;The first sending unit 61 is configured to send a reconnection identifier and a corresponding session identifier to the second WFD device when reconnection is required; the reconnection identifier is used to indicate that the second WFD device is reconnecting this time ; The session identifier is used to instruct the second WFD device to obtain a negotiated parameter set corresponding to the capability corresponding to the session identifier; the session identifier is a session identifier that identifies the uniqueness of the connection;

所述第一接收单元62,用于接收所述第二WFD设备返回的重连接应答;所述重连接应答表征重连接成功。The first receiving unit 62 is configured to receive a reconnection response returned by the second WFD device; the reconnection response indicates that the reconnection is successful.

其中,所述第二WFD设备为所述第一WFD设备的接收端设备。换句话说,所述第一WFD设备为发送端设备,所述第二WFD设备接收端设备。也就是说,由所述第一WFD设备发送多媒体数据,由所述第二WFD设备接收所述第一WFD设备发送的多媒体数据。Wherein, the second WFD device is a receiving end device of the first WFD device. In other words, the first WFD device is a sending end device, and the second WFD device is a receiving end device. That is, the multimedia data sent by the first WFD device is sent, and the multimedia data sent by the first WFD device is received by the second WFD device.

所述需要进行重连接的时机可以是:所述第一WFD设备进行切换或者设备故障断开需要重新连接。The timing when reconnection is required may be: the first WFD device needs to be reconnected when it is switched or disconnected due to a device failure.

在一实施例中,所述重连接标识及对应的会话标识可以携带在RTSPOPTIONS请求消息中,所述RTSP OPTIONS请求消息用于获取所述第二WFD设备支持的RTSP方法集。In an embodiment, the reconnection identifier and the corresponding session identifier may be carried in an RTSP OPTIONS request message, and the RTSP OPTIONS request message is used to obtain the RTSP method set supported by the second WFD device.

换句话说,可以将重连接标识及对应的会话标识可以携带在图2所示的M1请求消息中。In other words, the reconnection identifier and the corresponding session identifier can be carried in the M1 request message shown in FIG. 2 .

此时,在M1请求消息中携带的内容如表1所示。At this time, the content carried in the M1 request message is shown in Table 1.

其中,在表1中,Reconnect和Session ID是新增加的内容。Reconnect为重连接标识,Session ID为会话标识。Among them, in Table 1, Reconnect and Session ID are newly added contents. Reconnect is the reconnection identifier, and Session ID is the session identifier.

在表1中,Required表示必须携带的意思。From Source to Sink表示所述第一WFD设备向所述第二WFD设备发送的M1请求消息;From Sink to Source表示所述第二WFD设备向所述第一WFD设备发送的M1应答消息。发送M1应答消息的目的是:让所述第一WFD设备获知重连接成功。In Table 1, Required means that it must be carried. From Source to Sink represents the M1 request message sent by the first WFD device to the second WFD device; From Sink to Source represents the M1 response message sent by the second WFD device to the first WFD device. The purpose of sending the M1 response message is to let the first WFD device know that the reconnection is successful.

实际应用时,在进行重连接之前,所述第一WFD设备及所述第二WFD设备均需要设置并保存所述会话标识,以便进行后续处理。In practical applications, before reconnection, both the first WFD device and the second WFD device need to set and save the session identifier for subsequent processing.

基于此,该第一WFD设备还可以包括:第二发送单元,用于所述重连接前的P2P连接建立阶段,向所述第二WFD设备发送所述会话标识。Based on this, the first WFD device may further include: a second sending unit, configured to send the session identifier to the second WFD device during the P2P connection establishment phase before the reconnection.

具体地,向所述第二WF设备D发送的会话标识可以携带在联接/重联请求帧(Association/Reassociation Request Frame)中。Specifically, the session identifier sent to the second WF device D may be carried in an association/reassociation request frame (Association/Reassociation Request Frame).

这里,所述P2P连接建立阶段就是指图1中的WFD连接建立过程。Here, the P2P connection establishment phase refers to the WFD connection establishment process in FIG. 1 .

在Association/Reassociation Request Frame中携带所述会话标识,可以按照以下方法实现:Carrying the session identifier in the Association/Reassociation Request Frame can be implemented in the following way:

由于WFD IE中携带的一些基本信息可以使得两个设备之间进行最佳连接,因此,为了实现为两个WFD设备之间连接唯一的会话标识,可以对WFDIE中的WFD subelements)进行扩展,从而使得WFD subelements包含了会话标识(Session ID)的内容,扩展的具体内容可以如表2中的Subelement ID为11所示的内容。Since some basic information carried in WFD IE can make an optimal connection between two devices, in order to implement a unique session identifier for the connection between two WFD devices, the WFD subelements in WFDIE can be extended, so that Make the WFD subelements include the content of the session ID (Session ID), and the specific content of the extension may be as shown in Table 2 where the Subelement ID is 11.

同时,为了使进行连接的两个WFD设备设置并保存上述会话标识(SessionID),需要在设备连接建立阶段所发送的Association/Reassociation Request Frame和Association/Reassociation Response Frame中扩充内容。在Association/Reassociation Request Frame中扩充的具体内容可以如表3中的Subelements为Session ID对应行所示的内容,在Association/ReassociationResponse Frame中扩充的具体内容可以如表4中的Subelements为Session ID对应行所示的内容。At the same time, in order to enable the two connected WFD devices to set and save the above-mentioned session ID (SessionID), it is necessary to expand the contents of the Association/Reassociation Request Frame and Association/Reassociation Response Frame sent during the device connection establishment phase. The specific content expanded in the Association/Reassociation Request Frame can be as shown in the row corresponding to the Session ID in the Subelements in Table 3, and the specific content expanded in the Association/ReassociationResponse Frame can be shown in the row corresponding to the Session ID in the Subelements in Table 4 content shown.

其中,Association/Reassociation Response Frame携带上述会话标识(SessionID)的作用是:让所述第一WFD设备获知所述第二WFD设备收到了所述会话标识。Wherein, the role of the Association/Reassociation Response Frame carrying the session ID (SessionID) is to let the first WFD device know that the second WFD device has received the session ID.

在一实施例中,该第一WFD设备还可以包括:生成单元,用于所述P2P连接建立之前,生成所述会话标识;并在本地存储所述会话标识。In an embodiment, the first WFD device may further include: a generating unit, configured to generate the session identifier before establishing the P2P connection; and store the session identifier locally.

这里,所述生成单元生成的会话标识可以是一串随机数,只要是唯一标识即可。Here, the session identifier generated by the generating unit may be a string of random numbers, as long as it is a unique identifier.

所述第二WFD设备收到重连接标识及对应的会话标识后,根据所述重连接标识获知本次连接为重连接,因此在本地查找存储的与所述会话标识对应的能力协商后的参数集;当查找到对应的参数集后,会向所述第一WFD设备发送重连接应答,此时当重连接标识及对应的会话标识携带在M1请求消息中时,所述第二WFD设备会向所述第一WFD设备返回M1应答消息,即所述重连接应答为RTSP OPTIONS应答。After the second WFD device receives the reconnection identifier and the corresponding session identifier, it knows that this connection is a reconnection according to the reconnection identifier, so it searches locally for the parameter after negotiation of the capability corresponding to the session identifier set; when the corresponding parameter set is found, it will send a reconnection response to the first WFD device. At this time, when the reconnection identifier and the corresponding session identifier are carried in the M1 request message, the second WFD device will An M1 response message is returned to the first WFD device, that is, the reconnection response is an RTSP OPTIONS response.

其中,当所述第二WFD设备在本地不能查找到对应的参数集时,即查找失败时,会与所述第一WFD设备进行图2所示的完整流程,以完成会话建立过程。Wherein, when the second WFD device cannot find the corresponding parameter set locally, that is, when the search fails, it will perform the complete process shown in FIG. 2 with the first WFD device to complete the session establishment process.

需要说明的是:所述会话标识(Session ID)与普通的设备标识不同,其更像一个Handler,所述会话标识关联了一次通话过程中WFD设备之间能力协商后的参数集,正是因为关联了这种参数集,才使得所述第二WFD设备可能实现快速重连的效果。It should be noted that: the session ID (Session ID) is different from ordinary device IDs, it is more like a Handler, and the session ID is associated with the parameter set after capability negotiation between WFD devices during a call, precisely because Only by associating such a parameter set can the second WFD device realize the effect of fast reconnection.

实际应用时,第一发送单元61、第一接收单元62及第二发送单元可由第一WFD设备中的中央处理器(CPU,Central Processing Unit)、微处理器(MCU,Micro Control Unit)、数字信号处理器(DSP,Digital Signal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)结合收发机实现;所述生成单元可由第一WFD设备中的CPU、MCU、DSP或FPGA实现。In actual application, the first sending unit 61, the first receiving unit 62 and the second sending unit can be composed of a central processing unit (CPU, Central Processing Unit), a microprocessor (MCU, Micro Control Unit), digital A signal processor (DSP, Digital Signal Processor) or a programmable logic array (FPGA, Field-Programmable Gate Array) is implemented in combination with a transceiver; the generating unit can be implemented by a CPU, MCU, DSP or FPGA in the first WFD device.

为实现本发明实施例的方法,本实施例还提供了一种第二WFD,如图7所示,该第二WFD设备包括:第二接收单元71、确定单元72、查找单元73及第三发送单元74;其中,In order to realize the method of the embodiment of the present invention, this embodiment also provides a second WFD. As shown in FIG. Sending unit 74; wherein,

所述第二接收单元71,用于接收第一WFD设备发送的重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;The second receiving unit 71 is configured to receive the reconnection identifier and the corresponding session identifier sent by the first WFD device; the session identifier is a session identifier that identifies the uniqueness of the connection;

所述确定单元72,用于根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;The determining unit 72 is configured to determine that the connection with the first WFD device is a reconnection according to the reconnection identifier;

所述查找单元73,用于根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;The search unit 73 is configured to, according to the session identifier, locally search for a parameter set after negotiation of a capability corresponding to the session identifier that is stored;

所述第三发送单元74,用于查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功。The third sending unit 74 is configured to send a reconnection response to the first WFD device after the search is successful; the reconnection response indicates that the reconnection is successful.

其中,所述第二WFD设备为所述第一WFD设备的接收端设备。换句话说,所述第一WFD设备为发送端设备,所述第二WFD设备接收端设备。也就是说,由所述第一WFD设备发送多媒体数据,由所述第二WFD设备接收所述第一WFD设备发送的多媒体数据。Wherein, the second WFD device is a receiving end device of the first WFD device. In other words, the first WFD device is a sending end device, and the second WFD device is a receiving end device. That is, the multimedia data sent by the first WFD device is sent, and the multimedia data sent by the first WFD device is received by the second WFD device.

在一实施例中,所述重连接标识及对应的会话标识可以携带在RTSPOPTIONS请求消息中,所述RTSP OPTIONS请求消息用于获取所述第二WFD设备支持的RTSP方法集;In an embodiment, the reconnection identifier and the corresponding session identifier may be carried in an RTSP OPTIONS request message, and the RTSP OPTIONS request message is used to obtain the RTSP method set supported by the second WFD device;

相应地,所述第二接收单元71从所述RTSP OPTIONS请求消息中提取所述重连接标识及对应的会话标识。Correspondingly, the second receiving unit 71 extracts the reconnection identifier and the corresponding session identifier from the RTSP OPTIONS request message.

换句话说,可以将重连接标识及对应的会话标识可以携带在图2所示的M1请求消息中。In other words, the reconnection identifier and the corresponding session identifier can be carried in the M1 request message shown in FIG. 2 .

此时,在M1请求消息中携带的内容如表1所示。At this time, the content carried in the M1 request message is shown in Table 1.

其中,在表1中,Reconnect和Session ID是新增加的内容。Reconnect为重连接标识,Session ID为会话标识。Among them, in Table 1, Reconnect and Session ID are newly added contents. Reconnect is the reconnection identifier, and Session ID is the session identifier.

在表1中,Required表示必须携带的意思。From Source to Sink表示所述第一WFD设备向所述第二WFD设备发送的M1请求消息;From Sink to Source表示所述第二WFD设备向所述第一WFD设备发送的M1应答消息。发送M1应答消息的目的是:让所述第一WFD设备获知重连接成功。In Table 1, Required means that it must be carried. From Source to Sink represents the M1 request message sent by the first WFD device to the second WFD device; From Sink to Source represents the M1 response message sent by the second WFD device to the first WFD device. The purpose of sending the M1 response message is to let the first WFD device know that the reconnection is successful.

实际应用时,在进行重连接之前,所述第一WFD设备及所述第二WFD设备均需要设置并保存所述会话标识,以便进行后续处理。In practical applications, before reconnection, both the first WFD device and the second WFD device need to set and save the session identifier for subsequent processing.

基于此,该第二WFD设备还可以包括:第三接收单元及存储单元;其中,Based on this, the second WFD device may further include: a third receiving unit and a storage unit; wherein,

所述第三接收单元,用于所述重连接前的P2P连接建立阶段,接收所述第一WFD设备发送的所述会话标识;The third receiving unit is used for the P2P connection establishment stage before the reconnection, and receives the session identifier sent by the first WFD device;

所述存储单元,用于在本地保存接收的所述会话标识;并在所述重连接前的会话建立阶段,与所述第一WFD设备进行能力协商后,保存所述会话标识与能力协商后的参数集的对应关系。The storage unit is configured to store the received session identifier locally; and after performing capability negotiation with the first WFD device in the session establishment phase before the reconnection, save the session identifier and the capability negotiation The corresponding relationship of the parameter set.

其中,所述第二WFD设备接收的会话标识可以携带在Association/Reassociation Request Frame中;Wherein, the session identifier received by the second WFD device may be carried in the Association/Reassociation Request Frame;

相应地,所述第二WFD设备从Association/Reassociation Request Frame中提取所述会话标识。Correspondingly, the second WFD device extracts the session identifier from the Association/Reassociation Request Frame.

这里,所述P2P连接建立阶段就是指图1中的WFD连接建立过程。Here, the P2P connection establishment phase refers to the WFD connection establishment process in FIG. 1 .

在Association/Reassociation Request Frame中携带所述会话标识,可以按照以下方法实现:Carrying the session identifier in the Association/Reassociation Request Frame can be implemented in the following way:

由于WFD IE中携带的一些基本信息可以使得两个设备之间进行最佳连接,因此,为了实现为两个WFD设备之间连接唯一的会话标识,可以对WFDIE中的WFD subelements进行扩展,从而使得WFD subelements包含了会话标识(Session ID)的内容,扩展的具体内容可以如表2中的Subelement ID为11所示的内容。Since some basic information carried in WFD IE can make an optimal connection between two devices, in order to realize a unique session identifier for the connection between two WFD devices, the WFD subelements in WFDIE can be extended, so that The WFD subelements include the content of the session ID (Session ID), and the specific content of the extension may be as shown in Table 2 where the Subelement ID is 11.

同时,为了使进行连接的两个WFD设备设置并保存上述会话标识(SessionID),需要在设备连接建立阶段所发送的Association/Reassociation Request Frame和Association/Reassociation Response Frame中扩充内容。在Association/Reassociation Request Frame中扩充的具体内容可以如表3中的Subelements为Session ID对应行所示的内容,在Association/ReassociationResponse Frame中扩充的具体内容可以如表4中的Subelements为Session ID对应行所示的内容。At the same time, in order to enable the two connected WFD devices to set and save the above-mentioned session ID (SessionID), it is necessary to expand the contents of the Association/Reassociation Request Frame and Association/Reassociation Response Frame sent during the device connection establishment phase. The specific content expanded in the Association/Reassociation Request Frame can be as shown in the row corresponding to the Session ID in the Subelements in Table 3, and the specific content expanded in the Association/ReassociationResponse Frame can be shown in the row corresponding to the Session ID in the Subelements in Table 4 content shown.

其中,Association/Reassociation Response Frame携带上述会话标识(SessionID)的作用是:让所述第一WFD设备获知所述第二WFD设备收到了所述会话标识。Wherein, the role of the Association/Reassociation Response Frame carrying the session ID (SessionID) is to let the first WFD device know that the second WFD device has received the session ID.

这里,当所述第二接收单元71是通过M1请求消息获取到重连接标识及对应的会话标识时,查找参数集成功后,所述第三发送单元74会向所述第一WFD设备返回M1应答消息,即所述重连接应答为RTSP OPTIONS应答。Here, when the second receiving unit 71 obtains the reconnection identifier and the corresponding session identifier through the M1 request message, after finding the parameter set successfully, the third sending unit 74 will return the M1 message to the first WFD device. The response message, that is, the reconnection response is an RTSP OPTIONS response.

其中,当所述查找单元73在本地不能查找到对应的参数集时,即查找失败时,会与所述第一WFD设备进行图2所示的完整流程,以完成会话建立过程。Wherein, when the search unit 73 cannot find the corresponding parameter set locally, that is, when the search fails, it will perform the complete process shown in FIG. 2 with the first WFD device to complete the session establishment process.

需要说明的是:所述会话标识(Session ID)与普通的设备标识不同,其更像一个Handler,所述会话标识关联了一次通话过程中WFD设备之间能力协商后的参数集,正是因为关联了这种参数集,才使得所述第二WFD设备可能实现快速重连的效果。It should be noted that: the session ID (Session ID) is different from ordinary device IDs, it is more like a Handler, and the session ID is associated with the parameter set after capability negotiation between WFD devices during a call, precisely because Only by associating such a parameter set can the second WFD device realize the effect of fast reconnection.

实际应用时,第二接收单元71、第三发送单元74、第三接收单元可由第二WFD设备中的CPU、MCU、DSP或FPGA结合收发机实现;所述确定单元72、查找单元73及存储单元可由第二WFD设备中的CPU、MCU、DSP或FPGA实现。During actual application, the second receiving unit 71, the third sending unit 74, and the third receiving unit can be realized by CPU, MCU, DSP or FPGA in the second WFD device in conjunction with a transceiver; the determining unit 72, the searching unit 73 and the storage The unit can be realized by CPU, MCU, DSP or FPGA in the second WFD device.

为实现本发明实施例的方法,本实施例还提供了一种重连接系统,如图8所示,该系统包括:第一WFD设备81及第二WFD设备82;其中,In order to implement the method of the embodiment of the present invention, this embodiment also provides a reconnection system, as shown in FIG. 8 , the system includes: a first WFD device 81 and a second WFD device 82; wherein,

所述第一WFD设备81,用于需要重连接时,向所述第二WFD设备82发送重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;并接收所述第二WFD设备82返回的重连接应答;The first WFD device 81 is configured to send a reconnection identifier and a corresponding session identifier to the second WFD device 82 when reconnection is required; the session identifier is a session identifier that identifies the uniqueness of the connection; and receives the The reconnection response returned by the second WFD device 82;

所述第二WFD设备82,为所述第一WFD设备81的数据接收端设备,用于接收第一WFD设备81发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备81之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备81发送重连接应答;所述重连接应答表征重连接成功。The second WFD device 82 is a data receiving end device of the first WFD device 81, configured to receive the reconnection identifier and the corresponding session identifier sent by the first WFD device 81; according to the reconnection identifier, determine and The connection between the first WFD devices 81 is a reconnection; according to the session identifier, search locally for the negotiated parameter set corresponding to the capability corresponding to the session identifier; A WFD device 81 sends a reconnection response; the reconnection response indicates that the reconnection is successful.

需要说明的是:所述第一WFD设备81与所述第二WFD设备82的具体处理过程已在上文详述,这里不再赘述。It should be noted that: the specific processing procedures of the first WFD device 81 and the second WFD device 82 have been described in detail above, and will not be repeated here.

本发明实施例提供的方案,需要重连接时,第一WFD设备向第二WFD设备发送重连接标识及对应的会话标识;所述会话标识为标识连接唯一性的会话标识;所述第二WFD设备为所述第一WFD设备的数据接收端设备所述第二WFD设备接收第一WFD设备发送的重连接标识及对应的会话标识;根据所述重连接标识,确定与所述第一WFD设备之间的连接为重连接;根据所述会话标识,在本地查找存储的与所述会话标识对应的能力协商后的参数集;并在查找成功后,向所述第一WFD设备发送重连接应答;所述重连接应答表征重连接成功,由于重连接时,所述第二WFD设备仅根据收到的重连接标识,来确定本次连接为重连接,且仅根据会话标识查找对应的能力协商后的参数集,从而省去了WFD能力协商阶段所进行的消息交互过程,如此,大大提高了连接速度,能加速重连接过程,进而提升了用户体验,提升了WFD设备互联的实用性。In the solution provided by the embodiment of the present invention, when reconnection is required, the first WFD device sends the reconnection identifier and the corresponding session identifier to the second WFD device; the session identifier is a session identifier that identifies the uniqueness of the connection; the second WFD The device is the data receiving end device of the first WFD device. The second WFD device receives the reconnection identifier and the corresponding session identifier sent by the first WFD device; according to the reconnection identifier, determine the connection with the first WFD device The connection between them is a reconnection; according to the session identifier, search locally for the negotiated parameter set corresponding to the capability corresponding to the session identifier; and after the search succeeds, send a reconnection response to the first WFD device ; The reconnection response indicates that the reconnection is successful, because during reconnection, the second WFD device only determines that this connection is a reconnection according to the received reconnection identifier, and only searches for the corresponding capability negotiation according to the session identifier The final parameter set saves the message interaction process in the WFD capability negotiation stage. In this way, the connection speed is greatly improved, and the reconnection process can be accelerated, thereby improving user experience and improving the practicability of WFD device interconnection.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 and optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。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 operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.

Claims (15)

1. A reconnection method applied to a first WFD device, the method comprising:
when reconnection is needed, sending a reconnection identifier and a corresponding session identifier to second WFD equipment; the reconnection identifier is used for indicating that the current connection of the second WFD equipment is reconnection; the session identifier is used for indicating the second WFD device to acquire a parameter set after capability negotiation corresponding to the session identifier; the session identifier is a session identifier for identifying the uniqueness of connection; the second WFD equipment is receiving end equipment of the first WFD equipment;
receiving a reconnection response returned by the second WFD equipment; the reconnect reply is indicative of a successful reconnection.
2. The method of claim 1, wherein the reconnection identity and the corresponding session identity are carried in an RTSP streaming protocol (RTSP) selection OPTIONS request message, wherein the RTSP selection OPTIONS request message is used to obtain an RTSP method set supported by the second WFD device;
accordingly, the reconnection response is an RTSP OPTIONS response.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and in the point-to-point P2P connection establishment phase before reconnection, sending the session identification to the second WFD device.
4. The method of claim 3, wherein the session identification sent to the second WFD device is carried in a join/reconnect request frame.
5. The method of claim 3, further comprising:
generating the session identifier before the P2P connection is established;
storing the session identification locally.
6. A reconnection method, applied to a second WFD device, the method comprising:
receiving a reconnection identifier and a corresponding session identifier sent by first WFD equipment; the second WFD equipment is receiving end equipment of the first WFD equipment; the session identifier is a session identifier for identifying the uniqueness of connection;
determining that the connection between the first WFD equipment is reconnection according to the reconnection identifier;
according to the session identifier, locally searching a stored parameter set after capability negotiation corresponding to the session identifier;
after the search is successful, sending a reconnection response to the first WFD equipment; the reconnect reply is indicative of a successful reconnection.
7. The method of claim 6, wherein the reconnection identifier and the corresponding session identifier are carried in an RTSP OPTIONS request message, and wherein the RTSP OPTIONS request message is used to obtain an RTSP method set supported by the second WFD device;
correspondingly, extracting the reconnection identifier and the corresponding session identifier from the RTSP OPTIONS request message;
the reconnection response is an RTSP OPTIONS response.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
receiving the session identifier sent by the first WFD device in a P2P connection establishment phase before the reconnection;
locally saving the received session identification;
in the session establishment stage before reconnection, after performing capability negotiation with the first WFD device, storing a correspondence between the session identifier and the parameter set after the capability negotiation.
9. The method of claim 8, wherein the received session identifier is carried in a join/reconnect request frame;
accordingly, the session identification is extracted from the join/reconnect request frame.
10. A first WFD device, wherein the first WFD device comprises: a first transmitting unit and a first receiving unit; wherein,
the first sending unit is used for sending the reconnection identifier and the corresponding session identifier to the second WFD device when reconnection is needed; the reconnection identifier is used for indicating that the current connection of the second WFD equipment is reconnection; the session identifier is used for indicating the second WFD device to acquire a parameter set after capability negotiation corresponding to the session identifier; the session identifier is a session identifier for identifying the uniqueness of connection; the second WFD equipment is receiving end equipment of the first WFD equipment;
the first receiving unit is configured to receive a reconnection response returned by the second WFD device; the reconnect reply is indicative of a successful reconnection.
11. The device of claim 10, wherein the first WFD device further comprises: a second sending unit, configured to send the session identifier to the second WFD in the P2P connection establishment phase before reconnection.
12. The device of claim 11, wherein the first WFD device further comprises: a generating unit, configured to generate the session identifier before the P2P connection is established; and stores the session identification locally.
13. A second WFD device, wherein the second WFD device comprises: the device comprises a second receiving unit, a determining unit, a searching unit and a third sending unit; wherein,
the second receiving unit is configured to receive a reconnection identifier and a corresponding session identifier sent by the first WFD device; the second WFD equipment is receiving end equipment of the first WFD equipment; the session identifier is a session identifier for identifying the uniqueness of connection;
the determining unit is configured to determine, according to the reconnection identifier, that the connection with the first WFD device is reconnection;
the searching unit is used for locally searching the stored parameter set after the capability negotiation corresponding to the session identifier according to the session identifier;
the third sending unit is configured to send a reconnection response to the first WFD device after the successful search; the reconnect reply is indicative of a successful reconnection.
14. The device of claim 13, wherein the second WFD device further comprises: a third receiving unit and a storage unit; wherein,
the third receiving unit, configured to receive, in the P2P connection establishment phase before reconnection, the session identifier sent by the first WFD device;
the storage unit is used for locally saving the received session identifier; and in the session establishment stage before reconnection, after carrying out capability negotiation with the first WFD device, storing the corresponding relation between the session identifier and the parameter set after the capability negotiation.
15. A reconnecting system, characterized in that the system comprises: a first WFD device and a second WFD device; wherein,
the first WFD device is used for sending a reconnection identifier and a corresponding session identifier to the second WFD device when reconnection is needed; the session identifier is a session identifier for identifying the uniqueness of connection; receiving a reconnection response returned by the second WFD equipment;
the second WFD device is a data receiving end device of the first WFD device, and is configured to receive the reconnection identifier and the corresponding session identifier sent by the first WFD device; determining that the connection between the first WFD equipment is reconnection according to the reconnection identifier; according to the session identifier, locally searching a stored parameter set after capability negotiation corresponding to the session identifier; after the search is successful, sending a reconnection response to the first WFD equipment; the reconnect reply is indicative of a successful reconnection.
CN201610004338.3A 2016-01-04 2016-01-04 Reconnection method, reconnection system and WFD (Windows presentation device) Active CN106941732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610004338.3A CN106941732B (en) 2016-01-04 2016-01-04 Reconnection method, reconnection system and WFD (Windows presentation device)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610004338.3A CN106941732B (en) 2016-01-04 2016-01-04 Reconnection method, reconnection system and WFD (Windows presentation device)

Publications (2)

Publication Number Publication Date
CN106941732A true CN106941732A (en) 2017-07-11
CN106941732B CN106941732B (en) 2020-08-04

Family

ID=59468551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610004338.3A Active CN106941732B (en) 2016-01-04 2016-01-04 Reconnection method, reconnection system and WFD (Windows presentation device)

Country Status (1)

Country Link
CN (1) CN106941732B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021196921A1 (en) * 2020-04-02 2021-10-07 腾讯科技(深圳)有限公司 Session re-establishing or sharing methods, apparatuses, systems and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765228B (en) * 2010-01-29 2012-07-11 杭州华三通信技术有限公司 Recovery method of CAPWAP tunnel and device thereof
CN103392359A (en) * 2011-01-21 2013-11-13 高通股份有限公司 Negotiating capabilities between a wireless sink and a wireless source device
US20140096164A1 (en) * 2012-09-28 2014-04-03 Marvell World Trade Ltd. Enhanced user experience for miracast devices
CA2938753A1 (en) * 2014-02-06 2015-08-13 Lg Electronics Inc. Method for performing wi-fi display service and device for same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765228B (en) * 2010-01-29 2012-07-11 杭州华三通信技术有限公司 Recovery method of CAPWAP tunnel and device thereof
CN103392359A (en) * 2011-01-21 2013-11-13 高通股份有限公司 Negotiating capabilities between a wireless sink and a wireless source device
US20140096164A1 (en) * 2012-09-28 2014-04-03 Marvell World Trade Ltd. Enhanced user experience for miracast devices
CA2938753A1 (en) * 2014-02-06 2015-08-13 Lg Electronics Inc. Method for performing wi-fi display service and device for same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021196921A1 (en) * 2020-04-02 2021-10-07 腾讯科技(深圳)有限公司 Session re-establishing or sharing methods, apparatuses, systems and storage medium
US11985198B2 (en) 2020-04-02 2024-05-14 Tencent Technology (Shenzhen) Company Ltd Method, apparatus, and system for session reestablishment or session sharing, and storage medium

Also Published As

Publication number Publication date
CN106941732B (en) 2020-08-04

Similar Documents

Publication Publication Date Title
KR101876533B1 (en) Dockee-centric wireless docking
EP2640100B1 (en) Method and apparatus for providing an enhanced wi-fi display session in a wi-fi display network
EP3078182B1 (en) Wireless media sharing from multiple sources to a single sink
US9743225B2 (en) Method and apparatus for forming communication link using bluetooth
KR102113060B1 (en) Method and system for establishing wireless fidelity direct(wfd) connection in a wfd network environment
EP3269125B1 (en) Method for maintaining a persistent miracast session over wireless link
US10264038B2 (en) Discovery and management of synchronous audio or video streaming service to multiple sinks in wireless display system
WO2016110169A1 (en) Display processing method and device
EP3114820B1 (en) Method and system for establishing a service session between seeker device and advertiser device
CN105682182B (en) A kind of discovery of equipment and equipment connection method, equipment and system
JP2018506874A5 (en)
US10419543B2 (en) Method and system for establishing a connection between a seeker device and a target device
EP3227758B1 (en) Wireless docking system for audio-video relay
CN104394127A (en) A multimedia sharing method, device and system
CN111386749A (en) Method for establishing point-to-point service sessions over infrastructure links
EP2873169B1 (en) Scheme for device discovery and p2p group formation
CN106941732B (en) Reconnection method, reconnection system and WFD (Windows presentation device)
CN105653219A (en) Screen transmission control method, apparatus, system and related equipment
CN105722037B (en) A method and apparatus for interacting between a WLAN device and a WFD device
CN105812910B (en) A kind of many-one is wirelessly the same as the method and apparatus of screen session establishment
CN103874239B (en) The implementation method and device of a kind of network interface of multimode terminal data card
WO2025008041A1 (en) A method and devices for extending capability availability of an input/output device
CN108307534A (en) A kind of equipment room establishes the method and device of connection

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
GR01 Patent grant
GR01 Patent grant