Communication connection method and device, computer equipment, storage medium and computer program product

By obtaining the operating status and call quality information of the media server and selecting the media server with the highest service quality to process call requests, it solves the problem of inaccurate matching of session requests in WebRTC and improves the quality and stability of media calls.

CN119652873APending Publication Date: 2025-03-18SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411619052.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In WebRTC technology, the session request matching between terminal A and terminal B is inaccurate, which may lead to communication interruption and affect the quality of media calls.

Method used

By obtaining the operating status information and call quality information of each media server from the distributed cache server, the reference service quality of each media server is determined, and the call request is sent to the media server with the highest reference service quality to establish a communication connection.

Benefits of technology

The quality of media calls is improved, the stability of communication and anti-interference ability is ensured, and higher reliability and flexibility are achieved through horizontal scaling of signaling servers and media servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652873A_ABST
    Figure CN119652873A_ABST
Patent Text Reader

Abstract

The invention relates to a communication connection method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a call request of a media call of a network socket of a session initiator, obtaining running state information and call quality information of each media server from a distributed cache server; determining the reference service quality of each media server based on the running state information and the call quality information; and sending the call request to a media server with the highest reference service quality so as to indicate the media server to establish communication connection between the session initiating end and the session answering end based on the candidate network address of the session initiating end and the network address of the session answering end. By adopting the method, the call quality of the media call can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication connection method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] WebRTC (Web Real-Time Communication) is a technology that can realize end-to-end audio and video call functions between browsers or between browsers and traditional communication terminals. In the specific implementation process, when terminal A wants to initiate communication, it generates a session request, which contains detailed information of the media session, such as media type, codec, and network parameters. Terminal A sends the session request to the WebRTC gateway, and the WebRTC gateway forwards the session request to terminal B. Terminal B parses the session request to generate session response information, and the session response information is forwarded to terminal A again through the WebRTC gateway. After that, both terminal A and terminal B generate candidate ICE information (Interactive Connecitity Establishment), where the ICE information contains possible network paths, and forwards the ICE information to each other through the WebRTC gateway. According to the forwarded ICE information, terminal A and terminal B establish a connection, and then communicate through streaming media.

[0003] In the related art, when a session request is received, the WebRTC gateway cannot be accurately matched, which may cause communication interruption. Summary of the invention

[0004] Based on this, it is necessary to provide a communication connection method, device, computer equipment, computer-readable storage medium and computer program product that can improve the quality of media calls in response to the above technical problems.

[0005] In a first aspect, the present application provides a communication connection method. The method comprises:

[0006] In response to a call request for a media call of a network socket of a session initiator, obtaining operation status information and call quality information of each media server in each media server from a distributed cache server; the media server belongs to the WebRTC gateway;

[0007] Determining a reference quality of service of each media server based on the operation status information and the call quality information;

[0008] The call request is sent to a media server with the highest reference service quality to instruct the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder.

[0009] In one of the embodiments, the running state information includes a plurality of sub-state information, and the call quality information includes a plurality of sub-quality information; and determining the reference service quality of each media server based on the running state information and the call quality information includes:

[0010] Acquire a first impact factor corresponding to each sub-state information in the running state information and a second impact factor corresponding to each sub-quality information in the call quality information;

[0011] Based on the first impact factor and the second impact factor, weighted sum is performed on each of the sub-state information and each of the sub-quality information to obtain a reference service quality of each media server.

[0012] In one of the embodiments, the sub-state information includes at least one of the following: processor type, memory usage, disk input and output size, network traffic;

[0013] And or, the sub-quality information includes at least one of the following:

[0014] Packet loss rate, network delay, and media type.

[0015] In one of the embodiments, after responding to the call request of the media call of the network socket sent by the session initiator, the method further includes:

[0016] Storing the call request in a distributed cache server;

[0017] After sending the call request to the target media server with the highest reference service quality, the method further includes:

[0018] When the media server meets the preset switching condition, obtaining the operation status information and call quality information of the remaining media servers except the media server from the distributed cache server;

