An interactive connection establishment method, system and electronic device based on ICE protocol

By adopting an interactive connection establishment method based on the ICE protocol, combined with the collaborative registration mechanism of STUN and SFU servers, and dynamically selecting paths, the high latency and resource imbalance problems in NAT traversal and broadcast scenarios are solved, realizing a highly reliable and low-latency end-to-end connection that supports the multi-scenario needs of real-time audio and video and IoT devices.

CN120835083BActive Publication Date: 2025-12-23HUNAN JINSHENGQIAN NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511324528.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-12-23
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

Existing technologies suffer from high latency, high cost, and uneven resource allocation in NAT traversal and broadcast scenarios. Traditional solutions require independent system deployment, leading to complex operation and maintenance, and cannot simultaneously meet the multi-scenario needs of real-time audio and video and IoT devices.

Method used

An interactive connection establishment method based on the ICE protocol is adopted. Through the collaborative registration mechanism of STUN server and SFU server, P2P direct connection or SFU trunk path is dynamically selected. Combined with multi-dimensional candidate optimization and intelligent path switching, load balancing and resource elastic scaling are achieved, and redundant signaling is reduced.

Benefits of technology

In complex network environments, it significantly improves connection performance, reduces invalid connectivity checks and signaling transmission overhead, shortens connection establishment time, provides highly reliable and low-latency end-to-end connections, and supports the multi-scenario needs of real-time audio and video and IoT devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835083B_ABST
    Figure CN120835083B_ABST
Patent Text Reader

Abstract

The application discloses an ICE protocol-based interactive connection establishment method and system and electronic equipment, and the method comprises the following steps: a client configures a STUN and a SFU server address to support ICE connection; the client initiates a request to a STUN server to obtain a local candidate and initiates a request to a SFU server to obtain a relay candidate, wherein the relay candidate is used as a peer candidate; the local candidate is encapsulated into an ICE candidate list, ICE candidate lists are exchanged between the client and a peer through a signaling server, and the relay candidate is added into a PeerConnection; two-way connectivity checking is initiated based on the candidate list; a preset timeout verification mechanism is used to preferentially establish a low-delay P2P direct connection, and when the low-delay P2P direct connection fails, the method is degraded to an SFU relay channel in stages. The seamless connection from an intranet to a cloud relay is realized, and high-reliability and low-delay end-to-end connection support is provided for network communication.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of network communication, in particular to an interactive connectivity establishment method, system and electronic device based on ICE (Interactive Connectivity Establishment) protocol, which is suitable for real-time audio and video communication, Internet of Things device penetration connection and other scenes requiring NAT (Network Address Translation) penetration. BACKGROUND

[0002] In the field of real-time streaming transmission, the existing technology mainly relies on the STUN (Session Traversal Utilities for NAT) / TURN (Traversal Using Relays around NAT) penetration mechanism based on the ICE protocol and the SFU (Selective Forwarding Unit) media server forwarding mode, but both have significant limitations: the STUN / TURN scheme realizes NAT penetration through a relay server, which can establish a P2P (Peer-to-Peer) direct connection channel, but the static resource allocation leads to uneven load of relay nodes and a sharp increase in bandwidth cost, and the penetration failure rate is high under strict symmetric NAT, and the redundant candidate check further prolongs the connection establishment time; the SFU scheme supports one-to-many broadcast scenarios, but forces the traffic to pass through the center server, sacrificing the direct connection low delay advantage in local area network or high-quality public network environment, increasing the end-to-end transmission delay, and the static expansion mechanism is difficult to cope with sudden traffic, and the live peak scene has a high stutter rate. The two technologies are fragmented, leading to a dilemma in practical application—penetration scenarios are forced to bear high delay and high cost to ensure connectivity, and broadcast scenarios give up direct connection efficiency to pursue scalability, and when Internet of Things devices need to support local area network control and wide area network backup at the same time, traditional solutions need to deploy two sets of systems independently, greatly increasing the complexity of operation and maintenance.

[0003] The industry urgently needs a fusion architecture that can dynamically select P2P direct connection or SFU relay path, realize intelligent load balancing and resource elastic expansion, and reduce redundant signaling through protocol layer optimization, so as to balance low delay, high reliability and low cost in complex network environment, and meet the differentiated transmission needs of real-time audio and video, industrial Internet of Things and other scenes. SUMMARY

