CN112929371A - Session processing method, device, system, electronic equipment and medium - Google Patents

Session processing method, device, system, electronic equipment and medium Download PDF

Info

Publication number
CN112929371A
CN112929371A CN202110171866.9A CN202110171866A CN112929371A CN 112929371 A CN112929371 A CN 112929371A CN 202110171866 A CN202110171866 A CN 202110171866A CN 112929371 A CN112929371 A CN 112929371A
Authority
CN
China
Prior art keywords
session
terminal
target
mcu
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110171866.9A
Other languages
Chinese (zh)
Inventor
周万斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110171866.9A priority Critical patent/CN112929371A/en
Publication of CN112929371A publication Critical patent/CN112929371A/en
Pending 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/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]
    • 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
    • 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/403Arrangements for multi-party communication, e.g. for conferences

Abstract

The invention provides a session processing method, a device, a system, an electronic device and a medium, wherein the method comprises the following steps: when two terminals keep conversation in the MCU mode through the target application, the first terminal receives a conversation mode switching instruction and sends a conversation ending instruction carrying a target conversation ID for representing multi-party conversation to the MCU server so as to control the target application to exit the MCU mode; a first terminal sends a session request carrying a target session ID to an SIP server; the SIP server forwards the session request to the second terminal; and the second terminal receives the session request, sends a session ending instruction to the MCU server so as to control the target application to exit the MCU mode, and listens for the session request after sending the session ending instruction so as to establish P2P session connection with the first terminal. The invention can convert the MCU conversation mode into the P2P conversation mode when the multi-party conversation is converted into the two-party conversation, thereby saving resources and reducing the conversation cost.

Description