[0019] Based on the operation status information and call quality information of the remaining media servers, determining a target media server with the highest reference service quality from the remaining media servers;

[0020] The call request is switched to the target media server.

[0021] In one of the embodiments, before the media server meets the preset condition, the method further includes:

[0022] Obtaining the operating status information and call quality information of the media server from the distributed cache server at regular intervals;

[0023] In a case where the running status information and / or the call quality information meets a preset condition, it is determined that the media server meets a preset switching condition.

[0024] In one embodiment, the responding to the call request of the media call of the session initiator includes:

[0025] Sending the running status information of the current signaling server to the distribution server to instruct the distribution server to determine the target signaling server with the highest service quality based on the running status information of each signaling server;

[0026] In a case where the target signaling server is the current signaling server, a call request for a media call from a session initiator forwarded by the forwarding server is received.

[0027] In one of the embodiments, the distribution server also periodically obtains the operating status information of each signaling server, determines the target signaling server whose operating status information does not meet the preset conditions, and transfers the call request of the target signaling server to the signaling server that meets the preset conditions.

[0028] In one of the embodiments, before instructing the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder, the method further includes:

[0029] The media server also obtains local operation status information and call quality information;

[0030] Determine whether the local operating status information and call quality information meet preset processable conditions.

[0031] In a second aspect, the present application also provides a communication connection device. The device comprises:

[0032] A first acquisition module, configured to obtain, in response to a call request for a media call of a network socket of a session initiator, operation status information and call quality information of each media server in each media server from a distributed cache server; the media server belongs to the WebRTC gateway;

[0033] A first determining module, configured to determine a reference service quality of each media server based on the running state information and the call quality information;

[0034] The connection module is used to send the call request to the media server with the highest reference service quality to instruct the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder.

[0035] In one embodiment, the running state information includes a plurality of sub-state information, and the call quality information includes a plurality of sub-quality information; and the first determining module is further configured to:

[0036] Acquire a first impact factor corresponding to each sub-state information in the running state information and a second impact factor corresponding to each sub-quality information in the call quality information;

[0037] Based on the first impact factor and the second impact factor, weighted sum is performed on each of the sub-state information and each of the sub-quality information to obtain a reference service quality of each media server.

[0038] In one of the embodiments, the sub-state information includes at least one of the following: processor type, memory usage, disk input and output size, network traffic;

[0039] And or, the sub-quality information includes at least one of the following:

[0040] Packet loss rate, network delay, and media type.

[0041] In one embodiment, the device further comprises:

[0042] A storage module, used for storing the call request in a distributed cache server;

[0043] A second acquisition module is used to acquire, from the distributed cache server, the operation status information and call quality information of the remaining media servers except the media server when the media server meets the preset switching condition;

[0044] A second determination module is used to determine a target media server with the highest reference service quality from the remaining media servers based on the operation status information and call quality information of the remaining media servers;

[0045] A switching module is used to switch the call request to the target media server.

[0046] In one embodiment, the second acquisition module is further used for:

[0047] Obtaining the operating status information and call quality information of the media server from the distributed cache server at regular intervals;

[0048] In a case where the running status information and / or the call quality information meets a preset condition, it is determined that the media server meets a preset switching condition.

[0049] In one embodiment, the first acquisition module is further used for:

[0050] Sending the running status information of the current signaling server to the distribution server to instruct the distribution server to determine the target signaling server with the highest service quality based on the running status information of each signaling server;

[0051] In a case where the target signaling server is the current signaling server, a call request for a media call from a session initiator forwarded by the forwarding server is received.

[0052] In one of the embodiments, the distribution server also periodically obtains the operating status information of each signaling server, determines the target signaling server whose operating status information does not meet the preset conditions, and transfers the call request of the target signaling server to the signaling server that meets the preset conditions.

[0053] In one of the embodiments, the media server further obtains local operation status information and call quality information; and determines whether the local operation status information and call quality information meet preset processable conditions.

[0054] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, an embodiment of the method described in any one of the embodiments of the present disclosure is implemented.

[0055] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, an embodiment of the method described in any one of the embodiments of the present disclosure is implemented.