[0004] To solve the above technical problems, the present application provides an interactive connectivity establishment method, system and electronic device based on the ICE protocol.

[0005] The technical scheme adopted by the present application to solve its technical problems is:

[0006] An ICE protocol-based interactive connection establishment method, the method comprising the following steps:

[0007] S100: The client configures the address and port of the STUN server and the SFU server required by the ICE protocol to support the ICE connection establishment;

[0008] S200: The client initiates a STUN request to the STUN server, and the STUN server responds to the STUN request to obtain the ICE srflx candidate address of the local end, requests a transmission channel from the SFU server, obtains the relay address and port for forwarding data, and notifies the SFU server of the transmission channel port of the two ends for binding by the signaling server, adds the transmission channel port to the data forwarding route of the SFU server, and temporarily stores the relay address and port of the opposite ICE in the local end as a peer;

[0009] S300: The client collects the local candidate information, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list to the opposite end through the signaling server; the opposite end collects its own candidate information through the STUN server, encapsulates the candidate information into an ICE candidate list, and returns the ICE candidate list to the client through the signaling server to form a bidirectional candidate list;

[0010] S400: After the client and the opposite end completely receive the candidate list of the other party, the relay address and port of the opposite ICE temporarily stored in the local end in S200 are added to the PeerConnection, and connectivity checking is initiated based on the candidate list;

[0011] S500: The client and the opposite end both need to verify whether a STUN response from the other party is received within a preset time, if the bidirectional response is successful, the P2P connection is established by selecting the candidate path with the highest priority; if any direction times out without response, the SFU server is triggered to intervene to establish an SFU relay transmission channel.

[0012] Preferably, the candidate information of the local end in S300 includes the client intranet address and port, i.e., the host candidate, and the public network exit address and port, i.e., the srflx candidate.

[0013] Preferably, the connectivity checking initiated based on the candidate list in S400 comprises:

[0014] The client and the opposite end send a STUN BindingRequest to the candidate address of the other party in the order of the priority of the candidate path, wherein the default order is the host candidate, the srflx candidate, and the relay candidate;

[0015] Both sides listen and respond to STUN requests from the other side, ensuring two-way path verification.

[0016] Preferably, S500 comprises:

[0017] If the client and the peer both receive the STUN response from the other side through a non-relay candidate within a preset time, mark the candidate pair as a valid path, and select the path with the highest priority to establish a P2P connection;

[0018] If either direction does not respond within a preset timeout, mark the candidate pair as failed, and try the next candidate in descending order of priority;

[0019] If all host and srflx candidates fail, try to establish a connection through a relay candidate, i.e., the client and the peer send a STUN Binding Request to the SFU server to establish an SFU relay channel;

[0020] The SFU server forwards media streams and handles packet retransmission and buffering in the case of NAT penetration failure.

[0021] Preferably, the address of the SFU server in S100 is dynamically assigned by the signaling server according to a load balancing strategy, and the allocation strategy includes: selecting the nearest SFU node based on geographical location; selecting the optimal node based on the current load of the server.

[0022] Preferably, in S300, the client performs the following filtering operations when encapsulating the candidate list: remove candidates that are not related to the current network environment; merge redundant candidates of the same type to reduce signaling transmission volume.

[0023] An interactive connection establishment system based on the ICE protocol, comprising a configuration module, a STUN request initiation module, a candidate list transmission module, a connectivity check module, and an interactive connection establishment module;

[0024] The configuration module configures the addresses and ports of the STUN server and the SFU server required by the ICE protocol to support ICE connection establishment;

[0025] The STUN request initiation module initiates a STUN request to the STUN server, and the STUN server responds to the STUN request to obtain the ICE srflx candidate address of the local end, requests a transmission channel from the SFU server, obtains the relay address and port for forwarding data, and temporarily saves them as the relay address and port of the peer ICE locally; wherein the signaling server is responsible for notifying the SFU server of the transmission channel ports of the client and the peer for binding, and adding them to the data forwarding route of the SFU server;

[0026] A candidate list transmission module, the client collects local candidate information, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list to the opposite end through a signaling server; the opposite end collects its own candidate information through a STUN server, encapsulates the candidate information into an ICE candidate list, and returns the ICE candidate list to the client through the signaling server, forming a bidirectional candidate list;

