WO2015135409A1 - 一种会话建立方法、终端及系统 - Google Patents

一种会话建立方法、终端及系统 Download PDF

Info

Publication number
WO2015135409A1
WO2015135409A1 PCT/CN2015/072832 CN2015072832W WO2015135409A1 WO 2015135409 A1 WO2015135409 A1 WO 2015135409A1 CN 2015072832 W CN2015072832 W CN 2015072832W WO 2015135409 A1 WO2015135409 A1 WO 2015135409A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
description information
media description
media
information
Prior art date
Application number
PCT/CN2015/072832
Other languages
English (en)
French (fr)
Inventor
陈鑫
徐明远
胡彬
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015135409A1 publication Critical patent/WO2015135409A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a session establishment method, a terminal, and a system.
  • the codec technology supported by the terminal depends on the hardware codec module and the software codec module. Some terminals prefer to decode, such as a player; some terminals prefer coding, such as a media capture device, and the codec capability between different terminals may be difference.
  • the first terminal supports the H.264 decoding technology and the VP8 encoding technology
  • the first terminal supports the asymmetric codec technology
  • the second terminal supports the H.264 codec technology and the VP8 decoding capability
  • the second terminal can support the asymmetric coding.
  • Decoding technology or symmetric codec technology When the first terminal and the second terminal establish a session, if the first terminal supports the asymmetric codec technology, and the second terminal only supports the symmetric codec technology, the first terminal cannot be backward compatible with the second terminal, resulting in the first terminal. The matching with the codec technology of the second terminal fails, and the session establishment fails.
  • the first terminal and the second terminal can respectively use the SDP (Session Description Protocol,
  • SDP Session Description Protocol
  • the sendonly attribute in the session description protocol only sends but does not receive the media stream.
  • the recvonly attribute only receives but does not send the media stream. That is, the first terminal sends the media stream of the VP8 encoding technology through the sendend attribute of the sending channel, and receives the H through the receiving channel recvonly attribute.
  • the media stream of the .264 decoding technology receives the media stream of the VP8 decoding technology through the receiving channel recvonly attribute, and transmits the media stream of the H.264 encoding technology through the sendonly attribute of the sending channel, so as to achieve the matching of the asymmetric codec technology to succeed.
  • the embodiment of the invention provides a session establishment method, a terminal and a system, which can establish a session between two terminals and improve resource utilization.
  • a first aspect of the present invention provides a session establishment method, where the method includes:
  • the second terminal receives the call request information sent by the first terminal, where the call request information carries the media description information of the first terminal, and the media description information of the first terminal is used to describe the coding technology supported by the first terminal. And decoding techniques;
  • the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, according to the media description information of the first terminal and the media description of the second terminal.
  • the matching result of the information is used to send the media description information of the second terminal to the first terminal, so that the first terminal sends the media description information of the second terminal and the second terminal according to the second terminal.
  • a media stream session is established between the terminals.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in a session description protocol.
  • the second terminal determines whether the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched.
  • the second terminal determines that at least one of the media description information of the first terminal matches the at least one of the media description information of the second terminal, and the media of the first terminal Determining that the media description information of the first terminal and the media description information of the second terminal are not matched by at least one of the decoding technologies of the second terminal and the media description information of the second terminal Symmetric matching, wherein at least one encoding technique of the second terminal that matches the media description information of the first terminal and a second terminal that matches the media description information of the first terminal At least one decoding technique at the end is asymmetric.
  • the second terminal according to the matching result of the media description information of the first terminal and the media description information of the second terminal, Transmitting the media description information of the second terminal by the first terminal includes:
  • the media description information of the terminal is asymmetrically matched by at least one coding technique and at least one decoding technique.
  • the second terminal is configured to perform the matching result according to the media description information of the first terminal and the media description information of the second terminal. Transmitting the media description information of the second terminal by the first terminal includes:
  • the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, according to the media description information of the first terminal and the media description of the second terminal
  • the matching result of the information is used to send the media description information of the second terminal to the first terminal, so that the first terminal determines the media description information of the second terminal sent by the second terminal, and the first Whether the media description information of the terminal is asymmetrically matched, and if the first terminal determines that the media description information of the second terminal sent by the second terminal is asymmetrically matched with the media description information of the first terminal, A media stream session is established between the second terminals.
  • a second aspect of the present invention provides a terminal, where the terminal includes:
  • a call request receiving unit configured to receive call request information sent by the first terminal, where the call request information carries media description information of the first terminal, where media description information of the first terminal is used to describe the first terminal Supported coding techniques and decoding techniques;
  • a determining unit configured to determine whether the media description information of the first terminal and the media description information of the first terminal received by the call request receiving unit are asymmetrically matched
  • a media description sending unit configured to: when the determining unit determines that the media description information of the first terminal is asymmetrically matched with the media description information of the first terminal, according to the media description information of the first terminal and the The matching result of the media description information is sent to the first terminal to send the media description information to the first terminal, so that the first terminal establishes a media stream session according to the media description information of the first terminal.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in a session description protocol.
  • the determining unit includes:
  • the coding capability determining module is configured to determine whether at least one of the media description information of the first terminal matches at least one of the media description information of the first terminal;
  • a decoding capability determining module configured to determine whether at least one of the media description information of the first terminal matches at least one of the media description information of the first terminal;
  • a media description determining module configured to: when the encoding capability determining module determines that at least one of the media description information of the first terminal matches at least one of the media description information of the first terminal, and the Determining the media description information of the first terminal when the decoding capability determining module determines that at least one of the media description information of the first terminal matches at least one of the media description information of the first terminal Asymmetric matching with the media description information of the self, wherein at least one encoding technology of the self matching the media description information of the first terminal and at least one of itself matching the media description information of the first terminal
  • the decoding technique is asymmetric.
  • the media description sending unit is configured to:
  • the media description sending unit is configured to send the first media description information of the first media to the first terminal, where the first media description information is used to describe all media description information of the self and the first
  • the media description information of the terminal is asymmetrically matched by at least one coding technique and at least one decoding technique.
  • the media description sending unit is further configured to: when the determining unit determines the media description information of the first terminal and the media of the self When the description information is asymmetrically matched, the media description information is sent to the first terminal according to the matching result of the media description information of the first terminal and the media description information of the first terminal, so that the first terminal is used. Determining whether the media description information of the first terminal and the media description information of the first terminal are asymmetrically matched, if the first terminal determines that the media description information of the first terminal is asymmetrically matched with the media description information of the first terminal. , establish a media stream session with itself.
  • a third aspect of the present invention provides a session establishment system, where the system includes a first terminal and a second terminal, where:
  • the first terminal is configured to send call request information to the second terminal, where the call request information carries media description information of the first terminal, and receives media of the second terminal returned by the second terminal Descriptive information; establishing a media stream session with the second terminal according to the received media description information of the second terminal;
  • the second terminal is configured to receive call request information sent by the first terminal, and determine whether the received media description information of the first terminal and the media description information of the second terminal are asymmetrically matched; If it is determined that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, the matching result of the media description information of the first terminal and the media description information of the second terminal is used.
  • the first terminal sends media description information of the second terminal.
  • the second terminal receives the call request information sent by the first terminal, where the call request information carries the media description information of the first terminal, and determines whether the media description information of the first terminal and the media description information of the second terminal are not Symmetrically matching, if the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, the media description information of the second terminal is sent to the first terminal, so that the first terminal is configured according to the second terminal.
  • a media stream session is established between the media description information and the second terminal, so that a session can be established between the two terminals, and the media stream is sent to the peer end and the media stream sent by the peer end is sent through the same channel, thereby improving resource utilization.
  • FIG. 1 is a schematic flowchart of a session establishment method provided in a first embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a session establishment method provided in a second embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a session establishment method according to a third embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a terminal provided in a first embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of the determining unit of FIG. 4 in the first embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a terminal provided in a second embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a session establishment system according to an embodiment of the present invention.
  • the session establishing method in the embodiment of the present invention may be configured to receive the call request information sent by the first terminal in the second terminal, where the call request information carries the media description information of the first terminal, where the media description information is used to describe the first terminal.
  • the call request information carries the media description information of the first terminal, where the media description information is used to describe the first terminal.
  • Supporting the coding technology and the decoding technology determining whether the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, and if the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, Sending the media description information of the second terminal to the first terminal, so that a media stream session is established between the first terminal and the second terminal, so that a session can be established between the two terminals, and the media stream is sent to the peer end through the same channel.
  • the terminal mentioned in the embodiment of the present invention may include a smart phone (such as an Android mobile phone or an iOS mobile phone, etc.), a tablet computer, a palmtop computer, a mobile Internet device (MID), or a wearable smart device, among which the first The terminal supports asymmetric codec technology, and the second terminal can support symmetric codec technology or asymmetric codec technology.
  • a smart phone such as an Android mobile phone or an iOS mobile phone, etc.
  • a tablet computer such as an Android mobile phone or an iOS mobile phone, etc.
  • MID mobile Internet device
  • the terminal supports asymmetric codec technology
  • the second terminal can support symmetric codec technology or asymmetric codec technology.
  • FIG. 1 is a schematic flowchart of a session establishment method according to a first embodiment of the present invention.
  • the session establishment method in this embodiment is described from the perspective of a second terminal, where the first terminal supports The asymmetric coding and decoding technology, the second terminal supports the asymmetric codec technology.
  • the session establishment method may include:
  • Step S101 Receive call request information sent by the first terminal, where the call request information carries media description information of the first terminal.
  • the second terminal may receive the call request information sent by the first terminal, where the call request information carries media description information of the first terminal, where the media description information is used to describe an encoding technology and a decoding technology supported by the first terminal.
  • the media description information is through the rtpmap attribute or the custom media in the session description protocol.
  • the properties are described.
  • the media description information of the exemplary first terminal may also be as follows:
  • Step S102 Determine whether the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched.
  • the second terminal may determine whether the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched. Specifically, the second terminal may determine whether the first terminal exists. At least one of the media description information matches at least one of the media description information of the second terminal, and determines whether at least one of the media description information of the first terminal and the second terminal At least one coding technology in the media description information is matched, if the second terminal determines that at least one of the media description information of the first terminal matches the at least one of the media description information of the second terminal, and the If at least one of the media description information of the terminal matches the at least one of the media description information of the second terminal, determining that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched At least one coding technique of the second terminal that matches the media description information of the first terminal And a second terminal of the first terminal and the media description information matches at least one asymmetric decoding technique.
  • the second terminal supports the H.264 encoding, the H.264 decoding technology, and the VP8 encoding technology.
  • the second terminal knows that the first terminal supports the H.264 encoding technology and the VP8 decoding technology according to the media description information of the first terminal, and then the second terminal.
  • the terminal may determine whether there is at least one coding technology supported by the first terminal and at least one decoding technology supported by the second terminal, and determine whether there is at least one decoding technology supported by the first terminal and at least one supported by the second terminal.
  • the coding technology is matched, if the second terminal determines that the H.264 coding technology supported by the first terminal matches the H.264 decoding technology supported by the second terminal, and the VP8 decoding technology supported by the first terminal and the VP8 coding supported by the second terminal.
  • the technical matching determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched.
  • the second terminal may determine, according to the priority of the coding technology and the decoding technology supported by the first terminal, whether there is a coding technology with the highest priority among the media description information of the first terminal and the second terminal.
  • a decoding technique in the media description information is matched, and determining whether there is a decoding technology with the highest priority among the media description information of the first terminal and a coding technology in the media description information of the second terminal, if the second terminal determines
  • the encoding technology with the highest priority among the media description information of the first terminal matches the decoding technology of the media description information of the second terminal, and determines the decoding technology with the highest priority among the media description information of the first terminal and the second terminal.
  • the one of the media descriptions of the media description information is matched, and the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched.
  • Step S103 If it is determined that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, send the media description information of the second terminal to the first terminal, so that the first terminal is configured according to the media of the second terminal. A media stream session is established between the information and the second terminal.
  • the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, sending, according to the matching result of the media description information of the first terminal and the media description information of the second terminal, the first terminal
  • the media description information of the second terminal is used to enable the first terminal to establish a media stream session with the second terminal according to the media description information of the second terminal sent by the second terminal.
  • the second terminal determines that the media description information of the first terminal does not match the media description information of the second terminal, the second terminal sends a matching failure information to the first terminal, where the matching failure information is used to indicate the second terminal and the first The media stream session establishment between the terminals failed.
  • the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched
  • the media description information of the first terminal and the media description of the second terminal are The matching result of the information is used to send the media description information of the second terminal to the first terminal, so that the first terminal determines whether the media description information of the second terminal sent by the second terminal and the media description information of the first terminal are asymmetrically matched.
  • the media description information of the second terminal sent by the second terminal is asymmetrically matched with the media description information of the first terminal, a media stream session is established between the first terminal and the second terminal.
  • the media description information of the second terminal that is sent by the second terminal to the first terminal may be all the media description information of the second terminal, or may be the first media description information of the second terminal, where the first media description information is used to describe At least one coding technology and at least one decoding technology that are asymmetrically matched with the media description information of the first terminal in the media description information of the second terminal, for example, the second terminal determines the H.264 coding technology supported by the first terminal
  • the H.264 decoding technology supported by the second terminal is matched, and the VP8 decoding technology supported by the first terminal matches the VP8 encoding technology supported by the second terminal, and the media description information of the second terminal sent by the second terminal may be H.264 encoding.
  • the H.264 decoding technology and the VP8 encoding technology may also be an H.264 decoding technology and a VP8 encoding technology that are asymmetrically matched with the media description information of the first terminal.
  • the second terminal receives the call request information sent by the first terminal, and the call request information carries the media description information of the first terminal, and determines the media description information of the first terminal and the media of the second terminal. Determining whether the information is asymmetrically matched.
  • the media description information of the second terminal is sent to the first terminal, so that the first terminal Establishing a media stream session between the first terminal supporting the asymmetric codec technology and the second terminal supporting the asymmetric codec technology, and establishing a session between the second terminal supporting the asymmetric codec technology according to the media description information of the second terminal
  • a channel sends a media stream to the peer end and receives the media stream sent by the peer end to improve resource utilization.
  • FIG. 2 is a schematic flowchart of a session establishment method according to a second embodiment of the present invention.
  • the session establishment method in this embodiment is described from the perspective of a first terminal, where the first terminal supports
  • the asymmetric codec technology as shown in the figure, the session establishment method may include:
  • step S201 the call request information is sent to the second terminal, where the call request information carries the media description information of the first terminal, so that the second terminal determines whether the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched. And if the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, returning the media description information of the second terminal.
  • the first terminal sends the call request information to the second terminal, where the call request information carries the media description information of the first terminal, where the media description information is used to describe the coding technology and the decoding technology supported by the first terminal, so that the second terminal determines Whether the media description information of the terminal is asymmetrically matched with the media description information of the second terminal, and if the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, where the first terminal is And at least one coding technology of the second terminal that matches the media description information and the at least one decoding technology of the second terminal that matches the media description information of the first terminal are asymmetric, and according to the media description information of the first terminal
  • the matching result with the media description information of the second terminal returns the media description information of the second terminal.
  • the matching failure information is returned, where the matching failure information is used to indicate between the second terminal and the first terminal.
  • the media stream session fails to be established, and the further first terminal receives the matching failure information returned by the second terminal.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in the session description protocol.
  • the media description information of the exemplary first terminal may also be as follows:
  • the second terminal determines the H.264 encoding technology in the media description information of the first terminal and the media description information of the second terminal.
  • H.264 encoding technology and H.264 decoding technology match.
  • Step S202 Receive media description information of the second terminal returned by the second terminal.
  • the first terminal receives the media description information of the second terminal that is returned by the second terminal according to the matching result of the media description information of the first terminal and the media description information of the second terminal.
  • the first terminal may receive all media description information of the second terminal returned by the second terminal, or receive the first media description information of the second terminal returned by the second terminal, where the first terminal
  • the media description information is used to describe at least one coding technology and at least one decoding technology that are asymmetrically matched with the media description information of the first terminal in all media description information of the second terminal.
  • the first terminal may receive the first media description information of the second terminal returned by the second terminal.
  • the first terminal may determine whether the media description information of the second terminal and the media description information of the first terminal are asymmetrically matched, if the first terminal determines the media description information of the second terminal. If the media description information of a terminal is asymmetrically matched, a media stream session is established between the terminal and the second terminal.
  • the first terminal may determine whether there is at least one coding technology in the media description information of the second terminal that matches at least one of the media description information of the first terminal, and determine whether the second terminal exists. At least one of the media description information is matched with at least one of the media description information of the first terminal, and the first terminal determines that at least one of the media description information of the second terminal is present and the first At least one of the media description information of the terminal matches, and at least one of the media description information of the second terminal and the first terminal If the at least one coding technology of the media description of the terminal matches, the received media description information of the second terminal is asymmetrically matched with the media description information of the first terminal, where the media description information of the first terminal is At least one encoding technique of the matched second terminal and at least one decoding technique of the second terminal that matches the media description information of the first terminal are asymmetric.
  • the second terminal when the second terminal only supports the symmetric codec technology, if the first terminal determines that the media description information of the second terminal does not match the media description information of the first terminal, all the first terminals are sent to the second terminal. And media description information other than the media description information of the first terminal that does not match the first media description information of the second terminal in the media description information, so that the second terminal determines other media description information of the first terminal and the second terminal Whether the media description information is symmetrically matched.
  • the second terminal determines that the other media description information of the first terminal and the media description information of the second terminal are symmetrically matched, returning to the second media description information of the second terminal, where the second media description information is used to describe all the second terminal At least one coding technology and at least one decoding technology that are symmetrically matched with other media description information of the first terminal in the media description information, the first terminal receives the second media description information of the second terminal returned by the second terminal, and receives the second media And establishing a media stream session between the second media description information of the second terminal and the second terminal.
  • the second terminal determines that the other media description information of the first terminal does not match the media description information of the second terminal, the matching failure information is returned, and the first terminal receives the matching failure information returned by the second terminal. Then, the media stream session establishment between the first terminal and the second terminal fails.
  • the first terminal supports VP8 encoding technology, VP8 decoding technology, and H.264 encoding technology
  • the second terminal supports H.264 encoding technology, H.264 decoding technology, and VP8 encoding technology, wherein the second terminal only supports symmetric codec technology.
  • the first terminal sends the media description information of the first terminal to the second terminal, so that the second terminal identifies the first terminal to support the VP8 encoding technology and the VP8 decoding technology, and the H.264 encoding technology and the H.264 decoding technology.
  • the second terminal determines that the H.264 encoding technology in the media description information of the first terminal matches the H.264 encoding technology and the H.264 decoding technology in the media description information of the second terminal, and returns the first media description of the second terminal.
  • the first media description information is used to describe the H.264 encoding technology and the H.264 decoding technology supported by the second terminal.
  • the first terminal determines the second If the first media description information of the terminal does not match the H.264 encoding technology in the media description information of the first terminal, the other media description information is sent to the second terminal, where the other media description information is The VP8 encoding technology and the VP8 decoding technology supported by the first terminal are used to enable the second terminal to determine other media description information and the second terminal of the first terminal.
  • the media description information of the terminal does not match, and the matching failure information is returned, and the first terminal receives the matching failure information returned by the second terminal.
  • the first terminal supporting the asymmetric codec technology can be backward compatible, and only supports symmetry. A media stream session is established between the second terminals of the codec technology to improve resource utilization.
  • the first media description information of the second terminal received by the first terminal may be that the second terminal determines that the coding technology and the decoding technology in the media description information of the first terminal are asymmetrically matched, respectively.
  • a decoding technique and an encoding technique may also be a plurality of decoding technologies and multiple encoding technologies that the second terminal determines to asymmetrically match all coding techniques and all decoding technologies in the media description information of the first terminal.
  • the first terminal determines that one of the first media description information of the second terminal matches one of the media description information of the first terminal, and the first media description information of the second terminal
  • the first terminal determines that the first media description information of the second terminal is asymmetrically matched with the media description information of the first terminal, and triggers Establishing a media stream session between the two terminals; the first terminal determines that all coding technologies in the first media description information of the second terminal do not match all decoding technologies in the media description information of the first terminal, or When all the decoding technologies in one media description information do not match all the coding technologies in the media description information of the first terminal, the first end Determining that the first media description information of the second
  • the first terminal determines that the first media description information of the second terminal does not match the media description information of the first terminal, and the media of the first terminal that does not match the first media description information of the second terminal does not exist.
  • the media description information other than the information is described, the media description information that the information body is empty is sent to the second terminal, so that the second terminal returns the matching failure information.
  • Step S203 Establish a media stream session with the second terminal according to the received media description information of the second terminal.
  • the first terminal may establish a media stream session with the second terminal according to the received media description information of the second terminal, so that the first terminal and the second terminal transmit the media stream through the media stream session channel.
  • the first terminal sends the call request information to the second terminal, where the call request information carries the media description information of the first terminal, so that the second terminal determines the media description information of the first terminal.
  • the media description information of the second terminal is asymmetrically matched, and if the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched, the media description information of the second terminal is returned, and the first terminal receives
  • the second terminal returns the media description information of the second terminal, and establishes a media stream session with the second terminal, so that a session can be established between the two terminals, and the media stream and the receiving pair are sent to the peer end through the same channel.
  • the media stream sent by the terminal improves resource utilization.
  • FIG. 3 is a schematic flowchart of a method for establishing a session according to a third embodiment of the present invention.
  • the first terminal in this embodiment supports asymmetric codec technology, and the second terminal only supports symmetric codec technology.
  • the session establishment method in this embodiment may include:
  • Step S301 The first terminal sends call request information to the second terminal, where the call request information carries media description information of the first terminal.
  • the first terminal may send call request information to the second terminal, where the call request information carries media description information of the first terminal, where the media description information is used to describe an encoding technology and a decoding technology supported by the first terminal.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in the session description protocol.
  • the media description information of the exemplary first terminal may also be as follows:
  • Step S302 The second terminal determines whether the media description information of the first terminal and the media description information of the second terminal are symmetrically matched.
  • the second terminal may determine whether the media description information of the first terminal and the media description information of the second terminal are symmetrically matched, and if the second terminal determines the media description information of the first terminal and the second If the media description information of the terminal is symmetrically matched, step S303 is further performed; if the second terminal determines that the media description information of the first terminal does not match the media description information of the second terminal, the matching failure information is sent to the first terminal, and the matching fails. The information is used to indicate that the media stream session establishment between the first terminal and the second terminal fails.
  • the second terminal may determine whether there is at least one coding technology in the media description information of the first terminal and at least one of the media description information in the second terminal, and determine whether the first terminal exists. At least one of the media description information is matched with at least one of the media description information of the second terminal, and the second terminal determines at least one of the media description information of the first terminal and the second terminal.
  • the media description information is symmetrically matched with the media description information of the second terminal, wherein at least one coding technology of the second terminal that matches the media description information of the first terminal and the second terminal that matches the media description information of the first terminal At least one decoding technique is symmetrical.
  • the first terminal supports VP8 encoding technology, VP8 decoding technology, and H.264 encoding technology
  • the second terminal supports VP8 encoding technology and VP8 decoding technology, and also supports H.264 encoding technology and H.264 decoding technology, wherein H.264 The encoding technology and the H.264 decoding technology have higher priority than the VP8 encoding technology and the VP8 decoding technology.
  • the second terminal After receiving the media description information of the first terminal, the second terminal identifies the first terminal as supporting according to the media description information of the first terminal.
  • the second terminal determines the H.264 encoding technology in the media description information of the first terminal and the H.264 encoding technology and H.264 in the media description information of the second terminal.
  • the decoding technology is matched, it is determined that the media description information of the first terminal and the media description information of the second terminal are symmetrically matched.
  • Step S303 If the media description information of the first terminal and the media description information of the second terminal are symmetrically matched, return the first media description information of the second terminal.
  • the second terminal determines that the media description information of the first terminal and the media description information of the second terminal are symmetrically matched, returning to the first media description information of the second terminal, where the first media description information is used to describe all media of the second terminal Decoding at least one encoding technique and at least one decoding technique symmetrically matching the media description information of the first terminal.
  • the H.264 encoding technology and the H.264 decoding technology supported by the second terminal have higher priority than the VP8 encoding technology and the VP8 decoding technology, and the second terminal determines the H.264 encoding technology in the media description information of the first terminal.
  • the H.264 encoding technology in the media description information of the second terminal matches the H.264 decoding technology
  • the media description information of the first terminal is symmetrically matched with the media description information of the second terminal, and the second terminal is returned.
  • a media description information, the first media description information is used to describe the H.264 encoding technology and the H.264 decoding technology supported by the second terminal.
  • Step S304 Determine whether the first media description information of the second terminal and the media description information of the first terminal are symmetrically matched.
  • the first terminal may determine whether the first media description information of the second terminal is symmetrically matched with the media description information of the first terminal, and if the first terminal determines the first terminal of the second terminal If the media description information is symmetrically matched with the media description information of the first terminal, step S309 is directly performed; if the first terminal determines that the first media description information of the second terminal does not match the media description information of the first terminal, step S305 is further performed. .
  • the first terminal supports the VP8 encoding technology, the VP8 decoding technology, and the H.264 encoding technology. After receiving the first media description information of the second terminal, the first terminal determines the H. in the first media description information of the second terminal. If the 264 coding technology and the H.264 decoding technology do not match the H.264 coding technology in the media description information of the first terminal, it is determined that the first media description information of the second terminal does not match the media description information of the first terminal.
  • Step S305 if the first media description information of the second terminal and the media description information of the first terminal If there is no match, the other media description information of the first terminal is sent to the second terminal.
  • the first terminal determines that the first media description information of the second terminal does not match the media description information of the first terminal, the first terminal sends the first media description information of the second terminal to the second terminal.
  • Other media description information other than the media description information of the first terminal that does not match.
  • the first terminal determines that the H.264 encoding technology and the H.264 decoding technology in the first media description information of the second terminal do not match the H.264 encoding technology in the media description information of the first terminal, and then goes to the second The terminal sends other media description information, which is used to describe the VP8 encoding technology and the VP8 decoding technology supported by the first terminal.
  • Step S306 determining whether the other media description information of the first terminal and the media description information of the second terminal are symmetrically matched.
  • the second terminal may determine whether the other media description information of the first terminal and the media description information of the second terminal are symmetrically matched, and if the second terminal determines other media description information of the first terminal. If the media description information of the second terminal is symmetrically matched, the step S307 is further performed; if the second terminal determines that the other media description information of the first terminal does not match the media description information of the second terminal, the matching failure information is returned.
  • the second terminal receives the other media description information of the first terminal, and may determine that the VP8 encoding technology in the other media description information of the first terminal matches the VP8 decoding technology in the media description information of the second terminal, and the first terminal The VP8 decoding technology in the other media description information is matched with the VP8 encoding technology in the media description information of the second terminal, and then the other media description information of the first terminal is symmetrically matched with the media description information of the second terminal.
  • Step S307 If the other media description information of the first terminal and the media description information of the second terminal are symmetrically matched, return the second media description information of the second terminal.
  • the second terminal determines that the other media description information of the first terminal and the media description information of the second terminal are symmetrically matched, returning to the second media description information of the second terminal, where the second media description information is used to describe all the second terminal At least one coding technique and at least one decoding technique in the media description information that symmetrically match other media description information of the first terminal.
  • the second terminal determines that the VP8 encoding technology in the other media description information of the first terminal matches the VP8 decoding technology in the media description information of the second terminal, and the VP8 decoding technology and the other media description information in the first terminal
  • the VP8 encoding technology in the media description information of the second terminal matches, Sending, to the first terminal, second media description information of the second terminal, where the second media description information is used to describe the VP8 encoding technology and the VP8 decoding technology supported by the second terminal.
  • Step S308 determining whether the second media description information of the second terminal and the media description information of the first terminal are symmetrically matched.
  • the first terminal may determine whether the second media description information of the second terminal is symmetrically matched with the media description information of the first terminal, and if the first terminal determines the second terminal of the second terminal If the media description information is symmetrically matched with the media description information of the first terminal, step S309 is further performed; if the first terminal determines that the second media description information of the second terminal does not match the media description information of the first terminal, then the second terminal And sending, by the second terminal, the specified media description information of the first terminal that is different from the media description information of the first terminal that does not match the second media description information of the second terminal in the other media description information of the first terminal.
  • the first terminal determines that the second media description information of the second terminal does not match the media description information of the first terminal, and the second media description of the second terminal does not exist in the other media description information of the first terminal
  • the media description information that the information body is empty is sent to the second terminal, so that the second terminal returns the matching failure information.
  • the first terminal determines that the VP8 encoding technology in the second media description information of the second terminal matches the VP8 decoding technology in the media description information of the first terminal, and The VP8 decoding technology in the second media description information of the second terminal matches the VP8 encoding technology in the media description information of the first terminal, and the first terminal determines the second media description information of the second terminal and the media description information of the first terminal. Symmetrical matching.
  • Step S309 establishing a media stream session with the second terminal.
  • the first terminal determines that the second media description information of the second terminal is symmetrically matched with the media description information of the first terminal, establishing a media stream session with the second terminal.
  • the first terminal sends the call request information to the second terminal, where the call request information carries the media description information of the first terminal, and if the second terminal determines the media description information of the first terminal If the media description information of the second terminal is symmetrically matched, the first media description information of the second terminal is returned, and if the first terminal determines that the first media description information of the second terminal is symmetrically matched with the media description information of the first terminal, The terminal sends other media description information of the first terminal, if the second terminal If the terminal determines that the other media description information of the first terminal is symmetrically matched with the media description information of the second terminal, the second media description information of the second terminal is returned, and the first terminal determines the second media description information of the second terminal and the first If the media description information of the terminal is symmetrically matched, a media stream session is established with the second terminal, and a session between the first terminal supporting the asymmetric codec capability and the second terminal supporting only the symmetric codec capability is established,
  • FIG. 4 is a schematic structural diagram of a terminal according to a first embodiment of the present invention.
  • the terminal may include a smart phone, a tablet computer, a palmtop computer, a mobile internet device, or a wearable smart device.
  • the terminal in the illustrated embodiment may include at least a call request receiving unit 401, a determining unit 402, and a media description transmitting unit 403, where:
  • the call request receiving unit 401 is configured to receive the call request information sent by the first terminal, where the call request information carries the media description information of the first terminal, and the media description information of the first terminal is used to describe the coding technology supported by the first terminal. And decoding technology.
  • the determining unit 402 is configured to determine whether the media description information of the first terminal received by the call request receiving unit 401 and the media description information of the terminal are asymmetrically matched.
  • the media description sending unit 403 is configured to: when the determining unit 402 determines that the media description information of the first terminal and the media description information of the first terminal are asymmetrically matched, according to the matching result of the media description information of the first terminal and the media description information of the first terminal A terminal sends its own media description information to enable the first terminal to establish a media stream session with itself according to its own media description information.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in the session description protocol.
  • the media description information of the exemplary first terminal may also be as follows Shown as follows:
  • the determining unit 402 in this embodiment may be as shown in FIG. 5, and further includes:
  • the coding capability determining module 501 is configured to determine whether at least one of the media description information of the first terminal and at least one of the media description information of the first terminal is matched.
  • the decoding capability determining module 502 is configured to determine whether at least one of the media description information of the first terminal matches at least one of the media description information of the first terminal.
  • the media description determining module 503 is configured to: when the encoding capability determining module 501 determines that at least one of the media description information of the first terminal matches the decoding technology of the media description information, and the decoding capability determining module 502 When it is determined that at least one of the media description information of the first terminal matches the at least one of the media description information of the first terminal, determining that the media description information of the first terminal is asymmetrically matched with the media description information of the first terminal, where The at least one encoding technique of itself matching the media description information of the first terminal and the at least one decoding technique of itself matching the media description information of the first terminal are asymmetric.
  • the H.264 encoding, the H.264 decoding technology, and the VP8 encoding technology are supported by the call request receiving unit 401, according to the media description information of the first terminal, the first terminal supports the H.264 encoding technology and the VP8 decoding technology, and the encoding capability is obtained.
  • the determining module 501 can determine whether there is at least one encoding technology supported by the first terminal and at least one decoding technology supported by the first terminal, and the decoding capability determining module 502 determines whether there is at least one decoding technology supported by the first terminal and the self-supporting At least one coding technique is matched.
  • the decoding capability determination module 502 determines the VP8 decoding technology supported by the first terminal.
  • the media description determining module 503 determines that the media description information of the first terminal and the media description information of the second terminal are asymmetrically matched.
  • the media description sending unit 403 is configured to send all media description information of the first terminal to the first terminal, or send the first media description information of the first media to the first terminal, where the first media description information is used to describe all media of the media. Decoding at least one encoding technique and at least one decoding technique in the information that is asymmetrically matched with the media description information of the first terminal, for example, the determining unit 402 determines the H.264 encoding technology supported by the first terminal and the H.264 decoding supported by the first terminal.
  • the media description sending unit 403 is further configured to: when the determining unit 402 determines that the media description information of the first terminal and the media description information of the first terminal are asymmetrically matched, according to the media description information of the first terminal and the media description information of the first terminal.
  • the matching result is sent to the first terminal to send the media description information of the first terminal, so that the first terminal determines whether the media description information of the first terminal and the media description information of the first terminal are asymmetrically matched, if the first terminal determines the media description information of the first terminal and the first If the media description information of the terminal is asymmetrically matched, a media stream session is established with itself.
  • the determining unit 402 determines whether the media description information of the first terminal received by the call request receiving unit 401 and the media description information of the first terminal are asymmetrically matched, and when the determining unit 402 determines the first terminal.
  • the media description sending unit 403 sends the media description information of the first terminal to the first terminal according to the matching result of the media description information of the first terminal and the media description information of the first terminal, so that The first terminal establishes a media stream session according to the media description information of the first terminal, and can establish a session between the two terminals, and send the media stream to the peer end and receive the media stream sent by the peer end through the same channel to enhance the resource. Utilization rate.
  • FIG. 6 is a schematic structural diagram of a terminal according to a second embodiment of the present invention, for performing the session establishment method provided by the first embodiment of the present invention.
  • the terminal includes: at least one processor 601, such as a CPU (Central Processing Unit), at least one network interface 603, a memory 604, and at least one communication bus 602.
  • the communication bus 602 is used to implement connection communication between these components.
  • Network interface 603 can optionally include a standard wired interface or none A line interface, such as Wi-Fi (Wireless Fidelity, a wireless LAN technology based on the IEEE 802.11 standard) interface.
  • Wi-Fi Wireless Fidelity
  • the memory 604 may include a high speed RAM (Random Access Memory), and may also include a non-volatile memory such as at least one disk memory.
  • the memory 604 can optionally include at least one storage device located remotely from the aforementioned processor 601. As shown in FIG. 6, a set of program codes is stored in the memory 604, and the processor 601 is configured to call the program code stored in the memory 604 for performing the following operations:
  • the call request information sent by the first terminal, where the call request information carries the media description information of the first terminal, where the media description information of the first terminal is used to describe the coding technology and the decoding technology supported by the first terminal;
  • the second terminal is sent to the first terminal by using the network interface 603 according to the matching result of the media description information of the first terminal and the media description information of the first terminal.
  • the media description information is used to enable the first terminal to establish a media stream session with the second terminal according to the media description information of the second terminal sent by the second terminal.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in the session description protocol.
  • the media description information of the exemplary first terminal may also be as follows:
  • the processor 601 determines whether the media description information of the first terminal and the media description information of the first terminal are asymmetrically matched, specifically:
  • At least one decoding technique of the media description information of the first terminal that matches itself is asymmetric.
  • the H.264 encoding technology, the H.264 decoding technology, and the VP8 encoding technology are supported by the processor 601.
  • the processor 601 knows that the first terminal supports the H.264 encoding technology and the VP8 decoding technology according to the media description information of the first terminal, and the processor 601 Determining whether there is at least one coding technology supported by the first terminal and matching at least one coding technology supported by the first terminal, and determining whether at least one decoding technology supported by the first terminal matches at least one coding technology supported by the first terminal, If it is determined that the H.264 encoding technology supported by the first terminal matches the H.264 decoding technology supported by the first terminal, and the VP8 decoding technology supported by the first terminal matches the VP8 encoding technology supported by the first terminal, the media description information of the first terminal is determined. The asymmetric description is matched with the media description information of the second terminal.
  • the processor 601 sends its own media description information to the first terminal according to the matching result of the media description information of the first terminal and the media description information of the first terminal, specifically:
  • Technology and at least one decoding technique are used to describe at least one code that is asymmetrically matched with the media description information of the first terminal in all media description information of the first terminal.
  • the processor 601 determines that the H.264 encoding technology supported by the first terminal matches the H.264 decoding technology supported by the first terminal, and the VP8 decoding technology supported by the first terminal matches the VP8 encoding technology supported by the first terminal, and then sends the information through the network interface 603.
  • the own media description information can be H.264 encoding
  • the H.264 decoding technology and the VP8 encoding technology may also be H.264 decoding technology and VP8 encoding technology that are asymmetrically matched with the media description information of the first terminal.
  • the processor 601 sends its own media description information to the first terminal according to the matching result of the media description information of the first terminal and the media description information of the first terminal, specifically:
  • the media description information of the first terminal is asymmetrically matched with the media description information of the first terminal, the media description information is sent to the first terminal according to the matching result of the media description information of the first terminal and the media description information of the first terminal, so that The first terminal determines whether the media description information of the first terminal sent by the network interface 603 and the media description information of the first terminal are asymmetrically matched, if the first terminal determines the media description information of the first terminal and the media of the first terminal sent by the network interface 603.
  • the description information is asymmetrically matched, and a media stream session is established with itself.
  • the terminal in this embodiment can establish a session between the two terminals, and send the media stream to the peer end through the same channel and receive the media stream sent by the peer end to improve resource utilization.
  • FIG. 7 is a schematic structural diagram of a session establishment system according to an embodiment of the present invention.
  • the session establishment system in the embodiment of the present invention may include at least a first terminal 701 and a second terminal 702.
  • the second terminal 702 can be combined with the terminals shown in FIG. 4, FIG. 5 and FIG. 6, wherein:
  • the first terminal 701 is configured to send the call request information to the second terminal 702, where the call request information carries the media description information of the first terminal 701, where the media description information is used to describe the coding technology and decoding supported by the first terminal 701. technology.
  • the second terminal 702 is configured to receive the call request information sent by the first terminal 701, and determine whether the received media description information of the first terminal 701 and the media description information of the second terminal 702 are asymmetrically matched.
  • the media description information of the 701 is asymmetrically matched with the media description information of the second terminal 702, and the second terminal 702 is sent to the first terminal 701 according to the matching result of the media description information of the first terminal 701 and the media description information of the second terminal 702.
  • Media description information
  • the first terminal 701 is further configured to receive the media description information of the second terminal 702 returned by the second terminal 702, and establish a media stream session with the second terminal 702 according to the received media description information of the second terminal 702.
  • the second terminal 702 is further configured to: when the media description information of the first terminal 701 does not match the media description information of the second terminal 702, send the packet to the first terminal 701.
  • the failure information is used to indicate that the media stream session establishment between the second terminal 702 and the first terminal 701 fails.
  • the media description information is described by using an rtpmap attribute or a custom media attribute in the session description protocol.
  • the second terminal 702 is further configured to determine whether there is at least one coding technology in the media description information of the first terminal 701 and at least one of the media description information in the second terminal 702, and determine Whether at least one of the media description information of the first terminal 701 and at least one of the media description information of the second terminal 702 are matched, and at least one of the media description information of the first terminal 701 is determined.
  • the coding technique matches at least one of the media description information of the second terminal 702, and at least one of the at least one of the media description information of the first terminal 701 and the media description information of the second terminal 702 If the coding technology matches, it is determined that the media description information of the first terminal 701 and the media description information of the second terminal 702 are asymmetrically matched.
  • the media description information of the second terminal 702 that is sent by the second terminal 702 to the first terminal 701 according to the matching result of the media description information of the first terminal 701 and the media description information of the second terminal 702 may include all the second terminal 702.
  • An encoding technique and at least one decoding technique may be used to describe at least the media description information of the second terminal 702 that is asymmetrically matched with the media description information of the first terminal 701.
  • the second terminal 702 is configured to: when it is determined that the media description information of the first terminal 701 and the media description information of the second terminal 702 are asymmetrically matched, according to the media description information of the first terminal 701 and the second terminal 702.
  • the matching result of the media description information sends the media description information of the second terminal 702 to the first terminal 701;
  • the first terminal 701 is further configured to determine whether the media description information of the second terminal 702 sent by the second terminal 702 is asymmetrically matched with the media description information of the first terminal 701, and when the first terminal 701 determines that the second terminal 702 sends the first When the media description information of the second terminal 702 is asymmetrically matched with the media description information of the first terminal 701, a media stream session is established between the first terminal 701 and the second terminal 702.
  • the first terminal 701 sends call request information to the second terminal 702, the call request information carries the media description information of the first terminal 701, and the second terminal 702 determines the first received.
  • the media description information of the terminal 701 and the media description information of the second terminal 702 are If the media description information of the first terminal 701 is not symmetrically matched with the media description information of the second terminal 702, the media description information of the second terminal 702 is sent to the first terminal 701, and the first terminal 701 receives the A media stream session is established between the media description information of the second terminal 702 and the second terminal 702, so that a session can be established between the two terminals, and the media stream is sent to the peer end and the media sent by the peer end is sent through the same channel. Stream, improve resource utilization.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory, or the like.
  • the modules in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the module in the embodiment of the present invention may be implemented by a general-purpose integrated circuit, such as a CPU (Central Processing Unit) or an ASIC (Application Specific Integrated Circuit).
  • a general-purpose integrated circuit such as a CPU (Central Processing Unit) or an ASIC (Application Specific Integrated Circuit).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种会话建立方法、终端及系统,其中所述会话建立方法包括:第二终端接收第一终端发送的呼叫请求信息,呼叫请求信息携带第一终端的媒体描述信息;第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配;若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则向第一终端发送第二终端的媒体描述信息,以使第一终端根据第二终端的媒体描述信息与第二终端之间建立媒体流会话。采用本发明实施例,可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。

Description

一种会话建立方法、终端及系统
本申请要求于2014年3月14日提交中国专利局、申请号为201410096065.0、发明名称为“一种会话建立方法、终端及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,尤其涉及一种会话建立方法、终端及系统。
背景技术
终端支持的编解码技术依赖于硬件编解码模块和软件编解码模块,有些终端偏向于解码,例如播放器;有些终端偏向于编码,例如媒体捕获器,则不同终端之间的编解码能力会有差异。
例如第一终端支持H.264解码技术和VP8编码技术,则第一终端支持非对称编解码技术,第二终端支持H.264编解码技术和VP8解码能力,则第二终端可以支持非对称编解码技术或者对称编解码技术。第一终端与第二终端之间建立会话时,若第一终端支持非对称编解码技术,第二终端仅支持对称编解码技术,则第一终端无法向后兼容第二终端,导致第一终端和第二终端的编解码技术的匹配失败,进而会话建立失败;若第一终端和第二终端都支持非对称编解码技术,则第一终端和第二终端可以分别通过SDP(Session Description Protocol,会话描述协议)中的sendonly属性仅发送但不接收媒体流,recvonly属性仅接收但不发送媒体流,即第一终端通过发送通道sendonly属性发送VP8编码技术的媒体流,通过接收通道recvonly属性接收H.264解码技术的媒体流,第二终端通过接收通道recvonly属性接收VP8解码技术的媒体流,通过发送通道sendonly属性发送H.264编码技术的媒体流,实现非对称编解码技术的匹配,以成功建立第一终端和第二终端之间的会话,现有技术中第一终端和第二终端发送媒体流和接收媒体流的端口不相同,是单向通道,造成端口资源浪费。
发明内容
本发明实施例提供一种会话建立方法、终端及系统,可实现两个终端之间建立会话,提升资源利用率。
为了解决上述技术问题,本发明第一方面提供了一种会话建立方法,所述方法包括:
第二终端接收第一终端发送的呼叫请求信息,所述呼叫请求信息携带所述第一终端的媒体描述信息,所述第一终端的媒体描述信息用于描述所述第一终端支持的编码技术和解码技术;
所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息是否非对称匹配;
若所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,则根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息,以使所述第一终端根据所述第二终端发送的所述第二终端的媒体描述信息与所述第二终端之间建立媒体流会话。
在第一种可能的实现方式中,所述媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
结合第一方面可能的实现方式,在第二种可能的实现方式中,所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息是否非对称匹配包括;
所述第二终端判断是否存在所述第一终端的媒体描述信息中的至少一种编码技术与所述第二终端的媒体描述信息中的至少一种解码技术匹配;
所述第二终端判断是否存在所述第一终端的媒体描述信息中的至少一种解码技术与所述第二终端的媒体描述信息中的至少一种编码技术匹配;
若所述第二终端判断所述第一终端的媒体描述信息中的至少一种编码技术与所述第二终端的媒体描述信息中的至少一种解码技术匹配,且所述第一终端的媒体描述信息中的至少一种解码技术与所述第二终端的媒体描述信息中的至少一种编码技术匹配,则判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,其中与所述第一终端的媒体描述信息匹配的第二终端的至少一种编码技术和与所述第一终端的媒体描述信息匹配的第二终 端的至少一种解码技术是非对称的。
结合第一方面可能的实现方式,在第三种可能的实现方式中,所述第二终端根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息包括;
所述第二终端向所述第一终端发送所述第二终端的所有媒体描述信息;或
所述第二终端向所述第一终端发送所述第二终端的第一媒体描述信息,所述第一媒体描述信息用于描述所述第二终端的所有媒体描述信息中与所述第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。
结合第一方面可能的实现方式,在第四种可能的实现方式中,所述第二终端根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息包括;
若所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,则根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息,以使所述第一终端判断所述第二终端发送的所述第二终端的媒体描述信息与所述第一终端的媒体描述信息是否非对称匹配,若所述第一终端判断所述第二终端发送的所述第二终端的媒体描述信息与所述第一终端的媒体描述信息非对称匹配,则与所述第二终端之间建立媒体流会话。
本发明第二方面提供了一种终端,所述终端包括:
呼叫请求接收单元,用于接收第一终端发送的呼叫请求信息,所述呼叫请求信息携带所述第一终端的媒体描述信息,所述第一终端的媒体描述信息用于描述所述第一终端支持的编码技术和解码技术;
判断单元,用于判断所述呼叫请求接收单元接收到的所述第一终端的媒体描述信息与自身的媒体描述信息是否非对称匹配;
媒体描述发送单元,用于当所述判断单元判断所述第一终端的媒体描述信息与所述自身的媒体描述信息非对称匹配时,根据所述第一终端的媒体描述信息与所述自身的媒体描述信息的匹配结果向所述第一终端发送所述自身的媒体描述信息,以使所述第一终端根据所述自身的媒体描述信息与自身之间建立媒体流会话。
在第一种可能的实现方式中,所述媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
结合第二方面可能的实现方式,在第二种可能的实现方式中,所述判断单元包括;
编码能力判断模块,用于判断是否存在所述第一终端的媒体描述信息中的至少一种编码技术与所述自身的媒体描述信息中的至少一种解码技术匹配;
解码能力判断模块,用于判断是否存在所述第一终端的媒体描述信息中的至少一种解码技术与所述自身的媒体描述信息中的至少一种编码技术匹配;
媒体描述判断模块,用于当所述编码能力判断模块判断所述第一终端的媒体描述信息中的至少一种编码技术与所述自身的媒体描述信息中的至少一种解码技术匹配,且所述解码能力判断模块判断所述第一终端的媒体描述信息中的至少一种解码技术与所述自身的媒体描述信息中的至少一种编码技术匹配时,判断所述第一终端的媒体描述信息与所述自身的媒体描述信息非对称匹配,其中与所述第一终端的媒体描述信息匹配的自身的至少一种编码技术和与所述第一终端的媒体描述信息匹配的自身的至少一种解码技术是非对称的。
结合第二方面可能的实现方式,在第三种可能的实现方式中,所述媒体描述发送单元用于:
向所述第一终端发送所述自身的所有媒体描述信息;或
所述媒体描述发送单元,用于向所述第一终端发送所述自身的第一媒体描述信息,所述第一媒体描述信息用于描述所述自身的所有媒体描述信息中与所述第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。
结合第二方面可能的实现方式,在第四种可能的实现方式中,所述媒体描述发送单元,还用于当所述判断单元判断所述第一终端的媒体描述信息与所述自身的媒体描述信息非对称匹配时,根据所述第一终端的媒体描述信息与所述自身的媒体描述信息的匹配结果向所述第一终端发送所述自身的媒体描述信息,以使所述第一终端判断所述自身的媒体描述信息与所述第一终端的媒体描述信息是否非对称匹配,若所述第一终端判断所述自身的媒体描述信息与所述第一终端的媒体描述信息非对称匹配,则与自身之间建立媒体流会话。
本发明第三方面提供一种会话建立系统,所述系统包括第一终端和第二终端,其中:
所述第一终端,用于向所述第二终端发送呼叫请求信息,所述呼叫请求信息携带所述第一终端的媒体描述信息;接收所述第二终端返回的所述第二终端的媒体描述信息;根据所述接收到的所述第二终端的媒体描述信息与所述第二终端之间建立媒体流会话;
所述第二终端,用于接收所述第一终端发送的呼叫请求信息;判断所述接收到的所述第一终端的媒体描述信息与所述第二终端的媒体描述信息是否非对称匹配;若判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,则根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息。
实施本发明实施例,第二终端接收第一终端发送的呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则向第一终端发送第二终端的媒体描述信息,以使第一终端根据第二终端的媒体描述信息与第二终端之间建立媒体流会话,可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明第一实施例中提供的一种会话建立方法的流程示意图;
图2是本发明第二实施例中提供的一种会话建立方法的流程示意图;
图3是本发明第三实施例中提供的一种会话建立方法的流程示意图;
图4是本发明第一实施例中提供的一种终端的结构示意图;
图5是本发明第一实施例中图4的判断单元的结构示意图;
图6是本发明第二实施例中提供的一种终端的结构示意图;
图7是本发明实施例中提供的一种会话建立系统的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例中的会话建立方法可以在第二终端中实现接收第一终端发送的呼叫请求信息,其中该呼叫请求信息携带第一终端的媒体描述信息,该媒体描述信息用于描述第一终端支持的编码技术和解码技术,判断第一终端的媒体描述信息和第二终端的媒体描述信息是否非对称匹配,若第一终端的媒体描述信息和第二终端的媒体描述信息非对称匹配,则向第一终端发送第二终端的媒体描述信息,以使第一终端与第二终端之间建立媒体流会话,可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。本发明实施例中所提及的终端可以包括智能手机(如Android手机或iOS手机等)、平板电脑、掌上电脑、移动互联网设备(Mobile Internet Devices,MID)或穿戴式智能设备等,其中第一终端支持非对称编解码技术,第二终端可以支持对称编解码技术,也可以支持非对称编解码技术。
请参见图1,图1是本发明第一实施例中提供的一种会话建立方法的流程示意图,本实施例中的会话建立方法是从第二终端的角度进行描述的,其中第一终端支持非对称编解码技术,第二终端支持非对称编解码技术,如图所示,所述会话建立方法可以包括:
步骤S101,接收第一终端发送的呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息。
第二终端可以接收第一终端发送的呼叫请求信息,其中该呼叫请求信息携带第一终端的媒体描述信息,该媒体描述信息用于描述第一终端支持的编码技术和解码技术。
其中,媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体 属性进行描述的。
a=rtpmap:32 VP8/90000[EDcode]
a=rtpmap:31 H264/90000[Encode]
示例性的第一终端的媒体描述信息可以如上所示,是通过会话描述协议中的rtpmap属性进行描述的,“a=rtpmap:32 VP8/90000[EDcode]”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpmap:31 H264/90000[Encode]”用于描述第一终端支持H.264编码技术。
作为一种可选的实施方式,示例性的第一终端的媒体描述信息还可以如下所示:
a=rtpmap:32 VP8/90000
a=rtpsend:31 H264/90000
其中,所述第一终端的媒体描述信息是通过会话描述协议中的自定义媒体属性进行描述的,“a=rtpmap:32 VP8/90000”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpsend:31 H264/90000”用于描述第一终端支持H.264编码技术。
步骤S102,判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配。
第二终端接收到第一终端的媒体描述信息后,可以判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配,具体的,第二终端可以判断是否存在第一终端的媒体描述信息中的至少一种编码技术与第二终端的媒体描述信息中的至少一种解码技术匹配,并判断是否存在第一终端的媒体描述信息中的至少一种解码技术与第二终端的媒体描述信息中的至少一种编码技术匹配,若第二终端判断第一终端的媒体描述信息中的至少一种编码技术与第二终端的媒体描述信息中的至少一种解码技术匹配,且第一终端的媒体描述信息中的至少一种解码技术与第二终端的媒体描述信息中的至少一种编码技术匹配,则判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,其中与所述第一终端的媒体描述信息匹配的第二终端的至少一种编码技术和与所述第一终端的媒体描述信息匹配的第二终端的至少一种解码技术是非对称的。
例如,第二终端支持H.264编码、H.264解码技术以及VP8编码技术,第二终端根据第一终端的媒体描述信息知悉第一终端支持H.264编码技术和VP8解码技术,则第二终端可以判断是否存在第一终端支持的至少一种编码技术与第二终端支持的至少一种解码技术匹配,并判断是否存在第一终端支持的至少一种解码技术与第二终端支持的至少一种编码技术匹配,若第二终端判断第一终端支持的H.264编码技术与第二终端支持的H.264解码技术匹配,且第一终端支持的VP8解码技术与第二终端支持的VP8编码技术匹配,则判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配。
作为一种可选的实施方式,第二终端可以根据第一终端支持的编码技术和解码技术的优先级,判断是否存在第一终端的媒体描述信息中优先级最高的编码技术与第二终端的媒体描述信息中的一种解码技术匹配,并判断是否存在第一终端的媒体描述信息中优先级最高的解码技术与第二终端的媒体描述信息中的一种编码技术匹配,若第二终端判断第一终端的媒体描述信息中优先级最高的编码技术与第二终端的媒体描述信息中的一种解码技术匹配,并判断第一终端的媒体描述信息中优先级最高的解码技术与第二终端的媒体描述信息中的一种编码技术匹配,则第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配。
步骤S103,若判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则向第一终端发送第二终端的媒体描述信息,以使第一终端根据第二终端的媒体描述信息与第二终端之间建立媒体流会话。
若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则根据第一终端的媒体描述信息与第二终端的媒体描述信息的匹配结果向第一终端发送第二终端的媒体描述信息,以使第一终端根据第二终端发送的第二终端的媒体描述信息与第二终端之间建立媒体流会话。可选的,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息不匹配,则向第一终端发送匹配失败信息,该匹配失败信息用于指示第二终端与第一终端之间的媒体流会话建立失败。
具体实现中,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则根据第一终端的媒体描述信息与第二终端的媒体描述 信息的匹配结果向第一终端发送第二终端的媒体描述信息,以使第一终端判断第二终端发送的第二终端的媒体描述信息与第一终端的媒体描述信息是否非对称匹配,当第二终端发送的第二终端的媒体描述信息与第一终端的媒体描述信息非对称匹配时,第一终端与第二终端之间建立媒体流会话。
其中第二终端向第一终端发送的第二终端的媒体描述信息可以是第二终端的所有媒体描述信息,也可以是第二终端的第一媒体描述信息,该第一媒体描述信息用于描述第二终端的所有媒体描述信息中与第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术,例如第二终端判断第一终端支持的H.264编码技术与第二终端支持的H.264解码技术匹配,且第一终端支持的VP8解码技术与第二终端支持的VP8编码技术匹配,则第二终端发送的第二终端的媒体描述信息可以是H.264编码、H.264解码技术以及VP8编码技术,也可以是与第一终端的媒体描述信息非对称匹配的H.264解码技术和VP8编码技术。
在图1所示的会话建立方法中,第二终端接收第一终端发送的呼叫请求信息,呼叫请求信息携带第一终端的媒体描述信息,判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则向第一终端发送第二终端的媒体描述信息,以使第一终端根据第二终端的媒体描述信息与第二终端之间建立媒体流会话,可实现支持非对称编解码技术的第一终端和支持非对称编解码技术的第二终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
请参见图2,图2是本发明第二实施例中提供的一种会话建立方法的流程示意图,本实施例中的会话建立方法是从第一终端的角度进行描述的,其中第一终端支持非对称编解码技术,如图所示,所述会话建立方法可以包括:
步骤S201,向第二终端发送呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,以使第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则返回第二终端的媒体描述信息。
第一终端向第二终端发送呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,该媒体描述信息用于描述第一终端支持的编码技术和解码技术,以使第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,其中与所述第一终端的媒体描述信息匹配的第二终端的至少一种编码技术和与所述第一终端的媒体描述信息匹配的第二终端的至少一种解码技术是非对称的,则根据第一终端的媒体描述信息与第二终端的媒体描述信息的匹配结果返回第二终端的媒体描述信息。可选的,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息不匹配,则返回匹配失败信息,该匹配失败信息用于指示第二终端与第一终端之间的媒体流会话建立失败,进一步的第一终端接收第二终端返回的匹配失败信息。
其中,媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
a=rtpmap:32 VP8/90000[EDcode]
a=rtpmap:31 H264/90000[Encode]
示例性的第一终端的媒体描述信息可以如上所示,是通过会话描述协议中的rtpmap属性进行描述的,“a=rtpmap:32 VP8/90000[EDcode]”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpmap:31 H264/90000[Encode]”用于描述第一终端支持H.264编码技术。
作为一种可选的实施方式,示例性的第一终端的媒体描述信息还可以如下所示:
a=rtpmap:32 VP8/90000
a=rtpsend:31 H264/90000
其中,所述第一终端的媒体描述信息是通过会话描述协议中的自定义媒体属性进行描述的,“a=rtpmap:32 VP8/90000”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpsend:31 H264/90000”用于描述第一终端支持H.264编码技术。
当第二终端仅支持对称编解码技术时,第一终端向第二终端发送呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,以使第二终端判断第一 终端的媒体描述信息与第二终端的媒体描述信息是否对称匹配,其中,在会话建立过程中,支持非对称编解码技术的第一终端使用的系统协议与仅支持对称编解码技术的第二终端使用的系统协议不一致,则第二终端无法识别第一终端发送的第一终端的媒体描述信息中的编码技术标识和/或解码技术标识,例如第二终端无法识别“a=rtpmap:31 H264/90000[Encode]”中的标识“Encode”,其中该标识“Encode”用于指示第一终端支持H.264编码技术,第二终端接收到第一终端的媒体描述信息后,可以将第一终端识别为支持H.264编码技术和H.264解码技术。若第二终端支持H.264编码技术、H.264解码技术以及VP8编码技术,则第二终端判断第一终端的媒体描述信息中的H.264编码技术与第二终端的媒体描述信息中的H.264编码技术和H.264解码技术匹配。
步骤S202,接收第二终端返回的第二终端的媒体描述信息。
第一终端接收第二终端根据第一终端的媒体描述信息与第二终端的媒体描述信息的匹配结果返回的第二终端的媒体描述信息。
其中第二终端支持非对称编解码技术时,第一终端可以接收第二终端返回的第二终端的所有媒体描述信息,或者接收第二终端返回的第二终端的第一媒体描述信息,该第一媒体描述信息用于描述所述第二终端的所有媒体描述信息中与所述第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。可选的,第二终端仅支持对称编解码技术时,第一终端可以接收第二终端返回的第二终端的第一媒体描述信息。
第一终端接收到第二终端的媒体描述信息后,可以判断第二终端的媒体描述信息与第一终端的媒体描述信息是否非对称匹配,若第一终端判断第二终端的媒体描述信息与第一终端的媒体描述信息非对称匹配,则触发与第二终端之间建立媒体流会话。
具体实现中,第一终端可以判断是否存在第二终端的媒体描述信息中的至少一种编码技术与第一终端的媒体描述信息中的至少一种解码技术匹配,并判断是否存在第二终端的媒体描述信息中的至少一种解码技术与第一终端的媒体描述信息中的至少一种编码技术匹配,若第一终端判断存在第二终端的媒体描述信息中的至少一种编码技术与第一终端的媒体描述信息中的至少一种解码技术匹配,且存在第二终端的媒体描述信息中的至少一种解码技术与第一终 端的媒体描述信息中的至少一种编码技术匹配,则判断接收到的所述第二终端的媒体描述信息与所述第一终端的媒体描述信息非对称匹配,其中与第一终端的媒体描述信息匹配的第二终端的至少一种编码技术和与第一终端的媒体描述信息匹配的第二终端的至少一种解码技术是非对称的。
可选的,当第二终端仅支持对称编解码技术时,若第一终端判断第二终端的媒体描述信息与第一终端的媒体描述信息不匹配,则向第二终端发送第一终端的所有媒体描述信息中与第二终端的第一媒体描述信息不匹配的第一终端的媒体描述信息以外的其他媒体描述信息,以使第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息是否对称匹配。若第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第二媒体描述信息,该第二媒体描述信息用于描述第二终端的所有媒体描述信息中与第一终端的其他媒体描述信息对称匹配的至少一种编码技术和至少一种解码技术,第一终端接收第二终端返回的第二终端的第二媒体描述信息,并根据接收到的第二终端的第二媒体描述信息与第二终端之间建立媒体流会话。进一步可选的,若第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息不匹配,则返回所述匹配失败信息,第一终端接收第二终端返回的匹配失败信息,则第一终端与第二终端之间的媒体流会话建立失败。
例如,第一终端支持VP8编码技术、VP8解码技术以及H.264编码技术,第二终端支持H.264编码技术、H.264解码技术以及VP8编码技术,其中第二终端仅支持对称编解码技术,第一终端向第二终端发送第一终端的媒体描述信息,以使第二终端将第一终端识别为支持VP8编码技术和VP8解码技术以及H.264编码技术和H.264解码技术,则第二终端判断第一终端的媒体描述信息中的H.264编码技术和第二终端的媒体描述信息中的H.264编码技术和H.264解码技术匹配,返回第二终端的第一媒体描述信息,该第一媒体描述信息用于描述第二终端支持的H.264编码技术和H.264解码技术,第一终端接收到第二终端的第一媒体描述信息后,第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息中的H.264编码技术不匹配,则向第二终端发送其他媒体描述信息,所述其他媒体描述信息用于描述第一终端支持的VP8编码技术和VP8解码技术,以使第二终端判断第一终端的其他媒体描述信息与第二终 端的媒体描述信息不匹配,并返回匹配失败信息,第一终端接收第二终端返回的匹配失败信息,本实施例中支持非对称编解码技术的第一终端可以向后兼容,实现与仅支持对称编解码技术的第二终端之间建立媒体流会话,提升资源利用率。
作为一种可选的实施方式,第一终端接收到的第二终端的第一媒体描述信息可以是第二终端判断与第一终端的媒体描述信息中的编码技术和解码技术分别非对称匹配的一种解码技术和一种编码技术,也可以是第二终端判断与第一终端的媒体描述信息中的所有编码技术和所有解码技术分别非对称匹配的多种解码技术和多种编码技术。若第一终端接收到的第二终端的第一媒体描述信息是第二终端判断与第一终端的媒体描述信息中的所有编码技术和所有解码技术分别非对称匹配的多种解码技术和多种编码技术,第一终端判断第二终端的第一媒体描述信息中的一种编码技术与第一终端的媒体描述信息中的一种解码技术匹配,且第二终端的第一媒体描述信息中的一种解码技术与第一终端的媒体描述信息中的一种编码技术匹配时,则第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息非对称匹配,触发与第二终端之间建立媒体流会话;第一终端判断第二终端的第一媒体描述信息中的所有编码技术与第一终端的媒体描述信息中的所有解码技术都不匹配,或第二终端的第一媒体描述信息中的所有解码技术与第一终端的媒体描述信息中的所有编码技术都不匹配时,则第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息不匹配,并向第二终端发送第一终端的所有媒体描述信息中与第二终端的第一媒体描述信息不匹配的第一终端的媒体描述信息以外的其他媒体描述信息,以使第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息不匹配,并返回匹配失败信息。进一步可选的,第一终端判断第二终端的第一媒体描述信息和第一终端的媒体描述信息不匹配,且不存在与第二终端的第一媒体描述信息不匹配的第一终端的媒体描述信息以外的其他媒体描述信息时,则向第二终端发送信息体为空的媒体描述信息,以使第二终端返回匹配失败信息。
步骤S203,根据接收到的第二终端的媒体描述信息与第二终端之间建立媒体流会话。
第一终端可以根据接收到的第二终端的媒体描述信息与第二终端之间建立媒体流会话,以便第一终端和第二终端通过所述媒体流会话通道传输媒体流。
在图2所示的会话建立方法中,第一终端向第二终端发送呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,以使第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息是否非对称匹配,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配,则返回第二终端的媒体描述信息,第一终端接收第二终端返回的述第二终端的媒体描述信息,并与第二终端之间建立媒体流会话,可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
请参见图3,图3是本发明第三实施例中提供的一种会话建立方法的流程示意图,本实施例中的第一终端支持非对称编解码技术,第二终端仅支持对称编解码技术,如图所示本实施例中的会话建立方法可以包括:
步骤S301,第一终端向第二终端发送呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息。
第一终端可以向第二终端发送呼叫请求信息,其中该呼叫请求信息携带第一终端的媒体描述信息,该媒体描述信息用于描述第一终端支持的编码技术和解码技术。
其中,媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
a=rtpmap:32 VP8/90000[EDcode]
a=rtpmap:31 H264/90000[Encode]
示例性的第一终端的媒体描述信息可以如上所示,是通过会话描述协议中的rtpmap属性进行描述的,“a=rtpmap:32 VP8/90000[EDcode]”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpmap:31 H264/90000[Encode]”用于描述第一终端支持H.264编码技术。
作为一种可选的实施方式,示例性的第一终端的媒体描述信息还可以如下所示:
a=rtpmap:32 VP8/90000
a=rtpsend:31 H264/90000
其中,所述第一终端的媒体描述信息是通过会话描述协议中的自定义媒体属性进行描述的,“a=rtpmap:32 VP8/90000”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpsend:31 H264/90000”用于描述第一终端支持H.264编码技术。
步骤S302,第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息是否对称匹配。
第二终端接收到第一终端的媒体描述信息后,可以判断第一终端的媒体描述信息与第二终端的媒体描述信息是否对称匹配,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配,则进一步执行步骤S303;若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息不匹配,则向第一终端发送匹配失败信息,该匹配失败信息用于指示第一终端与第二终端之间的媒体流会话建立失败。
具体实现中,第二终端可以判断是否存在第一终端的媒体描述信息中的至少一种编码技术与第二终端的媒体描述信息中的至少一种解码技术匹配,并判断是否存在第一终端的媒体描述信息中的至少一种解码技术与第二终端的媒体描述信息中的至少一种编码技术匹配,若第二终端判断第一终端的媒体描述信息中的至少一种编码技术与第二终端的媒体描述信息中的至少一种解码技术匹配,且第一终端的媒体描述信息中的至少一种解码技术与第二终端的媒体描述信息中的至少一种编码技术匹配,则判断第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配,其中与第一终端的媒体描述信息匹配的第二终端的至少一种编码技术和与第一终端的媒体描述信息匹配的第二终端的至少一种解码技术是对称的。
例如,第一终端支持VP8编码技术、VP8解码技术以及H.264编码技术,第二终端支持VP8编码技术和VP8解码技术,也支持H.264编码技术和H.264解码技术,其中H.264编码技术和H.264解码技术的优先级高于VP8编码技术和VP8解码技术,第二终端接收到第一终端的媒体描述信息后,根据第一终端的媒体描述信息将第一终端识别为支持VP8编码技术和VP8解码技术以 及H.264编码技术和H.264解码技术,第二终端判断第一终端的媒体描述信息中的H.264编码技术与第二终端的媒体描述信息中的H.264编码技术和H.264解码技术匹配,则判断第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配。
步骤S303,若第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第一媒体描述信息。
若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第一媒体描述信息,该第一媒体描述信息用于描述第二终端的所有媒体描述信息中与第一终端的媒体描述信息对称匹配的至少一种编码技术和至少一种解码技术。
例如,第二终端支持的H.264编码技术和H.264解码技术的优先级高于VP8编码技术和VP8解码技术,第二终端判断第一终端的媒体描述信息中的H.264编码技术与第二终端的媒体描述信息中的H.264编码技术和H.264解码技术匹配时,则判断第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配,并返回第二终端的第一媒体描述信息,该第一媒体描述信息用于描述第二终端支持的H.264编码技术和H.264解码技术。
步骤S304,判断第二终端的第一媒体描述信息与第一终端的媒体描述信息是否对称匹配。
第一终端接收到第二终端的第一媒体描述信息后,可以判断第二终端的第一媒体描述信息与第一终端的媒体描述信息是否对称匹配,若第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息对称匹配,则直接执行步骤S309;若第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息不匹配,则进一步执行步骤S305。
例如,第一终端支持VP8编码技术、VP8解码技术以及H.264编码技术,第一终端接收到第二终端的第一媒体描述信息后,判断第二终端的第一媒体描述信息中的H.264编码技术和H.264解码技术与第一终端的媒体描述信息中的H.264编码技术不匹配,则判断第二终端的第一媒体描述信息与第一终端的媒体描述信息不匹配。
步骤S305,若第二终端的第一媒体描述信息与第一终端的媒体描述信息 不匹配,则向第二终端发送第一终端的其他媒体描述信息。
若第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息不匹配,则向第二终端发送第一终端的所有媒体描述信息中与第二终端的第一媒体描述信息不匹配的第一终端的媒体描述信息以外的其他媒体描述信息。
例如,第一终端判断第二终端的第一媒体描述信息中的H.264编码技术和H.264解码技术与第一终端的媒体描述信息中的H.264编码技术不匹配,则向第二终端发送其他媒体描述信息,该其他媒体描述信息用于描述第一终端支持的VP8编码技术和VP8解码技术。
步骤S306,判断第一终端的其他媒体描述信息与第二终端的媒体描述信息是否对称匹配。
第二终端接收到第一终端的其他媒体描述信息后,可以判断第一终端的其他媒体描述信息与第二终端的媒体描述信息是否对称匹配,若第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息对称匹配,则进一步执行步骤S307;若第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息不匹配,则返回匹配失败信息。
例如,第二终端接收到第一终端的其他媒体描述信息,可以判断第一终端的其他媒体描述信息中的VP8编码技术与第二终端的媒体描述信息中的VP8解码技术匹配,且第一终端的其他媒体描述信息中的VP8解码技术与第二终端的媒体描述信息中的VP8编码技术匹配,则判断第一终端的其他媒体描述信息与第二终端的媒体描述信息对称匹配。
步骤S307,若第一终端的其他媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第二媒体描述信息。
若第二终端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第二媒体描述信息,该第二媒体描述信息用于描述第二终端的所有媒体描述信息中与第一终端的其他媒体描述信息对称匹配的至少一种编码技术和至少一种解码技术。
例如,第二终端判断第一终端的其他媒体描述信息中的VP8编码技术与第二终端的媒体描述信息中的VP8解码技术匹配,且第一终端的其他媒体描述信息中的VP8解码技术与第二终端的媒体描述信息中的VP8编码技术匹配, 则向第一终端发送第二终端的第二媒体描述信息,该第二媒体描述信息用于描述第二终端支持的VP8编码技术和VP8解码技术。
步骤S308,判断第二终端的第二媒体描述信息与第一终端的媒体描述信息是否对称匹配。
第一终端接收到第二终端的第二媒体描述信息后,可以判断第二终端的第二媒体描述信息与第一终端的媒体描述信息是否对称匹配,若第一终端判断第二终端的第二媒体描述信息与第一终端的媒体描述信息对称匹配,则进一步执行步骤S309;若第一终端判断第二终端的第二媒体描述信息与第一终端的媒体描述信息不匹配,则向第二终端发送第一终端的其他媒体描述信息中与第二终端的第二媒体描述信息不匹配的第一终端的媒体描述信息以外的指定媒体描述信息,以使第二终端判断第一终端的指定媒体描述信息与第二终端的媒体描述信息是否对称匹配。可选的,若第一终端判断第二终端的第二媒体描述信息与第一终端的媒体描述信息不匹配,且第一终端的其他媒体描述信息中不存在与第二终端的第二媒体描述信息不匹配的第一终端的媒体描述信息以外的指定媒体描述信息时,则向第二终端发送信息体为空的媒体描述信息,以使第二终端返回匹配失败信息。
例如,第一终端接收到第二终端的第二媒体描述信息后,判断第二终端的第二媒体描述信息中的VP8编码技术与第一终端的媒体描述信息中的VP8解码技术匹配,且第二终端的第二媒体描述信息中的VP8解码技术与第一终端的媒体描述信息中的VP8编码技术匹配,则第一终端判断第二终端的第二媒体描述信息与第一终端的媒体描述信息对称匹配。
步骤S309,与第二终端之间建立媒体流会话。
若第一终端判断第二终端的第二媒体描述信息与第一终端的媒体描述信息对称匹配,则与第二终端之间建立媒体流会话。
在图3所示的会话建立方法中,第一终端向第二终端发送呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,若第二终端判断第一终端的媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第一媒体描述信息,若第一终端判断第二终端的第一媒体描述信息与第一终端的媒体描述信息对称匹配,则向第二终端发送第一终端的其他媒体描述信息,若第二终 端判断第一终端的其他媒体描述信息与第二终端的媒体描述信息对称匹配,则返回第二终端的第二媒体描述信息,若第一终端判断第二终端的第二媒体描述信息与第一终端的媒体描述信息对称匹配,则与第二终端之间建立媒体流会话,可实现支持非对称编解码能力的第一终端和仅支持对称编解码能力的第二终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
请参见图4,图4是本发明第一实施例中提供的一种终端的结构示意图,所述终端可以包括智能手机、平板电脑、掌上电脑、移动互联网设备或穿戴式智能设备等,如图所示本实施例中的终端至少可以包括呼叫请求接收单元401、判断单元402以及媒体描述发送单元403,其中:
呼叫请求接收单元401,用于接收第一终端发送的呼叫请求信息,该呼叫请求信息携带第一终端的媒体描述信息,第一终端的媒体描述信息用于描述所述第一终端支持的编码技术和解码技术。
判断单元402,用于判断呼叫请求接收单元401接收到的第一终端的媒体描述信息与自身的媒体描述信息是否非对称匹配。
媒体描述发送单元403,用于当判断单元402判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配时,根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果向第一终端发送自身的媒体描述信息,以使第一终端根据自身的媒体描述信息与自身之间建立媒体流会话。
其中,媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
a=rtpmap:32 VP8/90000[EDcode]
a=rtpmap:31 H264/90000[Encode]
示例性的第一终端的媒体描述信息可以如上所示,是通过会话描述协议中的rtpmap属性进行描述的,“a=rtpmap:32 VP8/90000[EDcode]”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpmap:31 H264/90000[Encode]”用于描述第一终端支持H.264编码技术。
作为一种可选的实施方式,示例性的第一终端的媒体描述信息还可以如下 所示:
a=rtpmap:32 VP8/90000
a=rtpsend:31 H264/90000
其中,所述第一终端的媒体描述信息是通过会话描述协议中的自定义媒体属性进行描述的,“a=rtpmap:32 VP8/90000”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpsend:31 H264/90000”用于描述第一终端支持H.264编码技术。
作为一种可选的实施方式,本实施例中的判断单元402可以如图5所示,进一步包括:
编码能力判断模块501,用于判断是否存在第一终端的媒体描述信息中的至少一种编码技术与自身的媒体描述信息中的至少一种解码技术匹配。
解码能力判断模块502,用于判断是否存在第一终端的媒体描述信息中的至少一种解码技术与自身的媒体描述信息中的至少一种编码技术匹配。
媒体描述判断模块503,用于当编码能力判断模块501判断第一终端的媒体描述信息中的至少一种编码技术与自身的媒体描述信息中的至少一种解码技术匹配,且解码能力判断模块502判断第一终端的媒体描述信息中的至少一种解码技术与自身的媒体描述信息中的至少一种编码技术匹配时,判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配,其中与第一终端的媒体描述信息匹配的自身的至少一种编码技术和与第一终端的媒体描述信息匹配的自身的至少一种解码技术是非对称的。
例如,自身支持H.264编码、H.264解码技术以及VP8编码技术,呼叫请求接收单元401根据第一终端的媒体描述信息知悉第一终端支持H.264编码技术和VP8解码技术,则编码能力判断模块501可以判断是否存在第一终端支持的至少一种编码技术与自身支持的至少一种解码技术匹配,解码能力判断模块502判断是否存在第一终端支持的至少一种解码技术与自身支持的至少一种编码技术匹配,若编码能力判断模块501判断第一终端支持的H.264编码技术与自身支持的H.264解码技术匹配,且解码能力判断模块502判断第一终端支持的VP8解码技术与自身支持的VP8编码技术匹配,则媒体描述判断模块503判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配。
其中,媒体描述发送单元403,用于向第一终端发送自身的所有媒体描述信息,或者向第一终端发送自身的第一媒体描述信息,所述第一媒体描述信息用于描述自身的所有媒体描述信息中与第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术,例如判断单元402判断第一终端支持的H.264编码技术与自身支持的H.264解码技术匹配,且第一终端支持的VP8解码技术与自身支持的VP8编码技术匹配,媒体描述发送单元403发送的自身的媒体描述信息可以是H.264编码技术、H.264解码技术以及VP8编码技术,也可以是与第一终端的媒体描述信息非对称匹配的H.264解码技术和VP8编码技术。
具体的,媒体描述发送单元403,还用于当判断单元402判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配时,根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果向第一终端发送自身的媒体描述信息,以使第一终端判断自身的媒体描述信息与第一终端的媒体描述信息是否非对称匹配,若第一终端判断自身的媒体描述信息与第一终端的媒体描述信息非对称匹配,则与自身之间建立媒体流会话。
在图4和图5所示的终端中,判断单元402判断呼叫请求接收单元401接收到的第一终端的媒体描述信息与自身的媒体描述信息是否非对称匹配,当判断单元402判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配时,媒体描述发送单元403根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果向第一终端发送自身的媒体描述信息,以使第一终端根据自身的媒体描述信息与自身之间建立媒体流会话,可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
请参见图6,图6是本发明第二实施例中提供的一种终端的结构示意图,用于执行本发明第一实施例提供的会话建立方法。如图6所示,该终端包括:至少一个处理器601,例如CPU(Central Processing Unit,中央处理器),至少一个网络接口603,存储器604,至少一个通信总线602。其中,通信总线602用于实现这些组件之间的连接通信。网络接口603可选的可以包括标准的有线接口或无 线接口,例如Wi-Fi(Wireless Fidelity,无线保真,一种基于IEEE802.11标准的无线局域网技术)接口。存储器604可能包含高速RAM(Random Access Memory,随机存储器),也可能还包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器604可选的可以包含至少一个位于远离前述处理器601的存储装置。如图6所示,存储器604中存储一组程序代码,且处理器601用于调用存储器604中存储的程序代码,用于执行以下操作:
通过网络接口603接收第一终端发送的呼叫请求信息,所述呼叫请求信息携带第一终端的媒体描述信息,第一终端的媒体描述信息用于描述第一终端支持的编码技术和解码技术;
判断第一终端的媒体描述信息与自身的媒体描述信息是否非对称匹配;
若判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配,则根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果通过网络接口603向第一终端发送第二终端的媒体描述信息,以使第一终端根据第二终端发送的第二终端的媒体描述信息与第二终端之间建立媒体流会话。
其中,媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
a=rtpmap:32 VP8/90000[EDcode]
a=rtpmap:31 H264/90000[Encode]
示例性的第一终端的媒体描述信息可以如上所示,是通过会话描述协议中的rtpmap属性进行描述的,“a=rtpmap:32 VP8/90000[EDcode]”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpmap:31 H264/90000[Encode]”用于描述第一终端支持H.264编码技术。
在一个实施例中,示例性的第一终端的媒体描述信息还可以如下所示:
a=rtpmap:32 VP8/90000
a=rtpsend:31 H264/90000
其中,所述第一终端的媒体描述信息是通过会话描述协议中的自定义媒体属性进行描述的,“a=rtpmap:32 VP8/90000”用于描述第一终端支持VP8编码技术和VP8解码技术,“a=rtpsend:31 H264/90000”用于描述第一终端支持H.264编码技术。
在一个实施例中,处理器601判断第一终端的媒体描述信息与自身的媒体描述信息是否非对称匹配,具体为:
判断是否存在第一终端的媒体描述信息中的至少一种编码技术与自身的媒体描述信息中的至少一种解码技术匹配;
判断是否存在第一终端的媒体描述信息中的至少一种解码技术与自身的媒体描述信息中的至少一种编码技术匹配;
若判断第一终端的媒体描述信息中的至少一种编码技术与自身的媒体描述信息中的至少一种解码技术匹配,且第一终端的媒体描述信息中的至少一种解码技术与自身的媒体描述信息中的至少一种编码技术匹配,则判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配,其中与第一终端的媒体描述信息匹配的自身的至少一种编码技术和与第一终端的媒体描述信息匹配的自身的至少一种解码技术是非对称的。
例如,自身支持H.264编码技术、H.264解码技术以及VP8编码技术,处理器601根据第一终端的媒体描述信息知悉第一终端支持H.264编码技术和VP8解码技术,则处理器601可以判断是否存在第一终端支持的至少一种编码技术与自身支持的至少一种解码技术匹配,并判断是否存在第一终端支持的至少一种解码技术与自身支持的至少一种编码技术匹配,若判断第一终端支持的H.264编码技术与自身支持的H.264解码技术匹配,且第一终端支持的VP8解码技术与自身支持的VP8编码技术匹配,则判断第一终端的媒体描述信息与第二终端的媒体描述信息非对称匹配。
在一个实施例中,处理器601根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果向第一终端发送自身的媒体描述信息,具体为:
通过网络接口603向第一终端发送自身的所有媒体描述信息;或
通过网络接口603向第一终端发送自身的第一媒体描述信息,所述第一媒体描述信息用于描述自身的所有媒体描述信息中与第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。
例如处理器601判断第一终端支持的H.264编码技术与自身支持的H.264解码技术匹配,且第一终端支持的VP8解码技术与自身支持的VP8编码技术匹配,则通过网络接口603发送的自身的媒体描述信息可以是H.264编码、 H.264解码技术以及VP8编码技术,也可以是与第一终端的媒体描述信息非对称匹配的H.264解码技术和VP8编码技术。
在一个实施例中,处理器601根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果向第一终端发送自身的媒体描述信息,具体为:
若判断第一终端的媒体描述信息与自身的媒体描述信息非对称匹配,则根据第一终端的媒体描述信息与自身的媒体描述信息的匹配结果向第一终端发送自身的媒体描述信息,以使第一终端判断通过网络接口603发送的自身的媒体描述信息与第一终端的媒体描述信息是否非对称匹配,若第一终端判断通过网络接口603发送的自身的媒体描述信息与第一终端的媒体描述信息非对称匹配,则与自身之间建立媒体流会话。
具体的,本实施例介绍的终端可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
请参见图7,图7是本发明实施例中提供的一种会话建立系统的结构示意图,如图所示本发明实施例中的会话建立系统至少可以包括第一终端701和第二终端702,第二终端702可以结合图4、图5以及图6所示的终端,其中:
第一终端701,用于向第二终端702发送呼叫请求信息,所述呼叫请求信息携带第一终端701的媒体描述信息,所述媒体描述信息用于描述第一终端701支持的编码技术和解码技术。
第二终端702,用于接收第一终端701发送的呼叫请求信息,并判断接收到的第一终端701的媒体描述信息与第二终端702的媒体描述信息是否非对称匹配,若判断第一终端701的媒体描述信息与第二终端702的媒体描述信息非对称匹配,则根据第一终端701的媒体描述信息与第二终端702的媒体描述信息的匹配结果向第一终端701发送第二终端702的媒体描述信息。
第一终端701,还用于接收第二终端702返回的第二终端702的媒体描述信息,并根据接收到的第二终端702的媒体描述信息与第二终端702之间建立媒体流会话。
作为一种可选的实施方式,第二终端702,还用于判断第一终端701的媒体描述信息与第二终端702的媒体描述信息不匹配时,向第一终端701发送匹 配失败信息,所述匹配失败信息用于指示第二终端702与第一终端701之间的媒体流会话建立失败。
其中,媒体描述信息是通过会话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
具体实现中,第二终端702,还用于判断是否存在第一终端701的媒体描述信息中的至少一种编码技术与第二终端702的媒体描述信息中的至少一种解码技术匹配,并判断是否存在第一终端701的媒体描述信息中的至少一种解码技术与第二终端702的媒体描述信息中的至少一种编码技术匹配,若判断第一终端701的媒体描述信息中的至少一种编码技术与第二终端702的媒体描述信息中的至少一种解码技术匹配,且第一终端701的媒体描述信息中的至少一种解码技术与第二终端702的媒体描述信息中的至少一种编码技术匹配,则判断第一终端701的媒体描述信息与第二终端702的媒体描述信息非对称匹配。
其中,第二终端702根据第一终端701的媒体描述信息与第二终端702的媒体描述信息的匹配结果向第一终端701发送的第二终端702的媒体描述信息可以包括第二终端702的所有媒体描述信息,或者第二终端702的第一媒体描述信息,所述第一媒体描述信息用于描述第二终端702的所有媒体描述信息中与第一终端701的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。
具体实现中,第二终端702,用于当判断第一终端701的媒体描述信息与第二终端702的媒体描述信息非对称匹配,则根据第一终端701的媒体描述信息与第二终端702的媒体描述信息的匹配结果向第一终端701发送第二终端702的媒体描述信息;
第一终端701,还用于判断第二终端702发送的第二终端702的媒体描述信息与第一终端701的媒体描述信息是否非对称匹配,当第一终端701判断第二终端702发送的第二终端702的媒体描述信息与第一终端701的媒体描述信息非对称匹配时,第一终端701与第二终端702之间建立媒体流会话。
在图7所示的会话建立系统中,第一终端701向第二终端702发送呼叫请求信息,所述呼叫请求信息携带第一终端701的媒体描述信息,第二终端702判断接收到的第一终端701的媒体描述信息与第二终端702的媒体描述信息是 否非对称匹配,若判断第一终端701的媒体描述信息与第二终端702的媒体描述信息非对称匹配,则向第一终端701发送第二终端702的媒体描述信息,第一终端701根据接收到的第二终端702的媒体描述信息与第二终端702之间建立媒体流会话,可实现两个终端之间建立会话,并通过同一个通道向对端发送媒体流和接收对端发送的媒体流,提升资源利用率。
本领域普通技术人员可以理解实现上述实施例方法中的全部或非对称流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储器等。
需要说明的是,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的非对称,可以参见其他实施例的相关描述。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。
本发明实施例装置中的模块可以根据实际需要进行合并、划分和删减。
本发明实施例中所述模块,可以通过通用集成电路,例如CPU(Central Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (11)

  1. 一种会话建立方法,其特征在于,所述方法包括:
    第二终端接收第一终端发送的呼叫请求信息,所述呼叫请求信息携带所述第一终端的媒体描述信息,所述第一终端的媒体描述信息用于描述所述第一终端支持的编码技术和解码技术;
    所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息是否非对称匹配;
    若所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,则根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息,以使所述第一终端根据所述第二终端发送的所述第二终端的媒体描述信息与所述第二终端之间建立媒体流会话。
  2. 如权利要求1所述的方法,其特征在于,所述媒体描述信息是通过会话描述协议(Session Description Protocol,SDP)中的rtpmap属性或自定义媒体属性进行描述的。
  3. 如权利要求1所述的方法,其特征在于,所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息是否非对称匹配包括:
    所述第二终端判断是否存在所述第一终端的媒体描述信息中的至少一种编码技术与所述第二终端的媒体描述信息中的至少一种解码技术匹配;
    所述第二终端判断是否存在所述第一终端的媒体描述信息中的至少一种解码技术与所述第二终端的媒体描述信息中的至少一种编码技术匹配;
    若所述第二终端判断所述第一终端的媒体描述信息中的至少一种编码技术与所述第二终端的媒体描述信息中的至少一种解码技术匹配,且所述第一终端的媒体描述信息中的至少一种解码技术与所述第二终端的媒体描述信息中的至少一种编码技术匹配,则判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,其中与所述第一终端的媒体描述信息匹配的第二终端的至少一种编码技术和与所述第一终端的媒体描述信息匹配的第二终端的至少一种解码技术是非对称的。
  4. 如权利要求1所述的方法,其特征在于,所述第二终端根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息包括:
    所述第二终端向所述第一终端发送所述第二终端的所有媒体描述信息;或
    所述第二终端向所述第一终端发送所述第二终端的第一媒体描述信息,所述第一媒体描述信息用于描述所述第二终端的所有媒体描述信息中与所述第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。
  5. 如权利要求1所述的方法,其特征在于,所述第二终端根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息包括:
    若所述第二终端判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,则根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息,以使所述第一终端判断所述第二终端发送的所述第二终端的媒体描述信息与所述第一终端的媒体描述信息是否非对称匹配,若所述第一终端判断所述第二终端发送的所述第二终端的媒体描述信息与所述第一终端的媒体描述信息非对称匹配,则与所述第二终端之间建立媒体流会话。
  6. 一种终端,其特征在于,所述终端包括:
    呼叫请求接收单元,用于接收第一终端发送的呼叫请求信息,所述呼叫请求信息携带所述第一终端的媒体描述信息,所述第一终端的媒体描述信息用于描述所述第一终端支持的编码技术和解码技术;
    判断单元,用于判断所述呼叫请求接收单元接收到的所述第一终端的媒体描述信息与自身的媒体描述信息是否非对称匹配;
    媒体描述发送单元,用于当所述判断单元判断所述第一终端的媒体描述信息与所述自身的媒体描述信息非对称匹配时,根据所述第一终端的媒体描述信息与所述自身的媒体描述信息的匹配结果向所述第一终端发送所述自身的媒体描述信息,以使所述第一终端根据所述自身的媒体描述信息与自身之间建立媒体流会话。
  7. 如权利要求6所述的终端,其特征在于,所述媒体描述信息是通过会 话描述协议中的rtpmap属性或自定义媒体属性进行描述的。
  8. 如权利要求6所述的终端,其特征在于,所述判断单元包括:
    编码能力判断模块,用于判断是否存在所述第一终端的媒体描述信息中的至少一种编码技术与所述自身的媒体描述信息中的至少一种解码技术匹配;
    解码能力判断模块,用于判断是否存在所述第一终端的媒体描述信息中的至少一种解码技术与所述自身的媒体描述信息中的至少一种编码技术匹配;
    媒体描述判断模块,用于当所述编码能力判断模块判断所述第一终端的媒体描述信息中的至少一种编码技术与所述自身的媒体描述信息中的至少一种解码技术匹配,且所述解码能力判断模块判断所述第一终端的媒体描述信息中的至少一种解码技术与所述自身的媒体描述信息中的至少一种编码技术匹配时,判断所述第一终端的媒体描述信息与所述自身的媒体描述信息非对称匹配,其中与所述第一终端的媒体描述信息匹配的自身的至少一种编码技术和与所述第一终端的媒体描述信息匹配的自身的至少一种解码技术是非对称的。
  9. 如权利要求6所述的终端,其特征在于,
    所述媒体描述发送单元,用于向所述第一终端发送所述自身的所有媒体描述信息;或
    所述媒体描述发送单元,用于向所述第一终端发送所述自身的第一媒体描述信息,所述第一媒体描述信息用于描述所述自身的所有媒体描述信息中与所述第一终端的媒体描述信息非对称匹配的至少一种编码技术和至少一种解码技术。
  10. 如权利要求6所述的终端,其特征在于,
    所述媒体描述发送单元,还用于当所述判断单元判断所述第一终端的媒体描述信息与所述自身的媒体描述信息非对称匹配时,根据所述第一终端的媒体描述信息与所述自身的媒体描述信息的匹配结果向所述第一终端发送所述自身的媒体描述信息,以使所述第一终端判断所述自身的媒体描述信息与所述第一终端的媒体描述信息是否非对称匹配,若所述第一终端判断所述自身的媒体描述信息与所述第一终端的媒体描述信息非对称匹配,则与自身之间建立媒体流会话。
  11. 一种会话建立系统,其特征在于,所述系统包括第一终端和第二终端, 其中:
    所述第一终端,用于向所述第二终端发送呼叫请求信息,所述呼叫请求信息携带所述第一终端的媒体描述信息;接收所述第二终端返回的所述第二终端的媒体描述信息;根据所述接收到的所述第二终端的媒体描述信息与所述第二终端之间建立媒体流会话;
    所述第二终端如权利要求6~10任一项所述的终端,用于接收所述第一终端发送的呼叫请求信息;判断所述接收到的所述第一终端的媒体描述信息与所述第二终端的媒体描述信息是否非对称匹配;若判断所述第一终端的媒体描述信息与所述第二终端的媒体描述信息非对称匹配,则根据所述第一终端的媒体描述信息与所述第二终端的媒体描述信息的匹配结果向所述第一终端发送所述第二终端的媒体描述信息。
PCT/CN2015/072832 2014-03-14 2015-02-12 一种会话建立方法、终端及系统 WO2015135409A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410096065.0A CN104917736B (zh) 2014-03-14 2014-03-14 一种会话建立方法、终端及系统
CN201410096065.0 2014-03-14

Publications (1)

Publication Number Publication Date
WO2015135409A1 true WO2015135409A1 (zh) 2015-09-17

Family

ID=54070912

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072832 WO2015135409A1 (zh) 2014-03-14 2015-02-12 一种会话建立方法、终端及系统

Country Status (2)

Country Link
CN (1) CN104917736B (zh)
WO (1) WO2015135409A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254354B (zh) * 2016-08-10 2019-04-26 东北大学 一种非对称媒体参数的sdp协商方法
CN111181900B (zh) * 2018-11-13 2022-04-22 深圳光启高等理工研究院 一种数据报文发送和接收方法、存储介质及处理器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008122228A1 (fr) * 2007-04-05 2008-10-16 Huawei Technologies Co., Ltd. Procédé d'appel multimédia, dispositif et système de communication
CN101395882A (zh) * 2006-03-02 2009-03-25 艾利森电话股份有限公司 宽带编解码器协商
WO2010133148A1 (zh) * 2009-05-19 2010-11-25 中兴通讯股份有限公司 软交换架构下的编解码转换控制方法、媒体网关及系统
CN102045782A (zh) * 2009-10-21 2011-05-04 中兴通讯股份有限公司 一种语音视频用户速率协商的方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007015788B3 (de) * 2007-03-30 2008-10-23 Fm Marketing Gmbh Multimedia-Einrichtung und Verfahren zur Datenübertragung bei einer Multimedia-Einrichtung
CN102232287B (zh) * 2010-09-14 2013-11-06 华为技术有限公司 媒体加速协商的实现方法及装置
WO2015021650A1 (zh) * 2013-08-16 2015-02-19 华为技术有限公司 媒体流的传输方法、装置与系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101395882A (zh) * 2006-03-02 2009-03-25 艾利森电话股份有限公司 宽带编解码器协商
WO2008122228A1 (fr) * 2007-04-05 2008-10-16 Huawei Technologies Co., Ltd. Procédé d'appel multimédia, dispositif et système de communication
WO2010133148A1 (zh) * 2009-05-19 2010-11-25 中兴通讯股份有限公司 软交换架构下的编解码转换控制方法、媒体网关及系统
CN102045782A (zh) * 2009-10-21 2011-05-04 中兴通讯股份有限公司 一种语音视频用户速率协商的方法及系统

Also Published As

Publication number Publication date
CN104917736B (zh) 2018-10-02
CN104917736A (zh) 2015-09-16

Similar Documents

Publication Publication Date Title
US9306992B2 (en) Method and system for using Wi-Fi display transport mechanisms to accomplish voice and data communications
JP6219310B2 (ja) ワイヤレスディスプレイのためのユーザ入力バックチャネルを介した双方向トンネリング
US10798138B2 (en) Instant calling method, apparatus and system
JP5852104B2 (ja) 帯域内信号を使用するコーデック展開
US20110113146A1 (en) Dynamic quality of service (qos) setup over wired and wireless networks
US9351328B2 (en) Method for transferring a communication session between devices
US10630786B2 (en) Method for maintaining a persistent miracast session over wireless link
US9232244B2 (en) Efficient frame forwarding in large scale real-time screen content sharing meetings
TW201517572A (zh) 一種數據處理方法、裝置及系統
WO2019184262A1 (zh) 多类型媒体数据网络地址转换穿越方法、终端及系统
CN115023964A (zh) Wlan感知测量建立终止方法及装置、电子设备及存储介质
CN107040458B (zh) 一种实现视频会议互通的方法和系统
WO2015135409A1 (zh) 一种会话建立方法、终端及系统
WO2019075896A1 (zh) 一种设备间互连的方法、装置、系统、设备和存储介质
WO2012113240A1 (zh) 一种多媒体会话的协商方法、相关设备和系统
CN102137093A (zh) 媒体流处理方法及媒体网关
WO2015135408A1 (zh) 一种对等网络会议接入方法、客户端及系统
US20220182713A1 (en) Device and system for streaming media interaction
WO2016154831A1 (zh) 一种实现传输控制协议tcp传输的方法及装置
JP2021100275A (ja) サービス通信のコーデックモードセットを確定するための方法及び装置
WO2024108900A1 (zh) 一种电子签名验证方法及装置
Leu et al. Design and implementation of a VoIP broadcasting service over embedded systems in a heterogeneous network environment
CN104469537A (zh) 不对称组网系统视频呼叫方法及终端、服务器和系统
WO2012163126A1 (zh) 多媒体能力协商方法及装置
WO2014040297A1 (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: 15762228

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: 15762228

Country of ref document: EP

Kind code of ref document: A1