[0056] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, an embodiment of the method described in any one of the embodiments of the present disclosure is implemented.

[0057] The above-mentioned communication connection method, device, computer equipment, storage medium and computer program product split the traditional WebRTC gateway function into a signaling server and a media server, wherein the signaling server is used to send a call request for a media call to the media server, and the media server is used to establish a communication connection between the session initiator and the session answerer based on the candidate network address of the session initiator and the network address of the session answerer. Compared with the traditional WebRTC gateway, the embodiment of the present disclosure disassembles its functions to different servers, and the functions implemented by the signaling server are no longer bundled with the functions implemented by the service, that is, in the embodiment of the present disclosure, the signaling server can select different media servers, which is conducive to the horizontal expansion of the signaling server and the media server. When one of the parties is interrupted, the server with the same function can be substituted to ensure the call quality. Furthermore, during the media session, the communication load pressure is more concentrated on the session connection, that is, the pressure of the communication load is on the media processing. Therefore, the embodiment of the present disclosure selects the media server with the highest reference service quality according to the running status information and call quality information of the media server, which can further improve the call quality of the current session. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 An application environment diagram of a communication connection method in an embodiment;

[0059] Figure 2 A schematic diagram of a flow chart of a communication connection method in one embodiment;

[0060] Figure 3 is a flow chart of a communication connection method in another embodiment;

[0061] Figure 4 A structural diagram of a WebRTC gateway in one embodiment;

[0062] Figure 5 A schematic diagram of a flow chart of a communication connection method in one embodiment;

[0063] Figure 6 is a structural block diagram of a communication connection device in one embodiment;

[0064] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0066] The communication connection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the session initiator 102 communicates with the distribution server 104 through the network, and the distribution server 104 forwards the call request of the media call sent by the session initiator 102 to the signaling server 112, and the signaling server forwards the call request to the media server 108, and the media server 108 forwards the call request to the session responder 106. The storage middleware can be the data that the signaling server 112 needs to process. The data storage system can be integrated on the server, or it can be placed on the cloud or other servers. Among them, the session initiator 102 and the session responder 106 can be but not limited to various desktop computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The distribution server 104, the signaling server 112, and the media server 108 can be implemented with independent servers or server clusters consisting of multiple servers.

[0067] In one embodiment, Figure 2 As shown, a communication connection method is provided, which is applied to Figure 1 Taking the session initiator 102 in the example as an example, the following steps are included:

[0068] Step S201, in response to a call request for a media call from a session initiator, obtaining operation status information and call quality information of each media server in each media server from a distributed cache server; the media server belongs to the WebRTC gateway.

[0069] Among them, media calls can include voice calls and video calls. Different from traditional text communications, the amount of voice data or video data transmitted in media calls is large and may be in different formats. The call request can be a hypertext transfer protocol request (Http) or a network socket request (WebSocket). Optionally, selecting a network socket request can reduce the number of connections and achieve the technical effect of multimedia long connection.

[0070] In the embodiment of the present disclosure, the media call request of the session initiator may be initiated based on the browser or application of the session initiator. The call request may include information such as SDP (Session Description Protocol) and address.

[0071] Among them, the distributed cache server can implement high-speed input and output technology in memory, reduce access to traditional databases, and improve the efficiency of data access. The distributed cache server can use Redis server, mongoDB server, etc. In one embodiment, the distributed cache server can store the running status information and call quality information of each media server in each media server. In addition, the distributed cache server can also store media call request, ICE address pair, SDP, etc. The distributed cache server shares data with each signaling server and each media server, realizing stateless service.

[0072] Step S203: determining a reference service quality of each media server based on the operation status information and the call quality information.

[0073] The operation status information may include at least one of the following: processor type, memory usage, disk input / output size, network traffic. The reference service quality may include at least one of the following: packet loss rate, network delay size, media type. The media type may include voice or video.