[0027] A connectivity checking module, after the client and the opposite end completely receive the candidate list of the other party, the relay address port of the ICE of the opposite end temporarily stored in the local is added to the PeerConnection, and connectivity checking is initiated based on the candidate list;

[0028] An interactive connection establishment module, the client and the opposite end both need to verify whether a STUN response from the other party is received within a preset time, if the bidirectional response is successful, a P2P connection is established by selecting a candidate path with the highest priority; if a response is not received in any direction within a timeout, an SFU server is triggered to intervene, and an SFU relay transmission channel is established.

[0029] An electronic device, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of an interactive connection establishment method based on an ICE protocol when executing the computer program.

[0030] A computer readable storage medium, having a computer program stored thereon, the computer program being executed by a processor to implement the steps of an interactive connection establishment method based on an ICE protocol.

[0031] The above-mentioned interactive connection establishment method, system and electronic device based on an ICE protocol effectively improve the connection performance in a complex network environment through dynamic resource allocation and intelligent decision mechanism. The method innovatively integrates the cooperative registration mechanism of the STUN server and the SFU server, realizes dynamic allocation and load balancing of relay nodes, significantly enhances the network penetration capability and resource utilization efficiency; adopts a multi-dimensional candidate optimization strategy, greatly reduces the invalid connectivity checking and signaling transmission overhead; through the parallel bidirectional path detection technology, the connection establishment time is significantly shortened and the real-time service continuity is guaranteed; a hierarchical connection guarantee system is established, a low-delay P2P direct connection path is preferentially established, and when there is a strict NAT restriction or network fluctuation, the system is quickly degraded to the optimal standby candidate or relay channel, forming seamless connection from the internal network to the cloud relay, fully solving the technical bottlenecks of the traditional scheme in candidate redundancy, resource rigidity and fault tolerance delay, while considering the scenarios that can be penetrated and the scenarios of streaming media broadcast, providing high-reliability, low-latency end-to-end connection support for real-time audio and video communication, Internet of Things device interconnection and other high-sensitivity services. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1A flow chart of an ICE protocol based interactive connection establishment method in an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the person skilled in the art better understand the technical solutions of the present application, the present application will be further described in detail below with reference to the drawings.

[0034] In one embodiment, as shown in Figure 1 An ICE protocol based interactive connection establishment method, the method comprising the following steps:

[0035] S100: The client configures the address and port of the STUN server and the SFU server required by the ICE protocol to support the ICE connection establishment;

[0036] S200: The client initiates a STUN request to the STUN server, and the STUN server responds to the STUN request to obtain the ICE srflx (Server Reflexive Candidate) candidate address of the local end, requests a transmission channel from the SFU server to obtain the relay (Relay Candidate) address and port for forwarding data, and temporarily stores the relay address and port of the peer ICE in the local end as the relay address and port of the peer ICE; wherein the signaling server is responsible for notifying the SFU server of the transmission channel port of the client and the peer to perform binding and adding to the data forwarding route of the SFU server;

[0037] S300: The client collects the local candidate information, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list to the peer through the signaling server; the peer collects the candidate information through the STUN server, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list back to the client through the signaling server to form a bidirectional candidate list;

[0038] S400: After the client and the peer completely receive the candidate list of the other party, the client and the peer add the relay address and port of the peer ICE temporarily stored in the local end in S200 to the PeerConnection peer-to-peer connection, initiate a connectivity check based on the candidate list, and perform a connectivity check based on the candidate list;

[0039] S500: The client and the peer both need to verify whether the STUN response from the other party is received within a preset time, if the bidirectional response is successful, a P2P connection is established by selecting the candidate path with the highest priority; if any direction times out without response, the standby candidate is tried in descending order of priority; if all P2P candidates fail, the SFU server is triggered to intervene to establish an SFU relay transmission channel.

[0040] The ICE protocol-based interactive connection establishment method provided by the application realizes significant improvement in NAT penetration efficiency, connection reliability and resource utilization through dynamic SFU resource allocation, multi-dimensional candidate optimization and intelligent path switching mechanism.

[0041] In one embodiment, the candidate information in S300 includes a client intranet address and port, i.e., a host candidate, and a public network exit address and port, i.e., a srflx candidate.