Session processing method, device, system, electronic equipment and medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a medium for session processing.
Background
In internet applications, scenes of audio and video calls among users are more and more common. In the traditional design, if only single chat between users is performed, a P2P (Peer to Peer) mode is generally selected, so that the service is simple to implement, the consumed resources are few, and the cost is low. When there is a Multi-user group chat, an MCU (Multi Control Unit) mode is generally used, and the server performs operations such as mixing and encoding, which consumes more server resources and is costly.
The P2P mode has the advantages of simple implementation and low cost, but has the disadvantage of being incapable of supporting more than three persons for audio and video calls. The MCU mode can support double-talk and multi-talk, but occupies more resources, i.e. compared to the P2P mode, the MCU mode is more costly when implementing double-talk.
In the prior art, for applications capable of supporting single chat and group chat, the MCU mode is adopted in both single chat and group chat, which causes problems of large occupied resources and high cost.
Disclosure of Invention
Embodiments of the present invention provide a session processing method, an apparatus, a system, an electronic device, and a medium, so as to solve the problems of a large number of occupied resources and a high cost in a chat mode capable of supporting single chat and group chat in the prior art.
In a first aspect of the embodiments of the present invention, a session processing method is provided, which is applied to a session processing system, where the session processing system includes at least three terminals, a session initiation protocol SIP server and a multipoint control unit MCU server, and the at least three terminals perform a multiparty session in an MCU mode through a target application, where the method includes:
under the condition that the two terminals keep a session state, the SIP server and/or the MCU server sends a session mode switching instruction;
when a first terminal of the two terminals receives the session mode switching instruction, the first terminal sends a session ending instruction to the MCU server according to the session mode switching instruction so as to control the target application to exit the MCU mode, wherein the session ending instruction is used for ending the sessions of the at least three terminals, and the session ending instruction carries target session identification numbers ID used for representing the sessions of the at least three terminals;
after the first terminal sends the session ending instruction, sending a first session request to the SIP server, where the first session request is used to indicate that a point-to-point P2P session connection is established with a second terminal of the two terminals, and the first session request carries the target session ID;
the SIP server forwards the received first session request to the second terminal;
the second terminal receives the first session request, sends the session ending instruction to the MCU server to control the target application to exit the MCU mode, and receives the first session request after sending the session ending instruction to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target applications of the first terminal and the second terminal are switched to a P2P mode.
In a second aspect of the embodiments of the present invention, a session processing method is provided, where the session processing method is applied to a first terminal, and the first terminal, a second terminal, and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, where the method includes:
under the condition that the first terminal and the second terminal keep a session state, the first terminal receives a session mode switching instruction, sends a session ending instruction for ending sessions of at least three terminals to an MCU server according to the session mode switching instruction so as to control the target application to exit an MCU mode, the session mode switching instruction is sent by a Session Initiation Protocol (SIP) server and/or the MCU server, and the session ending instruction carries a target session identification number (ID) for representing the at least three terminals to carry out sessions;
after the first terminal sends the session ending instruction, sending a first session request to the second terminal through the SIP server, wherein the first session request is used for indicating that point-to-point P2P session connection is established with the second terminal, and the first session request carries the target session ID;
in the event that the second terminal listens to the first session request, a P2P session connection is established with the second terminal, and after the P2P session connection is established, the target application switches to P2P mode.
In a third aspect of the embodiments of the present invention, a session processing method is provided, where the session processing method is applied to a second terminal, and the second terminal, a first terminal, and at least one third terminal perform a multi-party session in a multipoint control unit MCU mode through a target application, where the method includes:
under the conditions that the second terminal and the first terminal keep a session state and the first terminal receives a session mode switching instruction, receiving a first session request which is sent by the first terminal through a Session Initiation Protocol (SIP) server and used for indicating the establishment of point-to-point P2P session connection with the second terminal, wherein the first session request carries a target session identification number (ID) used for representing at least three terminals to carry out sessions;
and after receiving the first session request, the second terminal sends a session ending instruction to an MCU server to control the target application to exit an MCU mode, and after sending the session ending instruction, the second terminal receives the first session request to establish P2P session connection with the first terminal, and after establishing the P2P session connection, the target application is switched to a P2P mode.
In a fourth aspect of the embodiments of the present invention, there is provided a session processing method applied to a session processing system, where the session processing system includes a first terminal, a second terminal, a session initiation protocol SIP server and a multipoint control unit MCU server, and the first terminal and the second terminal perform a session between them in a peer-to-peer P2P mode through a target application, where the method includes:
in case at least one third terminal requests to join a session connection, the first terminal disconnects a P2P session connection with the second terminal;
the SIP server receives a call request which is sent by the first terminal and used for establishing multi-party session connection through the target application, and forwards the call request to at least two terminals, wherein the at least two terminals comprise at least one third terminal requesting to join session connection and the second terminal, and the call request carries a target session identity identification number ID for representing multi-party session;
the first terminal initiates a second session request carrying the target session ID to the MCU server so as to control the target application to be switched to an MCU mode;
the SIP server receives a call answering instruction which carries the target session ID and is fed back by the at least two terminals, and forwards the call answering instruction to the first terminal;
and under the condition that the at least two terminals initiate the second session request carrying the target session ID to the MCU server, at least three terminals establish multi-party session connection, and after the at least two terminals initiate the second session request to the MCU server, the controllable corresponding target application is switched to an MCU mode.
In a fifth aspect of the embodiments of the present invention, there is provided a session processing method, applied to a first terminal, where the first terminal and a second terminal perform a two-party session in a peer-to-peer P2P mode through a target application, the method including:
in case at least one third terminal requests to join a session connection, the first terminal disconnects a P2P session connection with the second terminal;
the first terminal sends a call request for establishing multi-party session connection through the target application to at least two terminals through a Session Initiation Protocol (SIP) server, wherein the at least two terminals comprise at least one third terminal for requesting to join the session connection and the second terminal, and the call request carries a target session identity identification number (ID) for representing multi-party session;
the first terminal initiates a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server so as to control the target application to be switched to an MCU mode;
the first terminal receives a call answering instruction carrying the target session ID fed back by the at least two terminals through the SIP server, and establishes multi-party session connection with the at least two terminals under the condition that the at least two terminals initiate a second session request carrying the target session ID to the MCU server.
In a sixth aspect of the embodiments of the present invention, there is provided a session processing method, applied to a second terminal, where the second terminal and a first terminal perform a two-party session in a peer-to-peer P2P mode through a target application, the method including:
in case at least one third terminal requests to join a session connection, the second terminal disconnects a P2P session connection with the first terminal;
the second terminal answers a call request which is sent by the first terminal through a Session Initiation Protocol (SIP) server and establishes multi-party session connection through the target application, wherein the call request carries a target session identity identification number (ID) for representing multi-party session;
the second terminal feeds back a call answering instruction carrying the target session ID to the first terminal through the SIP server;
and the second terminal initiates a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server to control the target application to be switched to an MCU mode, and under the condition that at least one third terminal and the first terminal initiate the second session request, the second terminal establishes multi-party session connection with the first terminal and at least one third terminal.
In a seventh aspect of the embodiments of the present invention, a session processing system is provided, where the session processing system includes at least three terminals, a session initiation protocol SIP server and a multipoint control unit MCU server, and the at least three terminals perform a multiparty session in an MCU mode through a target application;
the SIP server and/or the MCU server are/is used for sending a session mode switching instruction under the condition that the two terminals keep the session state;
when a first terminal of the two terminals receives the session mode switching instruction, the first terminal is configured to send a session ending instruction to the MCU server according to the session mode switching instruction to control the target application to exit the MCU mode, where the session ending instruction is used to end sessions of the at least three terminals, and the session ending instruction carries a target session identification number ID used to characterize the at least three terminals to perform sessions;
the first terminal is further configured to send a first session request to the SIP server after sending a session end instruction to the MCU server, where the first session request is used to instruct a second terminal of the two terminals to establish a peer-to-peer P2P session connection, and the first session request carries the target session ID;
the SIP server is used for forwarding the received first session request to the second terminal;
the second terminal is configured to receive the first session request, send the session termination instruction to the MCU server to control the target application to exit the MCU mode, and listen to the first session request after sending the session termination instruction to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target applications of the first terminal and the second terminal are switched to the P2P mode.
In an eighth aspect of the embodiments of the present invention, there is provided a session processing apparatus, configured to a first terminal, where the first terminal, a second terminal, and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, the apparatus including:
the first processing module is used for receiving a session mode switching instruction under the condition that the first terminal and the second terminal keep a session state, sending a session ending instruction for ending the sessions of at least three terminals to an MCU server according to the session mode switching instruction so as to control the target application to exit the MCU mode, wherein the session mode switching instruction is sent by a Session Initiation Protocol (SIP) server and/or the MCU server, and the session ending instruction carries a target session identification number (ID) for representing the sessions of the at least three terminals;
a first sending module, configured to send, after sending the session termination instruction, a first session request to the second terminal through the SIP server, where the first session request is used to indicate that a peer-to-peer P2P session connection is established with the second terminal, and the first session request carries the target session ID;
a first receiving establishing module, configured to establish a P2P session connection with the second terminal when the second terminal answers the first session request, and after the P2P session connection is established, the target application is switched to a P2P mode.
In a ninth aspect of the embodiments of the present invention, there is provided a session processing apparatus, disposed in a second terminal, where the second terminal, a first terminal, and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, the apparatus including:
a first receiving module, configured to receive, when the second terminal and the first terminal maintain a session state and the first terminal receives a session mode switching instruction, a first session request sent by the first terminal through a session initiation protocol SIP server and used to indicate that a peer-to-peer P2P session connection is established with the second terminal, where the first session request carries a target session identification number ID used to characterize at least three terminals to perform a session;
a second processing module, configured to send a session end instruction to an MCU server after receiving the first session request, to control the target application to exit the MCU mode, and listen to the first session request after sending the session end instruction, to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target application is switched to the P2P mode.
In a tenth aspect of the embodiments of the present invention, a session processing system is provided, where the session processing system includes a first terminal, a second terminal, a session initiation protocol SIP server, and a multipoint control unit MCU server, and the first terminal and the second terminal perform a session between them in a peer-to-peer P2P mode through a target application;
the first terminal is used for disconnecting the P2P session connection with the second terminal under the condition that at least one third terminal requests to join the session connection;
the SIP server is used for receiving a call request which is sent by the first terminal and used for establishing multi-party session connection through the target application, and forwarding the call request to at least two terminals, wherein the at least two terminals comprise at least one third terminal and a second terminal, the third terminal is used for requesting to join in session connection, and the call request carries a target session identity number ID for representing multi-party session;
the first terminal is used for initiating a second session request carrying the target session ID to the MCU server so as to control the target application to be switched to an MCU mode;
the SIP server is used for receiving a call answering instruction which carries the target session ID and is fed back by the at least two terminals, and forwarding the call answering instruction to the first terminal;
and under the condition that the at least two terminals initiate the second session request carrying the target session ID to the MCU server, at least three terminals establish multi-party session connection, and after the at least two terminals initiate the second session request to the MCU server, the controllable corresponding target application is switched to an MCU mode.
In an eleventh aspect of the embodiments of the present invention, there is provided a session processing apparatus, provided in a first terminal, for performing a session between the first terminal and a second terminal in a peer-to-peer P2P mode through a target application, the apparatus including:
a first disconnection module, configured to disconnect a P2P session connection with the second terminal in a case where at least one third terminal requests to join the session connection;
a second sending module, configured to send, to at least two terminals through a session initiation protocol SIP server, a call request for establishing a multi-party session connection through the target application, where the at least two terminals include at least one third terminal requesting to join the session connection and the second terminal, and the call request carries a target session identification number ID indicating that a multi-party session is to be performed;
the third processing module is used for initiating a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server so as to control the target application to be switched to an MCU mode;
and the second receiving and establishing module is used for receiving a call answering instruction which carries the target session ID and is fed back by the at least two terminals through the SIP server, and establishing multi-party session connection with the at least two terminals under the condition that the at least two terminals initiate the second session request carrying the target session ID to the MCU server.
In a twelfth aspect of the embodiments of the present invention, there is provided a session processing apparatus, provided in a second terminal, for performing a session between the second terminal and a first terminal in a peer-to-peer P2P mode through a target application, the apparatus including:
a second disconnection module, configured to disconnect a P2P session connection with the first terminal in a case where at least one third terminal requests to join the session connection;
a second receiving module, configured to answer a call request sent by the first terminal through a session initiation protocol SIP server and used for establishing a multi-party session connection through the target application, where the call request carries a target session identity ID for indicating that a multi-party session is to be performed;
a feedback module, configured to feed back, to the first terminal, a call answering instruction carrying the target session ID through the SIP server;
and the fourth processing module is used for initiating a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server so as to control the target application to be switched to an MCU mode, and establishing multi-party session connection with the first terminal and at least one third terminal under the condition that the second session request is initiated by the at least one third terminal and the first terminal.
In a thirteenth aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the session processing method according to any one of the first to sixth aspects when executing the program stored in the memory.
In a fourteenth aspect implemented by the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the session processing method of any one of the first to sixth aspects.
In a fifteenth aspect implemented by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the session handling method of any of the first to sixth aspects described above.
The embodiment of the invention at least comprises the following technical effects:
when at least three terminals end the multi-party session through the target application and only two terminals keep the session state, the first terminal sends a session ending instruction to the MCU server according to the session mode switching instruction to control the target application to exit the MCU mode, and sends a first session request for carrying out two-party session to the second terminal through the SIP server, and when the second terminal answers the first session request, the P2P session connection with the second terminal is established, and the target application can be switched to the P2P mode after the P2P session connection is formed, so that when the multi-party session is switched to the two-party session, the target application is switched to the P2P session mode from the MCU session mode, resources are saved, and the session cost is reduced.
Drawings
FIG. 1a shows a schematic diagram of an implementation corresponding to the prior art P2P model;
FIG. 1b is a diagram of an implementation architecture corresponding to the prior art MCU model;
FIG. 1c is a diagram showing an implementation architecture of the embodiment of the present invention in which the P2P mode corresponds to the MCU mode switching;
fig. 2 shows one of interaction flowcharts corresponding to a session processing method for switching the MCU mode to the P2P mode according to an embodiment of the present invention;
fig. 3 shows a second interaction flowchart corresponding to the session processing method for switching the MCU mode to the P2P mode according to the embodiment of the present invention;
fig. 4 shows a third interaction flowchart corresponding to the session processing method for switching the MCU mode to the P2P mode according to the embodiment of the present invention;
fig. 5 shows one of interaction flowcharts corresponding to the session processing method for switching the P2P mode to the MCU mode according to the embodiment of the present invention;
FIG. 6a is a diagram illustrating one embodiment of a target session ID synchronization application;
FIG. 6b is a second schematic diagram of a second embodiment of the present invention for applying and synchronizing target session IDs;
fig. 7 shows a second interaction flowchart corresponding to the session processing method for switching the P2P mode to the MCU mode according to the embodiment of the present invention;
fig. 8 shows a third interaction flowchart corresponding to the session processing method for switching the P2P mode to the MCU mode according to the embodiment of the present invention;
fig. 9 is a flowchart illustrating an implementation of the first terminal according to an embodiment of the present invention;
fig. 10 is a flowchart illustrating an implementation of the second terminal according to an embodiment of the present invention;
fig. 11 is a flowchart illustrating a third terminal according to an embodiment of the present invention;
fig. 12 is a second flowchart of a third terminal according to an embodiment of the present invention;
fig. 13 is a second flowchart of a first terminal according to an embodiment of the present invention;
fig. 14 shows a second flowchart of a second embodiment of the second terminal according to the embodiment of the present invention;
FIG. 15 is a schematic diagram of a session processing system according to an embodiment of the invention;
fig. 16 is a schematic diagram of a session processing apparatus applied to a first terminal according to an embodiment of the present invention;
fig. 17 is a schematic diagram of a session processing apparatus applied to a second terminal according to an embodiment of the present invention;
FIG. 18 is a second schematic diagram of a session processing system according to an embodiment of the invention;
fig. 19 is a second schematic diagram of a session processing apparatus applied to a first terminal according to an embodiment of the present invention;
fig. 20 is a second schematic diagram of a session processing apparatus applied to a second terminal according to an embodiment of the present invention;
fig. 21 is a block diagram of an electronic device provided in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention. The invention performs conversion of group chat (multiple sessions) and single chat (double session) based on the advantages of P2P and MCU modes, and saves cost while supporting double session and multi-person session.
First, briefly describing a conventional Session service, referring to fig. 1a and 1b, a P2P mode may be adopted in a single chat (two-person chat), the mode includes a service server and a Session Initiation Protocol (SIP) server, and an MCU mode may be adopted in a group chat (three-person or more), and an MCU server is added in the mode. The SIP server is responsible for sending a call instruction, the MCU server is responsible for audio and video coding and decoding, mixed flow, audio and video data transmission and the like, and the service server is responsible for user account management, session ID (Identity document) management and the like.
The P2P mode is simple, the calling initiator initiates a calling instruction to the calling receiver through the SIP server, and the calling receiver can establish P2P connection with the initiator after answering to transmit audio and video data. The SIP server is also needed to send a call instruction in the MCU mode, after the multiple parties of group chat answer, both the initiator and the receiver can establish long connection with the MCU server, and the MCU server is responsible for processing and transmitting audio and video data.
As shown in fig. 1c, in the embodiment of the present invention, a P2P mode is used in a single chat, and when a new member is added in the single chat, the single chat is automatically switched to an MCU mode to support group chat. And similarly, when a member quits and becomes a single chat in the MCU mode, the MCU mode is automatically switched to the P2P mode, so that double-person conversation and multi-person conversation are supported, and meanwhile, the cost is saved.
In the following, a session processing method provided by the embodiment of the present invention is described in detail, where the embodiment of the present invention provides a session processing method for switching from the MCU mode to the P2P mode, and a session processing method for switching from the P2P mode to the MCU mode.
The embodiment of the invention provides a session processing method, which is applied to a scene that an MCU mode is switched into a P2P mode. The session processing method is applied to a session processing system, the session processing system comprises at least three terminals, an SIP server and an MCU server, the at least three terminals carry out multi-party session in an MCU mode through target application, each terminal in the at least three terminals is provided with the target application, as shown in FIG. 2, under the condition that the two terminals keep session states, the method comprises the following steps:
step 201, the SIP server and/or the MCU server sends a session mode switching instruction.
Aiming at the scene that at least three terminals carry out multi-party conversation in the MCU mode through the target application, after at least one terminal exits the multi-party conversation, when the SIP server and/or the MCU server finds that only two terminals in the group chat keep the conversation state, the session mode switching instruction for switching the group chat (the multi-party conversation of at least three parties) to the single chat (the two-party conversation) can be sent. When the first terminal of the two terminals receives the session mode switching instruction, step 202 is executed.
Step 202, the first terminal sends a session ending instruction to the MCU server according to the session mode switching instruction to control the target application to exit the MCU mode, where the session ending instruction is used to end the sessions of the at least three terminals, and the session ending instruction carries a target session identification number ID used to characterize the at least three terminals to perform the sessions.
For the two terminals maintaining the session state, when the first terminal of the two terminals receives the session mode switching instruction, the subsequent operation may be triggered according to the session mode switching instruction. In the case that the SIP server and the MCU server send the session mode switching instruction, after the first terminal receives the first session mode switching instruction, the first terminal and the second terminal (the other terminal of the two terminals) may ignore the session mode switching instruction received subsequently.
After receiving the session mode switching instruction, the first terminal may first send a session end instruction carrying a target session ID representing that at least three terminals perform a session to the MCU server, quit the multiparty session, and disconnect the MCU server, so as to control the target application to quit the MCU mode. The first terminal executes step 203 after sending the session end instruction.
Step 203, the first terminal sends a first session request to the SIP server. The first session request is used for indicating that a point-to-point P2P session connection is established with a second terminal of the two terminals, and the first session request carries a target session ID.
After sending a session end instruction to control the installed target application to exit the MCU mode, the first terminal may send a first session request carrying a target session ID to the SIP server, where the first session request is used to instruct the first terminal to establish a P2P session connection with the second terminal, and by carrying the target session ID in the first session request, an ultimate recipient (second terminal) of the first session request may determine a sender of the first session request based on the target session ID. Since the first session request is used to indicate that a P2P session connection is established with the first terminal and the second terminal, the first session request may further carry an ID of the first terminal and an ID of the second terminal (since both the first terminal and the second terminal belong to members of a multi-party session, the first terminal may obtain the ID of the second terminal), and the SIP protocol supported by the SIP server corresponds to the initiator and the receiver, and the ID of the first terminal and the ID of the second terminal carried in the first session request may correspond to the initiator and the receiver of the SIP protocol.
Step 204, the SIP server forwards the received first session request to the second terminal.
After receiving the first session request sent by the first terminal, the SIP server is configured to instruct the first terminal to establish a P2P session connection with the second terminal, and the first session request carries an ID of the second terminal, so that the SIP server may forward the first session request to the second terminal.
And step 205, the second terminal receives the first session request and sends a session ending instruction to the MCU server.
For the second terminal, after receiving the first session request, the second terminal may first send a session end instruction to the MCU server, where the session end instruction also carries a target session ID, and quits the multi-party session by sending the session end instruction, so as to control the installed target application to quit the MCU mode.
Step 206, the second terminal listens to the first session request to establish a P2P session connection with the first terminal. After establishing the P2P session connection, the target applications of the first and second terminals switch to the P2P mode.
The second terminal can automatically answer the first session request after exiting the multi-party session, wherein the second terminal obtains the target session ID when the multi-party session is performed, and the first session request simultaneously carries the target session ID, which indicates that the second terminal and the initiator of the first session request both belong to members of the multi-party session, so the first session request carrying the target session ID can be automatically answered.
In case the second terminal listens automatically to the first session request, a P2P session connection may be established with the first terminal. The second terminal answers the first session request corresponding to two processes, wherein one process is to send a session answering instruction to the SIP server, the session answering instruction can carry the ID of the second terminal and the ID of the first terminal, and the SIP server forwards the session answering instruction to the first terminal; secondly, the second terminal initiates a request for establishing P2P connection to the first terminal based on the first session request, and after the first terminal answers the P2P connection request, the P2P connection between the first terminal and the second terminal can be established, so as to form a connection path between the first terminal and the second terminal. The two processes are not divided in sequence, and the SIP server can be ensured to acquire the conversation condition of the first terminal and the second terminal by sending the conversation answering instruction to the first terminal based on the SIP server.
Furthermore, the target session ID is carried in the interaction process of the first terminal and the second terminal, so that the group chat can be conveniently established based on the target session ID when other terminals are added subsequently.
In the above implementation process of the present invention, when at least three terminals end a multiparty session through a target application and only two terminals maintain a session state, a first terminal may send a session end instruction to an MCU server according to a received session mode switching instruction to control the target application to exit an MCU mode, and send a first session request for performing a bilateral session to a second terminal through an SIP server, and when the second terminal answers the first session request, a P2P session connection with the second terminal is established, and the target application may be switched to a P2P mode after forming a P2P session connection, so that when the multiparty session is converted to the bilateral session, the target application is converted from the MCU session mode to the P2P session mode to save resources and reduce session cost.
On the basis of the foregoing embodiment, the present invention further provides an optional embodiment, where in the current optional embodiment, the sending, by the SIP server and/or the MCU server, the session mode switching instruction includes:
the SIP server and the MCU server receive a session ending instruction which is sent by at least one third terminal and exits the multi-party session, the SIP server and/or the MCU server monitor the number of terminals maintaining the session state according to the session ending instruction, and when only two terminals maintain the session state, a session mode switching instruction is sent; the session ending instruction carries a target session ID.
Aiming at the scene that at least three terminals carry out multi-party conversation in the MCU mode through the target application, when at least one terminal exits the multi-party conversation, at least one terminal exiting the multi-party conversation can send a conversation ending instruction exiting the multi-party conversation to the SIP server and the MCU server, wherein the conversation ending instruction can carry a target conversation ID. After the SIP server and the MCU server receive a session ending instruction sent by at least one third terminal, at least one of the SIP server and the MCU server can monitor the number of terminals currently keeping the session state according to the session ending instruction, and when only two terminals currently keep the session state, at least one of the SIP server and the MCU server can send a session mode switching instruction to ensure that the target application can exit the MCU mode. Of course, if at least three terminals still maintain the session state currently, the multi-party session scene in the current MCU mode continues to be maintained.
In the implementation process of the invention, after the SIP server and the MCU server determine that at least one terminal exits the multi-party session, at least one of the SIP server and the MCU server can monitor the number of the terminals currently maintaining the session, and when the number of the terminals is determined to be only two, a session mode switching instruction for switching the group chat to the single chat is sent, so that the target application exits the MCU mode under the condition of double-party session, resources are saved, and the session cost is reduced.
On the basis of the foregoing embodiment, the present invention further provides an optional embodiment, in the current optional embodiment, the session processing system further includes a service server, the at least three terminals include a target terminal for initiating the multi-party session, and before the at least three terminals establish the multi-party session, the method further includes:
the target terminal sends a request for distributing a target session ID to a service server;
the target terminal receives a target session ID fed back by the service server;
the target terminal is any one of the first terminal, the second terminal or at least three terminals different from the first terminal and the second terminal.
For a scenario in which at least three terminals establish a multi-party session, a multi-party session initiator exists in the at least three terminals, that is, the at least three terminals include a target terminal for initiating the multi-party session, and the target terminal may be a first terminal, a second terminal, or a third terminal different from the first terminal and the second terminal. For the target terminal, before initiating the multi-party session, a request for allocating a target session ID may be sent to the service server, where the target session ID is an identifier of the multi-party session initiated by the target terminal, and after sending the request to the service server, a target session ID fed back by the service server for the request may be received.
After the target terminal acquires the target session ID fed back by the service server, the target terminal synchronizes the target session ID to at least two terminals through the SIP server when the multiparty session is established by at least three terminals.
After the target terminal receives the target session ID, when initiating the multi-party session to establish the session of at least three terminals, the target session ID may be synchronized with at least two terminals, and when synchronizing the target session ID, the target session ID may be sent to the SIP server, and the SIP server sends the target session ID to at least two terminals, where the target session ID is a group chat identifier, for example, a room number corresponding to a group chat, and a corresponding group chat room may be entered according to the room number to establish the group chat.
In the above implementation process of the present invention, the target terminal first requests the service server for a target session ID for group chat, and after receiving the target session ID, when initiating the multi-party session, the target session ID is sent to at least two terminals, so that the terminals participating in the multi-party session can establish the group chat according to the target session ID for group chat.
The above is a session processing method applied to a session processing system in an embodiment of the present invention, when at least three terminals end a multi-party session through a target application and only two terminals maintain session states, a first terminal may send a session end instruction to an MCU server according to a received session mode switching instruction to control the target application to exit an MCU mode, and send a first session request for performing a two-party session to a second terminal through an SIP server, and in a case that the second terminal answers the first session request, a P2P session connection between the first terminal and the second terminal is established, and after a P2P session connection is formed, the target application may be switched to a P2P mode, so that when the multi-party session is switched to the two-party session, the target application is switched from the MCU mode session to the P2P session mode, so as to save resources and reduce session cost.
An embodiment of the present invention further provides a session processing method, which is applied to a first terminal, where the first terminal, a second terminal, and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, as shown in fig. 3, where the first terminal and the second terminal maintain a session state, the method includes:
step 301, the first terminal receives a session mode switching instruction. Wherein, the conversation mode switching instruction is sent by a conversation initial protocol SIP server and/or an MCU server.
In a multi-party session scene, the first terminal, the second terminal and at least one third terminal carry out session in an MCU mode through the target application, and the SIP server and/or the MCU server can send a session mode switching instruction for switching group chat to single chat under the condition that the at least one third terminal exits the multi-party session and only the first terminal and the second terminal keep the session. After receiving the session mode switching instruction, the first terminal performs step 302 according to the session mode switching instruction.
Step 302, the first terminal sends a session ending instruction to the MCU server, where the session ending instruction is used to end the session of at least three terminals, and the session ending instruction carries a target session identification number ID used to characterize the at least three terminals to perform the session, and the session ending instruction is sent to control the target application of the first terminal to exit the MCU mode.
The first terminal may send a session ending instruction to the MCU server after receiving the session mode switching instruction, where the session ending instruction carries a target session ID for characterizing that at least three terminals perform a session, and may exit the multiparty session after sending the session ending instruction to the MCU server. After the first terminal sends the session ending instruction, the control target application can exit the MCU mode. And after the first terminal sends the session ending instruction, executing the next step.
Step 303, the first terminal sends a first session request to the second terminal through the SIP server, where the first session request is used to indicate that a peer-to-peer P2P session connection is established with the second terminal, and the first session request carries a target session ID.
After the control target application exits the MCU mode, the first terminal may send a first session request carrying a target session ID to the SIP server, where the first session request is used to instruct the first terminal to establish a P2P session connection with the second terminal, and the first session request may carry the ID of the first terminal and the ID of the second terminal. The SIP server may forward the first session request to the second terminal after receiving the first session request sent by the first terminal.
Step 304, in case that the second terminal answers the first session request, the first terminal establishes a P2P session connection with the second terminal, wherein after establishing the P2P session connection, the target application is switched to the P2P mode.
After receiving the first session request, the second terminal firstly sends a session ending instruction to the MCU server to quit the multi-party session, so that the control target application quits the MCU mode. After exiting the multi-party session, the first session request may be automatically answered to establish a P2P session connection between the first terminal and the second terminal, and after establishing the P2P session connection, the target applications of both the first terminal and the second terminal switch to the P2P mode.
The above is a specific implementation process of the embodiment of the present invention applied to a group chat to a single chat of a first terminal, when a session of at least three terminals is changed into a session maintained by only two terminals, the first terminal exits a multiparty session according to a session mode switching instruction, and sends a first session request for performing a bilateral session to a second terminal through an SIP server, and establishes a P2P session connection with the second terminal when the second terminal answers the first session request, so that when the multiparty session is changed into the bilateral session, a target application is converted from an MCU session mode into a P2P session mode, which saves resources and reduces session cost.
The embodiment of the present invention further provides a session processing method, which is applied to a second terminal, where the second terminal, a first terminal and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, as shown in fig. 4, where the second terminal and the first terminal maintain a session state and the first terminal receives a session mode switching instruction, the method includes:
step 401, receiving a first session request sent by a first terminal through a session initiation protocol SIP server, where the first session request carries a target session identification number ID for characterizing that at least three terminals perform a session, and is used to indicate to establish a peer-to-peer P2P session connection with a second terminal.
In a multi-party session scenario, a first terminal, a second terminal and at least one third terminal perform a session in an MCU mode through a target application, and the second terminal may receive a first session request sent by the first terminal through an SIP server under the condition that the at least one third terminal exits the multi-party session, only the first terminal and the second terminal maintain the session, and the first terminal receives a session mode switching instruction, where the first session request is used to indicate the first terminal and the second terminal to establish a P2P session connection, and the first session request carries a target session ID used to characterize at least three terminals performing a session.
Since the first session request is used to indicate that a P2P session connection is established with the first terminal and the second terminal, the first session request may also carry an ID of the first terminal and an ID of the second terminal, and after receiving the first session request sent by the first terminal, the SIP server may send the first session request to the second terminal. After receiving the first session request, the second terminal performs step 402.
And step 402, the second terminal sends a session ending instruction to the MCU server.
After receiving the first session request, the second terminal firstly sends a session ending instruction to the MCU server, wherein the session ending instruction also carries a target session ID so as to quit the multi-party session and realize that the target application is controlled to quit the MCU mode.
Step 403, the second terminal listens to the first session request to establish a P2P session connection with the first terminal.
After exiting the multi-party session, the second terminal may automatically listen to the first session request. In case the second terminal listens automatically to the first session request, a P2P session connection may be established with the first terminal. And after establishing the P2P session connection, the target applications of the first terminal and the second terminal are both switched to the P2P mode.
In the above specific implementation process of the embodiment of the present invention, when the session of at least three terminals is changed to only two terminals to maintain the session, the second terminal receives the first session request, which is sent by the first terminal through the SIP server, for performing the two-party session, and then sends the session end instruction to the MCU server to exit the multi-party session, and in the case of automatically receiving the first session request, the P2P session connection with the first terminal is established, so that the target application is switched to the P2P mode, and when the multi-party session is changed to the two-party session, the target application is switched from the MCU session mode to the P2P session mode, which saves resources and reduces session cost.
In the above, the process of the session processing method for switching from the MCU mode to the P2P mode in the embodiment of the present invention is described below, where the session processing method for switching from the P2P mode to the MCU mode in the embodiment of the present invention is described below.
An embodiment of the present invention provides a session processing method, which is applied to a session processing system, where the session processing system includes a first terminal, a second terminal, a session initiation protocol SIP server and a multipoint control unit MCU server, and the first terminal and the second terminal perform a two-party session in a point-to-point P2P mode through a target application, as shown in fig. 5, where at least one third terminal requests to join a session connection, the method includes:
step 501, the first terminal disconnects the P2P session with the second terminal.
For a scenario that two terminals perform a two-party session in a P2P mode through a target application, in a case where at least one third terminal requests to join a session connection (e.g., the first terminal invites at least one third terminal to join a session with the second terminal after receiving a session request of the at least one third terminal), the first terminal disconnects the P2P session connection with the second terminal, and after the first terminal disconnects the P2P connection with the second terminal, a call request for establishing a multi-party session connection through the target application may be sent to the SIP server, and the call request may carry an ID of the first terminal, an ID of the second terminal, and an ID of the at least one third terminal requesting to join the session.
Step 502, the SIP server receives a call request sent by the first terminal, where the call request is a request for establishing a multi-party session connection through a target application, and the call request carries a target session identification number ID for characterizing a multi-party session.
Step 503, the SIP server forwards the call request to the second terminal and at least one third terminal. I.e. the SIP server forwards the call request to at least two terminals, including at least one third terminal requesting to join the session connection, and the second terminal.
After receiving a call request sent by a first terminal and establishing a multi-party session connection through a target application, an SIP server may split the call request into a call request 1 corresponding to the second terminal and at least one call request 2 corresponding to at least one third terminal according to an ID of the second terminal and an ID of at least one third terminal requesting to join a session, where the call request 1 carries an initiator ID (ID of the first terminal) and a receiver ID (ID of the second terminal), and the call request 2 carries the initiator ID (ID of the first terminal) and the receiver ID (ID of the third terminal). The SIP server then forwards the call request 1 to the corresponding second terminal and forwards the call request 2 to the corresponding third terminal.
It should be noted that the SIP protocol supported by the SIP server corresponds to the initiator and the receiver, the ID of the first terminal in the call request corresponds to the initiator, and the ID of the second terminal or the ID of the third terminal in the call request corresponds to the receiver.
The call request also carries a target session ID representing the multiparty session, and a group chat identifier can be sent to the second terminal and the at least one third terminal by carrying the target session ID, wherein the group chat identifier can be a room number of the group chat, so that the group chat session with the second terminal and the at least one third terminal can be established.
Step 504, the first terminal initiates a second session request to the MCU server, where the second session request carries a target session ID to control the target application of the first terminal to switch to the MCU mode.
The first terminal may also initiate a second session request to the MCU server, where the second session request carries a target session ID, and a group chat identifier, such as a group chat room number, may be determined by the target session ID, and the second session request may be understood as a session request for entering a group chat. And after the first terminal initiates a second session request to the MCU server, when response information fed back by the MCU server is received, the control target application is switched to the MCU mode. And when response information fed back by the MCU server is received, determining that connection with the MCU server is established, so that the target application can be switched to an MCU mode. In this embodiment, after each default terminal initiates the second session request to the MCU server, the MCU server feeds back response information, and no discussion is made about the situation where the MCU server feeds back rejection information.
And 505, the SIP server receives a call answering instruction fed back by the second terminal and the at least one third terminal, and forwards the call answering instruction to the first terminal, wherein the call answering instruction carries the target session ID.
For the second terminal, after receiving a call request (call request 1) sent by the SIP server, the second terminal may automatically answer the call request and send a call answering instruction carrying a target session ID to the SIP server, where the call answering instruction further includes an ID of the second terminal and an ID of a first terminal of a receiving party of the call answering instruction. The second terminal acquires the target session ID sent by the first terminal in advance, and the call request carries the target session ID, which indicates that the initiator of the call request has session association with the second terminal, so that the call request carrying the target session ID can be automatically answered.
For each of the at least one third terminal, after receiving a call request (call request 2) sent by the SIP server, the SIP server may answer the call request (can answer according to an input of a user) and send a call answering instruction carrying a target session ID to the SIP server, where the call answering instruction further includes an ID of the current third terminal and an ID of a receiver (first terminal) of the call answering instruction.
For the SIP server, the call answering instruction fed back by the second terminal and the at least one third terminal may be received, and the call answering instruction is sent to the first terminal according to the ID of the receiving party in the call answering instruction.
Step 506, the second terminal and the at least one third terminal initiate a second session request to the MCU server. After at least two terminals initiate a second session request to the MCU server, the controllable corresponding target application is switched to the MCU mode, and the second session request carries a target session ID.
Step 507, at least three terminals establish a multi-party session connection.
For the second terminal and the at least one third terminal, after a call answering instruction is fed back to the first terminal through the SIP server, a second session request carrying a target session ID may be initiated to the MCU server, where the second session request is a session request for entering a group chat, and since the second session request carries the target session ID (which is equivalent to a room number of the group chat), a corresponding group chat may be found, and since the first terminal has entered the group chat, a multi-party session connection of the first terminal, the second terminal, and the at least one third terminal may be formed. For at least two terminals, after a second session request is initiated to the MCU server, the controllable corresponding target application is switched to the MCU mode so as to form multi-party session connection in the MCU mode.
In the above implementation process of the present invention, for a scenario that a first terminal and a second terminal perform a session in a P2P mode, when at least one third terminal requests to join the session, the first terminal disconnects from the second terminal, sends a call request for establishing a multi-party session connection to the second terminal and the at least one third terminal through an SIP server, and initiates a request for entering a group chat to an MCU server, so as to control a target application to switch to an MCU mode, after the second terminal and the at least one third terminal feed back a call answering instruction and initiate a request for entering the group chat to the MCU server, the MCU server establishes a connection with the second terminal and the at least one third terminal, so as to form a multi-party session with the second terminal and the at least one third terminal, and further, the target application can be controlled to perform a corresponding session mode switch according to the number of terminals participating in the session, under the condition of ensuring a normal session, resource waste is avoided.
On the basis of the foregoing embodiment, the present invention further provides an optional embodiment, in the current optional embodiment, the session processing system further includes a service server, and before the first terminal and the second terminal perform a two-party session, the method further includes:
the first terminal sends a request for distributing the target session ID to the service server, and receives the target session ID fed back by the service server.
The first terminal may send a request for allocating a target session ID to the service server before performing a two-party session with the second terminal, where the target session ID is an identifier of a multiparty session initiated by the first terminal, and may receive a target session ID fed back by the service server for the request after sending the request to the service server.
Wherein, in case the first terminal maintains a session with the second terminal, the target session ID is synchronized to the second terminal through the P2P session connection, or the target session ID is synchronized to the second terminal through the SIP server; in case that the first terminal does not establish the P2P session connection or disconnect the P2P session connection with the second terminal, the target session ID is synchronized to the second terminal through the SIP server.
The target session ID may be sent to the second terminal after the first terminal acquires the target session ID, may be synchronized to the second terminal through a P2P session connection in the case where the first terminal maintains a session with the second terminal, or may be synchronized to the second terminal through a SIP server. Synchronizing, by the SIP server, the target session ID to the second terminal for a case where the first terminal does not establish the P2P session connection or disconnects the P2P session connection with the second terminal.
In the following, a process of synchronizing a target session ID is described by using a specific example, where a first terminal corresponds to a user a, and a second terminal corresponds to a user B, as shown in fig. 6a, the user a applies for the target session ID from a service server, and after obtaining the target session ID fed back by the service server, synchronizes the target session ID to the user B through a point-to-point connection with the user B. I.e. the synchronization of the target session ID between user a and user B can now be achieved through the P2P connection.
As shown in fig. 6B, the user a applies for the target session ID from the service server, obtains the target session ID fed back by the service server, and can implement synchronization between the user a and the user B through the SIP server when the first terminal and the second terminal are not connected, the first terminal and the second terminal maintain a session, or the first terminal and the second terminal end a session. That is, when the P2P call is not established or the P2P call is ended, the destination session ID can be synchronized by the SIP server, and when the P2P connection is established, the destination session ID can be synchronized by the P2P connection or the SIP server.
In the implementation process, the identifier corresponding to the multi-party session can be acquired by applying the target session ID in advance to ensure the establishment of the multi-party session, and both parties of the established session can acquire the target session ID by synchronizing the target session ID to the second terminal.
An embodiment of the present invention further provides a session processing method, which is applied to a first terminal, where the first terminal and a second terminal perform a session between the two terminals in a peer-to-peer P2P mode through a target application, as shown in fig. 7, where at least one third terminal requests to join a session connection, the method includes:
step 701, the first terminal disconnects the P2P session with the second terminal.
In a scenario where two terminals are engaged in a double-talk session in the P2P mode through a target application, the first terminal disconnects the P2P session with the second terminal when at least one third terminal requests to join the session connection.
Step 702, the first terminal sends a call request to the second terminal and at least one third terminal through the SIP server.
Namely, a first terminal sends a call request for establishing a multi-party session connection through a target application to at least two terminals through an SIP server, the at least two terminals comprise at least one third terminal for requesting to join the session connection and a second terminal, and the call request carries a target session identification number ID for representing the multi-party session.
After the first terminal disconnects the P2P connection with the second terminal, a call request for establishing a multi-party session connection through the target application may be sent to the SIP server, and the ID of the first terminal, the ID of the second terminal, and the ID of at least one third terminal requesting to join the session may be carried in the call request. After receiving a call request sent by a first terminal and used for establishing multi-party session connection through a target application, an SIP server may split the call request according to an ID of a second terminal and an ID of at least one third terminal requesting to join in a session, which are carried in the call request, and then forward the split call request to the second terminal and the at least one third terminal requesting to join in the session connection, respectively.
The call request also carries a target session ID for characterizing the multiparty session (each call request obtained after splitting carries a target session ID), and by carrying the target session ID, the group chat session with the second terminal and at least one third terminal can be conveniently established.
And 703, the first terminal initiates a second session request to the MCU server, wherein the second session request carries a target session ID, and the target application of the first terminal can be controlled to switch to the MCU mode by sending the second session request.
The first terminal can also initiate a second session request to the MCU server, where the second session request carries a target session ID, and the group chat identifier can be determined by the target session ID. After the first terminal initiates the second session request to the MCU server, the control target application can be switched to the MCU mode.
Step 704, the first terminal receives a call answering instruction fed back by the second terminal and the at least one third terminal through the SIP server, wherein the call answering instruction carries a target session ID.
Step 705, the second terminal and the at least one third terminal initiate a second session request to the MCU server.
The second session request carries the target session ID, that is, the at least two terminals initiate the second session request carrying the target session ID to the MCU server. After the second terminal and the at least one third terminal initiate a second session request to the MCU server, the corresponding target application can be controlled to switch to the MCU mode.
Step 706, the first terminal, the second terminal and the at least one third terminal establish a multi-party session connection.
For the second terminal and the at least one third terminal, after the corresponding call request (the split call request) is answered, a call answering instruction carrying the target session ID is sent to the first terminal through the SIP server, and then a second session request carrying the target session ID can be initiated to the MCU server. The first terminal can establish a multi-party session connection with at least two terminals when receiving the call answering instruction and the at least two terminals initiate a second session request to the MCU server.
An embodiment of the present invention further provides a session processing method, which is applied to a second terminal, where the second terminal and a first terminal perform a session between the two parties in a peer-to-peer P2P mode through a target application, as shown in fig. 8, where at least one third terminal requests to join a session connection, the method includes:
step 801, the second terminal disconnects the P2P session with the first terminal.
In a scenario where two terminals are engaged in a double-talk session in the P2P mode through the target application, the second terminal disconnects the P2P session with the first terminal when at least one third terminal requests to join the session connection.
Step 802, a second terminal answers a call request sent by a first terminal through a Session Initiation Protocol (SIP) server, wherein the call request is a request for establishing a multi-party session connection through a target application, and the call request carries a target session identity number (ID) for representing the multi-party session.
After the second terminal disconnects the P2P connection with the first terminal, a call request sent by the first terminal through the SIP server to establish a multi-party session connection through a target application may be received, where the call request carries a target session ID indicating that a multi-party session is to be performed, and the second terminal may automatically answer the call request carrying the target session ID.
The first terminal also sends a call request to at least one third terminal, wherein the call request sent by the first terminal is split after reaching the SIP server, and is split into a corresponding call request of the second terminal and at least one call request corresponding to each third terminal, and the split call request may also carry a corresponding terminal ID. And then the SIP server sends the split call request to a corresponding terminal.
And step 803, the second terminal feeds back a call answering instruction to the first terminal through the SIP server.
For the second terminal, after receiving the received call request carrying the target session ID, the SIP server feeds back a call receiving instruction carrying the target session ID to the first terminal, and correspondingly, the third terminal may also feed back a call receiving instruction to the first terminal (not shown in the figure). The first terminal can receive a call answering instruction after initiating a second session request carrying a target session ID to the MCU server to control the target application to switch to the MCU mode.
And step 804, the second terminal initiates a second session request to the MCU server.
Step 805, when the first terminal and the at least one third terminal initiate the second session request, the multi-party session connection of the at least three terminals is established.
After feeding back the call answering instruction, the second terminal may initiate a second session request carrying the target session ID to the MCU server, that is, initiate a request to enter group chat to the MCU server, and establish a multi-party session connection between the second terminal and the first terminal, or between the second terminal and the at least one third terminal, under the condition that the at least one third terminal and the first terminal both initiate the second session request. And the third terminal initiates a second session request after feeding back the call answering instruction.
In the above-described specific implementation process of the session processing method for converting the P2P mode into the MCU mode according to the embodiment of the present invention, when two terminals maintain a session, if a request for joining a session sent by at least one third terminal is received, a session between two terminals is terminated, a call request for establishing a multi-party session connection is sent to at least two terminals by a first terminal, a request for entering a group chat is sent to an MCU server to control a target application to perform mode switching, and after the at least two terminals answer the call request and request for entering the group chat, a multi-party session between at least three terminals is established.
The session processing method of the present invention is described below with a specific example, in which a first terminal corresponds to a user a, a second terminal corresponds to a user B, and a third terminal corresponds to a user C. For a scenario of switching from a target application based session between the user a and the user B to a target application based session between the user a, the user B, and the user C, a corresponding implementation process of the first terminal may be as shown in fig. 9.
Step 901, user a ends the individual session with user B.
Step 902, the user a sends a call request of the multi-party session to the SIP server through the first terminal, and calls the user B and the user C, where the call request carries the target session ID.
Step 903, the user a initiates a group chat request carrying a target session ID to the MCU server through the first terminal, and establishes a connection between the first terminal and the MCU server. At this time, the target application of the first terminal is switched to the MCU mode.
The implementation process corresponding to the second terminal can be seen in fig. 10.
Step 1001, user B ends the individual session with user a.
Step 1002, the user B receives a call request of the multiparty session sent by the SIP server through the second terminal, where the call request carries a target session ID.
Step 1003, the user B automatically answers the call request through the second terminal, and sends a call answering instruction carrying the target session ID to the SIP server.
Step 1004, the user B initiates a group chat request carrying the target session ID to the MCU server through the second terminal, and establishes a connection between the second terminal and the MCU server. At this time, the target application of the second terminal is switched to the MCU mode.
The call request needs to be sent to a user B and a user C, after the user B and the user C answer the call request, a call answering instruction is fed back to a user A through an SIP server, and the user A determines that both the user B and the user C answer the call request according to the call answering instruction.
The implementation process corresponding to the third terminal can be seen in fig. 11.
Step 1101, the user C receives a call request of the multiparty session sent by the SIP server through the third terminal, where the call request carries a target session ID.
Step 1102, the user C determines whether to answer the call request, if yes, step 1103 is executed, otherwise step 1105 is executed.
Step 1103, sending a call answering instruction carrying the target session ID to the SIP server. Step 1104 is then performed.
And 1104, the user C initiates a group chat request carrying a target session ID to the MCU server through the third terminal, establishes a connection between the third terminal and the MCU server, and at this time, the target application of the third terminal is switched to an MCU mode.
Step 1105, user C ends the session.
Wherein, for the case that the user C does not answer the call request, the target applications of the first terminal and the second terminal may switch back to the P2P mode or remain in the MCU mode.
For a scenario of switching from a target application based session between the user a, the user B, and the user C to a target application based session between the user a and the user B, a corresponding implementation process of the third terminal may be as shown in fig. 12.
Step 1201, the user C sends a session ending instruction carrying the target session ID to the SIP server through the third terminal.
Step 1202, the user C sends a session ending instruction carrying the target session ID to the MCU server through the third terminal.
And after the SIP server and/or the MCU server finds that only two users, namely the user A and the user B, remain in the session, one of the two users is selected to send a session mode switching instruction. Assuming that the user a is selected, the corresponding implementation process of the first terminal can be seen in fig. 13.
Step 1301, the user a receives a session mode switching instruction through the first terminal.
Step 1302, the user a sends a session ending instruction carrying the target session ID to the MCU server through the first terminal, so as to control the target application to exit the MCU mode.
And step 1303, the user a sends a single chat request for conversation with the user B to the SIP server through the first terminal, and the SIP server forwards the single chat request to the second terminal corresponding to the user B.
The implementation process corresponding to the second terminal can be seen in fig. 14.
Step 1401, the user B receives a single chat request carrying a target session ID through the second terminal.
Step 1402, the user B sends a session end instruction carrying the target session ID to the MCU server through the second terminal to control the target application to exit the MCU mode.
And step 1403, the user B automatically answers the single chat request through the second terminal to establish a session with the user A.
The above is a specific example of the embodiment of the present invention, where a two-party session is converted into a multiple-party session, and a multiple-party session is converted into a two-party session, so that a switching between a multiple-party session and a two-party session can be realized, respective advantages based on a P2P mode and an MCU mode are ensured, a single chat mode and a group chat mode are supported, a switching between a single chat and a group chat is realized, and meanwhile, cost is saved.
An embodiment of the present invention provides a session processing system, as shown in fig. 15, including at least three terminals, a session initiation protocol SIP server 1501 and a multipoint control unit MCU server 1502, where the at least three terminals perform a multiparty session in an MCU mode through a target application;
the SIP server 1501 and/or the MCU server 1502 are configured to send a session mode switching instruction when the two terminals maintain a session state;
when a first terminal 1503 of the two terminals receives a session mode switching instruction, the first terminal 1503 is configured to send a session ending instruction to the MCU server 1502 according to the session mode switching instruction to control the target application to exit the MCU mode, where the session ending instruction is configured to end sessions of at least three terminals, and the session ending instruction carries a target session identification number ID used to represent that the at least three terminals perform sessions;
the first terminal 1503, further configured to send, after sending the session ending instruction, a first session request to the SIP server 1501, where the first session request is used to instruct to establish a peer-to-peer P2P session connection with the second terminal 1504 of the two terminals, and the first session request carries a target session ID;
the SIP server 1501 is configured to forward the received first session request to the second terminal 1504;
the second terminal 1504 is configured to receive the first session request, send a session ending instruction to the MCU server 1502 to control the target application to exit the MCU mode, listen to the first session request after sending the session ending instruction to establish a P2P session connection with the first terminal 1503, and switch the target applications of the first terminal 1503 and the second terminal 1504 to the P2P mode after establishing the P2P session connection.
Optionally, in a case that two terminals maintain a session state, when the SIP server 1501 and/or the MCU server 1502 send a session mode switching instruction, the SIP server 1501 and the MCU server 1502 are configured to receive a session end instruction sent by at least one third terminal 1505 for exiting a multi-party session, and the SIP server 1501 and/or the MCU server 1502 are further configured to monitor the number of terminals maintaining the session state according to the session end instruction, and send the session mode switching instruction when only two terminals maintain the session state;
the session ending instruction carries a target session ID.
Optionally, the session processing system further includes a service server 1506, where the at least three terminals include a target terminal for initiating the multi-party session, and before the at least three terminals establish the multi-party session, the target terminal is further configured to: sending a request for allocating a target session ID to the service server 1506, and receiving the target session ID fed back by the service server 1506;
the target terminal is the first terminal 1503, the second terminal 1504, or any third terminal 1505 of the at least three terminals that is different from the first terminal 1503 and the second terminal 1504, and the first terminal 1503 is taken as an example in the figure for illustration.
Optionally, when at least three terminals establish a multi-party session, the target terminal is further configured to: the target session ID is synchronized to at least two terminals by the SIP server 1501.
An embodiment of the present invention further provides a session processing apparatus, which is disposed at a first terminal, and the first terminal, a second terminal, and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, as shown in fig. 16, the apparatus includes:
the first processing module 1601 is configured to receive a session mode switching instruction when the first terminal and the second terminal maintain a session state, send a session end instruction for ending sessions of at least three terminals to the MCU server according to the session mode switching instruction to control the target application to exit the MCU mode, where the session mode switching instruction is sent by the SIP server and/or the MCU server, and the session end instruction carries a target session identification number ID for representing that the at least three terminals perform a session;
a first sending module 1602, configured to send, after sending the session ending instruction, a first session request to the second terminal through the SIP server, where the first session request is used to indicate that a P2P peer-to-peer session connection is established with the second terminal, and the first session request carries a target session ID;
a first receiving and establishing module 1603, configured to establish a P2P session connection with the second terminal if the second terminal answers the first session request, and after establishing the P2P session connection, the target application is switched to the P2P mode.
An embodiment of the present invention further provides a session processing apparatus, which is disposed at a second terminal, where the second terminal, the first terminal, and at least one third terminal perform a multi-party session in a multi-point control unit MCU mode through a target application, as shown in fig. 17, the apparatus includes:
a first receiving module 1701, configured to receive, when the second terminal and the first terminal maintain a session state and the first terminal receives a session mode switching instruction, a first session request sent by the first terminal through a session initiation protocol SIP server and used for indicating that a peer-to-peer P2P session connection is established with the second terminal, where the first session request carries a target session identification number ID used for representing that at least three terminals perform a session;
a second processing module 1702, configured to send a session ending instruction to the MCU server after receiving the first session request, to control the target application to exit the MCU mode, and listen to the first session request after sending the session ending instruction, to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target application switches to the P2P mode.
An embodiment of the present invention further provides a session processing system, as shown in fig. 18, including a first terminal 1801, a second terminal 1802, a session initiation protocol SIP server 1803, and a multipoint control unit MCU server 1804, where the first terminal 1801 and the second terminal 1802 perform a session between themselves in a point-to-point P2P mode through a target application;
a first terminal 1801 for disconnecting a P2P session connection with a second terminal 1802, in case at least one third terminal 1805 requests to join the session connection;
the SIP server 1803 is configured to receive a call request sent by a first terminal 1801 and used for establishing a multi-party session connection through a target application, and forward the call request to at least two terminals, where the at least two terminals include at least one third terminal 1805 requesting to join a session connection and a second terminal 1802, and the call request carries a target session identification number ID representing that a multi-party session is to be performed;
the first terminal 1801 is configured to initiate a second session request carrying a target session ID to the MCU server 1804, so as to control the target application to switch to the MCU mode;
the SIP server 1803 is configured to receive a call answering instruction carrying a target session ID and fed back by at least two terminals, and forward the call answering instruction to the first terminal 1801;
under the condition that at least two terminals initiate a second session request carrying a target session ID to the MCU server 1804, at least three terminals establish a multi-party session connection, and after the at least two terminals initiate the second session request to the MCU server, the controllable corresponding target application is switched to an MCU mode.
Optionally, the session processing system further includes a service server 1806, and before the first terminal 1801 and the second terminal 1802 perform a two-party session, the first terminal 1801 is further configured to: a request for allocating a target session ID is sent to the service server 1806, and the target session ID fed back by the service server 1806 is received.
Optionally, the first terminal 1801 is further configured to:
synchronizing the target session ID to the second terminal 1802 through a P2P session connection or synchronizing the target session ID to the second terminal 1802 through the SIP server 1803, in a case where the first terminal 1801 maintains a session with the second terminal 1802;
in the case where the first terminal 1801 and the second terminal 1802 do not establish a P2P session connection or disconnect a P2P session connection, the target session ID is synchronized to the second terminal 1802 by the SIP server 1803 (a process of synchronizing the target session ID is not shown in the drawing).
An embodiment of the present invention further provides a session processing apparatus, which is disposed at a first terminal, and the first terminal and a second terminal perform a session therebetween in a peer-to-peer P2P mode through a target application, as shown in fig. 19, the apparatus includes:
a first disconnection module 1901, configured to disconnect the P2P session connection with the second terminal in case that at least one third terminal requests to join the session connection;
a second sending module 1902, configured to send, to at least two terminals through a SIP server, a call request for establishing a multi-party session connection through a target application, where the at least two terminals include at least one third terminal requesting to join the session connection, and the call request carries a target session identification number ID representing that the multi-party session is performed;
a third processing module 1903, configured to initiate a second session request carrying a target session ID to the MCU server to control the target application to switch to the MCU mode;
a second receiving and establishing module 1904, configured to receive a call answering instruction carrying a target session ID and fed back by at least two terminals through the SIP server, and establish a multi-party session connection with the at least two terminals when the at least two terminals initiate a second session request carrying the target session ID to the MCU server.
An embodiment of the present invention further provides a session processing apparatus, which is disposed at a second terminal, where the second terminal and a first terminal perform a session therebetween in a peer-to-peer P2P mode through a target application, as shown in fig. 20, the apparatus includes:
a second disconnection module 2001, configured to disconnect the P2P session connection with the first terminal in case that at least one third terminal requests to join the session connection;
a second receiving module 2002, configured to answer a call request sent by the first terminal through the SIP server and used for establishing a multi-party session connection through a target application, where the call request carries a target session identity ID that indicates that a multi-party session is to be performed;
a feedback module 2003, configured to feed back, to the first terminal, a call answering instruction carrying the target session ID through the SIP server;
the fourth processing module 2004 is configured to initiate a second session request carrying a target session ID to the MCU server to control the target application to switch to the MCU mode, and establish a multi-party session connection with the first terminal and the at least one third terminal when the at least one third terminal and the first terminal initiate the second session request.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, as shown in fig. 21, including a processor 211, a communication interface 212, a memory 213, and a communication bus 214, where the processor 211, the communication interface 212, and the memory 213 complete mutual communication through the communication bus 214, and the memory 213 is used for storing a computer program; the processor 211 is configured to execute the program stored in the memory 213, so as to implement the session processing method in the embodiment of the present invention.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the session processing method described in the above embodiment.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the session processing method described in the above embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (19)