[0074] In an exemplary embodiment, a grading standard for reference service quality may be set. For example, if the processor type is A, the disk input / output rate is above threshold B, the network flow is higher than C, etc., it belongs to the first level of reference service quality; if the processor type is D, the disk input / output rate is above threshold E, the network flow is higher than F, etc., it belongs to the second level of reference service quality. In another exemplary embodiment, based on the operation status information of the media server and the corresponding weight, and the call quality information and the corresponding weight, the operation status information and the call quality information may be weighted and summed to obtain the reference service quality of the server.

[0075] Step S205: Send the call request to the media server with the highest reference service quality to instruct the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder.

[0076] In the disclosed embodiment, a media server with the highest reference service quality is selected from each media server. For example, a media server with the highest level of reference server quality is selected first. When the number of media servers with the highest level of reference service quality is large, a media server may be randomly selected. For another example, a media server with the highest reference service quality score may be selected based on a weighted sum score of the reference service quality.

[0077] The media server parses the SDP in the call request, collects candidate network addresses, port numbers, and protocols of the session initiator, and collects candidate network addresses, port numbers, and protocols of the session responder, where the network addresses, port numbers, and protocols can be referred to as ICE (Interactive Connectivity Establishment) information. ICE information is used to traverse NAT and firewalls. The media server sends the ICE information of the session initiator to the session responder, and the media server also sends the ICE information of the session responder to the session initiator. Both ends perform connection tests on the candidate network addresses to determine the optimal transmission network address. Based on the optimal network address, a communication connection is established between the session initiator and the session responder.

[0078] In the above communication connection method, the traditional WebRTC gateway function is split into a signaling server and a media server, wherein the signaling server is used to send a call request for a media call to the media server, and the media server is used to establish a communication connection between the session initiator and the session answerer based on the candidate network address of the session initiator and the network address of the session answerer. Compared with the traditional WebRTC gateway, the disclosed embodiment disassembles its functions to different servers, and the functions implemented by the signaling server are no longer bundled with the functions implemented by the service, that is, in the disclosed embodiment, the signaling server can select different media servers, which is conducive to the horizontal expansion of the signaling server and the media server. When one of the parties is interrupted, the server with the same function can be substituted to ensure the call quality. Furthermore, during the media session, the communication load pressure is more concentrated on the session connection, that is, the pressure of the communication load is on the media processing. Therefore, the disclosed embodiment selects the media server with the highest reference service quality according to the running status information and call quality information of the media server, which can further improve the call quality of the current session.

[0079] In one embodiment, the running state information includes a plurality of sub-state information, and the call quality information includes a plurality of sub-quality information; and determining the reference service quality of each media server based on the running state information and the call quality information includes:

[0080] Acquire a first impact factor corresponding to each sub-state information in the running state information and a second impact factor corresponding to each sub-quality information in the call quality information;

[0081] Based on the first impact factor and the second impact factor, weighted sum is performed on each of the sub-state information and each of the sub-quality information to obtain a reference service quality of each media server.

[0082] The operation status information includes a plurality of sub-status information, and the sub-status information may include at least one of the following: processor type, memory usage, disk input / output size, and network traffic. The call quality information includes a plurality of sub-quality information, and the sub-quality information may include at least one of the following: packet loss rate, network delay size, and media type. In an exemplary embodiment, k Indicates sub-state information or sub-quality information, C k represents the corresponding impact factor. It can be understood that when ρ k When representing sub-state information, the corresponding C k represents the first impact factor, when ρ k When representing sub-quality information, the corresponding C k Indicates the second influencing factor. In the specific implementation process, the reference service quality of the media server can be expressed as

[0083] The above embodiment performs weighted summation of the sub-state information and the sub-quality information according to the sub-state information in the running state information of the media server and the corresponding first influencing factor, and the sub-quality information in the call quality information and the corresponding second influencing factor. This can comprehensively consider the influence of each piece of information and the influence weight, and provide an accurate evaluation index for the media server, which is helpful for determining the media server with the better current service.

[0084] In one embodiment, after responding to the call request of the media call of the network socket sent by the session initiator, the method further includes:

[0085] The call request is stored in a distributed cache server.