[0042] Specifically, the host candidate refers to a private IP address and port of a client local network interface, and the acquisition method is to directly read the address information of a local Socket binding through an operating system API (Application Programming Interface), and the applicable scenario is to directly connect devices in a unified local area network to realize zero-delay transmission; the srflx candidate refers to a public network exit mapping address and port obtained by a client through a STUN protocol, and the acquisition method is that the client sends a request to a STUN server, and the STUN server returns a field in a response packet, which is parsed as a public network address, and the applicable scenario is to penetrate a regular NAT device to establish a P2P public network direct connection.

[0043] In addition, the STUN Binding Request (STUN Binding Request) address and port of the SFU are used as the relay candidate type of all peers, and there is no need to exchange relay candidate addresses through signaling, and the ICE connectivity checking mechanism is directly used to automatically select the P2P and SFU modes. The applicable scenario is the ultimate backup path when the strict symmetric NAT penetration fails, and the connection reachability is ensured.

[0044] In one embodiment, S400 includes initiating connectivity checking based on the candidate list, including:

[0045] The client and the peer respectively send a STUN Binding Request to the candidate address of the other party in the order of candidate path priority, and the default order is host candidate, srflx candidate and relay candidate;

[0046] Both parties listen to and respond to the STUN request from the other party at the same time to ensure bidirectional path verification.

[0047] Specifically, the signaling transmission efficiency optimization effectively reduces invalid data transmission, the resource pre-binding reduces relay delay, the dynamic candidate management supports real-time network switching, the adaptive network environment changes, and the connection speed is adjusted and optimized.

[0048] In one embodiment, S500 includes:

[0049] If both the client and the peer receive the STUN response of the other party through the non-relay candidate within the preset time, mark the candidate pair as a valid path, and select the path with the highest priority to establish the P2P connection;

[0050] If any direction does not respond within the preset timeout, mark the candidate pair as a failure, and try the next candidate in descending order of priority;

[0051] If all host and srflx candidates fail, try to establish a connection through a relay candidate, that is, the client and the peer send a STUN Binding Request to the SFU server to establish an SFU relay channel;

[0052] The SFU server forwards the media stream and processes packet retransmission and buffering in the case of NAT penetration failure.

[0053] Specifically, P2P is used first, and in most scenarios, an end-to-end direct connection is established to save server bandwidth costs; when P2P fails, SFU relay is automatically switched, and SFU relay as a backup ensures the success rate of connection, which can ensure smooth media transmission.

[0054] In one embodiment, the preset timeout is specifically:

[0055] Timeout time = average network round-trip delay x 2 + redundancy value;

[0056] If the timeout is continuous, increase the retry interval according to the exponential backoff strategy.

[0057] Specifically, for example, when the average network round-trip delay is 150 ms, the timeout is 150 x 2 + 50 = 350 ms, adaptive timeout is used to avoid premature retry or invalid waiting caused by fixed timeout value; when the network is congested, the retry interval is automatically extended, such as 350 ms → 700 ms → 1400 ms, to reduce the risk of signaling storm.

[0058] In one embodiment, the address of the SFU server in S100 is dynamically allocated by the signaling server according to a load balancing strategy, and the allocation strategy includes: selecting the nearest SFU node based on geographical location; selecting the optimal node based on the current load of the server.

[0059] Specifically, the STUN server cooperates with the SFU server, the SFU node dynamically registers the STUN Binder address to the STUN server, and the STUN server dynamically allocates the optimal SFU node according to the geographical proximity (such as IP segment matching) and real-time load weight (such as CPU (Central Processing Unit, central processor) / bandwidth occupancy) when the client first connects. The average access delay of the client can be reduced, the load balancing and connection reliability can be effectively improved, and the resource utilization rate can be improved.

[0060] In one embodiment, the client performs the following filtering operations when encapsulating the candidate list in S300: removing candidates irrelevant to the current network environment; and merging redundant candidates of the same type to reduce signaling transmission.

[0061] Specifically, filtering redundant candidates can reduce signaling transmission, save bandwidth, and speed up processing.

