Audio and video call network address selection method and system
By calculating the network channel quality and priority sorting of candidate addresses of audio and video calls and detecting network connectivity, the problem of low audio and video calls in the prior art is solved, and high-quality calls are achieved.
Patent Information
- Application Number
- CN202411990559.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-22
AI Technical Summary
In prior art, when selecting the network address for audio and video calls, the call quality may not be ideal.
By obtaining the candidate address of the client, calculating the network channel quality of the candidate address based on the network channel parameters, determining the priority order, and detecting the network connectivity between the candidate addresses to select the appropriate network address.
Improve the quality of audio and video calls and ensure that the selected network address can support high-quality calls.
Smart Images

Figure CN119865577A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio and video calls, and in particular to a method and system for selecting a network address for audio and video calls. Background Art
[0002] Before establishing a two-person audio and video call or a multi-person audio and video call in a video conference, it is necessary to calculate the candidate address priorities of the clients to be established for the audio and video call, and select appropriate network addresses based on the candidate address priorities to establish the audio and video call between the two clients.
[0003] The priority of a candidate address is usually calculated by considering the type of the candidate address. For example, a local address usually has a higher priority than a public address or a relay address. This value is fixed by the document based on the address type. Alternatively, if the client has multiple network interfaces or IP addresses, the local preference value can be further considered. The local preference value reflects the priority selection of these multiple IP addresses. The higher the value, the greater the priority. This value is fixed by the document.
[0004] However, when establishing an audio or video call between clients through the network address selected in the above manner, the call quality may be unsatisfactory. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method and device, system, medium, and product for selecting a network address for audio and video calls, so as to solve the problem of low quality of audio and video calls.
[0006] In order to solve the above technical problems, this specification is implemented as follows: In a first aspect, a method for selecting a network address for an audio or video call is provided, which is executed on a first client, and the method includes: Obtaining at least one first candidate address of the first client for audio and video calls; Determining the network channel quality of each of the at least one first candidate address based on the network channel parameter of each of the at least one first candidate address; Determining a priority ranking of the at least one first candidate address based on a network channel quality of the at least one first candidate address; The network connectivity between the at least one prioritized first candidate address and at least one second candidate address of a second client is detected respectively, wherein the second client is a peer client that establishes the audio and video call with the first client.
[0007] Optionally, determining the network channel quality of each of the at least one first candidate addresses based on the network channel parameter of each of the at least one first candidate addresses includes: The network channel quality of the target candidate address is determined based on the network channel parameters corresponding to the signal-to-noise ratio, delay, packet loss rate and jitter of the target candidate address, and the target candidate address is any one of the at least one first candidate address.
[0008] Optionally, the network channel quality of the target candidate address includes a transmission performance level coefficient of the network channel of the target candidate address. The determining of the network channel quality of the target candidate address based on the network channel parameters corresponding to the signal-to-noise ratio, delay, packet loss rate and jitter of the target candidate address includes: The transmission performance level coefficient of the network channel of the target candidate address is calculated by the following formula: R = Ro – Is – Id – Ie-eff + A Among them, R represents the transmission performance level coefficient of the network channel of the target candidate address, Ro represents the basic signal-to-noise ratio of the network channel of the target candidate address, Is represents the simultaneous damage coefficient of the packet loss rate corresponding to the network channel of the target candidate address, Id represents the delay damage coefficient corresponding to the delay of the network channel of the target candidate address, Ie-eff represents the device damage coefficient of the jitter corresponding to the network channel of the target candidate address, and A represents the preset benefit coefficient of the network channel of the target candidate address.
[0009] Optionally, determining the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address includes: Based on the order of the network channel quality of the at least one first candidate address from high to low, the priority ranking of the at least one first candidate address is determined, wherein the higher the network channel quality of the first candidate address is, the higher the corresponding priority is.
[0010] Optionally, the types of the first candidate address include a local candidate address and a public network candidate address of the first client, and when the network channel qualities are the same, the priority of the local candidate address is higher than the priority of the public network candidate address.
[0011] Optionally, the detecting of network connectivity between the at least one first candidate address after priority sorting and at least one second candidate address of the second client includes: Determining the priority ranking of at least one candidate address pair based on the at least one first candidate address and the at least one second candidate address after the priority ranking, wherein any candidate address pair of the at least one candidate address includes a first candidate address and a second candidate address; According to the priority ranking of at least one candidate address pair, the network connectivity between the first candidate address and the second candidate address included in any candidate address pair of at least one candidate address pair is detected respectively.
[0012] Optionally, before detecting the network connectivity between the at least one first candidate address after the priority sorting and at least one second candidate address of the second client, the method further includes: Obtaining the at least one second candidate address and the corresponding network channel quality used by the second client for the audio and video call; Based on the network channel quality of the at least one second candidate address, a priority ranking of the at least one second candidate address is determined.
[0013] Optionally, the at least one second candidate address of the second client is sorted according to network channel quality priority.
[0014] Optionally, the detecting of network connectivity between the at least one first candidate address after priority sorting and at least one second candidate address of the second client includes: Determining a priority ranking of at least one candidate address pair based on the priority ranking of the at least one first candidate address and the priority ranking of the at least one second candidate address, any candidate address pair of the at least one candidate address including a first candidate address and a second candidate address; According to the priority ranking of at least one candidate address pair, the network connectivity between the first candidate address and the second candidate address included in any candidate address pair of at least one candidate address pair is detected respectively.
[0015] Optionally, the step of respectively detecting the network connectivity between the first candidate address and the second candidate address included in any one of the at least one candidate address pair according to the priority order of the at least one candidate address pair comprises: Selecting a target candidate address pair according to the priority ranking of the at least one candidate address pair from high to low; Sending a connectivity check request to a second candidate address included in the target candidate address pair via a first candidate address included in the target candidate address pair; Upon receiving a response message returned by a server of the second candidate address included in the target candidate address pair in response to the connectivity check request, determining whether there is connectivity between the first candidate address and the second candidate address included in the target candidate address pair based on the response message; If it is determined based on the response message that the target candidate address pair does not have connectivity, return to the step of selecting the target candidate address pair in descending order of priority of the at least one candidate address pair until a target candidate address pair with connectivity is determined, so as to use the target candidate address pair to establish an audio and video call between the first client and the second client.
[0016] Optionally, the step of respectively detecting the network connectivity between the first candidate address and the second candidate address included in any one of the at least one candidate address pair according to the priority order of the at least one candidate address pair comprises: According to the priority order of the at least one candidate address pair from high to low, respectively check the connectivity between the first candidate address and the second candidate address included in the at least one candidate address pair to determine the candidate address pair with connectivity in the at least one candidate address pair; Based on the network channel quality of the candidate address pair with connectivity among the at least one candidate address pair, a target candidate address pair with connectivity is determined to establish an audio and video call between the first client and the second client using the target candidate address pair.
[0017] Optionally, the determining a target candidate address pair with connectivity based on a network channel quality of a candidate address pair with connectivity among the at least one candidate address pair comprises: Respectively calculating a weighted average of a network channel quality of a first candidate address and a network channel quality of a second candidate address of a candidate address pair having connectivity among the at least one candidate address pair; The candidate address pair corresponding to the highest weighted average value is determined as the target candidate address pair with connectivity.
[0018] Optionally, the determining a target candidate address pair with connectivity based on a network channel quality of a candidate address pair with connectivity among the at least one candidate address pair comprises: Sending a connectivity check request to a second candidate address of the current candidate address pair through a first candidate address of the current candidate address pair in descending order of priority; Upon receiving a response message returned by the server of the second candidate address of the current candidate address pair in response to the connectivity check request, determining whether there is connectivity between the first candidate address and the second candidate address included in the current candidate address pair based on the response message, and determining the duration between the current time and the start time of checking connectivity between the first candidate address and the second candidate address included in each candidate address pair; If the duration reaches a preset duration threshold, counting candidate address pairs that have been determined to have connectivity at the current moment; Based on the statistical network channel quality of the candidate address pairs with connectivity, a target candidate address pair with connectivity is determined.
[0019] Optionally, obtaining each first candidate address used by the first client for audio and video calls includes: collecting the local address of the first client to serve as a local candidate address of the first client; Sending a connection request to a target server, wherein the connection request carries the IP address and port information of the first client; Receiving the public network address or relay address of the first client returned by the target server in response to the connection request; The public network address or relay address of the first client is used as a candidate public network address of the first client.
[0020] Optionally, the obtaining the at least one second candidate address and the corresponding network channel quality used by the second client for the audio and video call includes: Sending a session description protocol SDP proposal to the second client, where the SDP proposal carries first candidate information of the first client, where the first candidate information carries at least one first candidate address of the first client and network channel quality corresponding to each first candidate address; receiving an SDP response returned by the second client in response to the SDP proposal, wherein the SDP response carries second candidate information of the second client, and the second candidate information carries at least one second candidate address of the second client and network channel quality corresponding to each second candidate address; The at least one second candidate address of the second client and the corresponding network channel quality are obtained by parsing the SDP response.
[0021] In a second aspect, a network address selection device for audio and video calls is provided, which is executed on a first client, and the device includes: An acquisition module, used to acquire at least one first candidate address used by the first client for audio and video calls; A first determination module, configured to determine the network channel quality of each of the at least one first candidate address based on the network channel parameter of each of the at least one first candidate address; A second determining module, configured to determine a priority ranking of the at least one first candidate address based on a network channel quality of the at least one first candidate address; The detection module is used to detect the network connectivity between the at least one first candidate address after priority sorting and at least one second candidate address of the second client, wherein the second client is the opposite client that establishes the audio and video call with the first client.
[0022] In a third aspect, a network address selection system for an audio or video call is provided, comprising a first client and a second client that establishes an audio or video call with the first client. The first client obtains at least one first candidate address used by the first client for audio and video calls; determines the network channel quality of the at least one first candidate address based on the network channel parameters of the at least one first candidate address; determines the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address; and detects the network connectivity between the at least one first candidate address after the priority ranking and at least one second candidate address of the second client; The second client obtains at least one second candidate address used by the second client for audio and video calls; determines the network channel quality of the at least one second candidate address based on the network channel parameters of the at least one second candidate address; determines the priority ranking of the at least one second candidate address based on the network channel quality of the at least one second candidate address; and respectively detects the network connectivity between the at least one second candidate address after priority ranking and at least one first candidate address of the first client.
[0023] Optionally, the network channel parameters of the target candidate address include signal-to-noise ratio, delay, packet loss rate and jitter, and the network channel quality includes a transmission performance level coefficient of the network channel of the target candidate address, and the transmission performance level coefficient of the network channel of the target candidate address is calculated by the following formula: R = Ro – Is – Id – Ie-eff + A Among them, R represents the transmission performance level coefficient of the network channel of the target candidate address, Ro represents the basic signal-to-noise ratio of the network channel of the target candidate address, Is represents the simultaneous damage coefficient of the packet loss rate corresponding to the network channel of the target candidate address, Id represents the delay damage coefficient corresponding to the delay of the network channel of the target candidate address, Ie-eff represents the device damage coefficient of the jitter corresponding to the network channel of the target candidate address, and A represents the preset benefit coefficient of the network channel.
[0024] In a fourth aspect, a computer-readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0025] In a fifth aspect, a computer program product is provided, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute the steps of the method described in the first aspect.
[0026] In an embodiment of the present application, a first client obtains at least one first candidate address used by the first client for audio and video calls; determines the network channel quality of each of the at least one first candidate addresses based on the network channel parameters of each of the at least one first candidate addresses; determines the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address; and detects the network connectivity between the at least one first candidate address after priority ranking and at least one second candidate address of a second client, wherein the second client is the opposite client that establishes the audio and video call with the first client, thereby selecting a suitable network address for the audio and video call to ensure that the established audio and video call has high call quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a flowchart of a method for selecting a network address for an audio or video call according to an embodiment of the present application.
[0028] Figure 2 It is a schematic diagram of the application scenario flow of the network address selection method for audio and video calls in an embodiment of the present application.
[0029] Figure 3 It is a structural block diagram of a network address selection device for audio and video calls according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. The numbering of the drawings in this application is only used to distinguish the various steps in the scheme, and is not used to limit the execution order of the various steps. The specific execution order is subject to the description in the specification.
[0031] In order to solve the problems existing in the prior art, the embodiment of the present application provides a method for selecting a network address for an audio and video call, which is executed on a first client. The first client is one of the clients performing a P2P audio and video call or an audio and video call of a multi-person video conference. Before establishing an audio and video call, it is necessary to select a network address for establishing a call with a client at the other end.
[0032] like Figure 1 As shown, the network address selection method for a video call in an embodiment of the present application includes the following steps 102 to 108.
[0033] Step 102: Obtain at least one first candidate address of the first client for audio and video calls.
[0034] The first candidate address is the address of the first client, including one or more addresses, which can be used as a candidate for establishing a call with the second client at the other end. The network address ultimately used to establish the video call is selected from these candidate addresses.
[0035] Optionally, the types of the first candidate address include a local candidate address and a public network candidate address of the first client.
[0036] The local candidate address is the local address of the first client. When the first client and the other client are both located in the same local area network, an audio and video call can be directly established through the local address. When the first client and the other client are not located in the same local area network, it is necessary to perform network address translation or act as a relay through the target server to establish an audio and video call through a public network address or relay address.
[0037] The method of obtaining the first candidate addresses used by the first client for audio and video calls includes: collecting the local addresses of the first clients as the local candidate addresses of the first clients; sending a connection request to a target server, wherein the connection request carries the IP address and port information of the first client; receiving the public network address or relay address of the first client returned by the target server in response to the connection request; and using the public network address or relay address of the first client as the public network candidate address of the first client.
[0038] The first client may have at least one local candidate address and at least one public network candidate address. The first client may select one from multiple local candidate addresses and public network candidate addresses to establish an audio or video call with a second client at the opposite end.
[0039] Step 104: Determine the network channel quality of each of the at least one first candidate address based on the network channel parameter of each of the at least one first candidate address.
[0040] Each candidate address has a corresponding network channel parameter, which is related to the network channel quality. Correspondingly, different candidate addresses have their own corresponding network channel quality.
[0041] Optionally, determining the network channel quality of each of the at least one first candidate address based on the network channel parameters of each of the at least one first candidate address includes: determining the network channel quality of the target candidate address based on the network channel parameters corresponding to the signal-to-noise ratio, delay, packet loss rate and jitter of the target candidate address, the target candidate address being any one of the at least one first candidate address.
[0042] The factors such as the packet loss rate, delay, jitter, and signal-to-noise ratio of the network channel are crucial to the quality of audio and video calls. The corresponding network channel quality can be obtained through the above network channel parameters of each candidate address. Using a candidate address of a high-quality network channel to establish an audio and video call with the peer client can improve the quality of the audio and video call compared to a candidate address of a low-quality network channel.
[0043] Optionally, the network channel quality of the target candidate address includes a transmission performance level coefficient of the network channel of the target candidate address, and the network channel parameters corresponding to the signal-to-noise ratio, delay, packet loss rate and jitter of the target candidate address are determined, including: calculating the transmission performance level coefficient of the network channel of the target candidate address by the following formula: R = Ro – Is – Id – Ie-eff + A Among them, R represents the transmission performance level coefficient of the network channel of the target candidate address, Ro represents the basic signal-to-noise ratio of the network channel of the target candidate address, Is represents the simultaneous damage coefficient of the packet loss rate corresponding to the network channel of the target candidate address, Id represents the delay damage coefficient corresponding to the delay of the network channel of the target candidate address, Ie-eff represents the device damage coefficient of the jitter corresponding to the network channel of the target candidate address, and A represents the preset benefit coefficient of the network channel of the target candidate address.
[0044] In the above embodiment, based on the network channel parameters of each first candidate address of the first client, the transmission performance level coefficient R of the corresponding network channel is calculated. The transmission performance level coefficient R of the network channel is used to characterize the quality of the network channel corresponding to the first candidate address.
[0045] Ro represents the basic signal-to-noise ratio of the network channel, Is is the simultaneous damage coefficient, which is related to the packet loss rate of the network channel of the candidate address; Id is the delay damage coefficient, which is related to the delay of the network channel of the candidate address; Ie-eff is the device damage coefficient, which is related to the jitter of the network channel of the candidate address; A is the benefit coefficient, which has a specific empirical value corresponding to different scenarios.
[0046] Step 106: Determine the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address.
[0047] Specifically, based on the network channel quality of the at least one first candidate address, determining the priority ranking of the at least one first candidate address includes: determining the priority ranking of the at least one first candidate address based on the order of the network channel quality of the at least one first candidate address from high to low, wherein the higher the network channel quality of the first candidate address, the higher the corresponding priority.
[0048] In the case where the types of the first candidate address include a local candidate address and a public network candidate address of the first client, optionally, when the network channel qualities are the same, the priority of the local candidate address is higher than the priority of the public network candidate address.
[0049] Step 108: Detect network connectivity between the at least one prioritized first candidate address and at least one second candidate address of a second client, wherein the second client is a peer client that establishes the audio and video call with the first client.
[0050] After obtaining the priority ranking of each first candidate address of the first client, the network connectivity between each first candidate address of the first client and the second candidate address of the opposite second client may be detected in sequence based on the priority ranking.
[0051] In one embodiment, the detecting of the network connectivity between the at least one first candidate address after priority sorting and at least one second candidate address of the second client comprises: determining the priority sorting of at least one candidate address pair based on the at least one first candidate address and the at least one second candidate address after priority sorting, wherein any one of the at least one candidate address pair comprises a first candidate address and a second candidate address; and detecting the network connectivity between the first candidate address and the second candidate address contained in any one of the at least one candidate address pair according to the priority sorting of the at least one candidate address pair.
[0052] In this embodiment, the first candidate address of the first client is prioritized based on the corresponding network channel quality, and the second candidate address of the second client may not be prioritized. Therefore, each prioritized first candidate address can be respectively combined with the second candidate address of the second client to form a candidate address pair, and the priority ranking of the candidate address pair is related to the priority ranking of the first candidate address. For example, the priority ranking of the candidate address pair composed of the first candidate address with the highest priority and each second candidate address is higher than the priority ranking of the candidate address pair composed of the first candidate address with the second highest priority and each second candidate address. Then, according to the priority ranking of the candidate address pair, the network connectivity between the first candidate address and the second candidate address contained in the candidate address pair is detected respectively. If there are multiple candidate address pairs with the same priority ranking, network connectivity detection can be performed randomly.
[0053] When performing a connectivity check, a connectivity check request is sent to the second candidate address of the second client in the current candidate address pair through the first candidate address of the first client in the current candidate address pair. And based on the response of the second client to the connectivity check request, it is determined whether there is connectivity between the first candidate address and the second candidate address included in the current candidate address pair. If there is connectivity, the current candidate address pair can be used to establish an audio and video call between the first client and the second client. If there is no connectivity, the next candidate address pair is selected in order of priority from high to low, and it is detected whether the next candidate address pair has connectivity. The above steps are looped until a candidate address pair is determined and used to establish an audio and video call between the first client and the second client. At this time, the selected candidate address pair can not only be used to establish an audio and video call, but also can ensure that the established audio and video call has high call quality.
[0054] Alternatively, when performing a connectivity check, all candidate address pairs are checked for connectivity in descending order of priority of the candidate address pairs, thereby determining all candidate address pairs with connectivity. Then, the network channel quality of the candidate address pairs with connectivity is used to determine the target candidate address pair and to establish an audio and video call between the first client and the second client.
[0055] Based on the weighted average of the network channel quality of the first candidate address and the network channel quality of the second candidate address included in the candidate address pair with connectivity, the network channel quality of each candidate address pair with connectivity is determined, and the candidate address pair with connectivity having the highest weighted average value is used to establish an audio and video call between the first client and the second client. At this time, the selected candidate address pair can not only be used to establish an audio and video call, but also ensure that the established audio and video call has high call quality.
[0056] In one embodiment, before detecting the network connectivity between the at least one first candidate address after priority sorting and the at least one second candidate address of the second client, it also includes: obtaining the at least one second candidate address and the corresponding network channel quality used by the second client for the audio and video call; and determining the priority sorting of the at least one second candidate address based on the network channel quality of the at least one second candidate address.
[0057] In this embodiment, the first candidate addresses of the first client are prioritized based on the corresponding network channel quality, and the first client obtains the second candidate addresses and the corresponding network channel quality from the second client, and prioritizes the second candidate addresses of the second client.
[0058] Optionally, obtaining the at least one second candidate address and the corresponding network channel quality used by the second client for the audio and video call includes: sending a session description protocol SDP proposal to the second client, the SDP proposal carrying the first candidate information of the first client, the first candidate information carrying the at least one first candidate address of the first client and the network channel quality corresponding to each first candidate address; receiving an SDP response returned by the second client in response to the SDP proposal, the SDP response carrying the second candidate information of the second client, the second candidate information carrying at least one second candidate address of the second client and the network channel quality corresponding to each second candidate address; and obtaining the at least one second candidate address and the corresponding network channel quality of the second client by parsing the SDP response.
[0059] Before establishing an audio or video call, the first client first needs to generate a Session Description Protocol (SDP) message to describe the desired session, which constitutes an SDP proposal (SDPoffer). The SDP proposal includes the IP address and port used by the first client to receive audio and video call media. The SDP proposal is transmitted to the second client on the other end. After receiving the SDP proposal, the second client may accept or reject it. In the former case, the second client generates an SDP message based on the received SDP proposal to describe the session it can accept. This is called an SDP answer. The SDP answer includes the IP address and port that the second client wishes to use to receive audio and video call media.
[0060] In this embodiment, the second client sends the second candidate address and the network channel quality corresponding to each second candidate address to the first client when agreeing to establish the audio and video call, so that the first client can sort the quality of the second candidate address, thereby determining the priority sorting of the candidate address pairs for connectivity detection. The first client can also send the first candidate address and the network channel quality corresponding to each first candidate address to the second client, so that the second client can sort the quality of the first candidate address of the first client when agreeing to establish the audio and video call, thereby determining the priority sorting of the candidate address pairs for connectivity detection.
[0061] Alternatively, in one embodiment, the first client does not actively send the first candidate addresses and the network channel qualities corresponding to each first candidate address to the second client, but after receiving the SDP proposal sent by the second client, the first client returns an SDP response to the second client in response to the SDP proposal, and the SDP response carries at least one first candidate address of the first client and the network channel qualities corresponding to each first candidate address, so that the second client can detect the network connectivity between the first candidate addresses of the first client based on the priority ranking of the network channel qualities of the first candidate addresses.
[0062] Alternatively, in one embodiment, the at least one second candidate address of the second client is prioritized according to network channel quality.
[0063] Further, for the above two embodiments, the detecting of the network connectivity between the at least one first candidate address after priority sorting and at least one second candidate address of the second client includes: determining the priority sorting of at least one candidate address pair based on the priority sorting of the at least one first candidate address and the priority sorting of the at least one second candidate address, wherein any one of the at least one candidate address pairs includes a first candidate address and a second candidate address; and detecting the network connectivity between the first candidate address and the second candidate address contained in any one of the at least one candidate address pair according to the priority sorting of the at least one candidate address pair.
[0064] That is to say, each priority-ranked first candidate address can be combined with each priority-ranked second candidate address to form a candidate address pair, and the priority ranking of the candidate address pair is related to the priority ranking of the first candidate address and the priority ranking of the second candidate address. For example, the candidate address pair composed of the first candidate address with the highest priority ranking and the second candidate address with the highest priority ranking has the highest priority ranking. Then, according to the priority ranking of the candidate address pair, the network connectivity between the first candidate address and the second candidate address contained in the candidate address pair is detected respectively.
[0065] Further, in one embodiment, the step of detecting the network connectivity between the first candidate address and the second candidate address included in any one of the at least one candidate address pair respectively according to the priority sorting of the at least one candidate address pair includes: selecting the target candidate address pair according to the priority sorting of the at least one candidate address pair from high to low; sending a connectivity check request to the second candidate address included in the target candidate address pair through the first candidate address included in the target candidate address pair; upon receiving a response message returned by the server of the second candidate address included in the target candidate address pair in response to the connectivity check request, determining whether there is connectivity between the first candidate address and the second candidate address included in the target candidate address pair based on the response message; if it is determined based on the response message that the target candidate address pair does not have connectivity, returning to the step of selecting the target candidate address pair according to the priority sorting of the at least one candidate address pair from high to low, until a target candidate address pair with connectivity is determined, so as to use the target candidate address pair to establish an audio and video call between the first client and the second client.
[0066] The target candidate address pair may be the candidate address pair with the highest priority when the connectivity check starts; or the candidate address pair with the middle priority after the connectivity check starts, and when the connectivity check is performed in descending order of priority, the connectivity check of the candidate address pair with the previous higher priority was unsuccessful.
[0067] When performing a connectivity check, a connectivity check request is sent to a second candidate address of a second client in the current candidate address pair through the first candidate address of the first client in the current candidate address pair, and based on the response of the second client to the connectivity check request, it is determined whether there is connectivity between the first candidate address and the second candidate address included in the current candidate address pair.
[0068] If there is connectivity, the current candidate address pair can be used to establish an audio and video call between the first client and the second client. If there is no connectivity, the next candidate address pair is selected in order of priority from high to low, and whether the next candidate address pair has connectivity is detected. The above steps are looped until a candidate address pair is determined and used to establish an audio and video call between the first client and the second client. At this point, the selected candidate address pair can not only be used to establish an audio and video call, but also ensure that the established audio and video call has high call quality.
[0069] In another embodiment, the detecting the network connectivity between the first candidate address and the second candidate address included in any one of the at least one candidate address pair respectively according to the priority sorting of the at least one candidate address pair comprises: checking the connectivity between the first candidate address and the second candidate address included in the at least one candidate address pair respectively according to the priority sorting of the at least one candidate address pair from high to low to determine the candidate address pair with connectivity in the at least one candidate address pair; determining the target candidate address pair with connectivity based on the network channel quality of the candidate address pair with connectivity in the at least one candidate address pair to establish an audio and video call between the first client and the second client using the target candidate address pair.
[0070] In this embodiment, all candidate address pairs are checked for connectivity in descending order of priority of the candidate address pairs, thereby determining all candidate address pairs with connectivity. Then, the network channel quality of the candidate address pairs with connectivity is used to determine the target candidate address pair and to establish an audio and video call between the first client and the second client.
[0071] If there are multiple candidate address pairs with connectivity, the network channel quality of the first candidate address included in each candidate address pair may be different from the network channel quality of the second candidate address. Therefore, a better candidate address pair can be selected based on the network channel quality.
[0072] In one embodiment, the method of determining a target candidate address pair with connectivity based on the network channel quality of the candidate address pair with connectivity among the at least one candidate address pair comprises: respectively calculating the weighted averages of the network channel quality of the first candidate address and the network channel quality of the second candidate address of the candidate address pair with connectivity among the at least one candidate address pair; and determining the candidate address pair corresponding to the highest weighted average as the target candidate address pair with connectivity.
[0073] In this embodiment, based on the weighted average of the network channel quality of the first candidate address and the network channel quality of the second candidate address included in the candidate address pair with connectivity, the network channel quality of each candidate address pair with connectivity is determined, and the candidate address pair with connectivity having the highest weighted average value is used to establish an audio and video call between the first client and the second client. At this time, the selected candidate address pair can not only be used to establish an audio and video call, but also ensure that the established audio and video call has high call quality.
[0074] Further, in one embodiment, the determining of a target candidate address pair with connectivity based on the network channel quality of a candidate address pair with connectivity among the at least one candidate address pair comprises: sending a connectivity check request to the second candidate address of the current candidate address pair through the first candidate address of the current candidate address pair in order of priority from high to low; upon receiving a response message returned by the server of the second candidate address of the current candidate address pair in response to the connectivity check request, determining whether there is connectivity between the first candidate address and the second candidate address included in the current candidate address pair based on the response message, and determining the duration between the current moment and the start moment of checking the connectivity between the first candidate address and the second candidate address included in each candidate address pair; if the duration reaches a preset duration threshold, counting the candidate address pairs that have been determined to have connectivity at the current moment; and determining the target candidate address pair with connectivity based on the counted network channel quality of the candidate address pairs with connectivity.
[0075] In this embodiment, the priority ranking of the candidate address pairs is ranked from high to low, and connectivity checks are performed on the candidate address pairs in the priority ranking within a preset waiting time, i.e., a preset time threshold. The waiting time is calculated from the moment when the connectivity check request is sent at the start of the connectivity check. At the current moment when the first client receives a response message to the connectivity check request, if the calculated waiting time reaches the preset time threshold, connectivity checks for the next candidate address pair according to the priority ranking of the candidate address pairs are stopped. Statistics are collected on the candidate address pairs that have been determined to have connectivity, and based on the network channel quality of the statistically connected candidate address pairs, the target candidate address pair is determined and used to establish an audio and video call between the first client and the second client.
[0076] Next, combine Figure 2 , describes the application scenario process of the network address selection method for audio and video calls in the embodiment of the present application. Figure 2 As shown, the following steps are included: Step 1, the first client 1200 collects local candidate addresses and calculates the network channel quality of each local candidate address; Step 2: The first client 1200 sends a connection request to the target server 1600 to request to obtain the public IP and port of the first client 1200, that is, the public address; Step 3: The target server 1600 returns a response carrying a public network candidate address; Step 4, the first client 1200 collects public network candidates and calculates the network channel quality of each public network candidate address; Step 5: The first client 1200 sends an SDP proposal carrying the first client candidate address and network channel quality to the second client 1400; Step 6: The second client 1400 parses the SDP proposal to obtain candidate addresses and network channel quality of the first client; Step 7: The second client 1400 transmits an SDP response carrying the candidate address of the second client and the network channel quality back to the first client 1200; Step 8: The first client 1200 parses the SDP response to obtain the second client candidate address and network channel quality; Step 9: The first client 1200 prioritizes the candidate address pairs consisting of the first client 1200 candidate address and the second client candidate address based on the network channel quality; Step 10: The first client 1200 sends a connectivity detection request to the target server 1600 according to the priority order; Step 11: The first client 1200 determines whether the detected address pair is connected according to the response returned by the target server 1600; Step 12: The first client 1200 selects a target candidate address pair with connectivity and establishes an audio and video call between the first client 1200 and the second client 1400 according to the methods described in the above different embodiments.
[0077] In an embodiment of the present application, a first client obtains at least one first candidate address used by the first client for audio and video calls; determines the network channel quality of each of the at least one first candidate addresses based on the network channel parameters of each of the at least one first candidate addresses; determines the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address; and detects the network connectivity between the at least one first candidate address after priority ranking and at least one second candidate address of a second client, wherein the second client is the opposite client that establishes the audio and video call with the first client, thereby selecting a suitable network address for the audio and video call to ensure that the established audio and video call has high call quality.
[0078] Optionally, an embodiment of the present application further provides a network address selection device for an audio or video call, which is executed on a first client, and the device includes: An acquisition module, used to acquire at least one first candidate address used by the first client for audio and video calls; A first determination module, configured to determine the network channel quality of each of the at least one first candidate address based on the network channel parameter of each of the at least one first candidate address; A second determining module, configured to determine a priority ranking of the at least one first candidate address based on a network channel quality of the at least one first candidate address; The detection module is used to detect the network connectivity between the at least one first candidate address after priority sorting and at least one second candidate address of the second client, wherein the second client is the opposite client that establishes the audio and video call with the first client.
[0079] Alternatively, if Figure 2 As shown, an embodiment of the present application also provides a network address selection system for audio and video calls, including a first client 1200 and a second client 1400 that establishes an audio and video call with the first client 1200, wherein the first client 1200 obtains at least one first candidate address used by the first client 1200 for the audio and video call; determines the network channel quality of the at least one first candidate address based on the network channel parameters of the at least one first candidate address; determines the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address; and detects the network connectivity between the at least one first candidate address after priority ranking and at least one second candidate address of the second client 1400.
[0080] Optionally, the second client 1400 obtains at least one second candidate address used by the second client 1400 for audio and video calls; determines the network channel quality of the at least one second candidate address based on the network channel parameters of the at least one second candidate address; determines the priority ranking of the at least one second candidate address based on the network channel quality of the at least one second candidate address; and respectively detects the network connectivity between the at least one second candidate address after priority ranking and at least one first candidate address of the first client 1200.
[0081] Optionally, the network channel parameters of the target candidate address include signal-to-noise ratio, delay, packet loss rate and jitter, and the network channel quality includes a transmission performance level coefficient of the network channel of the target candidate address, and the transmission performance level coefficient of the network channel of the target candidate address is calculated by the following formula: R = Ro – Is – Id – Ie-eff + A Among them, R represents the transmission performance level coefficient of the network channel of the target candidate address, Ro represents the basic signal-to-noise ratio of the network channel of the target candidate address, Is represents the simultaneous damage coefficient of the packet loss rate corresponding to the network channel of the target candidate address, Id represents the delay damage coefficient corresponding to the delay of the network channel of the target candidate address, Ie-eff represents the device damage coefficient of the jitter corresponding to the network channel of the target candidate address, and A represents the preset benefit coefficient of the network channel.
[0082] In this embodiment, the first client and / or the second client can select a suitable network address for the audio and video call to ensure that the established audio and video call has high call quality.
[0083] Alternatively, if Figure 3 As shown, an embodiment of the present application also provides a network address selection device 2000 for audio and video calls, including a processor 2400 and a memory 2200, and the memory 2200 stores a program or instruction that can be run on the processor 2400. When the program or instruction is executed by the processor 2400, the various steps of the above-mentioned network address selection method embodiment for audio and video calls are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0084] The embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of any of the above-mentioned embodiments of the method for selecting a network address for an audio or video call is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0085] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program can be operated to enable a computer to implement the various processes of any of the above-mentioned network address selection method embodiments for audio and video calls when executed, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0086] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0088] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for selecting a network address for an audio or video call, characterized in that: Executed on a first client, the method includes: Obtaining at least one first candidate address of the first client for audio and video calls; Determining the network channel quality of each of the at least one first candidate address based on the network channel parameter of each of the at least one first candidate address; Determining a priority ranking of the at least one first candidate address based on a network channel quality of the at least one first candidate address; The network connectivity between the at least one prioritized first candidate address and at least one second candidate address of a second client is detected respectively, wherein the second client is a peer client that establishes the audio and video call with the first client.
2. The method according to claim 1, characterized in that: The determining, based on the network channel parameter of each of the at least one first candidate addresses, the network channel quality of each of the at least one first candidate addresses comprises: The network channel quality of the target candidate address is determined based on the network channel parameters corresponding to the signal-to-noise ratio, delay, packet loss rate and jitter of the target candidate address, and the target candidate address is any one of the at least one first candidate address.
3. The method according to claim 2, characterized in that The network channel quality of the target candidate address includes a transmission performance level coefficient of the network channel of the target candidate address. The determining of the network channel quality of the target candidate address based on the network channel parameters corresponding to the signal-to-noise ratio, delay, packet loss rate and jitter of the target candidate address includes: The transmission performance level coefficient of the network channel of the target candidate address is calculated by the following formula: R = Ro – Is – Id – Ie-eff + A Among them, R represents the transmission performance level coefficient of the network channel of the target candidate address, Ro represents the basic signal-to-noise ratio of the network channel of the target candidate address, Is represents the simultaneous damage coefficient of the packet loss rate corresponding to the network channel of the target candidate address, Id represents the delay damage coefficient corresponding to the delay of the network channel of the target candidate address, Ie-eff represents the device damage coefficient of the jitter corresponding to the network channel of the target candidate address, and A represents the preset benefit coefficient of the network channel of the target candidate address.
4. The method according to claim 1, characterized in that: The determining the priority ranking of the at least one first candidate address based on the network channel quality of the at least one first candidate address comprises: Based on the order of the network channel quality of the at least one first candidate address from high to low, the priority ranking of the at least one first candidate address is determined, wherein the higher the network channel quality of the first candidate address is, the higher the corresponding priority is.
5. The method according to claim 4, characterized in that The types of the first candidate address include a local candidate address and a public network candidate address of the first client. When the network channel qualities are the same, the priority of the local candidate address is higher than the priority of the public network candidate address.
6. The method according to claim 4 or 5, characterized in that: The detecting of the network connectivity between the at least one first candidate address after the priority sorting and at least one second candidate address of the second client includes: Determining the priority ranking of at least one candidate address pair based on the at least one first candidate address and the at least one second candidate address after the priority ranking, wherein any candidate address pair of the at least one candidate address includes a first candidate address and a second candidate address; According to the priority ranking of at least one candidate address pair, the network connectivity between the first candidate address and the second candidate address included in any candidate address pair of at least one candidate address pair is detected respectively.
7. The method according to claim 1, characterized in that Before detecting the network connectivity between the at least one first candidate address after the priority sorting and at least one second candidate address of the second client, the method further includes: Obtaining the at least one second candidate address and the corresponding network channel quality used by the second client for the audio and video call; Based on the network channel quality of the at least one second candidate address, a priority ranking of the at least one second candidate address is determined.
8. The method according to claim 1, characterized in that The at least one second candidate address of the second client is sorted according to network channel quality priority.
9. The method according to claim 7 or 8, characterized in that: The detecting of the network connectivity between the at least one first candidate address after the priority sorting and at least one second candidate address of the second client includes: Determining a priority ranking of at least one candidate address pair based on the priority ranking of the at least one first candidate address and the priority ranking of the at least one second candidate address, any candidate address pair of the at least one candidate address including a first candidate address and a second candidate address; According to the priority ranking of at least one candidate address pair, the network connectivity between the first candidate address and the second candidate address included in any candidate address pair of at least one candidate address pair is detected respectively.
10. The method according to claim 9, characterized in that The step of detecting the network connectivity between the first candidate address and the second candidate address contained in any one of the at least one candidate address pair according to the priority order of the at least one candidate address pair comprises: Selecting a target candidate address pair according to the priority ranking of the at least one candidate address pair from high to low; Sending a connectivity check request to a second candidate address included in the target candidate address pair via a first candidate address included in the target candidate address pair; Upon receiving a response message returned by a server of the second candidate address included in the target candidate address pair in response to the connectivity check request, determining whether there is connectivity between the first candidate address and the second candidate address included in the target candidate address pair based on the response message; If it is determined based on the response message that the target candidate address pair does not have connectivity, return to the step of selecting the target candidate address pair in descending order of priority of the at least one candidate address pair until a target candidate address pair with connectivity is determined, so as to use the target candidate address pair to establish an audio and video call between the first client and the second client.
11. A network address selection system for audio and video calls, characterized in that: comprising a first client and a second client establishing an audio or video call with the first client, The first client obtains at least one first candidate address used by the first client for audio and video calls; and determines the network channel quality of the at least one first candidate address based on the network channel parameters of the at least one first candidate address; Determining a priority ranking of the at least one first candidate address based on a network channel quality of the at least one first candidate address; respectively detecting the network connectivity between the at least one first candidate address after the priority sorting and at least one second candidate address of the second client; The second client obtains at least one second candidate address used by the second client for audio and video calls; based on the network channel parameters of the at least one second candidate address, determines the network channel quality of the at least one second candidate address; based on the network channel quality of the at least one second candidate address, determines the priority ranking of the at least one second candidate address; The network connectivity between the at least one prioritized second candidate address and the at least one first candidate address of the first client is detected respectively.
Citation Information
Patent Citations
Method, device and system for establishing network address translation (NAT) traversal path of peer-to-peer (P2P) connection
CN105262853A
Media session between network endpoints
CN106716963A
Tunneling of remote desktop sessions through firewalls
US20100217874A1
Method and system for selecting tunnels to send network traffic through
US20180062875A1
Machine learning-based mechanism for optimal interface selection in network environments employing network address translation
US20180234333A1