[0086] Specifically, when the signaling server receives a call request for a media call, the call request may be stored in the distributed cache server.

[0087] After sending the call request to the target media server with the highest reference service quality, the method further includes:

[0088] Step S301, when the media server meets the preset switching condition, the operation status information and call quality information of the remaining media servers except the media server are obtained from the distributed cache server.

[0089] The preset switching condition may include when the running state and / or call quality of the media server do not meet the preset requirements, for example, a large network packet loss rate, a long network delay, a high memory usage rate, call interruption, etc. The running state information and call quality information of the media server other than the current media server may be obtained from the distributed cache server. For example, the corresponding relationship between the call request and the media server processing the call request may be stored in the distributed cache server, so as to facilitate the query of the media server that has not processed the current call request.

[0090] Step S303: determining a target media server with the highest reference service quality from the remaining media servers based on the operation status information and call quality information of the remaining media servers.

[0091] Specifically, the reference service quality of the media server can be determined by referring to the determination method of the reference service quality of the media server in the above embodiment. For example, the reference service quality level classification standard can be set. For example, if the processor type is A, the disk input and output rate is above the threshold value B, the network flow is higher than C, etc., it belongs to the first level of reference service quality; if the processor type is D, the disk input and output rate is above the threshold value E, the network flow is higher than F, etc., it belongs to the second level of reference service quality. In another exemplary embodiment, based on the operation status information of the media server and the corresponding weight, and the call quality information and the corresponding weight, the operation status information and the call quality information can be weighted and summed to obtain the reference service quality of the server.

[0092] Step S305: switching the call request to the target media server.

[0093] Specifically, the target media server parses the SDP in the call request, collects candidate network addresses, port numbers, and protocols of the session initiator, and collects candidate network addresses, port numbers, and protocols of the session responder, wherein the network addresses, port numbers, and protocols can be referred to as ICE (Interactive Connectivity Establishment) information. ICE information is used to traverse NAT and firewalls. The target media server sends the ICE information of the session initiator to the session responder, and the target media server also sends the ICE information of the session responder to the session initiator. Both ends perform connection tests on the candidate network addresses to determine the optimal transmission network address. Based on the new optimal network address, a communication connection is established between the session initiator and the session responder.

[0094] The above-mentioned embodiment can promptly transfer the call request to the target media server with the highest current reference service quality when the media server that has established a communication connection meets the switching conditions, such as service performance degradation or service interruption, thereby effectively avoiding or promptly restoring the media call and improving the disaster resistance of the media call.

[0095] In one embodiment, before the media server meets the preset condition, the method further includes:

[0096] The running status information and call quality information of the media server are obtained from the distributed cache server at regular intervals.

[0097] When the running status information and the call quality information meet preset conditions, it is determined that the media server meets preset switching conditions.

[0098] In the disclosed embodiment, the distributed cache server stores the running status information and call quality information of each media server, and continuously updates the running status information and call quality information of each media server. In an exemplary embodiment, the running status information and call quality information of the media server are obtained from the distributed cache server at regular intervals, and when the running status information and / or call quality information meet the preset conditions, it is determined that the media server meets the preset switching conditions. For example, the network packet loss rate is large, the network delay is long, the memory usage rate is high, the call is interrupted, etc.

[0099] In the above embodiment, by periodically acquiring the operating status information and call quality information of the media server and switching in time, the call quality degradation or even interruption caused by long calls on the media server can be reduced, thereby greatly improving the call quality.

[0100] In one embodiment, the responding to the call request of the media call of the session initiator includes:

[0101] The operation status information of the current signaling server is sent to the distribution server to instruct the distribution server to determine the target signaling server with the highest service quality based on the operation status information of each signaling server.

[0102] In a case where the target signaling server is the current signaling server, a call request for a media call from a session initiator forwarded by the forwarding server is received.