[0062] The above-mentioned ICE protocol-based interactive connection establishment method effectively improves the connection performance in a complex network environment through dynamic resource allocation and intelligent decision-making mechanism. The method innovatively integrates the cooperative registration mechanism of the STUN server and the SFU server, realizes dynamic distribution of relay nodes and load balancing, significantly enhances the network penetration capability and resource utilization efficiency; adopts a multi-dimensional candidate optimization strategy, intelligently filters redundant addresses and pre-binds relay channels when collecting local candidates, greatly reduces invalid connectivity checking and signaling transmission overhead; through parallel bidirectional path detection and adaptive timeout control technology, the connection establishment time is significantly shortened and the real-time service continuity is guaranteed; a hierarchical connection guarantee system is established, the low-delay P2P direct connection path is preferentially established, and when strict NAT restriction or network fluctuation occurs, the optimal backup candidate or relay channel is quickly degraded, forming seamless connection from the internal network to the cloud relay, fully solving the technical bottlenecks of traditional solutions in candidate redundancy, resource rigidity and fault tolerance delay, while considering the scenarios that can be penetrated and the scenarios of streaming media broadcast, providing high-reliability, low-latency end-to-end connection support for real-time audio and video communication, Internet of Things device interconnection and other high-sensitivity services.

[0063] In one embodiment, an ICE protocol-based interactive connection establishment system is also provided, comprising a configuration module, a STUN request initiation module, a candidate list delivery module, a connectivity checking module and an interactive connection establishment module;

[0064] The configuration module configures the addresses and ports of the STUN server and the SFU server required by the ICE protocol, to support the ICE connection establishment;

[0065] The STUN request initiation module initiates a STUN request to a STUN server, and the STUN server responds to the STUN request, thereby obtaining an ICE srflx candidate address of the local end, requesting a transmission channel from the SFU server, obtaining a relay address and a port for forwarding data, and temporarily storing the relay address and the port of the opposite ICE in the local end; wherein the signaling server is responsible for notifying the SFU server of the transmission channel ports of the client and the opposite end for binding and adding to the data forwarding route of the SFU server;

[0066] The candidate list transmission module collects the local candidate information, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list to the opposite end through the signaling server; the opposite end collects its own candidate information through a STUN server, encapsulates the candidate information into an ICE candidate list, and returns the ICE candidate list to the client through the signaling server, thereby forming a bidirectional candidate list;

[0067] The connectivity checking module adds the relay address and the port of the opposite ICE temporarily stored in the local end to the PeerConnection after the client and the opposite end completely receive the candidate list of the other party, and initiates connectivity checking based on the candidate list;

[0068] The interactive connection establishment module verifies whether a STUN response from the other party is received within a preset time by the client and the opposite end, and if the bidirectional response is successful, a P2P connection is established by selecting a candidate path with the highest priority; if any direction times out without response, the SFU server is triggered to intervene to establish an SFU relay transmission channel.

[0069] Based on the ICE Restarts mechanism, the ICE candidate list is dynamically adjusted through signaling, and the dynamic switching of the P2P and SFU modes is realized by dynamically adding or removing srflx. The personnel change in the room can be dynamically adapted, and the performance burden of the encoding of the streaming end is reduced.

[0070] The specific limitation of the interactive connection establishment system based on the ICE protocol can refer to the limitation of the interactive connection establishment method based on the ICE protocol in the above, and will not be repeated here. Each module in the above interactive connection establishment system based on the ICE protocol can be realized by software, hardware, and a combination thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0071] An electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements steps of an ICE protocol based interactive connection establishment method when executing the computer program.

[0072] A computer readable storage medium stores a computer program, and the computer program implements steps of an ICE protocol based interactive connection establishment method when executed by a processor.

[0073] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of the method. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0074] The above provides a detailed description of an ICE protocol based interactive connection establishment method, system and electronic device. The principles and implementation of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the core idea of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of the present application, the present application can be improved and modified. These improvements and modifications also fall within the scope of the claims of the present application.

Claims

