[go: up one dir, main page]

WO2016180220A1 - Conversation setup method and apparatus - Google Patents

Conversation setup method and apparatus Download PDF

Info

Publication number
WO2016180220A1
WO2016180220A1 PCT/CN2016/080160 CN2016080160W WO2016180220A1 WO 2016180220 A1 WO2016180220 A1 WO 2016180220A1 CN 2016080160 W CN2016080160 W CN 2016080160W WO 2016180220 A1 WO2016180220 A1 WO 2016180220A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
identification information
address
data channel
port number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/080160
Other languages
French (fr)
Chinese (zh)
Inventor
杨冬变
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Publication of WO2016180220A1 publication Critical patent/WO2016180220A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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/40Support for services or applications
    • H04L65/402Support for services or applications wherein the services involve a main real-time session and one or more additional parallel non-real time sessions, e.g. downloading a file in a parallel FTP session, initiating an email or combinational services
    • H04L65/4025Support for services or applications wherein the services involve a main real-time session and one or more additional parallel non-real time sessions, e.g. downloading a file in a parallel FTP session, initiating an email or combinational services where none of the additional parallel sessions is real time or time sensitive, e.g. downloading a file in a parallel FTP session, initiating an email or combinational services
    • 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/40Support for services or applications
    • 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 application relates to, but is not limited to, the field of communications, and in particular, to a method and apparatus for establishing a session.
  • the ticket purchaser During the peak booking process of the Spring Festival travel season, after the booking telephone is connected, the ticket purchaser must accurately and quickly enter his 18-digit ID number, 11 mobile phone contact information and other personal information, assuming that the ticket purchaser accidentally presses the wrong one. If the key causes the input information to be incorrect, the ticket purchaser needs to re-enter, which affects the efficiency of the telephone booking. In the worse case, the ticket purchaser may not be able to grab the ticket that he needs because of the mistake.
  • the need for each party to send a picture/text message to the other party during the call is met by everyone.
  • the related technologies are usually implemented in the following manner: the calling party dials the called number by dialing or looking up the address book.
  • the terminal device can not simultaneously transmit multimedia data during the call process, which not only fails to fully meet the diverse interaction requirements of the user, but also has a complicated operation process, high cost, long time consumption, and low communication efficiency.
  • Embodiments of the present invention provide a method and apparatus for establishing a session.
  • An embodiment of the present invention provides a method for establishing a session, where the method includes:
  • the second terminal device is a terminal device that is talking when the first terminal device sends a connection request.
  • the identity identification information includes an International Mobile Subscriber Identity (IMSI), a protocol IP address interconnected between the networks, and a port number.
  • IMSI International Mobile Subscriber Identity
  • the method further includes: the server searching for a presence of the IMSI in the identification information in a local data storage area; and when the IMSI exists in the data storage area, the IP address corresponding to the identity identification information and The port number is synchronously updated to the data storage area; when the IMSI is not present in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to the data storage area.
  • the establishing a data channel between the first terminal device and the target terminal includes: establishing, according to an IP address and a port number of the first terminal device, and an IP address and a port number of the second terminal device a data channel; the data channel is independent of a call channel between the first terminal device and the second terminal device.
  • the server obtains an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device, and acquires an IP address and a port number of the first terminal device according to the connection request.
  • the embodiment of the invention further provides a method for a session, the method comprising:
  • the first terminal device After the first terminal device establishes a call with the second terminal device, sending a connection request to the server, where the connection request is set to request to establish a data channel with the second terminal device;
  • the first terminal device After the data channel is established, the first terminal device sends a file to the second terminal device through the data channel, and/or receives a file from the second terminal device through the data channel.
  • the method further includes: the first terminal device transmitting the identity identification information to the server;
  • the identification information carries the IMSI of the first terminal device, a telephone number, a protocol IP address interconnected between the networks, and a port number.
  • the first terminal device sends a file to the second terminal device by using the data channel, where the first terminal device receives a request for sending a file input by a user, and sends the corresponding file to the first file through the data channel.
  • Two terminal devices Two terminal devices.
  • the first terminal device receives a request for sending a file input by the user, and detects that the user clicks on an icon indicating that the file is sent on the call interface of the first terminal device.
  • the embodiment of the present invention further provides a device for establishing a session, which is disposed on a server, and the device includes:
  • a locating module configured to receive a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists;
  • connection module configured to establish a data channel between the first terminal device and the second terminal device according to the found identity information
  • the second terminal device is a terminal device that is talking when the first terminal device sends a connection request.
  • the identity identification information includes an International Mobile Subscriber Identity (IMSI), a protocol IP address and a port number interconnected between the networks.
  • IMSI International Mobile Subscriber Identity
  • protocol IP address a protocol IP address and a port number interconnected between the networks.
  • the device further includes an information processing module, the information processing module is configured to search for an IMSI in the identification information in a data storage area, and when the IMSI is found in the data storage area, The IP address and the port number corresponding to the IMSI are synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to The data storage area.
  • the information processing module is configured to search for an IMSI in the identification information in a data storage area, and when the IMSI is found in the data storage area, The IP address and the port number corresponding to the IMSI are synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to The data storage area.
  • the connection module is configured to: establish a data channel according to an IP address and a port number of the first terminal device, and an IP address and a port number of the second terminal device; the data channel is independent of the first a communication channel between a terminal device and the second terminal device.
  • connection module is further configured to: acquire an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device; and acquire an IP of the first terminal device according to the connection request Address and port number.
  • the embodiment of the present invention further provides a device for a session, which is disposed on a first terminal device, where the device includes:
  • a communication module configured to send a connection request to the server after establishing a call with the second terminal device, where the connection request is set to request to establish a data channel with the second terminal device;
  • a processing module configured to send a file to the second terminal device through the data channel after the data channel is established, and/or receive a file from the second terminal device through the data channel.
  • the communication module is further configured to send the identity identification information to the server;
  • the identification information includes an International Mobile Subscriber Identity (IMSI) of the first terminal device, a telephone number, a protocol IP address interconnected between the networks, and a port number.
  • IMSI International Mobile Subscriber Identity
  • the processing module is configured to: receive a request for sending a file input by the user, and send the corresponding file to the second terminal device by using the data channel.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the method for establishing a session and/or the method for the session.
  • the embodiment of the invention can enable the terminal device to establish a data channel through the server of the network during the call and in the networked state, so that the server through the network can transmit multimedia data such as pictures, texts, videos and files to each other, and the operation is simple, saves time and effort. Improve communication efficiency and greatly enhance the user experience.
  • FIG. 1 is a flowchart of a method for establishing a session according to an embodiment of the present invention
  • FIG. 2 is another flowchart of a method for establishing a session according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of establishing a session in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a communication frame in an embodiment of the present invention.
  • FIG. 5 is another flowchart of a method for establishing a session according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of an apparatus for establishing a session set in a server according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a session apparatus installed in a terminal device according to an embodiment of the present invention.
  • this embodiment provides a method for establishing a session, which is applied to a server, and the method includes:
  • Step S11 The server receives the connection request of the first terminal device, and carries the identity identification information of the second terminal device in the connection request to find whether the identity identification information exists.
  • the identification information may include an IMSI (International Mobile Subscriber Identification Number), a telephone number, a protocol IP address interconnected between the networks, and a port number.
  • IMSI International Mobile Subscriber Identification Number
  • Step S12 When the identity identification information exists, establish a data channel between the first terminal device and the second terminal device;
  • the second terminal device is a terminal device that is in a call when the first terminal device sends a connection request.
  • the data channel is established according to the IP address and port number of the first terminal device and the IP address and port number of the second terminal device; the data channel is independent of the first terminal device and the second terminal device. Call channel.
  • the method may further include:
  • Step S14 The server receives the identification information
  • Step S15 After receiving the identity identification information, the server searches for the IMSI included in the identity identification information in the data storage area.
  • the IP address corresponding to the identity identification information is The port number is synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, IP address, and port number in the identification information are added to the data storage area.
  • the server After receiving the connection request sent by the first terminal device, the server can identify the connection.
  • the sender is the identity information of the first terminal device, and obtains the IP address and port number of the first terminal device.
  • the server can obtain the IP address and the port number of the second terminal device by searching for the IP address and port number of the second terminal device in a local search manner according to the identity identification information of the second terminal device carried in the connection request. That is, the IP address and port number of the second terminal device are obtained.
  • the server After the server obtains the IP address and port number of the first terminal device and the IP address and port number of the second terminal device, the server can be in the first terminal device.
  • the communication channel of the data, the above data channel and the call channel can coexist and do not interfere with each other.
  • step S14 may be performed after step S12, or may be performed before step S11, or may be other execution order.
  • the execution order of step 14 is not specifically limited, and step S15 needs to be It is executed after step S14.
  • the embodiment further provides a method for a session, which is applied to a first terminal device, and the method includes:
  • Step S10 The first terminal device sends a connection request to the server after establishing a call with the second terminal device.
  • connection request is set to request to establish a data channel with the second terminal device
  • Step S13 After the data channel is established, the first terminal device sends a corresponding file to the second terminal device through the data channel, and/or receives a file from the second terminal device through the data channel.
  • the first terminal device receives the request for sending a file input by the user, and sends the corresponding file to the second terminal device through the data channel after receiving the request for sending the file.
  • the receiving the file request input by the user may include: detecting that the user clicks on the icon indicating that the file is sent on the call interface of the first terminal device.
  • the icon of the sending file is also set on the call interface of the terminal device, and after the user clicks the icon, the corresponding sending file request is automatically generated, and correspondingly, the terminal device receives the user input. Send a file request.
  • the method further includes:
  • Step S16 The first terminal device sends the identity identification information to the server.
  • the identity identification information includes an IMSI, a phone number, an IP address, and a port number of the first terminal device. Wherein, since the telephone number and the IMSI actually represent the same meaning, the identification information may not include the telephone number.
  • step S16 is not specifically limited, and may be performed before step S10 or after step S13.
  • the mobile phone can be pre-installed with the IM client software.
  • the entry of the software can be inserted into the call page, each of which inserts a valid SIM (Subscriber Identity Module) card and connects to the Internet.
  • SIM Subscriber Identity Module
  • the IMSI and IP (Internet Protocol) information of the mobile phone are recorded by the IM (Instant Messaging) software and sent to the network server, and a message is generated on the network server and recorded in the database.
  • IM Intelligent Messaging
  • the communication system architecture of the embodiment of the present invention may adopt a C/S mode, that is, a client/server architecture.
  • a C/S mode that is, a client/server architecture.
  • the Android platform-based client as an example, connect to the Internet (Internet) through 3G/4G or WiFi, and realize communication between Android clients through the server.
  • the server can add the user identity of the terminal device as follows:
  • the mobile phone is pre-installed with the instant messaging client software when the mobile phone is shipped.
  • the entry of the software is in the call page, and the software icon can also appear on the user's mobile phone desktop;
  • the network server built by the mobile phone equipment provider maintains the user profile information DB1 in the server local area network, provides a separate session channel DB2 to both parties of the call, and forwards the user chat record;
  • the client software detects the IMSI and the phone number of the mobile phone, and generates a user identity by using the IMSI, the phone number, the IP address of the smart phone, and the TCP/UDP port number occupied by the client software. Information is sent to the server.
  • the server After the server receives a user identification information, the information and the database (ie, the upper The information in the data storage area of the text is compared. If the IMSI is not in the database, it is added to the database, otherwise the IP address and TCP/UDP port number corresponding to the IMSI in the database are updated.
  • S202 Send the call made by the user to the server to match
  • the client software on the terminal device sends a connection request carrying the phone number dialed by the user to the connection request. server. If it detects that there is no network signal status, the client software prompts the user to send it after networking.
  • step S203 The server determines whether the matching is successful, if the matching is unsuccessful, step S204 is performed; if the matching is successful, step S205 is performed;
  • S205 The server establishes a session channel between the two parties of the call
  • S206 The user clicks on the IM client on the call page, and the two parties enter a peer-to-peer chat session mode.
  • the client When the mobile phone makes a telephone call, the client reads the telephone number dialed by the user through the mobile phone address book interface, and sends the telephone number to the server side. After the IM server performs the matching in the database DB1, the IP and port numbers of the two parties through the call are successfully transmitted. A separate session channel is created, and the calling party directly sends information to the called party directly through the IP address and TCP port number of the called party sent by the server.
  • the picture information sent from other mobile phones is transferred through the IM server, and after the mobile phone is connected to the network, the server forwards the mobile phone to the mobile phone.
  • the embodiment of the invention combines the convenience of voice call with the diversity of network communication. For the user, as long as the mobile phone is in the networked state, the user can share information with the other party at any time during the call, and truly realize the "smell". Its sound is as good as it can be.”
  • Embodiment 2
  • the embodiment provides a device for establishing a session, which is disposed on a server, and the device includes:
  • the locating module 11 is configured to receive a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists;
  • connection module 12 is configured to establish a data channel between the first terminal device and the second terminal device according to the found identity identification information
  • the second terminal device is a terminal device that is talking when the first terminal device sends a connection request.
  • the identification information includes an IMSI, a phone number, an IP address, and a port number of the terminal device.
  • the device further includes: an information processing module 13 configured to search for an IMSI in the identity identification information in a data storage area; and when the IMSI is found in the data storage area, the IMSI is corresponding to The IP address and the port number are synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to the data. Storage area.
  • the identity identification information used by the information processing module 13 may be the identity identification information of the first terminal device or the identity identification information of the second terminal device.
  • the connection module 12 is configured to: establish a data channel according to an IP address and a port number of the first terminal device, and an IP address and a port number of the second terminal device; the data channel is independent of the first a communication channel between a terminal device and the second terminal device.
  • connection module 12 is further configured to: obtain an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device, and acquire an IP of the first terminal device according to the connection request Address and port number.
  • the embodiment further provides a device for a session, which is disposed on a first terminal device, where the device includes:
  • the communication module 21 is configured to send a connection request to the server after establishing a call with the second terminal device, where the connection request is set to request to establish a data channel with the second terminal device;
  • the processing module 22 is configured to, after the data channel is established, send a file to the second terminal device through the data channel, and/or receive a file from the second terminal device through the data channel.
  • the communication module 21 is further configured to send the identity identification information of the first terminal device to the server; the identity identification information includes an IMSI, a phone number, a protocol IP address interconnected between the networks, and a port number.
  • the processing module 22 is configured to: receive a send file request input by the user, and send the corresponding file to the second terminal device by using the data channel.
  • the receiving the file request input by the user specifically refers to: detecting that the user clicks on the icon indicating that the file is sent in the call interface of the first terminal device.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of establishing a session and/or a session.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • the method and device for establishing a session are provided by the embodiment of the present invention, and the corresponding session method and device are also provided.
  • the embodiment of the present invention establishes between the first terminal device and the second terminal device that are talking by the server in the network.
  • the data channel enables the terminal device to transmit multimedia data such as pictures, texts, videos and files to each other while in a call and in a networked state, which is simple in operation, saves time and labor, improves communication efficiency, and greatly improves the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Disclosed is a conversation setup method. The method comprises: when receiving a connection request of a first terminal device, if the connection request carries identification information of a second terminal device, making a search to find whether the identification information exists; when the identification information is found, establishing a data channel between the first terminal device and the target terminal, where the second terminal device is a terminal device with which the first terminal device is having a conversation when the first terminal device sends the connection request. By means of the foregoing solution, when terminal devices are having a conversation and are in an online state, the terminal devices may transfer multimedia data such as a picture, a text, a video, and a file to each other by using a network server. The method has single operations, and a user does not need to additionally install software, thereby greatly improving user experience.

Description

一种建立会话的方法及装置Method and device for establishing session 技术领域Technical field

本申请涉及但不限于通信领域,具体涉及一种建立会话的方法及装置。The present application relates to, but is not limited to, the field of communications, and in particular, to a method and apparatus for establishing a session.

背景技术Background technique

社区O2O(Online To Offline,在线离线/线上到线下)服务过程中,顾客给加盟店拨打电话订购生鲜蔬菜,店员有时难以通过语言描述准确传达商品品质信息,只能约定登陆社区服务APP(Application,应用程序)向顾客发送商品实时图片,这个环节影响顾客在通话过程中快速作出订购决定,且由于各种原因大部分顾客不主动安装APP,可能导致加盟店失去订单。In the process of community O2O (Online To Offline, online offline/online to offline), customers call the franchise store to order fresh vegetables. It is sometimes difficult for the clerk to accurately convey the product quality information through the language description. (Application, application) sends real-time pictures of goods to customers. This link affects customers' quick decision making during the call, and most customers do not actively install the app for various reasons, which may cause the franchise to lose orders.

春运高峰期电话订票过程中,订票电话接通后,购票人需准确快速地输入自己的18位身份证号、11位手机联系方式等个人信息,假设购票人不小心按错一个键,导致输入信息错误,就需要购票人重新输入,影响到电话订票的效率,更糟糕的情况下购票人还可能因为这个失误抢不到自己需要的车票。双方打电话过程中一方需要给对方发送图片/文字消息的需求每个人都会碰到,对于此类应用场景,目前相关技术通常采用如下方式实现:主叫通过拨号或查找通讯录拨通被叫号码,与被叫建立语音通话,在语音通话过程中,一方需要与另一方进行图片/文字交流,需要先切换到短消息页面,在短消息页面向对方发送短信/彩信,以让对方获知信息,对方查看相关信息,也需要先切换到短消息页面,才能查看具体的信息。由此可知,相关技术中终端设备通话过程往往不能同时传输多媒体数据,不仅无法完全满足用户的多样化交互需求,而且操作过程复杂,成本高,耗时长,通信效率低。During the peak booking process of the Spring Festival travel season, after the booking telephone is connected, the ticket purchaser must accurately and quickly enter his 18-digit ID number, 11 mobile phone contact information and other personal information, assuming that the ticket purchaser accidentally presses the wrong one. If the key causes the input information to be incorrect, the ticket purchaser needs to re-enter, which affects the efficiency of the telephone booking. In the worse case, the ticket purchaser may not be able to grab the ticket that he needs because of the mistake. The need for each party to send a picture/text message to the other party during the call is met by everyone. For such application scenarios, the related technologies are usually implemented in the following manner: the calling party dials the called number by dialing or looking up the address book. To establish a voice call with the called party, during the voice call, one party needs to perform picture/text communication with the other party, and needs to switch to the short message page first, and send a short message/mMS message to the other party on the short message page to let the other party know the information. To view related information, you also need to switch to the short message page before you can view the specific information. It can be seen that in the related art, the terminal device can not simultaneously transmit multimedia data during the call process, which not only fails to fully meet the diverse interaction requirements of the user, but also has a complicated operation process, high cost, long time consumption, and low communication efficiency.

因此,需要一种能够在通话的同时传输多媒体数据的技术,以解决相关技术存在的上述问题。Therefore, there is a need for a technology capable of transmitting multimedia data while a call is being made to solve the above problems of the related art.

发明内容Summary of the invention

以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保围。The following is an overview of the topics detailed in this document. This summary is not intended to limit the scope of the claims.

本发明实施例提供一种建立会话的方法及装置。 Embodiments of the present invention provide a method and apparatus for establishing a session.

本发明实施例提供了一种建立会话的方法,所述方法包括:An embodiment of the present invention provides a method for establishing a session, where the method includes:

服务器接收第一终端设备的连接请求,所述连接请求中携带第二终端设备的身份识别信息,查找是否存在所述身份识别信息;Receiving, by the server, a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists;

根据查找到的所述身份识别信息,建立所述第一终端设备与所述第二终端设备之间的数据通道;Establishing, according to the found identity information, a data channel between the first terminal device and the second terminal device;

其中,所述第二终端设备是所述第一终端设备发送连接请求时正在通话的终端设备。The second terminal device is a terminal device that is talking when the first terminal device sends a connection request.

其中,所述身份识别信息包含国际移动用户识别码IMSI、网络之间互连的协议IP地址以及端口号。The identity identification information includes an International Mobile Subscriber Identity (IMSI), a protocol IP address interconnected between the networks, and a port number.

所述方法还包括:服务器在本地的数据存储区域中查找是否存在所述身份识别信息中的IMSI;所述数据存储区域中存在所述IMSI时,则将所述身份识别信息对应的IP地址及端口号同步更新到数据存储区域;在所述数据存储区域中不存在所述IMSI时,将所述身份识别信息中的IMSI、IP地址及端口号添加到所述数据存储区域。The method further includes: the server searching for a presence of the IMSI in the identification information in a local data storage area; and when the IMSI exists in the data storage area, the IP address corresponding to the identity identification information and The port number is synchronously updated to the data storage area; when the IMSI is not present in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to the data storage area.

其中,所述建立所述第一终端设备与所述目标终端之间的数据通道包括:根据所述第一终端设备的IP地址及端口号和所述第二终端设备的IP地址及端口号建立数据通道;所述数据通道独立于所述第一终端设备与所述第二终端设备之间的通话通道。The establishing a data channel between the first terminal device and the target terminal includes: establishing, according to an IP address and a port number of the first terminal device, and an IP address and a port number of the second terminal device a data channel; the data channel is independent of a call channel between the first terminal device and the second terminal device.

其中,所述服务器根据所述第二终端设备的身份识别信息,获取第二终端设备的IP地址以及端口号;根据所述连接请求,获取所述第一终端设备的IP地址以及端口号。The server obtains an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device, and acquires an IP address and a port number of the first terminal device according to the connection request.

本发明实施例还提供了一种会话的方法,所述方法包括:The embodiment of the invention further provides a method for a session, the method comprising:

第一终端设备与第二终端设备建立通话后,发送连接请求给服务器,所述连接请求设置为请求建立与所述第二终端设备之间的数据通道;After the first terminal device establishes a call with the second terminal device, sending a connection request to the server, where the connection request is set to request to establish a data channel with the second terminal device;

所述数据通道建立后,所述第一终端设备通过所述数据通道发送文件到所述第二终端设备,和/或通过所述数据通道接收来自所述第二终端设备的文件。After the data channel is established, the first terminal device sends a file to the second terminal device through the data channel, and/or receives a file from the second terminal device through the data channel.

所述方法还包括:所述第一终端设备将身份识别信息发送给服务器;所 述身份识别信息携带有所述第一终端设备的IMSI、电话号码、网络之间互连的协议IP地址以及端口号。The method further includes: the first terminal device transmitting the identity identification information to the server; The identification information carries the IMSI of the first terminal device, a telephone number, a protocol IP address interconnected between the networks, and a port number.

其中,所述第一终端设备通过所述数据通道发送文件到所述第二终端设备,包括:所述第一终端设备接收用户输入的发送文件请求,将相应文件通过所述数据通道发送给第二终端设备。The first terminal device sends a file to the second terminal device by using the data channel, where the first terminal device receives a request for sending a file input by a user, and sends the corresponding file to the first file through the data channel. Two terminal devices.

其中,所述第一终端设备接收用户输入的发送文件请求,检测到用户点击所述第一终端设备通话界面上表示发送文件的图标。The first terminal device receives a request for sending a file input by the user, and detects that the user clicks on an icon indicating that the file is sent on the call interface of the first terminal device.

本发明实施例还提供了一种建立会话的装置,设置于服务器,所述装置包括:The embodiment of the present invention further provides a device for establishing a session, which is disposed on a server, and the device includes:

查找模块,设置为接收第一终端设备的连接请求,所述连接请求中携带第二终端设备的身份识别信息,查找是否存在所述身份识别信息;a locating module, configured to receive a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists;

连接模块,设置为根据查找到的所述身份识别信息,建立所述第一终端设备与所述第二终端设备之间的数据通道;a connection module, configured to establish a data channel between the first terminal device and the second terminal device according to the found identity information;

其中,所述第二终端设备是所述第一终端设备发送连接请求时正在通话的终端设备。The second terminal device is a terminal device that is talking when the first terminal device sends a connection request.

其中,所述身份识别信息包含国际移动用户识别码IMSI、网络之间互连的协议IP地址及端口号。The identity identification information includes an International Mobile Subscriber Identity (IMSI), a protocol IP address and a port number interconnected between the networks.

所述装置还包括信息处理模块:所述信息处理模块,设置为在数据存储区域中查找所述身份识别信息中的IMSI;,在所述数据存储区域中查找到所述IMSI时,则将所述IMSI对应的IP地址及端口号同步更新到所述数据存储区域;在所述数据存储区域中没有查找到所述IMSI时,将所述身份识别信息中的IMSI、IP地址及端口号添加到所述数据存储区域。The device further includes an information processing module, the information processing module is configured to search for an IMSI in the identification information in a data storage area, and when the IMSI is found in the data storage area, The IP address and the port number corresponding to the IMSI are synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to The data storage area.

其中,所述连接模块,是设置为:根据所述第一终端设备的IP地址及端口号和所述第二终端设备的IP地址及端口号建立数据通道;所述数据通道独立于所述第一终端设备与所述第二终端设备之间的通话通道。The connection module is configured to: establish a data channel according to an IP address and a port number of the first terminal device, and an IP address and a port number of the second terminal device; the data channel is independent of the first a communication channel between a terminal device and the second terminal device.

其中,所述连接模块,还设置为:根据所述第二终端设备的身份识别信息,获取第二终端设备的IP地址以及端口号;根据所述连接请求,获取所述第一终端设备的IP地址以及端口号。 The connection module is further configured to: acquire an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device; and acquire an IP of the first terminal device according to the connection request Address and port number.

本发明实施例还提供一种会话的装置,设置于第一终端设备,所述装置包括:The embodiment of the present invention further provides a device for a session, which is disposed on a first terminal device, where the device includes:

通讯模块,设置为与第二终端设备建立通话后发送连接请求给服务器,所述连接请求设置为请求建立与所述第二终端设备之间的数据通道;a communication module, configured to send a connection request to the server after establishing a call with the second terminal device, where the connection request is set to request to establish a data channel with the second terminal device;

处理模块,设置为在所述数据通道建立后,通过所述数据通道发送文件给所述第二终端设备,和/或通过所述数据通道接收来自所述第二终端设备的文件。And a processing module, configured to send a file to the second terminal device through the data channel after the data channel is established, and/or receive a file from the second terminal device through the data channel.

其中,所述通讯模块,还设置为将身份识别信息发送给服务器;The communication module is further configured to send the identity identification information to the server;

所述身份识别信息包含所述第一终端设备的国际移动用户识别码IMSI、电话号码、网络之间互连的协议IP地址以及端口号。The identification information includes an International Mobile Subscriber Identity (IMSI) of the first terminal device, a telephone number, a protocol IP address interconnected between the networks, and a port number.

其中,所述处理模块,是设置为:接收用户输入的发送文件请求,将相应文件通过所述数据通道发送给第二终端设备。The processing module is configured to: receive a request for sending a file input by the user, and send the corresponding file to the second terminal device by using the data channel.

本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述建立会话的方法和/或上述会话的方法。The embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the method for establishing a session and/or the method for the session.

本发明实施例可以使得终端设备在通话且处于联网状态下,通过网络的服务器建立数据通道,从而通过网络的服务器能够互相传递图片、文字、视频和文件等多媒体数据,操作简单,省时省力,提高了通讯效率,而且极大的提升了用户体验。The embodiment of the invention can enable the terminal device to establish a data channel through the server of the network during the call and in the networked state, so that the server through the network can transmit multimedia data such as pictures, texts, videos and files to each other, and the operation is simple, saves time and effort. Improve communication efficiency and greatly enhance the user experience.

在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.

附图概述BRIEF abstract

图1为本发明实施例中的建立会话的方法的流程图;FIG. 1 is a flowchart of a method for establishing a session according to an embodiment of the present invention;

图2为本发明实施例中的建立会话的方法的另一流程图;2 is another flowchart of a method for establishing a session according to an embodiment of the present invention;

图3为本发明实施例中的建立会话的示意图;3 is a schematic diagram of establishing a session in an embodiment of the present invention;

图4为本发明实施例中的通讯框架的示意图;4 is a schematic diagram of a communication frame in an embodiment of the present invention;

图5为本发明实施例中的建立会话的方法的另一流程图;FIG. 5 is another flowchart of a method for establishing a session according to an embodiment of the present invention;

图6为本发明实施例中设置于服务器的建立会话的装置的结构示意图; FIG. 6 is a schematic structural diagram of an apparatus for establishing a session set in a server according to an embodiment of the present invention;

图7为本发明实施例中设置于终端设备的会话装置的结构示意图。FIG. 7 is a schematic structural diagram of a session apparatus installed in a terminal device according to an embodiment of the present invention.

本发明的实施方式Embodiments of the invention

下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.

实施例一Embodiment 1

如图1所示,本实施例提供一种建立会话的方法,应用于服务器,所述方法包括:As shown in FIG. 1 , this embodiment provides a method for establishing a session, which is applied to a server, and the method includes:

步骤S11:服务器接收第一终端设备的连接请求,在所述连接请求中携带第二终端设备的身份识别信息,查找是否存在该身份识别信息;Step S11: The server receives the connection request of the first terminal device, and carries the identity identification information of the second terminal device in the connection request to find whether the identity identification information exists.

其中,所述身份识别信息可以包含IMSI(International Mobile Subscriber Identification Number,国际移动用户识别码)、电话号码、网络之间互连的协议IP地址以及端口号。The identification information may include an IMSI (International Mobile Subscriber Identification Number), a telephone number, a protocol IP address interconnected between the networks, and a port number.

步骤S12:存在所述身份识别信息时,建立所述第一终端设备与所述第二终端设备之间的数据通道;Step S12: When the identity identification information exists, establish a data channel between the first terminal device and the second terminal device;

其中,所述第二终端设备是所述第一终端设备发送连接请求时正在进行通话的终端设备。The second terminal device is a terminal device that is in a call when the first terminal device sends a connection request.

具体的,根据第一终端设备的IP地址及端口号和第二终端设备的IP地址及端口号建立数据通道;所述数据通道独立于所述第一终端设备与所述第二终端设备之间的通话通道。Specifically, the data channel is established according to the IP address and port number of the first terminal device and the IP address and port number of the second terminal device; the data channel is independent of the first terminal device and the second terminal device. Call channel.

其中,所述方法还可以包括:The method may further include:

步骤S14:服务器接收身份识别信息;Step S14: The server receives the identification information;

步骤S15:服务器接收该身份识别信息后,在数据存储区域中查找该身份识别信息所包含的IMSI;在所述数据存储区域中查找到该IMSI时,则将该身份识别信息对应的IP地址及端口号同步更新到所述数据存储区域;在所述数据存储区域中没有查找到所述IMSI时,将该身份识别信息中的IMSI、IP地址及端口号添加到所述数据存储区域。Step S15: After receiving the identity identification information, the server searches for the IMSI included in the identity identification information in the data storage area. When the IMSI is found in the data storage area, the IP address corresponding to the identity identification information is The port number is synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, IP address, and port number in the identification information are added to the data storage area.

服务器在接收到第一终端设备发送的连接请求后,可以识别出该连接请 求的发送方即第一终端设备的身份识别信息,并获取第一终端设备的IP地址和端口号。同时,服务器根据连接请求中携带的第二终端设备的身份识别信息,可以通过在本地查找的方式获取第二终端设备的IP地址及端口号,查找到第二终端设备的IP地址和端口号,即获取了第二终端设备的IP地址及端口号,如此,服务器在获取到第一终端设备的IP地址及端口号和第二终端设备的IP地址及端口号之后,就可以在第一终端设备与第二终端设备之间建立数据通道,该数据通道可用于在第一终端设备与第二终端设备之间传输多媒体数据;此时,第一终端设备与第二终端设备之间还存在传输通话数据的通话通道,上述的数据通道与该通话通道可并存且互不干扰。After receiving the connection request sent by the first terminal device, the server can identify the connection. The sender is the identity information of the first terminal device, and obtains the IP address and port number of the first terminal device. At the same time, the server can obtain the IP address and the port number of the second terminal device by searching for the IP address and port number of the second terminal device in a local search manner according to the identity identification information of the second terminal device carried in the connection request. That is, the IP address and port number of the second terminal device are obtained. After the server obtains the IP address and port number of the first terminal device and the IP address and port number of the second terminal device, the server can be in the first terminal device. Establishing a data channel between the first terminal device and the second terminal device, where the data channel is used to transmit multimedia data between the first terminal device and the second terminal device; The communication channel of the data, the above data channel and the call channel can coexist and do not interfere with each other.

需要说明的是,步骤S14可以在步骤S12后执行,也可以在步骤S11前执行,也可以是其它执行顺序,在本实施例中对步骤14的执行顺序不做具体限定,而步骤S15需要在步骤S14后执行。It should be noted that step S14 may be performed after step S12, or may be performed before step S11, or may be other execution order. In this embodiment, the execution order of step 14 is not specifically limited, and step S15 needs to be It is executed after step S14.

如图2所示,本实施例还提供一种会话的方法,应用于第一终端设备,所述方法包括:As shown in FIG. 2, the embodiment further provides a method for a session, which is applied to a first terminal device, and the method includes:

步骤S10:所述第一终端设备与第二终端设备建立通话后发送连接请求给服务器;Step S10: The first terminal device sends a connection request to the server after establishing a call with the second terminal device.

所述连接请求设置为请求建立与所述第二终端设备之间的数据通道;The connection request is set to request to establish a data channel with the second terminal device;

步骤S13:所述数据通道建立后,所述第一终端设备通过所述数据通道发送相应文件给第二终端设备,和/或通过所述数据通道从第二终端设备接收文件。Step S13: After the data channel is established, the first terminal device sends a corresponding file to the second terminal device through the data channel, and/or receives a file from the second terminal device through the data channel.

其中,所述第一终端设备接收用户输入的发送文件请求,并在收到所述发送文件请求后将相应的文件通过所述数据通道发送给所述第二终端设备。The first terminal device receives the request for sending a file input by the user, and sends the corresponding file to the second terminal device through the data channel after receiving the request for sending the file.

其中,所述接收用户输入的发送文件请求,可以包括:检测到用户点击所述第一终端设备通话界面上表示发送文件的图标。其中,本发明实施例中还在终端设备的通话界面上设置了所述发送文件的图标,用户点击该图标后,自动生成相应的发送文件请求,相应的,终端设备也就接收到了用户输入的发送文件请求。The receiving the file request input by the user may include: detecting that the user clicks on the icon indicating that the file is sent on the call interface of the first terminal device. In the embodiment of the present invention, the icon of the sending file is also set on the call interface of the terminal device, and after the user clicks the icon, the corresponding sending file request is automatically generated, and correspondingly, the terminal device receives the user input. Send a file request.

其中,所述方法还包括: The method further includes:

步骤S16:所述第一终端设备将身份识别信息发送给服务器;Step S16: The first terminal device sends the identity identification information to the server.

所述身份识别信息包含所述第一终端设备的IMSI、电话号码、IP地址以及端口号。其中,因电话号码与IMSI实际表示同一含义,因此,身份识别信息中也可以不包含电话号码。The identity identification information includes an IMSI, a phone number, an IP address, and a port number of the first terminal device. Wherein, since the telephone number and the IMSI actually represent the same meaning, the identification information may not include the telephone number.

需要说明的是,步骤S16的执行顺序不做具体限定,可以是在步骤S10前执行也可以在步骤S13后执行。It should be noted that the execution order of step S16 is not specifically limited, and may be performed before step S10 or after step S13.

通过上述实施例,可实现在通话的同时发送图片或者实时拍照给对方。Through the above embodiments, it is possible to transmit a picture or take a picture in real time to the other party while the call is in progress.

下面结合具体的场景以手机为例进一步说明本发明实施例的技术方案。The technical solution of the embodiment of the present invention is further illustrated by taking a mobile phone as an example in combination with a specific scenario.

如图3、4所示,手机在出厂时可以预装IM客户端软件,该软件的入口可以在通话页面中,每一个插入有效的SIM(Subscriber Identity Module,客户识别模块)卡且连接到Internet的手机的IMSI和IP(Internet Protocol,互联网协议)信息等都被该IM(InstantMessaging,即时通讯)软件记录并发送给网络服务器,在网络服务器端生成一条信息并记录到数据库中。当这样的两个智能机通话时且处于联网状态下,可以通过该网络服务器互相传递图片、文字、视频和文件等。As shown in Figures 3 and 4, the mobile phone can be pre-installed with the IM client software. The entry of the software can be inserted into the call page, each of which inserts a valid SIM (Subscriber Identity Module) card and connects to the Internet. The IMSI and IP (Internet Protocol) information of the mobile phone are recorded by the IM (Instant Messaging) software and sent to the network server, and a message is generated on the network server and recorded in the database. When such two smart phones are in a conversation and are in a networked state, pictures, texts, videos, files, and the like can be transmitted to each other through the network server.

本发明实施例的通讯系统架构可以采用C/S模式,即客户端/服务器的体系结构。以基于Android平台的客户端为例,通过3G/4G或WiFi与互联网(Internet)连接,通过服务器实现Android客户端之间的通讯。The communication system architecture of the embodiment of the present invention may adopt a C/S mode, that is, a client/server architecture. Take the Android platform-based client as an example, connect to the Internet (Internet) through 3G/4G or WiFi, and realize communication between Android clients through the server.

服务器可以按照如下方式添加终端设备的用户身份标识:The server can add the user identity of the terminal device as follows:

1、手机出厂时预装即时通讯客户端软件,该软件的入口在通话页面中,软件图标也可以出现在用户手机桌面上;1. The mobile phone is pre-installed with the instant messaging client software when the mobile phone is shipped. The entry of the software is in the call page, and the software icon can also appear on the user's mobile phone desktop;

2、手机设备提供商搭建的网络服务器,在服务器局域网中维护用户资料信息DB1,对通话双方提供单独会话通道DB2,且对用户聊天记录进行转发;2. The network server built by the mobile phone equipment provider maintains the user profile information DB1 in the server local area network, provides a separate session channel DB2 to both parties of the call, and forwards the user chat record;

3、在手机连接到Internet网络时,客户端软件检测该手机的IMSI和电话号码,将IMSI、电话号码和智能机的IP地址,以及客户端软件占用的TCP/UDP端口号生成一条用户身份识别信息,发送给服务器端。3. When the mobile phone is connected to the Internet network, the client software detects the IMSI and the phone number of the mobile phone, and generates a user identity by using the IMSI, the phone number, the IP address of the smart phone, and the TCP/UDP port number occupied by the client software. Information is sent to the server.

4、服务器接收到一条用户身份识别信息后,对这条信息与数据库(即上 文的数据存储区域)里的信息进行比对,如果数据库中没有该IMSI,就添加到数据库中,否则更新数据库中的IMSI对应的IP地址和TCP/UDP端口号。4. After the server receives a user identification information, the information and the database (ie, the upper The information in the data storage area of the text is compared. If the IMSI is not in the database, it is added to the database, otherwise the IP address and TCP/UDP port number corresponding to the IMSI in the database are updated.

如图5所示,本实施例中在通话的同时进行聊天的具体流程如下:As shown in FIG. 5, the specific process of performing chat at the same time as the call in this embodiment is as follows:

S201:用户拨打电话;S201: The user makes a call;

S202:把用户拨打的电话发送给服务器匹配;S202: Send the call made by the user to the server to match;

当用户在通话页面点击“向对方发送图片/视频/文字/文件”图标,就进入与对方网络聊天模式,此时终端设备上的客户端软件将携带有用户拨打的电话号码的连接请求发送给服务器。如果检测到当前处于无网络信号状态,客户端软件提示用户联网后再发送。When the user clicks the "send picture/video/text/file to the other party" icon on the call page, the user enters the network chat mode with the other party. At this time, the client software on the terminal device sends a connection request carrying the phone number dialed by the user to the connection request. server. If it detects that there is no network signal status, the client software prompts the user to send it after networking.

S203:服务器判断匹配是否成功,如果匹配不成功,则执行步骤S204;如果匹配成功,则执行步骤S205;S203: The server determines whether the matching is successful, if the matching is unsuccessful, step S204 is performed; if the matching is successful, step S205 is performed;

S204:服务器对用户发送的信息储存在DB2中,等对方联网后再发送,结束本次聊天;S204: The information sent by the server to the user is stored in the DB2, and then sent after the other party is connected to the network, and the chat is ended;

S205:服务器在通话双方之间建立会话通道;S205: The server establishes a session channel between the two parties of the call;

S206:用户在通话页面点击IM客户端,双方进入点对点聊天会话模式。S206: The user clicks on the IM client on the call page, and the two parties enter a peer-to-peer chat session mode.

手机进行电话通话时,客户端通过手机通讯录接口读取用户拨打的电话号码,并把该电话号码发送给服务器侧,IM服务器在数据库DB1中进行匹配成功后,通过通话双方的IP和端口号,创建单独的会话通道,通话一方将直接通过服务器端发送来的被呼叫方的IP地址、TCP端口号等信息,直接向被呼叫方发送信息。When the mobile phone makes a telephone call, the client reads the telephone number dialed by the user through the mobile phone address book interface, and sends the telephone number to the server side. After the IM server performs the matching in the database DB1, the IP and port numbers of the two parties through the call are successfully transmitted. A separate session channel is created, and the calling party directly sends information to the called party directly through the IP address and TCP port number of the called party sent by the server.

在手机没有联网时,从其它手机发送过来的图片信息就通过IM服务器中转,待该手机联网后,再由服务器转发给该手机。When the mobile phone is not connected to the network, the picture information sent from other mobile phones is transferred through the IM server, and after the mobile phone is connected to the network, the server forwards the mobile phone to the mobile phone.

本发明实施例把语音通话的便利性和网络通信的多样性结合起来,对于用户来说,只要确保自己的手机在联网状态下,就可以在通话过程中随时和对方分享信息,真正实现“闻其声如见其面”。实施例二The embodiment of the invention combines the convenience of voice call with the diversity of network communication. For the user, as long as the mobile phone is in the networked state, the user can share information with the other party at any time during the call, and truly realize the "smell". Its sound is as good as it can be." Embodiment 2

如图6所示,本实施例提供一种建立会话的装置,设置于服务器,所述装置包括: As shown in FIG. 6, the embodiment provides a device for establishing a session, which is disposed on a server, and the device includes:

查找模块11,设置为接收第一终端设备的连接请求,所述连接请求中携带第二终端设备的身份识别信息,查找是否存在所述身份识别信息;The locating module 11 is configured to receive a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists;

连接模块12,设置为根据查找到的所述身份识别信息,建立所述第一终端设备与所述第二终端设备之间的数据通道;The connection module 12 is configured to establish a data channel between the first terminal device and the second terminal device according to the found identity identification information;

其中,所述第二终端设备是所述第一终端设备发送连接请求时正在通话的终端设备。The second terminal device is a terminal device that is talking when the first terminal device sends a connection request.

其中,身份识别信息包含终端设备的IMSI、电话号码、IP地址以及端口号。The identification information includes an IMSI, a phone number, an IP address, and a port number of the terminal device.

其中,所述装置还包括:信息处理模块13,设置为在数据存储区域中查找所述身份识别信息中的IMSI;在所述数据存储区域中查找到所述IMSI时,则将所述IMSI对应的IP地址及端口号同步更新到所述数据存储区域;在所述数据存储区域中没有查找到所述IMSI时,将所述身份识别信息中的IMSI、IP地址及端口号添加到所述数据存储区域。其中,信息处理模块13查找时使用的身份识别信息可能是第一终端设备的身份识别信息,也可能是第二终端设备的身份识别信息。The device further includes: an information processing module 13 configured to search for an IMSI in the identity identification information in a data storage area; and when the IMSI is found in the data storage area, the IMSI is corresponding to The IP address and the port number are synchronously updated to the data storage area; when the IMSI is not found in the data storage area, the IMSI, the IP address, and the port number in the identification information are added to the data. Storage area. The identity identification information used by the information processing module 13 may be the identity identification information of the first terminal device or the identity identification information of the second terminal device.

其中,所述连接模块12是设置为:根据所述第一终端设备的IP地址及端口号和所述第二终端设备的IP地址及端口号建立数据通道;所述数据通道独立于所述第一终端设备与所述第二终端设备之间的通话通道。The connection module 12 is configured to: establish a data channel according to an IP address and a port number of the first terminal device, and an IP address and a port number of the second terminal device; the data channel is independent of the first a communication channel between a terminal device and the second terminal device.

其中,所述连接模块12还设置为:根据所述第二终端设备的身份识别信息,获取第二终端设备的IP地址以及端口号;根据所述连接请求,获取所述第一终端设备的IP地址以及端口号。The connection module 12 is further configured to: obtain an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device, and acquire an IP of the first terminal device according to the connection request Address and port number.

如图7所示,本实施例还提供一种会话的装置,设置于第一终端设备,所述装置包括:As shown in FIG. 7, the embodiment further provides a device for a session, which is disposed on a first terminal device, where the device includes:

通讯模块21,设置为与第二终端设备建立通话后发送连接请求给服务器,所述连接请求设置为请求建立与所述第二终端设备之间的数据通道;The communication module 21 is configured to send a connection request to the server after establishing a call with the second terminal device, where the connection request is set to request to establish a data channel with the second terminal device;

处理模块22,设置为在所述数据通道建立后,通过所述数据通道发送文件给所述第二终端设备,和/或通过所述数据通道接收来自所述第二终端设备的文件。 The processing module 22 is configured to, after the data channel is established, send a file to the second terminal device through the data channel, and/or receive a file from the second terminal device through the data channel.

其中,所述通讯模块21,还设置为将第一终端设备的身份识别信息发送给服务器;所述身份识别信息包含IMSI、电话号码、网络之间互连的协议IP地址以及端口号。The communication module 21 is further configured to send the identity identification information of the first terminal device to the server; the identity identification information includes an IMSI, a phone number, a protocol IP address interconnected between the networks, and a port number.

其中,所述处理模块22,是设置为:接收用户输入的发送文件请求,将相应文件通过所述数据通道发送给第二终端设备。其中,所述接收用户输入的发送文件请求具体是指:检测到用户点击所述第一终端设备通话界面中的表示发送文件的图标。The processing module 22 is configured to: receive a send file request input by the user, and send the corresponding file to the second terminal device by using the data channel. The receiving the file request input by the user specifically refers to: detecting that the user clicks on the icon indicating that the file is sent in the call interface of the first terminal device.

本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述建立会话的方法和/或会话的方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the method of establishing a session and/or a session.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现,相应地,上述实施例中的各模块/模块可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请不限制于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the steps described above can be accomplished by a program that instructs the associated hardware, such as a read-only memory, a magnetic or optical disk, and the like. Optionally, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits. Accordingly, each module/module in the foregoing embodiment may be implemented in the form of hardware, or may be implemented by using a software function module. Formal realization. This application is not limited to any specific combination of hardware and software.

工业实用性 Industrial applicability

本发明实施例提供的一种建立会话的方法及装置,还提供了相应的会话方法及装置,本发明实施例通过网络中的服务器在正在通话的第一终端设备与第二终端设备之间建立数据通道,使得终端设备在通话且处于联网状态下能够互相传递图片、文字、视频和文件等多媒体数据,操作简单,省时省力,提高了通讯效率,而且极大的提升了用户体验。 The method and device for establishing a session are provided by the embodiment of the present invention, and the corresponding session method and device are also provided. The embodiment of the present invention establishes between the first terminal device and the second terminal device that are talking by the server in the network. The data channel enables the terminal device to transmit multimedia data such as pictures, texts, videos and files to each other while in a call and in a networked state, which is simple in operation, saves time and labor, improves communication efficiency, and greatly improves the user experience.

Claims (18)

一种建立会话的方法,所述方法包括:A method of establishing a session, the method comprising: 服务器接收第一终端设备的连接请求,所述连接请求中携带第二终端设备的身份识别信息,查找是否存在所述身份识别信息;Receiving, by the server, a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists; 根据查找到的所述身份识别信息,建立所述第一终端设备与所述第二终端设备之间的数据通道;Establishing, according to the found identity information, a data channel between the first terminal device and the second terminal device; 其中,所述第二终端设备是所述第一终端设备发送连接请求时正在通话的终端设备。The second terminal device is a terminal device that is talking when the first terminal device sends a connection request. 如权利要求1所述的方法,其中,The method of claim 1 wherein 所述身份识别信息包含国际移动用户识别码IMSI、网络之间互连的协议IP地址以及端口号。The identification information includes an International Mobile Subscriber Identity (IMSI), a protocol IP address interconnected between the networks, and a port number. 如权利要求2所述的方法,所述方法还包括:The method of claim 2, the method further comprising: 服务器在本地的数据存储区域中查找是否存在所述身份识别信息中的IMSI;The server searches for a presence of the IMSI in the identification information in a local data storage area; 所述数据存储区域中存在所述IMSI时,则将所述身份识别信息对应的IP地址及端口号同步更新到数据存储区域;在所述数据存储区域中不存在所述IMSI时,将所述身份识别信息中的IMSI、IP地址及端口号添加到所述数据存储区域。When the IMSI exists in the data storage area, the IP address and the port number corresponding to the identity identification information are synchronously updated to the data storage area; when the IMSI is not present in the data storage area, the The IMSI, IP address, and port number in the identification information are added to the data storage area. 如权利要求3所述的方法,其中,The method of claim 3, wherein 所述建立所述第一终端设备与所述目标终端之间的数据通道包括:The establishing a data channel between the first terminal device and the target terminal includes: 根据所述第一终端设备的IP地址及端口号和所述第二终端设备的IP地址及端口号建立数据通道;Establishing a data channel according to the IP address and port number of the first terminal device and the IP address and port number of the second terminal device; 所述数据通道独立于所述第一终端设备与所述第二终端设备之间的通话通道。The data channel is independent of a call channel between the first terminal device and the second terminal device. 根据权利要求4所述的方法,其中,The method of claim 4, wherein 所述服务器根据所述第二终端设备的身份识别信息,获取第二终端设备的IP地址以及端口号;根据所述连接请求,获取所述第一终端设备的IP地 址以及端口号。The server acquires an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device, and acquires an IP address of the first terminal device according to the connection request. Address and port number. 一种会话的方法,所述方法包括:A method of conversation, the method comprising: 第一终端设备与第二终端设备建立通话后,发送连接请求给服务器,所述连接请求设置为请求建立与所述第二终端设备之间的数据通道;After the first terminal device establishes a call with the second terminal device, sending a connection request to the server, where the connection request is set to request to establish a data channel with the second terminal device; 所述数据通道建立后,所述第一终端设备通过所述数据通道发送文件到所述第二终端设备,和/或通过所述数据通道接收来自所述第二终端设备的文件。After the data channel is established, the first terminal device sends a file to the second terminal device through the data channel, and/or receives a file from the second terminal device through the data channel. 如权利要求6所述的方法,所述方法还包括:The method of claim 6 further comprising: 所述第一终端设备将身份识别信息发送给服务器;The first terminal device sends the identity identification information to the server; 所述身份识别信息携带有所述第一终端设备的国际移动用户识别码IMSI、电话号码、网络之间互连的协议IP地址以及端口号。The identity identification information carries an International Mobile Subscriber Identity (IMSI) of the first terminal device, a phone number, a protocol IP address interconnected between the networks, and a port number. 如权利要求6或7所述的方法,其中,所述第一终端设备通过所述数据通道发送文件到所述第二终端设备,包括:所述第一终端设备接收用户输入的发送文件请求,将相应文件通过所述数据通道发送给第二终端设备。The method of claim 6 or 7, wherein the transmitting, by the first terminal device, the file to the second terminal device by using the data channel comprises: receiving, by the first terminal device, a request for sending a file input by a user, Sending the corresponding file to the second terminal device through the data channel. 如权利要求8所述的方法,其中,所述第一终端设备接收用户输入的发送文件请求,检测到用户点击所述第一终端设备通话界面上表示发送文件的图标。The method of claim 8, wherein the first terminal device receives a send file request input by the user, detecting that the user clicks on the icon on the call interface of the first terminal device indicating that the file is sent. 一种建立会话的装置,设置于服务器,其特征在于,所述装置包括:An apparatus for establishing a session, configured on a server, wherein the apparatus includes: 查找模块,设置为接收第一终端设备的连接请求,所述连接请求中携带第二终端设备的身份识别信息,查找是否存在所述身份识别信息;a locating module, configured to receive a connection request of the first terminal device, where the connection request carries the identity identification information of the second terminal device, to find whether the identity identification information exists; 连接模块,设置为根据查找到的所述身份识别信息,建立所述第一终端设备与所述第二终端设备之间的数据通道;a connection module, configured to establish a data channel between the first terminal device and the second terminal device according to the found identity information; 其中,所述第二终端设备是所述第一终端设备发送连接请求时正在通话的终端设备。The second terminal device is a terminal device that is talking when the first terminal device sends a connection request. 如权利要求10所述的装置,其中,所述身份识别信息包含国际移动用户识别码IMSI、网络之间互连的协议IP地址及端口号。The apparatus of claim 10, wherein the identification information comprises an International Mobile Subscriber Identity (IMSI), a protocol IP address and a port number interconnected between the networks. 如权利要求11所述的装置,所述装置还包括信息处理模块: The apparatus of claim 11 further comprising an information processing module: 所述信息处理模块,设置为在数据存储区域中查找所述身份识别信息中的IMSI;在所述数据存储区域中查找到所述IMSI时,则将所述IMSI对应的IP地址及端口号同步更新到所述数据存储区域;在所述数据存储区域中没有查找到所述IMSI时,将所述身份识别信息中的IMSI、IP地址及端口号添加到所述数据存储区域。The information processing module is configured to search for an IMSI in the identification information in a data storage area; when the IMSI is found in the data storage area, synchronize an IP address and a port number corresponding to the IMSI Updating to the data storage area; when the IMSI is not found in the data storage area, adding an IMSI, an IP address, and a port number in the identification information to the data storage area. 如权利要求12所述的装置,其中,所述连接模块是设置为:The apparatus of claim 12 wherein said connection module is configured to: 根据所述第一终端设备的IP地址及端口号和所述第二终端设备的IP地址及端口号建立数据通道;Establishing a data channel according to the IP address and port number of the first terminal device and the IP address and port number of the second terminal device; 所述数据通道独立于所述第一终端设备与所述第二终端设备之间的通话通道。The data channel is independent of a call channel between the first terminal device and the second terminal device. 根据权利要求13所述的装置,其中,所述连接模块还设置为:The apparatus of claim 13, wherein the connection module is further configured to: 根据所述第二终端设备的身份识别信息,获取第二终端设备的IP地址以及端口号;根据所述连接请求,获取所述第一终端设备的IP地址以及端口号。Obtaining an IP address and a port number of the second terminal device according to the identity identification information of the second terminal device; and acquiring an IP address and a port number of the first terminal device according to the connection request. 一种会话的装置,设置于第一终端设备,其特征在于,所述装置包括:A device for a session, is provided in a first terminal device, wherein the device comprises: 通讯模块,设置为与第二终端设备建立通话后发送连接请求给服务器,所述连接请求设置为请求建立与所述第二终端设备之间的数据通道;a communication module, configured to send a connection request to the server after establishing a call with the second terminal device, where the connection request is set to request to establish a data channel with the second terminal device; 处理模块,设置为在所述数据通道建立后,通过所述数据通道发送文件给所述第二终端设备,和/或通过所述数据通道接收来自所述第二终端设备的文件。And a processing module, configured to send a file to the second terminal device through the data channel after the data channel is established, and/or receive a file from the second terminal device through the data channel. 如权利要求15所述的装置,其中,The device of claim 15 wherein 所述通讯模块,还设置为将身份识别信息发送给服务器;The communication module is further configured to send the identity identification information to the server; 所述身份识别信息包含所述第一终端设备的国际移动用户识别码IMSI、电话号码、网络之间互连的协议IP地址以及端口号。The identification information includes an International Mobile Subscriber Identity (IMSI) of the first terminal device, a telephone number, a protocol IP address interconnected between the networks, and a port number. 如权利要求15或16所述的装置,其中,所述处理模块,是设置为:接收用户输入的发送文件请求,将相应文件通过所述数据通道发送给第二终端设备。 The device according to claim 15 or 16, wherein the processing module is configured to: receive a send file request input by the user, and send the corresponding file to the second terminal device through the data channel. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求1至5任一项所述的方法和/或权利要求6至9任一项所述的方法。 A computer readable storage medium storing computer executable instructions for performing the method of any one of claims 1 to 5 and/or any one of claims 6 to 9 when executed by a processor Said method.
PCT/CN2016/080160 2015-08-27 2016-04-25 Conversation setup method and apparatus Ceased WO2016180220A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510537445.8 2015-08-27
CN201510537445.8A CN106487755A (en) 2015-08-27 2015-08-27 A kind of method and device setting up session

Publications (1)

Publication Number Publication Date
WO2016180220A1 true WO2016180220A1 (en) 2016-11-17

Family

ID=57247720

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/080160 Ceased WO2016180220A1 (en) 2015-08-27 2016-04-25 Conversation setup method and apparatus

Country Status (2)

Country Link
CN (1) CN106487755A (en)
WO (1) WO2016180220A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114765588A (en) * 2020-12-30 2022-07-19 深圳Tcl新技术有限公司 Test method, computer device, computer-readable storage medium
WO2023011056A1 (en) * 2021-07-31 2023-02-09 华为技术有限公司 Communication method and apparatus
CN116708532A (en) * 2023-08-03 2023-09-05 腾讯科技(深圳)有限公司 Local area network connection method, device, computer equipment and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696309A (en) * 2021-07-31 2023-02-03 华为技术有限公司 A communication method and device
CN113938850B (en) * 2021-10-19 2023-04-25 维沃移动通信有限公司 Data service implementation method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090022141A1 (en) * 2007-07-20 2009-01-22 At&T Intellectual Property, Inc. Systems, methods and computer products for placing telephone calls via internet protocol television call logs
US20100080361A1 (en) * 2008-09-29 2010-04-01 Conrad Edward Houghton Method for Sharing Audio-only content, Audio-Visual content, and Visual-only content between Subscribers on a Telephone call
CN102158816A (en) * 2010-12-10 2011-08-17 上海合合信息科技发展有限公司 Method for displaying set images on electronic equipment of opposite side during talking connection establishing
CN102263789A (en) * 2011-07-15 2011-11-30 同济大学 Graphical Assisted Conversation System
CN103052169A (en) * 2012-12-05 2013-04-17 北京百度网讯科技有限公司 System and method for mobile terminal conversation interaction and mobile terminal
CN104158985A (en) * 2014-07-21 2014-11-19 小米科技有限责任公司 Communication method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090022141A1 (en) * 2007-07-20 2009-01-22 At&T Intellectual Property, Inc. Systems, methods and computer products for placing telephone calls via internet protocol television call logs
US20100080361A1 (en) * 2008-09-29 2010-04-01 Conrad Edward Houghton Method for Sharing Audio-only content, Audio-Visual content, and Visual-only content between Subscribers on a Telephone call
CN102158816A (en) * 2010-12-10 2011-08-17 上海合合信息科技发展有限公司 Method for displaying set images on electronic equipment of opposite side during talking connection establishing
CN102263789A (en) * 2011-07-15 2011-11-30 同济大学 Graphical Assisted Conversation System
CN103052169A (en) * 2012-12-05 2013-04-17 北京百度网讯科技有限公司 System and method for mobile terminal conversation interaction and mobile terminal
CN104158985A (en) * 2014-07-21 2014-11-19 小米科技有限责任公司 Communication method, device and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114765588A (en) * 2020-12-30 2022-07-19 深圳Tcl新技术有限公司 Test method, computer device, computer-readable storage medium
WO2023011056A1 (en) * 2021-07-31 2023-02-09 华为技术有限公司 Communication method and apparatus
CN116708532A (en) * 2023-08-03 2023-09-05 腾讯科技(深圳)有限公司 Local area network connection method, device, computer equipment and readable storage medium
CN116708532B (en) * 2023-08-03 2023-10-20 腾讯科技(深圳)有限公司 Local area network connection method, device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN106487755A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
US11470023B2 (en) Session initiation method and device
EP2710776B1 (en) Anonymous signalling
US9167089B2 (en) Method and system for searching and processing contacts
US9686506B2 (en) Method, apparatus, system, and storage medium for video call and video call control
CN104363507B (en) A kind of video and audio recording and sharing method and system based on OTT set-top box
WO2016180220A1 (en) Conversation setup method and apparatus
CN111510476B (en) Communication method, communication device, computer equipment and computer readable storage medium
EP3552372B1 (en) Msrp/http file transfer
US20140032493A1 (en) Method, apparatus and system for synchronizing contact information
WO2016045214A1 (en) Decision method and device, terminal and computer storage medium
EP2974159B1 (en) Method, device and system for voice communication
US20180019958A1 (en) Rcs origination forking
CN105743766B (en) A kind of group communication method and device
US20130188559A1 (en) Method for Establishing a Communication Connection over the Internet Between Mobile Terminals, Computer Program, and Storage Medium
WO2017036235A1 (en) Information transmission method and device
CN106385516B (en) A kind of method, apparatus and terminal of the transfer of setting business
KR100990744B1 (en) Session establishment method using gateway server and phone identification
CN103618739B (en) Data processing method and device of reinforced S-CSCF server
US10237212B2 (en) RCS origination forking
WO2023213275A1 (en) Communication method and apparatus, terminal, network side device and medium
CN105827502A (en) Unified communication method and device
CN107852577A (en) A kind of supplementary service implementation method, terminal device and IMS service device
CN116074369A (en) Information transmission method and device and related equipment
CN114979043A (en) Rich media group chat service method, server and message-as-a-platform
US11075960B2 (en) User of identity services to auto-discover subscribers of social networking sites

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

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

Country of ref document: EP

Kind code of ref document: A1