[0103] Among them, the running status information of the signaling server is similar to the running status information of the media server, and the running status information of the signaling server may include: processor type, memory usage, disk input and output size, network traffic, etc. In the embodiment of the present disclosure, the distribution server can obtain the running status information of each signaling server, and determine the target signaling server with the highest service quality based on the running status information of each signaling server. Specifically, the level classification standard of service quality can be set. For example, if the processor type is type A, the disk input and output rate is above the threshold B, the network traffic is higher than C, etc., it belongs to the first level of reference service quality; if the processor type is type D, the disk input and output rate is above the threshold E, the network traffic is higher than F, etc., it belongs to the second level of reference service quality. In another exemplary embodiment, based on the running status information of the signaling server and the corresponding weight, the running status information can be weighted and summed to obtain the service quality of the signaling server.

[0104] In an exemplary embodiment, if the target signaling server with the highest server quality is the current signaling server, the current signaling server receives the call request for the media call of the session initiator forwarded by the forwarding server.

[0105] In the disclosed embodiment, the signaling server is responsible for periodically obtaining the operating status information and call quality information of the media server, calculating the reference service quality of the media server, and switching the media server when the performance of the media server decreases or is interrupted. Therefore, a horizontally scalable signaling server is used, that is, multiple information servers with the above functions are set. By obtaining the operating status information of each signaling server, the target signaling server with the highest service quality is determined to complete the call forwarding, which is conducive to improving the call quality.

[0106] In one embodiment, the distribution server also periodically obtains the operating status information of each signaling server, determines the target signaling server whose operating status information does not meet the preset conditions, and transfers the call request of the target signaling server to the signaling server that meets the preset conditions.

[0107] Specifically, the operation status information does not meet the preset conditions to characterize call quality degradation or interruption, for example, a large network packet loss rate, a long network delay, a high memory usage rate, call interruption, etc. In the embodiment of the present disclosure, when the call quality of the signaling server is degraded or interrupted, the signaling server is forwarded to an information server that meets the preset conditions, which is conducive to ensuring call quality.

[0108] In one embodiment, before instructing the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder, the method further includes:

[0109] The media server also obtains local operation status information and call quality information;

[0110] Determine whether the local operating status information and call quality information meet preset processable conditions.

[0111] Specifically, the local operating status information and call quality information may be the current real-time operating status information and call quality information of the media server. In an exemplary embodiment, the operating status information and call quality information of each media server in the distributed cache server are updated regularly. The media server further confirms whether the media server can process the above call request by obtaining the local operating status information and call quality information, which is conducive to further ensuring the validity of the call.

[0112] In one embodiment, reference Figure 4 As shown, an architecture diagram of a WebRTC gateway is provided, wherein the WebRTC gateway includes two services: one is a signaling server, which is responsible for the access of WebRTC signaling and the management of media services, and the other is a media server, which is responsible for media processing.

[0113] The signaling server mainly includes the following modules: distributed storage module, WebRTC signaling processing module, media service load monitoring module, media service call quality monitoring module, dynamic switching module, and real-time computing module. The main functions of each module are introduced below.

[0114] Distributed storage module: puts data such as the addresses of the two communicating parties, SDP, ICE, server status, call quality and other information into storage middleware such as Redis, mongoDB, etc., and realizes stateless service through data sharing. WebRTC signaling processing module: responsible for WebRTC signaling access and processing, and forwards the signaling to the media service. Media service load monitoring module: obtains the server performance and load of each media service, and updates it in real time. Media service call quality monitoring module: obtains the media load of each media service and the media quality of the current communication, and updates it in real time. Dynamic switching module: when it is monitored that the media service performance is insufficient, the service is unavailable, etc., the call will be switched to other available media services in real time. Real-time calculation module: after receiving the call request, the best media service is calculated to handle the call based on information such as call quality, media service load, and media interaction type.

[0115] The media server mainly includes the following modules: distributed storage module, media processing module, server performance module, renegotiation module, call quality monitoring module, WebRTC interaction module. The following introduces the main functions of each module. Distributed storage module: puts data such as the addresses of both communicating parties, SDP, ICE, server status, call quality and other information into storage middleware such as Redis, mongoDB, etc., and data sharing realizes stateless service. Media processing module: responsible for media transmission and media encoding conversion. Server performance module: obtains the performance indicators of the current server such as CPU, memory, disk IO, network traffic and other information in real time, and puts them into the cache. Renegotiation module: responsible for renegotiating media encoding, media exchange address and port. Call quality monitoring module: real-time statistics of call packet loss rate, delay and other information, and calculates the call quality. WebRTC interaction module: WebRTC media encryption and decryption, STUN, ICE and other functions.