1. An interactive connection establishment method based on ICE protocol, characterized in that, The method comprises the following steps: S100: The client configures the address and port of the STUN server and the SFU server required by the ICE protocol to support ICE connection establishment; S200: The client initiates a STUN request to the STUN server, and the STUN server responds to the STUN request to obtain the ICE srflx candidate address of the local end, requests a transmission channel from the SFU server, obtains the relay address and port for forwarding data, and temporarily stores the relay address and port of the peer ICE in the local end; wherein the signaling server is responsible for notifying the SFU server of the transmission channel ports of the client and the peer, and adding them to the data forwarding route of the SFU server; S300: The client collects the local candidate information, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list to the peer through the signaling server; the peer collects its own candidate information through the STUN server, encapsulates the candidate information into an ICE candidate list, and returns the ICE candidate list to the client through the signaling server to form a bidirectional candidate list; S400: After the client and the peer completely receive the candidate list of the other party, the client adds the relay address and port of the peer ICE temporarily stored in the local end in S200 to the PeerConnection, initiates a connectivity check based on the candidate list, and initiates a connectivity check based on the candidate list; S500: The client and the peer both need to verify whether a STUN response from the other party is received within a preset time, and if the bidirectional response is successful, a P2P connection is established by selecting the candidate path with the highest priority; if any direction times out without responding, the SFU server is triggered to intervene to establish an SFU relay transmission channel.

2. The method of claim 1, wherein, The candidate information in S300 includes the client's intranet address and port, i.e., the host candidate, and the public network exit address and port, i.e., the srflx candidate.

3. The method of claim 2, wherein, In S400, the connectivity check based on the candidate list comprises: The client and the peer send a STUN BindingRequest to the candidate address of the other party in the order of the priority of the candidate path, wherein the default order is the host candidate, the srflx candidate, and the relay candidate; Both parties listen to and respond to the STUN request from the other party to ensure bidirectional path verification.

4. The method of claim 3, wherein, S500 comprises: If the client and the peer both receive the STUN response from the other party through a non-relay candidate within a preset time, the candidate pair is marked as a valid path, and a P2P connection is established by selecting the path with the highest priority; If any direction does not respond within a preset timeout, the candidate pair is marked as a failure, and the next candidate is tried in descending order of priority; If all host and srflx candidates fail, the relay candidate is tried to establish a connection, i.e., the client and the peer send a STUN Binding Request to the SFU server to establish an SFU relay channel; The SFU server forwards the media stream and processes the packet retransmission and buffering in the case of NAT penetration failure.

5. The method of claim 4, wherein, The address of the SFU server in S100 is dynamically allocated by the signaling server according to a load balancing strategy, and the allocation strategy includes: selecting the nearest SFU node based on geographical location; selecting the optimal node based on the current load of the server.

6. The method of claim 5, wherein, In S300, the client performs the following filtering operations when encapsulating the candidate list: removing candidates irrelevant to the current network environment; merging redundant candidates of the same type to reduce signaling transmission volume.

7. An interactive connection establishment system based on ICE protocol, characterized in that, The ICE protocol includes a configuration module, a STUN request initiation module, a candidate list transmission module, a connectivity check module, and an interactive connection establishment module. The configuration module configures the address and port of the STUN server and the SFU server required by the ICE protocol to support ICE connection establishment. The STUN request initiation module initiates a STUN request to the STUN server, and the STUN server responds to the STUN request to obtain the ICE srflx candidate address of the local end, requests a transmission channel from the SFU server, obtains the relay address and port for forwarding data, and temporarily stores the relay address and port of the opposite ICE in the local end; wherein the signaling server is responsible for notifying the SFU server of the transmission channel port of the client and the opposite end for binding and adding to the data forwarding route of the SFU server. The candidate list transmission module collects local candidate information, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list to the opposite end through the signaling server; the opposite end collects its own candidate information through the STUN server, encapsulates the candidate information into an ICE candidate list, and transmits the ICE candidate list back to the client through the signaling server to form a bidirectional candidate list. The connectivity check module adds the relay address and port of the opposite ICE temporarily stored in the local end to the PeerConnection after the client and the opposite end completely receive the candidate list of the other party, and initiates a connectivity check based on the candidate list. The interactive connection establishment module requires the client and the opposite end to verify whether a STUN response from the other party is received within a preset time, and if the bidirectional response is successful, a P2P connection is established by selecting the candidate path with the highest priority; if any direction times out without response, the SFU server is triggered to intervene to establish an SFU relay transmission channel. 8.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.

9. 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 1 to 6.

Citation Information

Patent Citations

  • Data transmission method and device, electronic equipment and storage medium

    CN114401114A

  • Omni channel customer care system and method

    US20180007204A1