Communication apparatus, method, system, electronic device, storage medium, and program product
By injecting publicly accessible addresses into WebRTC communication, the problems of unstable network penetration and low communication connection efficiency are solved, and efficient communication connection establishment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-10
AI Technical Summary
Existing WebRTC communication suffers from unstable network penetration in complex network environments, resulting in low communication connection efficiency. Furthermore, multiple rounds of network negotiation and signaling interaction increase communication establishment latency.
The public network reachable address of the first peer is injected into the session negotiation proposal information. A communication channel is established through the public network reachable address and connectivity detection, reducing multiple rounds of network negotiation and signaling interaction.
It improves the stability of the network traversal process and the efficiency of communication connection, shortens the communication establishment latency, and reduces network negotiation overhead.
Smart Images

Figure CN121644558A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and in particular to a communication device, method, system, electronic equipment, storage medium and program product. BACKGROUND
[0002] A cloud phone is a new terminal service form based on cloud computing and virtualization technology. The cloud phone runs a virtual mobile terminal instance on a cloud server and transmits interface pictures, audio data and user interaction results of the virtual terminal to a user device in real time, so that the user can remotely operate the virtual phone on the cloud side on the local device. Since the pictures and sounds generated by the virtual phone on the cloud side need to be presented to the user side terminal in real time, the cloud phone service has high requirements for the real-time performance, stability and low latency of audio and video transmission. Therefore, efficient and stable real-time audio and video transmission technology is one of the key technical foundations in the implementation process of the cloud phone service.
[0003] In the prior art, the Web Real-Time Communication (WebRTC) protocol provides support for real-time audio and video and data channels at the browser level, can realize low-latency transmission from end to end, and can achieve millisecond-level response in an ideal network environment. Therefore, the WebRTC protocol is widely used in real-time communication scenarios and gradually becomes the preferred solution for reducing transmission delay and decoding delay in cloud phone services. However, in actual applications, the two communication parties are usually in a complex and changeable network environment, and each peer may be located behind a network address translation device. To realize network penetration, the existing WebRTC communication process usually needs to perform dynamic collection and multiple connectivity detection of network candidates (Candidates) through an Interactive Connectivity Establishment (ICE) mechanism, accompanied by multiple rounds of signaling exchange process. The above network negotiation process not only increases the overall latency during communication establishment, but also may cause unstable network penetration in some network environments, thereby affecting the communication connection efficiency. SUMMARY
[0004] Embodiments of the present application provide a communication device, method, system, electronic equipment, storage medium and program product to address some defects in the background art.
[0005] In a first aspect, embodiments of the present application provide a communication device applied to a first peer, comprising: a signaling communication module configured to receive and send signaling information; a negotiation module configured to perform negotiation processing in a communication connection establishment process; a channel management module configured to establish a communication channel; The negotiation module is configured to: When the first peer end is a communication initiator and it is identified that it has the cloud-side deployment identifier, a public network reachable address of the first peer end is acquired, and the public network reachable address is injected into session negotiation proposal information; The signaling communication module is configured to: send the session negotiation proposal information to a second peer end; The channel management module is configured to: based on the public network reachable address and connectivity detection of the second peer end, establish a communication channel between the first peer end and the second peer end.
[0006] In a first aspect of the embodiments of the present application, the device further includes: A peer end management module is configured to coordinate the signaling communication module, the negotiation module, and the channel management module to perform a communication establishment process.
[0007] In the first aspect of the embodiments of the present application, the peer end management module is configured to: in response to a construction instruction for a target peer end identifier, return a corresponding data channel connection object or a media stream channel connection object.
[0008] In the first aspect of the embodiments of the present application, the session negotiation proposal information includes a session description protocol proposal message.
[0009] In the first aspect of the embodiments of the present application, the public network reachable address is carried in a candidate item parameter field of the session negotiation proposal information.
[0010] In the first aspect of the embodiments of the present application, the public network reachable address includes a fixed public network address.
[0011] In the first aspect of the embodiments of the present application, the channel management module is further configured to: in response to a connectivity detection request sent by the second peer end, and feed back a detection response carrying a reflection network address of the second peer end to the second peer end.
[0012] In the first aspect of the embodiments of the present application, the communication device is configured to: only when the first peer end has the cloud-side deployment identifier, allow the first peer end to initiate a media stream communication establishment process.
[0013] In a second aspect, the embodiments of the present application provide a communication device applied to a second peer end, including: A signaling communication module is configured to receive and send signaling information; a negotiation module, configured to perform negotiation processing in a communication connection establishment process; a channel management module, configured to establish a communication channel; The signaling communication module is configured to: receive session negotiation proposal information sent by the first peer, the session negotiation proposal information containing a public network reachable address of the first peer; The channel management module is configured to: perform connectivity detection with the first peer based on the public network reachable address, to confirm a communication path and establish a communication channel.
[0014] In a second aspect of the embodiments of the present application, the device further includes: a peer management module, configured to coordinate the signaling communication module, the negotiation module and the channel management module to perform a communication establishment process.
[0015] In the second aspect of the embodiments of the present application, the peer management module is further configured to: in response to a construction instruction for a target peer identifier, return a data channel connection object or a media stream channel connection object through the channel management module.
[0016] In the second aspect of the embodiments of the present application, the channel management module is further configured to: In the process of performing connectivity detection, receive a detection response returned by the first peer and carrying the second peer's reflected network address, and determine the reflected network address according to the detection response.
[0017] In the second aspect of the embodiments of the present application, the channel management module is further configured to: construct a candidate pair by taking the public network reachable address as a host candidate and taking the reflected network address as a peer reflected candidate.
[0018] In a third aspect, the embodiments of the present application provide a communication method applied to a first peer, including: when the first peer is a communication initiator and recognizes that it has a cloud-side deployment identifier, obtaining a public network reachable address of the first peer; injecting the public network reachable address into session negotiation proposal information, and sending the session negotiation proposal information to a second peer; based on the public network reachable address and connectivity detection of the second peer, establishing a communication channel between the first peer and the second peer.
[0019] In the third aspect of the embodiments of the present application, the method further includes: maintaining a connection pool recording a mapping relationship between a peer identifier and a peer connection object.
[0020] In a third aspect of the embodiments of the present application, the method further comprises: returning the corresponding data channel connection object or the media stream channel connection object in response to the construction instruction for the target peer identity.
[0021] In a third aspect of the embodiments of the present application, the public reachable address comprises a fixed public address.
[0022] In a third aspect of the embodiments of the present application, the method further comprises: responding to the connectivity detection request sent by the second peer, and feeding back a detection response carrying the reflective network address of the second peer to the second peer.
[0023] In a third aspect of the embodiments of the present application, the method further comprises: only when the first peer has the cloud-side deployment identity, allowing the first peer to initiate a media stream communication establishment process.
[0024] In a fourth aspect, the embodiments of the present application provide a communication method, applied to a second peer, comprising: receiving session negotiation proposal information sent by a first peer, the session negotiation proposal information containing a public reachable address of the first peer; performing connectivity detection with the first peer based on the public reachable address to confirm a communication path; establishing a communication channel based on the confirmed communication path.
[0025] In a fourth aspect of the embodiments of the present application, the confirming the communication path comprises: receiving a detection response returned by the first peer and carrying a reflective network address of the second peer; confirming the communication path according to the public reachable address and the reflective network address.
[0026] In a fourth aspect of the embodiments of the present application, the confirming the communication path according to the public reachable address and the reflective network address comprises: taking the public reachable address as a host candidate and taking the reflective network address as a peer reflective candidate to confirm the communication path.
[0027] In a fifth aspect, the embodiments of the present application provide a communication system, comprising: the communication device of any one of the first aspect, and the communication device of any one of the second aspect.
[0028] In a sixth aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method of any of the second aspect or the third aspect.
[0029] In a seventh aspect, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps of the method of any of the second aspect or the third aspect.
[0030] In an eighth aspect, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps of the method of any of the second aspect or the third aspect.
[0031] According to the communication device, method, electronic device, storage medium, and program product provided in the embodiments of the present application, the public network reachable address of the first peer is injected into the session negotiation proposal information in the session negotiation proposal information generation stage, and the negotiation processing and the communication channel construction of the two communication parties are completed based on the session negotiation proposal information, thereby reducing the dependence on multiple rounds of network negotiation and signaling interaction in the communication establishment process, shortening the communication connection delay, and improving the communication connection efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0032] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which:
[0033] Figure 1 is a schematic diagram of an application scenario provided by the embodiments of the present application.
[0034] Figure 2 is a block diagram of a communication device provided by the embodiments of the present application.
[0035] Figure 3 is a schematic diagram of the working process of a signaling communication module in a communication device provided by the embodiments of the present application.
[0036] Figure 4 is a schematic diagram of a negotiation module in a communication device provided by the embodiments of the present application.
[0037] Figure 5 is a schematic diagram of a data channel module in a communication device provided by the embodiments of the present application.
[0038] Figure 6is a schematic diagram of a media flow channel module in a communication device provided by an embodiment of the present application.
[0039] Figure 7 is a flowchart of a communication method provided by an embodiment of the present application.
[0040] Figure 8 is another flowchart of a communication method provided by an embodiment of the present application.
[0041] Figure 9 is a schematic diagram of a computer program product provided by an embodiment of the present application.
[0042] Figure 10 is a hardware block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present application more obvious, the following will describe the example embodiments according to the present application in detail with reference to the drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein.
[0044] Referring to Figure 1 , the present embodiment provides a communication application scenario schematic diagram. In the scenario, the communication system includes a first peer 101, a second peer 102 and a signaling server 103. Among them, the first peer 101 and the second peer 102 are communication terminals with network communication capability. The peer can be deployed on the cloud side or on the terminal side, such as a cloud phone instance, a user side browser, a mobile terminal, etc.
[0045] Embodiment 1 Referring to Figure 2 A communication device applied to a first peer, comprising: a signaling communication module 201 for receiving and sending signaling information; a negotiation module 202 for performing negotiation processing in a communication connection establishment process; a channel management module 203 for establishing a communication channel; The negotiation module 202 is configured to: When the first peer is a communication initiator and recognizes that it has a cloud side deployment identifier, obtain a public network reachable address of the first peer, and inject the public network reachable address into session negotiation proposal information; The signaling communication module 201 is configured to: send the session negotiation proposal information to the second peer; The channel management module 203 is configured to: A communication channel is established between the first peer and the second peer based on the public network reachable address and the connectivity detection of the second peer.
[0046] In this embodiment of the application, the first peer is a cloud-side device and the second peer is a terminal-side device, which will be used as an example for explanation.
[0047] In this embodiment, when the first peer initiates communication and is identified as having a cloud-side deployment identifier, session negotiation proposal information is generated based on the public network reachable address corresponding to the first peer. This public network reachable address is injected into the session negotiation proposal information, and the communication module sends the session negotiation proposal information to the second peer. This allows the second peer to perform connectivity detection based on the public network reachable address. The communication module can then establish a communication channel between the first and second peers based on the public network reachable address and the connectivity detection. In this embodiment, the public network reachable address is the target network address used by the second peer to initiate connectivity detection.
[0048] The communication device in this application embodiment has the following effects: by injecting the public network reachable address of the first peer into the session negotiation proposal information during the generation of session negotiation proposal information, both parties can clearly identify the reachable network address of the first peer during the negotiation phase, thereby enabling the construction of the communication channel to be based on the clear public network reachable address, reducing the dependence on multiple rounds of network negotiation and signaling interaction during the communication establishment process, shortening the communication connection establishment delay, and improving the communication connection efficiency.
[0049] In one implementation of the WebRTC protocol, the session negotiation proposal information can take the form of a Session Description Protocol Offer (SDP) message. After the session negotiation proposal information is sent to the second peer, the second peer generates and returns a session negotiation response message based on the proposal. In another implementation of the WebRTC protocol, the session negotiation response information can take the form of a Session Description Protocol Answer (Answer SDP) message.
[0050] The peer management module 204 coordinates the collaborative work of various functional modules. When initiating communication, the peer management module 204 drives the signaling communication module 201 to establish a signaling connection, serving as the bearer for Session Description Protocol (SDP) information transmission. Subsequently, the peer management module 204 calls the negotiation module 202 to perform negotiation processing.
[0051] During the negotiation process, the negotiation module 202 identifies the cloud-side deployment identifier of the communication device and injects the public network reachable address corresponding to the first peer into the candidate attribute field of the Offer SDP. The session negotiation proposal information is sent to the second peer via the signaling communication module 201.
[0052] After receiving the session negotiation proposal information containing public network reachable address information, the second peer initiates a connectivity test to the first peer based on the public network reachable address information. Since the first peer is deployed on the cloud and has direct public network connectivity, the connectivity test request sent by the second peer can reach the first peer.
[0053] The channel management module 203 of the first peer responds to the connectivity detection request and sends back the identified reflection transmission address of the second peer in the response message. During this process, the peer management module 204, through the coordination and negotiation module 202 and the channel management module 203, realizes fast communication path confirmation based on publicly accessible addresses, enabling the second peer to build a data channel or media stream channel without having to perform the complete Interactive Connectivity Establishment (ICE) address collection process.
[0054] Compared to conventional WebRTC-based communication methods, which require multiple rounds of network negotiation to exchange ICE candidates for network traversal, and which may involve multiple network negotiations and signaling interactions due to differences in the network environments of each peer, resulting in a complex connection establishment process and uncertain stability, this application's implementation method effectively improves the stability of the network traversal process and the efficiency of communication connection establishment by introducing an explicit publicly accessible address during the negotiation phase.
[0055] In one implementation, when the second peer initiates a connectivity test to the first peer, the system can generate a set of valid candidate pairs with high connectivity based on the reflected transmission address of the second peer and the host candidate of the first peer, for example, represented as (second peer [prflx]: first peer [host]).
[0056] The above candidate pair generation method can achieve the following technical effects: On the one hand, when the first peer has the ability to directly connect to the public network, the two communicating parties can reduce the address acquisition requests to the external Session Traversal Utilities for NAT Server (STUN server), thereby reducing network request latency; on the other hand, the two communicating parties reduce their reliance on resending candidate addresses through additional signaling exchange mechanisms, thereby reducing the number of signaling interactions, so that connectivity detection and communication path establishment can be performed after completing one SDP information exchange.
[0057] In cloud phone service scenarios, a fixed public IP address is used as the publicly reachable address. When the second peer is a terminal device and the first peer is a cloud device with a fixed public IP address, the fixed public IP address can be used as a candidate host for the first peer. When the terminal device initiates a network candidate connectivity test to the cloud device, the terminal device obtains its own reflected transmission address. The cloud device identifies the reflected transmission address based on the test message, thereby generating a set of candidate pairs that can communicate with each other, for example (terminal device [prflx]: cloud device [host]). Based on the candidate pairs, the two communicating parties can complete network traversal and establish a communication connection.
[0058] After the above optimizations, the implementation method of this application can reduce the number of candidate collection and exchange based on ICE in the WebRTC service process, thereby reducing network negotiation overhead.
[0059] In one implementation, the peer management module 204 is used to manage the communication process in a unified manner. In a specific implementation, the peer management module 204 can be implemented by the Peer module. The Peer module serves as the unified business entry point of the system, responsible for the initialization and maintenance of the overall communication process, and provides interfaces for establishing communication connections and making calls to achieve unified scheduling and management of the communication process.
[0060] The signaling communication module 201 is used to manage signaling connections and transmit signaling-related data. In a specific embodiment, the signaling communication module 201 can be implemented by a Socket module. The Socket module is used to establish and maintain a Socket connection between the communication device and the signaling server, and to distribute the received signaling information to the peer management module 204 by listening to signaling messages, so as to realize the reception and forwarding of signaling information.
[0061] The negotiation module 202 is used to perform negotiation processing, which may include media negotiation and network negotiation. When the first peer, acting as the communication initiator, generates session negotiation proposal information, the negotiation module 202 injects the public network reachable address information corresponding to the first peer into the session negotiation proposal information. In a specific implementation, the negotiation module 202 can be implemented by the Negotiator module, which manages the generation and processing of session description protocol information and coordinates the establishment process of data channels or media stream channels between peers.
[0062] The channel management module 203 is used to manage communication channels and construct communication channels based on connectivity detection. It can be a data channel module and a media stream channel module. In a specific implementation, the channel management module 203 can be implemented by a Connection module, which can include a DataConnection module and a MediaConnection module. The DataConnection module is used to manage the data channel, and the MediaConnection module is used to manage the media stream channel.
[0063] This application provides a communication device that modularizes and abstracts the functional roles and business processes involved in WebRTC communication services. Each module handles its own business logic and compatibility issues strongly related to the WebRTC communication process internally or between modules, thus exposing only a unified interface for user calls. Through this modular design, users do not need to delve into the complex implementation details of the WebRTC protocol; they can develop browser-based real-time communication applications simply by using the system's provided interfaces, thereby lowering the barrier to entry for WebRTC applications and improving development efficiency.
[0064] Meanwhile, considering that cloud-side devices in cloud phone service scenarios typically have fixed public IP addresses, this application's implementation method introduces a session negotiation mechanism based on cloud-side deployment identifiers. During the session negotiation phase, the fixed public IP address of the cloud-side device is provided in advance as a public reachable address, thereby improving the stability of the network penetration process, simplifying the network negotiation process, and accelerating the establishment of communication connections.
[0065] In addition, in one implementation, by limiting the connection to be initiated by the cloud-side device, the restrictions on the use of media streaming channels by the web client are circumvented, thereby further improving the communication success rate and the overall stability of the system.
[0066] In one embodiment, the apparatus further includes a peer management module for coordinating the signaling communication module, the negotiation module, and the channel management module to perform the communication establishment process.
[0067] In this implementation, the peer management module coordinates the signaling communication module, negotiation module, and channel management module, ensuring that signaling information exchange, negotiation processing, and communication channel establishment are executed in an orderly manner under the control of the peer management module. By scheduling the signaling exchange, negotiation processing, and communication channel establishment involved in the communication establishment process in a streamlined manner, the peer management module ensures that these operations are executed according to a predetermined communication establishment sequence, thereby encapsulating the originally dispersed and complex communication establishment logic within the system. Consequently, the application layer does not need to directly participate in the underlying communication process control.
[0068] In one example, the peer management module maintains a connection pool that records the mapping between peer identifiers and peer connection objects. Peer identifiers are generated during the initialization of each peer and are used to identify different peers. Based on these identifiers, one-to-one communication connections between peers can be created and maintained. By introducing a connection pool and a management mechanism based on peer identifiers into the peer management module, centralized management of peer connection objects is achieved. In one-to-many communication scenarios, the connection pool mechanism allows for the rapid acquisition of the peer connection object corresponding to the target peer identifier, thereby reducing the maintenance cost of one-to-many connection states and improving the system's support for multi-peer communication scenarios.
[0069] In this example, by maintaining a connection pool that records the mapping relationship between peer identifiers and peer connection objects, centralized management of multiple peer communication connections is achieved. This avoids the application layer directly handling the creation, maintenance, and lifecycle management logic of peer connection objects, thereby reducing the implementation complexity in multi-connection scenarios and improving the system's usability and development efficiency.
[0070] In one example, the peer management module 204 is configured to: respond to a build instruction for a target peer identifier and return the corresponding data channel connection object or media stream channel connection object.
[0071] When the peer management module receives a build instruction for a target peer identifier, it determines the peer connection object corresponding to the target peer from the connection pool based on the target peer identifier, and returns the corresponding data channel connection object or media stream channel connection object to the caller according to the type of the peer connection object.
[0072] By responding to the construction instructions for the target peer identifier and returning the corresponding connection object, the caller can directly obtain the required data channel connection object or media stream channel connection object based on the peer identifier, thereby further simplifying the use of communication connections and improving the scalability and ease of use of the communication system in multi-peer scenarios.
[0073] In one implementation, the peer management module 204 is configured to: respond to a data channel construction command carrying a target peer identifier and return a data channel connection instance corresponding to the target peer identifier. In this implementation, by sending a data channel construction command to the peer management module and passing in the target peer identifier, the construction process of the data channel corresponding to the target peer can be triggered, and the corresponding data channel connection instance can be obtained, thus eliminating the need for the application layer to directly participate in the creation and management of the data channel.
[0074] In one implementation, the publicly reachable address is carried in the candidate parameter field of the session negotiation proposal information.
[0075] In this implementation, when generating session negotiation proposal information, the first peer injects its publicly accessible address into the candidate parameter field of the session negotiation proposal information. The candidate parameter field describes the network-related parameter information required for connection establishment between the communicating parties. By including the publicly accessible address in the candidate parameter field, after the session negotiation proposal information is sent to the second peer, the second peer can parse and obtain the publicly accessible address of the first peer from the candidate parameter field. For example, the publicly accessible address is injected into the session description protocol proposal message according to a predetermined format.
[0076] In one implementation, the publicly reachable address includes a fixed public IP address. Specifically, this fixed public IP address can be a fixed public IP address. The inclusion of a fixed public IP address ensures that the publicly reachable address has a fixed and unchanging network address format, and can be pre-stored for easy retrieval.
[0077] In one implementation, the operation of injecting the public network reachable address of the first peer into the session negotiation proposal information is triggered based on the recognition that the first peer has a cloud-side deployment identifier. This implementation, through the association triggering mechanism between identity tagging and address injection action, not only ensures the accuracy of public network reachable address injection, but also avoids subsequent execution being affected by non-cloud peers performing this operation.
[0078] In one implementation, the channel management module is further configured to: respond to a connectivity detection request sent by the second peer and send a detection response carrying the reflected network address of the second peer back to the second peer.
[0079] In this implementation, when the second peer sends a connectivity detection request to the first peer, the channel management module responds to the connectivity detection request. When generating the detection response, the channel management module injects the reflected network address of the second peer, obtained during the connectivity detection process, into the detection response and then feeds the detection response back to the second peer. In this way, the second peer can obtain its corresponding reflected network address during the connectivity detection process. This reduces the system's dependence on external STUN (Session Traversal Utilities for NAT) servers. Even if the external STUN service is unreachable, the second peer can still obtain its own reflected network address through a single interaction with the first peer; by combining address discovery and connectivity detection into one, rapid construction of the communication channel is achieved.
[0080] In one embodiment, the communication device is configured to allow the first peer to initiate a media stream communication establishment process only when the first peer possesses a cloud-side deployment identifier. In this embodiment, when processing a media stream communication connection initiation request, the communication device determines whether the first peer possesses a cloud-side deployment identifier. When the first peer is identified as possessing a cloud-side deployment identifier, the communication device allows the first peer to initiate the media stream communication establishment process; when the first peer does not possess a cloud-side deployment identifier, the communication device does not allow it to initiate a media stream communication connection. Through this method, the initiation of a media stream communication connection is limited by the cloud-side deployment identifier, ensuring that only the cloud side initiates the connection, thus achieving a mechanism where the terminal side does not carry a media stream to establish a media stream channel with the cloud side.
[0081] In one implementation, the channel management module 203 includes a data channel module and a media stream channel module.
[0082] In one specific implementation, see Figure 3The peer management module 204 is a peer module used to create and manage Socket connections. It facilitates information exchange between the peer and the signaling server by receiving and sending information. Before establishing a one-to-one WebRTC connection, the peer must first connect to the signaling server for subsequent signaling exchange. The system uses the WebSocket protocol to connect to the signaling server. A signaling communication module 201 is set up within the system; this module is a Socket module responsible for managing the WebSocket connection between the system and the signaling server 103. By listening to Socket messages, it distributes information to the upper-layer peer instances to facilitate subsequent business processing. The Socket transmits Open, Offer, and Answer data to the peer module, which uses the Socket instance to control the Socket module's data sending and receiving.
[0083] After establishing a connection with the signaling server, establishing a one-to-one connection with another peer requires signaling exchange, which involves negotiating media and network information. This implementation uses a Negotiator module to handle the WebRTC negotiation process. The Negotiator module manages and coordinates the data channel and media stream established between the two peers.
[0084] See Figure 4 , Figure 4 The schematic diagram for the Negotiator module includes: S401, Create a PeerConnection object.
[0085] The negotiation module sets up the startConnection method to create a PeerConnection object and sets up relevant callback events, including the DataChannel event for the data channel and the track event for the media stream channel.
[0086] S402, PeerConnection object listener event.
[0087] The PeerConnection object listens for events such as DataChannel on the data channel and Track on the media stream channel.
[0088] S403, determine whether it is a media type.
[0089] Different negotiation processes are performed depending on whether the current peer is the initiator and the incoming connection type. If it is a media type, the local media stream is added to the PeerConnection object.
[0090] S404, determine if it is the initiator.
[0091] If the current peer is the initiator, an Offer SDP is generated; otherwise, it means that the current peer, as the receiver, has received the initiator's Offer SDP and needs to process this Offer SDP and generate its own Answer SDP.
[0092] S405, determine if it is a data type.
[0093] If it is a data type, then a Data Channel is created.
[0094] The `makeOffer` method is set to create an Offer, which determines whether it is a cloud-based offer. If it is a cloud-based offer, the public IP address of the cloud-based offer is written into the Offer.
[0095] Set the handleSDP method to process the received Offer SDP and generate the Answer SDP.
[0096] Data channels are primarily used for bidirectional transmission of non-streaming data and support the monitoring and processing of communication connection status and data events. These include events such as connection establishment, closure, and the receipt of new data.
[0097] See Figure 5 , Figure 5 The schematic diagram of the data channel module includes: Data channel module initialization 501: Create a negotiation module instance, call the connection initiation method of the negotiation module, and obtain a data channel object. The data channel object is attached to the data channel module. For example, create a Negotiator module instance, call the Negotiator module's startConnection method, and obtain a DataChannel object. The DataChannel object is attached to the DataConnection module. The DataChannel object includes the DataChannel generated by the current peer and the DataChannel generated by the other peer and passed through the negotiation process. Configure a callback event listener mechanism for the DataChannel object to listen for the Open event, the message event, and the close event of the data channel. Publish data and status information externally through custom events such as Open, Data, and Close, allowing module instances or callers to subscribe to events to monitor the relevant connection status and data content.
[0098] Data transmission processing logic 502: Configure a send method to handle data transmission for the corresponding data channel. For example, configure the send method to send messages, inject the data to be sent into the DataChannel object, thereby realizing data transmission based on the data channel.
[0099] Data channel module signaling processing logic 503: A message handling method is set up to process the signaling information returned by the signaling server. For example, the `handleMessage` method can be set up to process the signaling information returned by the signaling server, including session negotiation response information, etc. For example, the `negotiator.handleSDP` method of `Negotiator` can be called. By parsing and processing the signaling information, the status updates and coordination of each stage in the data channel establishment process can be realized.
[0100] In one implementation, the peer management module 204 is configured to: respond to a media stream channel construction command carrying a target peer identifier and local audio / video streams, and return a media stream communication connection instance corresponding to the target peer identifier. By simply sending a media stream channel construction command to the peer management module, passing in the target peer identifier and local audio / video streams, a media stream channel can be constructed, and a media stream channel connection instance can be returned.
[0101] In WebRTC-based communication scenarios, the MediaConnection module allows communication devices to access local camera and microphone devices, collect audio and video data in real time, and transmit the audio and video data to the browser of the remote peer, thereby achieving real-time audio and video communication.
[0102] See Figure 6 , Figure 6 The schematic diagram of the media streaming channel module includes: Media Streaming Channel Module Initialization 601: Create a negotiation module instance, call the connection start method of the negotiation module, determine whether local media stream data exists, and if local media stream data exists, call the connection start method of the negotiation module and pass in the local media stream data.
[0103] For example, create an instance of the Negotiator module and determine if a local media stream exists. If a local media stream exists, call the startConnection method of the Negotiator module, passing the local media stream as a parameter to start the media negotiation process.
[0104] Media stream sending processing logic 602: The media stream addition method is set up to send the acquired local media stream data to the target peer through the media stream channel, thereby realizing the real-time transmission of audio and video data.
[0105] For example, by setting the addStream method, the addStream method sends the acquired local media stream data to the target peer through the media stream channel via the stream event, thereby realizing the real-time transmission of audio and video data.
[0106] Call Response and Media Consultation 603: The `Answer` method is set to respond to the `call` event sent by the peer. The `Answer` method can optionally pass in local media stream data and call the `startConnection` method of the `Negotiator` module instance within the module to complete media negotiation. Only then is the media streaming channel established.
[0107] Media Stream Channel Module Signaling Processing 604: By configuring message processing methods, you can handle the signaling information returned by the signaling server. This signaling information includes session negotiation response information, etc.
[0108] For example, the `handleMessage` method can be used to process signaling returned by the signaling server, including Answer SDP, etc. The `negotiator.handleSDP` method of the Negotiator module can be used to call the `handleSDP` method. Through parsing and processing of signaling information, the status updates and coordination of each stage in the media stream channel establishment process can be achieved.
[0109] In one specific embodiment, taking the first peer as the initiator and the second peer as the receiver as an example, the data channel construction process is as follows: The first peer creates a Peer instance.
[0110] The first peer calls the `connect` method, passing in the ID of the second peer. The `connect` method is set in the `Peer` module. When the `connect` method is called with the ID of the second peer, the peer management module will coordinate resources to create a one-to-one connection with that peer. After execution, this method returns a data channel connection instance, namely a `DataConnection` object. Through this object, the system can establish a bidirectional data path with the peer, enabling reliable transmission of non-streaming data.
[0111] The connect method returns a DataConnection object for use by the first peer.
[0112] The second peer listens for the "connect" event and obtains a DataConnection object.
[0113] The first and second peers can listen to the "Data" event through the DataConnection object to obtain the data transmitted by the other party.
[0114] The first and second peers send data to each other using the send method of the DataConnection object.
[0115] The process for building a media streaming channel is as follows: The first peer creates a Peer instance; The first peer calls the `call` method, passing in the second peer's ID and local media stream data. The `call` method in the Peer module implements the media stream channel. When the `call` method is called with the target peer's identifier and local audio / video stream data, the peer management module creates a one-to-one communication connection with the target peer and returns a `MediaConnection` object corresponding to that connection. Through the `MediaConnection` object, the system can establish a real-time audio / video communication channel with the target peer.
[0116] The call method returns a MediaConnection object for use by the first peer.
[0117] The second peer obtains a MediaConnection object by listening for the "call" event.
[0118] The second peer calls the Answer method of the MediaConnection object to respond. When calling the Answer method, you can choose whether to pass in local media stream data.
[0119] The first and second peers can obtain the real-time media stream data from the other end by listening to the "stream" event through the MediaConnection object.
[0120] Example 2: A communication device, applied to a second peer, comprising: The signaling communication module is used for receiving and sending signaling information; The negotiation module is used to perform negotiation processing during the establishment of a communication connection; The channel management module is used to establish communication channels; The signaling communication module is configured as follows: Receive session negotiation proposal information sent by the first peer, which contains the public network reachable address of the first peer; The channel management module is configured as follows: Based on the publicly accessible address, a connectivity test is performed with the first peer to confirm the communication path and establish a communication channel.
[0121] In this embodiment, the communication device is applied to the second peer and includes a signaling communication module, a negotiation module, and a channel management module. The signaling communication module receives session negotiation proposal information sent by the first peer, which includes the public network reachable address of the first peer. By receiving the session negotiation proposal information, the second peer can obtain the public network reachable address of the first peer during the communication connection establishment phase, and use this public network reachable address as the target address to perform connectivity detection, confirm the communication path based on the connectivity detection, and establish a communication channel.
[0122] In one example, during the communication channel establishment phase, the channel management module generates corresponding candidate pairs based on the publicly accessible address and the reflected network address of the second peer determined during connectivity detection. After confirming the communication path based on the candidate pairs, a communication channel is established between the first and second peers. In this way, the second peer confirms the communication path and establishes the communication channel based on the publicly accessible address provided by the first peer. This allows the construction of the communication channel to be based on a clearly defined publicly accessible address, thereby reducing the reliance on multiple rounds of network negotiation and signaling interaction during communication establishment, shortening communication connection latency, and improving communication connection efficiency.
[0123] In one embodiment, the apparatus further includes a peer management module for coordinating the signaling communication module, the negotiation module, and the channel management module to perform the communication establishment process.
[0124] In one embodiment, the apparatus further includes a peer management module for maintaining a connection pool that records the mapping relationship between peer identifiers and peer connection objects.
[0125] In one implementation, the peer management module is further configured to: in response to a build instruction for a target peer identifier, return a data channel connection object or a media stream channel connection object through the channel management module.
[0126] In one implementation, the channel management module is further configured to: during the performance of connectivity detection, receive a detection response returned by the first peer carrying the reflected network address of the second peer, and determine the reflected network address based on the detection response.
[0127] In one implementation, the channel management module is further configured to construct candidate pairs by using publicly accessible addresses as host candidates and reflected network addresses as peer reflexive candidates (prflx).
[0128] In this implementation, when generating candidate pairs, the channel management module uses the public network reachable address of the first peer as a host candidate and the reflected network address obtained during connectivity detection as a reflection candidate. Based on the host and reflection candidates, the channel management module constructs corresponding candidate pairs for subsequent communication path confirmation and communication channel establishment. In this way, candidate pairs consist of known network address information, avoiding reliance on unknown or unobtained network address information to establish a communication channel.
[0129] Example 3: See Figure 7 A communication method, applied to a first peer, comprising: S701, when the first peer is the initiator of the communication and is identified as having a cloud-side deployment identifier, obtains the public network reachable address of the first peer.
[0130] S702 injects the publicly accessible address into the session negotiation proposal information and sends the session negotiation proposal information to the second peer.
[0131] In this step, the first peer sends a session negotiation proposal to the second peer via a signaling connection. The session negotiation proposal contains the public network reachable address of the first peer, enabling the second peer to perform connectivity checks using that address. The signaling connection is used to transmit signaling information between the first and second peers; the session negotiation proposal describes the basic parameters and candidate information of the communication session.
[0132] In the WebRTC protocol context, the session negotiation proposal information is the Offer SDP. When the negotiation module on the first peer generates the Offer SDP, it can identify that the first peer has a cloud-side deployment identifier, and inject its publicly accessible address as a host candidate in a predetermined format into the Offer SDP field. Subsequently, the signaling communication module uses a signaling connection established via the WebSocket protocol to send the Offer SDP with the injected address to the second peer.
[0133] After being sent to the second peer, the second peer can perform connectivity tests based on the publicly accessible address. In this step, the first peer can receive the session negotiation response information returned by the second peer, and the first peer receives the session negotiation response information returned by the second peer through the signaling connection.
[0134] In the WebRTC protocol context, connectivity detection manifests as ICE connectivity detection. Specifically, after resolving the Offer SDP, the second peer obtains the first peer's fixed public IP address (as a host candidate) and immediately sends a STUN Binding Request probe packet to that address. Upon receiving this probe packet, the first peer's underlying protocol stack identifies the second peer's publicly reachable address after NAT mapping, i.e., the reflected transport address, based on the packet's origin. At this point, both parties generate a mutually connected and legitimate candidate pair (second peer [prflx]: first peer [host]), thus confirming connectivity at the physical layer.
[0135] S703 establishes a communication channel between the first peer and the second peer based on the public network reachable address and the connectivity detection of the second peer.
[0136] In this step, the connectivity detection of the second peer refers to the connectivity detection performed by the second peer based on the publicly accessible address. This connectivity detection will include the source address of the second peer. The communication path is confirmed based on the source address and the publicly accessible address. Once the communication path is confirmed, the communication channel can be obtained.
[0137] In one implementation, the method further includes: Maintain a connection pool that records the mapping relationship between peer identifiers and peer connection objects.
[0138] In one implementation, the method further includes: responding to a build instruction for a target peer identifier and returning the corresponding data channel connection object or media stream channel connection object.
[0139] In response to the target peer identifier of a business call, the system retrieves and returns the corresponding data channel connection instance or media stream communication connection instance of the peer connection object from the connection pool. This ability to quickly locate and return the corresponding connection instance based on the peer identifier significantly improves the system's efficiency in handling concurrent connections, avoiding redundant negotiation and reducing communication establishment latency.
[0140] In one implementation, the session negotiation proposal information includes a session description protocol proposal message.
[0141] In one implementation, the publicly reachable address includes a fixed public address.
[0142] In one implementation, the method further includes: responding to a connectivity detection request sent by a second peer and sending back a detection response carrying the reflected network address of the second peer to the second peer.
[0143] In one implementation, the method further includes: The first peer is allowed to initiate the media stream communication establishment process only when it has a cloud-side deployment identifier.
[0144] In the WebRTC protocol context, the session negotiation response information is the Answer SDP. The first peer receives the Answer SDP via the signaling communication module and sets it in the PeerConnection object. At this point, based on the communication path confirmed by connectivity detection, the channel management module can activate either the DataChannel or the MediaStream Channel. This process requires no additional ICE Candidate signaling exchange, achieving extremely rapid connection establishment.
[0145] In one embodiment, the publicly reachable address includes a static public IP address. Unlike dynamically allocated or temporarily acquired internal addresses, this address is globally unique and directly accessible. By pre-storing it in the system's configuration module, the first peer can directly retrieve and use it when generating negotiation information without performing real-time network probing. The first peer is typically on the cloud side and has a statically allocated public IP address.
[0146] In one embodiment, the method further includes: adding a local media stream to a peer connection object in response to a received media stream transmission instruction. The first peer determines whether audio / video communication needs to be initiated based on the received service instruction. If the service instruction indicates the need to establish a media stream channel, the first peer associates the local audio / video data stream to be transmitted with the created peer connection object. This step aims to inject specific media content into the communication instance so that the subsequently generated negotiation information can include the corresponding media capability description. In the scenario where this application is applied to the WebRTC protocol, the operation of "adding a local audio / video stream" occurs before calling the createOffer interface to generate the Offer SDP. The locally obtained media track is added to the RTCPeerConnection instance by calling the addTrack or addStream methods.
[0147] Example 4: See Figure 8 This application provides a communication method applied to a second peer, including: S801, receive session negotiation proposal information sent by the first peer, the session negotiation proposal information containing the public network reachable address of the first peer.
[0148] S802, based on a publicly accessible address, performs connectivity checks with the first peer to confirm the communication path.
[0149] S803 establishes a communication channel based on the confirmed communication path.
[0150] In one embodiment, a publicly accessible address can be used as the target address to perform connectivity detection with the first peer. Based on the detection response from the first peer, a communication path is determined, and a communication channel is established based on the communication path. This reduces the reliance on multiple rounds of network negotiation and signaling interaction during communication establishment, thereby shortening the communication connection latency and improving communication connection efficiency.
[0151] In a WebRTC scenario, the second peer generates and sends an Answer SDP. At this point, no further network negotiation is needed; the channel status can be directly set to Connected. The channel management module then activates either DataChannel or MediaStream to enable real-time transmission of business data.
[0152] In one implementation, the method further includes maintaining a connection pool that records the mapping relationship between peer identifiers and peer connection objects.
[0153] In one implementation, the method further includes: responding to a build instruction for a target peer identifier and returning the corresponding data channel connection object or media stream channel connection object.
[0154] In one implementation, confirming the communication path includes: Receive the detection response returned by the first peer, which carries the reflected network address of the second peer; The communication path is confirmed based on the publicly accessible address and the reflected network address.
[0155] The reflected network address is the network address that the first peer identifies based on the message source when it receives a connectivity detection and returns to the second peer.
[0156] In one implementation, determining the communication path based on the publicly accessible address and the reflected network address includes: using the publicly accessible address as a host candidate and the reflected network address as a peer reflection candidate to determine the communication path.
[0157] In one implementation, the method further includes transmitting data streams and / or media streams through the communication channel after the communication channel is established.
[0158] In one implementation, the method further includes: Receive target proposal messages pushed by the signaling server; The target proposal message is obtained by the signaling server in response to the recognition of the second peer joining the operation, by pushing the proposal message published by the pre-identified cloud-side peer to the second peer.
[0159] In one implementation, the communication is based on the WebRTC protocol.
[0160] Example 5: A communication system includes: any of the communication devices in Embodiment 1, and any of the communication devices in Embodiment 2.
[0161] In one embodiment, the communication system further includes: The signaling server is used to push the pre-stored session negotiation proposal information of the first peer deployed on the cloud side to the second peer when the second peer, which is not deployed on the cloud side, joins.
[0162] Example 6: An exemplary embodiment of this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform a method according to an embodiment of this application.
[0163] Exemplary embodiments of this application also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.
[0164] refer to Figure 9 An exemplary embodiment of this application also provides a computer program product 900, including a computer program 901, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.
[0165] refer to Figure 10 The present invention describes a structural block diagram of an electronic device 1000 that can serve as a server or client of this application, which is an example of a hardware device that can correspond to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0166] Electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1002 or a computer program loaded into random access memory (RAM) 1003 from storage unit 1008. The RAM 1003 may also store various programs and data required for device operation. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. An input / output (I / O) interface 1005 is also connected to bus 1004.
[0167] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, output unit 1007, storage unit 1008, and communication unit 1009. Input unit 1006 can be any type of device capable of inputting information to electronic device 1000. Input unit 1006 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 1007 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1008 may include, but is not limited to, disk and optical disk. Communication unit 1009 allows electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0168] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above. For example, in some embodiments, the methods of the embodiments of this application can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. In some embodiments, the computing unit 1001 can be configured to perform the methods of the embodiments of this application by any other suitable means (e.g., by means of firmware).
[0169] The communication apparatus, method, electronic device, storage medium, and program product of this application inject the network address information of the first peer into the session negotiation proposal information generation stage, and complete the negotiation processing and communication channel construction of the two communicating parties based on the session negotiation proposal information. This reduces the dependence on multiple rounds of network negotiation and signaling interaction during the communication establishment process, thereby shortening the communication establishment delay and improving the communication connection efficiency.
[0170] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A communication apparatus, applied to a first peer, characterized in that, Comprising: a signaling communication module for receiving and sending signaling information; a negotiation module for performing negotiation processing in a communication connection establishment process; a channel management module for establishing a communication channel; wherein the negotiation module is configured to: when the first peer is a communication initiator and recognizes that it has a cloud-side deployment identifier, obtain a public network reachable address of the first peer, and inject the public network reachable address into session negotiation proposal information; the signaling communication module is configured to: send the session negotiation proposal information to a second peer; the channel management module is configured to: based on the public network reachable address and the connectivity detection of the second peer, establish a communication channel between the first peer and the second peer.
2. The communication apparatus according to claim 1, wherein The device further comprises: a peer management module for coordinating the signaling communication module, the negotiation module and the channel management module to perform a communication establishment process.
3. The communication apparatus according to claim 2, wherein The peer management module is configured to: in response to a construction instruction for a target peer identifier, return a corresponding data channel connection object or media stream channel connection object.
4. The communication apparatus according to claim 1, wherein The session negotiation proposal information includes a session description protocol proposal message.
5. The communication apparatus according to claim 1, wherein The public network reachable address is carried in a candidate item parameter field of the session negotiation proposal information.
6. The communication apparatus according to claim 1, wherein The public network reachable address includes a fixed public network address.
7. The communication apparatus according to claim 1, wherein The channel management module is further configured to: in response to a connectivity detection request sent by the second peer, and feedback a detection response carrying the second peer's reflection network address to the second peer.
8. The communication apparatus according to any one of claims 1-7, wherein The communication device is configured to: only when the first peer has the cloud-side deployment identifier, allow the first peer to initiate a media stream communication establishment process.
9. A communication apparatus applied to a second peer, characterized in that, Comprising: a signaling communication module for receiving and sending signaling information; a negotiation module for performing negotiation processing in a communication connection establishment process; a channel management module for establishing a communication channel; wherein the signaling communication module is configured to: receive session negotiation proposal information sent by a first peer, the session negotiation proposal information containing a public network reachable address of the first peer; the channel management module is configured to: based on the public network reachable address, perform connectivity detection with the first peer to confirm a communication path and establish a communication channel.
10. The communication apparatus according to claim 9, wherein The device further comprises: a peer management module for coordinating the signaling communication module, the negotiation module and the channel management module to perform a communication establishment process.
11. The communication apparatus according to claim 10, wherein The peer management module is further configured to: in response to a construction instruction for a target peer identifier, return a corresponding data channel connection object or media stream channel connection object.
12. The communication apparatus according to claim 9, wherein The channel management module is further configured to: in the process of performing connectivity detection, receive a detection response returned by the first peer and carrying the second peer's reflection network address, and determine the reflection network address according to the detection response.
13. The communication apparatus according to claim 12, wherein The channel management module is further configured to: construct a candidate pair by taking the public network reachable address as a host candidate and the reflection network address as a peer reflection candidate.
14. A communication method, comprising: Applied to a first peer, comprising: obtaining a public reachable address of the first peer when the first peer is a communication initiator and identifies that the first peer has the cloud-side deployment identifier; injecting the public reachable address into session negotiation proposal information, and sending the session negotiation proposal information to a second peer; establishing a communication channel between the first peer and the second peer based on the public reachable address and connectivity detection of the second peer.
15. The communication method according to claim 14, wherein, The method further comprises: maintaining a connection pool recording mapping relationship between a peer identifier and a peer connection object.
16. The communication method according to claim 15, wherein, The method further comprises: in response to a construction instruction for a target peer identifier, returning a corresponding data channel connection object or a media stream channel connection object.
17. The communication method of claim 14, wherein, The public reachable address comprises a fixed public address.
18. The communication method of claim 14, wherein, The method further comprises: responding to a connectivity detection request sent by the second peer, and feeding back a detection response carrying a reflective network address of the second peer to the second peer.
19. The communication method of claim 14, wherein, The method further comprises: only when the first peer has the cloud-side deployment identifier, allowing the first peer to initiate a media stream communication establishment process.
20. A method of communication, comprising: Applied to a second peer, comprising: receiving session negotiation proposal information sent by a first peer, the session negotiation proposal information containing a public reachable address of the first peer; based on the public reachable address, performing connectivity detection with the first peer to confirm a communication path; based on the confirmed communication path, establishing a communication channel.
21. The communication method according to claim 20, wherein, The confirmed communication path comprises: receiving a detection response returned by the first peer, the detection response carrying a reflective network address of the second peer; confirming a communication path according to the public reachable address and the reflective network address.
22. The communication method according to claim 21, wherein, The confirming a communication path according to the public reachable address and the reflective network address comprises: taking the public reachable address as a host candidate and taking the reflective network address as a peer reflective candidate to confirm the communication path.
23. A communication system, characterized by comprising: the communication device of any one of claims 1-8, and the communication device of any one of claims 9-13.
24. An electronic device, comprising a memory and a processor, wherein, The processor executes the computer program stored in the memory to implement the steps of the method of any one of claims 14 to 22.
25. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 14 to 22.
26. A computer program product, characterised in that, comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 14 to 22.