[0116] In one embodiment, reference Figure 5 As shown, a flowchart of a communication connection method is provided, and the method specifically includes: Step 1, start a call, send a call request through WebSocket, and the call request carries information such as SDP and address. Step 2, after the signaling service receives the request, it puts the call request into the distributed cache middleware. Step 3, the signaling service obtains the status of all media service servers from the distributed cache middleware, and returns call failure if there is no available media service. Otherwise, go to step 4. Step 4, the signaling service obtains the status of all media service servers and the call quality information from the distributed cache middleware. where ρ k and C kThey are server-related indicators and their respective proportions, as well as call quality-related indicators such as packet loss rate, latency, media type (voice, video) and their respective proportions. Step 5: The signaling service forwards the request to the media server with the highest score. Step 6: The media service receives the call request and determines whether it can be processed. If it cannot be processed, it notifies the signaling service and reallocates the call request to step 3. Otherwise, it proceeds to step 7. Step 7: The media service parses the SDP, collects the local IP address and port to prepare for the ICE interactive connection test. Step 8: The media service starts the ICE interactive connection test and selects the optimal transmission address pair. Step 9: The media service successfully establishes communication with the client and the call is successful. Step 10: If the call is over, clear the cache and release resources, otherwise the signaling service starts scheduled monitoring. Step 11: The signaling service periodically obtains the media service status and call quality information from the distributed cache middleware. By combining the media service status and call quality, it is determined whether the media server needs to be dynamically switched. If the media service needs to be switched, it proceeds to step 12, otherwise the scheduled task continues to execute. Step 12: The signaling service detects that the media service needs to be switched, obtains the media service status and server information that has not processed this call from the distributed cache middleware, calculates the best media service, obtains the call information from the distributed cache middleware, such as SDP, client address, etc., forwards it to the new media service, and goes to step 4. Step 13: The call ends, and the resources and cache are released.

[0117] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0118] Based on the same inventive concept, the embodiment of the present application also provides a communication connection device for implementing the communication connection method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more communication connection device embodiments provided below can refer to the limitations on the communication connection method above, and will not be repeated here.

[0119] In one embodiment, Figure 6As shown, a communication connection device 600 is provided, comprising:

[0120] A first acquisition module 601 is used to obtain the operation status information and call quality information of each media server in each media server from the distributed cache server in response to the call request of the media call of the network socket of the session initiator; the media server belongs to the WebRTC gateway;

[0121] A first determination module 603, configured to determine a reference service quality of each media server based on the operation status information and the call quality information;

[0122] The connection module 605 is used to send the call request to the media server with the highest reference service quality to instruct the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder.

[0123] In one embodiment, the running state information includes a plurality of sub-state information, and the call quality information includes a plurality of sub-quality information; and the first determining module is further configured to:

[0124] Acquire a first impact factor corresponding to each sub-state information in the running state information and a second impact factor corresponding to each sub-quality information in the call quality information;

[0125] Based on the first impact factor and the second impact factor, weighted sum is performed on each of the sub-state information and each of the sub-quality information to obtain a reference service quality of each media server.

[0126] In one of the embodiments, the sub-state information includes at least one of the following: processor type, memory usage, disk input and output size, network traffic;

[0127] And or, the sub-quality information includes at least one of the following:

[0128] Packet loss rate, network delay, and media type.

[0129] In one embodiment, the device further comprises:

[0130] A storage module, used for storing the call request in a distributed cache server;

[0131] A second acquisition module is used to acquire, from the distributed cache server, the operation status information and call quality information of the remaining media servers except the media server when the media server meets the preset switching condition;

[0132] A second determination module is used to determine a target media server with the highest reference service quality from the remaining media servers based on the operation status information and call quality information of the remaining media servers;