1. A conversation processing method is applied to a conversation processing system, and is characterized in that the conversation processing system comprises at least three terminals, a SIP server and a MCU server, the at least three terminals carry out multiparty conversation in an MCU mode through target application, and the method comprises the following steps:
under the condition that the two terminals keep a session state, the SIP server and/or the MCU server sends a session mode switching instruction;
when a first terminal of the two terminals receives the session mode switching instruction, the first terminal sends a session ending instruction to the MCU server according to the session mode switching instruction so as to control the target application to exit the MCU mode, wherein the session ending instruction is used for ending the sessions of the at least three terminals, and the session ending instruction carries target session identification numbers ID used for representing the sessions of the at least three terminals;
after the first terminal sends the session ending instruction, sending a first session request to the SIP server, where the first session request is used to indicate that a point-to-point P2P session connection is established with a second terminal of the two terminals, and the first session request carries the target session ID;
the SIP server forwards the received first session request to the second terminal;
the second terminal receives the first session request, sends the session ending instruction to the MCU server to control the target application to exit the MCU mode, and receives the first session request after sending the session ending instruction to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target applications of the first terminal and the second terminal are switched to a P2P mode.
2. The session processing method according to claim 1, wherein in a case where the two terminals maintain the session state, the SIP server and/or the MCU server sends a session mode switching instruction, including:
the SIP server and the MCU server receive the session ending instruction which is sent by at least one third terminal and exits the multi-party session, the SIP server and/or the MCU server monitor the number of terminals maintaining the session state according to the session ending instruction, and when only two terminals maintain the session state, the SIP server and/or the MCU server send the session mode switching instruction;
wherein, the session ending instruction carries the target session ID.
3. The session processing method according to claim 1, wherein the session processing system further comprises a service server, the at least three terminals include a target terminal for initiating a multi-party session, and before the at least three terminals establish the multi-party session, the method further comprises:
the target terminal sends a request for distributing the target session ID to the service server;
the target terminal receives the target session ID fed back by the service server;
the target terminal is any one of the first terminal, the second terminal or any one of the at least three terminals different from the first terminal and the second terminal.
4. The session processing method according to claim 3, wherein the method further comprises:
and when the at least three terminals establish the multi-party session, the target terminal synchronizes the target session ID to the at least two terminals through the SIP server.
5. A session processing method is applied to a first terminal, and is characterized in that the first terminal, a second terminal and at least one third terminal perform a multi-party session in a multi-point control unit (MCU) mode through a target application, and the method comprises the following steps:
under the condition that the first terminal and the second terminal keep a session state, the first terminal receives a session mode switching instruction, sends a session ending instruction for ending sessions of at least three terminals to an MCU server according to the session mode switching instruction so as to control the target application to exit an MCU mode, the session mode switching instruction is sent by a Session Initiation Protocol (SIP) server and/or the MCU server, and the session ending instruction carries a target session identification number (ID) for representing the at least three terminals to carry out sessions;
after the first terminal sends the session ending instruction, sending a first session request to the second terminal through the SIP server, wherein the first session request is used for indicating that point-to-point P2P session connection is established with the second terminal, and the first session request carries the target session ID;
in the event that the second terminal listens to the first session request, a P2P session connection is established with the second terminal, and after the P2P session connection is established, the target application switches to P2P mode.
6. A session processing method is applied to a second terminal, and is characterized in that the second terminal, a first terminal and at least one third terminal perform a multi-party session in a multi-point control unit (MCU) mode through a target application, and the method comprises the following steps:
under the conditions that the second terminal and the first terminal keep a session state and the first terminal receives a session mode switching instruction, receiving a first session request which is sent by the first terminal through a Session Initiation Protocol (SIP) server and used for indicating the establishment of point-to-point P2P session connection with the second terminal, wherein the first session request carries a target session identification number (ID) used for representing at least three terminals to carry out sessions;
and after receiving the first session request, the second terminal sends a session ending instruction to an MCU server to control the target application to exit an MCU mode, and after sending the session ending instruction, the second terminal receives the first session request to establish P2P session connection with the first terminal, and after establishing the P2P session connection, the target application is switched to a P2P mode.
7. A conversation processing method is applied to a conversation processing system, and is characterized in that the conversation processing system comprises a first terminal, a second terminal, a Session Initiation Protocol (SIP) server and a Multipoint Control Unit (MCU) server, the first terminal and the second terminal carry out conversation between the two terminals in a point-to-point P2P mode through a target application, and the method comprises the following steps:
in case at least one third terminal requests to join a session connection, the first terminal disconnects a P2P session connection with the second terminal;
the SIP server receives a call request which is sent by the first terminal and used for establishing multi-party session connection through the target application, and forwards the call request to at least two terminals, wherein the at least two terminals comprise at least one third terminal requesting to join session connection and the second terminal, and the call request carries a target session identity identification number ID for representing multi-party session;
the first terminal initiates a second session request carrying the target session ID to the MCU server so as to control the target application to be switched to an MCU mode;
the SIP server receives a call answering instruction which carries the target session ID and is fed back by the at least two terminals, and forwards the call answering instruction to the first terminal;
and under the condition that the at least two terminals initiate the second session request carrying the target session ID to the MCU server, at least three terminals establish multi-party session connection, and after the at least two terminals initiate the second session request to the MCU server, the controllable corresponding target application is switched to an MCU mode.
8. The session processing method according to claim 7, wherein the session processing system further includes a service server, and before the first terminal and the second terminal perform a two-party session, the method further includes:
the first terminal sends a request for distributing the target session ID to the service server;
and the first terminal receives the target session ID fed back by the service server.
9. The session processing method according to claim 8, wherein the method further comprises:
synchronizing the target session ID to the second terminal through a P2P session connection or synchronizing the target session ID to the second terminal through the SIP server, in case the first terminal maintains a session with the second terminal;
synchronizing, by the SIP server, the target session ID to the second terminal if the first terminal does not establish a P2P session connection or disconnects a P2P session connection with the second terminal.
10. A session processing method is applied to a first terminal, and is characterized in that the first terminal and a second terminal carry out a double-party session in a peer-to-peer P2P mode through a target application, and the method comprises the following steps:
in case at least one third terminal requests to join a session connection, the first terminal disconnects a P2P session connection with the second terminal;
the first terminal sends a call request for establishing multi-party session connection through the target application to at least two terminals through a Session Initiation Protocol (SIP) server, wherein the at least two terminals comprise at least one third terminal for requesting to join the session connection and the second terminal, and the call request carries a target session identity identification number (ID) for representing multi-party session;
the first terminal initiates a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server so as to control the target application to be switched to an MCU mode;
the first terminal receives a call answering instruction carrying the target session ID fed back by the at least two terminals through the SIP server, and establishes multi-party session connection with the at least two terminals under the condition that the at least two terminals initiate a second session request carrying the target session ID to the MCU server.
11. A session processing method applied to a second terminal, wherein the second terminal and a first terminal have a session therebetween in a peer-to-peer P2P mode through a target application, the method comprising:
in case at least one third terminal requests to join a session connection, the second terminal disconnects a P2P session connection with the first terminal;
the second terminal answers a call request which is sent by the first terminal through a Session Initiation Protocol (SIP) server and establishes multi-party session connection through the target application, wherein the call request carries a target session identity identification number (ID) for representing multi-party session;
the second terminal feeds back a call answering instruction carrying the target session ID to the first terminal through the SIP server;
and the second terminal initiates a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server to control the target application to be switched to an MCU mode, and under the condition that at least one third terminal and the first terminal initiate the second session request, the second terminal establishes multi-party session connection with the first terminal and at least one third terminal.
12. A conversation processing system is characterized in that the conversation processing system comprises at least three terminals, a conversation initial protocol SIP server and a multipoint control unit MCU server, wherein the at least three terminals carry out multiparty conversation in an MCU mode through target application;
the SIP server and/or the MCU server are/is used for sending a session mode switching instruction under the condition that the two terminals keep the session state;
when a first terminal of the two terminals receives the session mode switching instruction, the first terminal is configured to send a session ending instruction to the MCU server according to the session mode switching instruction to control the target application to exit the MCU mode, where the session ending instruction is used to end sessions of the at least three terminals, and the session ending instruction carries a target session identification number ID used to characterize the at least three terminals to perform sessions;
the first terminal is further configured to send a first session request to the SIP server after sending the session ending instruction, where the first session request is used to indicate that a point-to-point P2P session connection is established with a second terminal of the two terminals, and the first session request carries the target session ID;
the SIP server is used for forwarding the received first session request to the second terminal;
the second terminal is configured to receive the first session request, send the session termination instruction to the MCU server to control the target application to exit the MCU mode, and listen to the first session request after sending the session termination instruction to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target applications of the first terminal and the second terminal are switched to the P2P mode.
13. A session processing device is arranged at a first terminal, and is characterized in that the first terminal, a second terminal and at least one third terminal perform a multi-party session in a multi-point control unit (MCU) mode through a target application, and the device comprises:
the first processing module is used for receiving a session mode switching instruction under the condition that the first terminal and the second terminal keep a session state, sending a session ending instruction for ending the sessions of at least three terminals to an MCU server according to the session mode switching instruction so as to control the target application to exit the MCU mode, wherein the session mode switching instruction is sent by a Session Initiation Protocol (SIP) server and/or the MCU server, and the session ending instruction carries a target session identification number (ID) for representing the sessions of the at least three terminals;
a first sending module, configured to send, after sending the session termination instruction, a first session request to the second terminal through the SIP server, where the first session request is used to indicate that a peer-to-peer P2P session connection is established with the second terminal, and the first session request carries the target session ID;
a first receiving establishing module, configured to establish a P2P session connection with the second terminal when the second terminal answers the first session request, and after the P2P session connection is established, the target application is switched to a P2P mode.
14. A session processing device is arranged at a second terminal, and is characterized in that the second terminal, the first terminal and at least one third terminal perform a multi-party session in a multi-point control unit (MCU) mode through a target application, and the device comprises:
a first receiving module, configured to receive, when the second terminal and the first terminal maintain a session state and the first terminal receives a session mode switching instruction, a first session request sent by the first terminal through a session initiation protocol SIP server and used to indicate that a peer-to-peer P2P session connection is established with the second terminal, where the first session request carries a target session identification number ID used to characterize at least three terminals to perform a session;
a second processing module, configured to send a session end instruction to an MCU server after receiving the first session request, to control the target application to exit the MCU mode, and listen to the first session request after sending the session end instruction, to establish a P2P session connection with the first terminal, and after establishing the P2P session connection, the target application is switched to the P2P mode.
15. A conversation processing system is characterized in that the conversation processing system comprises a first terminal, a second terminal, a conversation initial protocol (SIP) server and a Multipoint Control Unit (MCU) server, wherein the first terminal and the second terminal carry out conversation between the two terminals in a point-to-point P2P mode through a target application;
the first terminal is used for disconnecting the P2P session connection with the second terminal under the condition that at least one third terminal requests to join the session connection;
the SIP server is used for receiving a call request which is sent by the first terminal and used for establishing multi-party session connection through the target application, and forwarding the call request to at least two terminals, wherein the at least two terminals comprise at least one third terminal and a second terminal, the third terminal is used for requesting to join in session connection, and the call request carries a target session identity number ID for representing multi-party session;
the first terminal is used for initiating a second session request carrying the target session ID to the MCU server so as to control the target application to be switched to an MCU mode;
the SIP server is used for receiving a call answering instruction which carries the target session ID and is fed back by the at least two terminals, and forwarding the call answering instruction to the first terminal;
and under the condition that the at least two terminals initiate the second session request carrying the target session ID to the MCU server, at least three terminals establish multi-party session connection, and after the at least two terminals initiate the second session request to the MCU server, the controllable corresponding target application is switched to an MCU mode.
16. A session processing apparatus provided in a first terminal, the first terminal and a second terminal performing a session therebetween in a peer-to-peer P2P mode via a target application, the apparatus comprising:
a first disconnection module, configured to disconnect a P2P session connection with the second terminal in a case where at least one third terminal requests to join the session connection;
a second sending module, configured to send, to at least two terminals through a session initiation protocol SIP server, a call request for establishing a multi-party session connection through the target application, where the at least two terminals include at least one third terminal requesting to join the session connection and the second terminal, and the call request carries a target session identification number ID indicating that a multi-party session is to be performed;
the third processing module is used for initiating a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server so as to control the target application to be switched to an MCU mode;
and the second receiving and establishing module is used for receiving a call answering instruction which carries the target session ID and is fed back by the at least two terminals through the SIP server, and establishing multi-party session connection with the at least two terminals under the condition that the at least two terminals initiate the second session request carrying the target session ID to the MCU server.
17. A session processing apparatus provided in a second terminal, the second terminal and a first terminal performing a session therebetween in a peer-to-peer P2P mode via a target application, the apparatus comprising:
a second disconnection module, configured to disconnect a P2P session connection with the first terminal in a case where at least one third terminal requests to join the session connection;
a second receiving module, configured to answer a call request sent by the first terminal through a session initiation protocol SIP server and used for establishing a multi-party session connection through the target application, where the call request carries a target session identity ID for indicating that a multi-party session is to be performed;
a feedback module, configured to feed back, to the first terminal, a call answering instruction carrying the target session ID through the SIP server;
and the fourth processing module is used for initiating a second session request carrying the target session ID to a Multipoint Control Unit (MCU) server so as to control the target application to be switched to an MCU mode, and establishing multi-party session connection with the first terminal and at least one third terminal under the condition that the second session request is initiated by the at least one third terminal and the first terminal.
18. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the session processing method according to any one of claims 1 to 4 or 5 or 6 or 7 to 9 or 10 or 11 when executing the program stored in the memory.
19. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the session processing method according to any one of claims 1 to 4 or 5 or 6 or 7 to 9 or 10 or 11.
CN202110171866.9A 2021-02-08 2021-02-08 Session processing method, device, system, electronic equipment and medium Pending CN112929371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110171866.9A CN112929371A (en) 2021-02-08 2021-02-08 Session processing method, device, system, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110171866.9A CN112929371A (en) 2021-02-08 2021-02-08 Session processing method, device, system, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN112929371A true CN112929371A (en) 2021-06-08