[0133] A switching module is used to switch the call request to the target media server.

[0134] In one embodiment, the second acquisition module is further used for:

[0135] Obtaining the running status information and call quality information of the media server from the distributed cache server at regular intervals;

[0136] In a case where the running status information and / or the call quality information meets a preset condition, it is determined that the media server meets a preset switching condition.

[0137] In one embodiment, the first acquisition module is further used for:

[0138] Sending the running status information of the current signaling server to the distribution server to instruct the distribution server to determine the target signaling server with the highest service quality based on the running status information of each signaling server;

[0139] In a case where the target signaling server is the current signaling server, a call request for a media call from a session initiator forwarded by the forwarding server is received.

[0140] In one of the embodiments, the distribution server also periodically obtains the operating status information of each signaling server, determines the target signaling server whose operating status information does not meet the preset conditions, and transfers the call request of the target signaling server to the signaling server that meets the preset conditions.

[0141] In one of the embodiments, the media server further obtains local operation status information and call quality information; and determines whether the local operation status information and call quality information meet preset processable conditions.

[0142] Each module in the above communication connection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0143] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store communication connection data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a communication connection method is implemented.

[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0145] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, 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 embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in 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, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0146] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0147] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A communication connection method, characterized in that: A signaling server applied to a WebRTC gateway, the method comprising: In response to a call request for a media call of a network socket of a session initiator, obtaining operation status information and call quality information of each media server in each media server from a distributed cache server; the media server belongs to the WebRTC gateway; Determining a reference quality of service of each media server based on the operation status information and the call quality information; The call request is sent to a media server with the highest reference service quality to instruct the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder.

2. The method according to claim 1, characterized in that The operation status information includes a plurality of sub-state information, and the call quality information includes a plurality of sub-quality information; and determining the reference service quality of each media server based on the operation status information and the call quality information includes: Acquire a first impact factor corresponding to each sub-state information in the running state information and a second impact factor corresponding to each sub-quality information in the call quality information; Based on the first impact factor and the second impact factor, weighted sum is performed on each of the sub-state information and each of the sub-quality information to obtain a reference service quality of each media server.

3. The method according to claim 2, characterized in that The sub-status information includes at least one of the following: processor type, memory usage, disk input and output size, and network traffic; And or, the sub-quality information includes at least one of the following: Packet loss rate, network delay, and media type.

4. The method according to claim 1, characterized in that: After responding to the call request of the media call of the network socket sent by the session initiator, the method further includes: Storing the call request in a distributed cache server; After sending the call request to the target media server with the highest reference service quality, the method further includes: When the media server meets the preset switching condition, obtaining the operation status information and call quality information of the remaining media servers except the media server from the distributed cache server; Determining a target media server with the highest reference service quality from the remaining media servers based on the operation status information and call quality information of the remaining media servers; The call request is switched to the target media server.

5. The method according to claim 4, characterized in that Before the media server meets the preset condition, the method further includes: Obtaining the running status information and call quality information of the media server from the distributed cache server at regular intervals; In a case where the running status information and / or the call quality information meets a preset condition, it is determined that the media server meets a preset switching condition.

6. The method according to claim 1, wherein the response to the call request of the media call of the session initiator comprises: Sending the running status information of the current signaling server to the distribution server to instruct the distribution server to determine the target signaling server with the highest service quality based on the running status information of each signaling server; In a case where the target signaling server is the current signaling server, a call request for a media call from a session initiator forwarded by the distribution server is received.

7. A communication connection device, characterized in that: The device comprises: A first acquisition module is used to obtain the operation status information and call quality information of each media server in each media server from the distributed cache server in response to the call request of the media call of the network socket of the session initiator; the media server belongs to the WebRTC gateway; A first determining module, configured to determine a reference service quality of each media server based on the running state information and the call quality information; The connection module is used to send the call request to the media server with the highest reference service quality to instruct the media server to establish a communication connection between the session initiator and the session responder based on the candidate network address of the session initiator and the network address of the session responder.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.