Family

ID=76171176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110171866.9A Pending CN112929371A (en) 2021-02-08 2021-02-08 Session processing method, device, system, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112929371A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866520A (en) * 2022-04-18 2022-08-05 北京奇艺世纪科技有限公司 Communication processing method, system, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158673A (en) * 2013-05-13 2014-11-19 杭州华为企业通信技术有限公司 Conference mode selection method and server
CN106549978A (en) * 2016-12-19 2017-03-29 东软集团股份有限公司 A kind of conversation modes changing method and proxy server
CN110113555A (en) * 2018-02-01 2019-08-09 北京视联动力国际信息技术有限公司 A kind of video conference processing method and system based on view networking
EP3694146A1 (en) * 2019-02-07 2020-08-12 Apizee Method for processing audio and video stream in multi-party conference, corresponding devices, system and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158673A (en) * 2013-05-13 2014-11-19 杭州华为企业通信技术有限公司 Conference mode selection method and server
CN106549978A (en) * 2016-12-19 2017-03-29 东软集团股份有限公司 A kind of conversation modes changing method and proxy server
CN110113555A (en) * 2018-02-01 2019-08-09 北京视联动力国际信息技术有限公司 A kind of video conference processing method and system based on view networking
EP3694146A1 (en) * 2019-02-07 2020-08-12 Apizee Method for processing audio and video stream in multi-party conference, corresponding devices, system and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866520A (en) * 2022-04-18 2022-08-05 北京奇艺世纪科技有限公司 Communication processing method, system, electronic device and storage medium
CN114866520B (en) * 2022-04-18 2024-01-30 北京奇艺世纪科技有限公司 Communication processing method, system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10798138B2 (en) Instant calling method, apparatus and system
KR101571925B1 (en) Multipoint conference device and switching method from multipoint conference to point-to-point communication
CN110971863B (en) Multi-point control unit cross-area conference operation method, device, equipment and system
US8890928B2 (en) Method, system and device for conference switching
EP2437491A1 (en) Method and system for video conference control, network equipment and meeting places for video conference
CN101453524B (en) Multimedia service implementing method
US7328240B2 (en) Distributed multipoint conferencing
US7983199B1 (en) Voice over internet protocol push-to-talk communication system
WO2015131709A1 (en) Method and device for participants to privately chat in video conference
WO2011088656A1 (en) Method and system for implementing three-party call of videophone by mobile terminals
WO2014062620A2 (en) Reduction of chaining in conference sessions
EP2738999B1 (en) Method and device for realizing a seamless switch from a two-party call to a conference
CN112887271A (en) Method, system, electronic device and storage medium for realizing instant conference
CN105556980A (en) A method and system for integrating content viewing and communication in immersive social centre session
US11678149B2 (en) Communications network
CN101389059A (en) Method, system and device for implementing session mode switching
CN112929371A (en) Session processing method, device, system, electronic equipment and medium
KR100937025B1 (en) Method and system for multi-person communication using IP terminal
CN107846382B (en) Multi-screen sharing method, server, terminal and system in converged communication
JP5579660B2 (en) Multipoint video conferencing equipment
CN114095688A (en) Method and system for realizing global broadcast conference
WO2012155732A1 (en) Mobile terminal and method for realizing remote conference based on mobile terminal
JP4903477B2 (en) Group call server
CN114866520B (en) Communication processing method, system, electronic equipment and storage medium
KR100345310B1 (en) System and method for multimedia chatting service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210608