CN112367493B - Data transmission control method, device, mobile terminal and storage medium - Google Patents

Data transmission control method, device, mobile terminal and storage medium Download PDF

Info

Publication number
CN112367493B
CN112367493B CN202110050755.2A CN202110050755A CN112367493B CN 112367493 B CN112367493 B CN 112367493B CN 202110050755 A CN202110050755 A CN 202110050755A CN 112367493 B CN112367493 B CN 112367493B
Authority
CN
China
Prior art keywords
transmission
path
transmission path
mobile terminal
quality score
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110050755.2A
Other languages
Chinese (zh)
Other versions
CN112367493A (en
Inventor
王伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Youmi Technology Shenzhen Co ltd
Original Assignee
Youmi Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Youmi Technology Shenzhen Co ltd filed Critical Youmi Technology Shenzhen Co ltd
Priority to CN202110050755.2A priority Critical patent/CN112367493B/en
Publication of CN112367493A publication Critical patent/CN112367493A/en
Application granted granted Critical
Publication of CN112367493B publication Critical patent/CN112367493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • H04N7/147Communication arrangements, e.g. identifying the communication as a video-communication, intermediate storage of the signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1096Supplementary features, e.g. call forwarding or call holding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a data transmission control method and device, a mobile terminal and a storage medium, and relates to the technical field of mobile terminals. When a video call is carried out, the first mobile terminal sends audio and video data to the second mobile terminal through a first transmission path, and obtains the service quality parameter of the first transmission path as a first path parameter and the service quality parameter of a second transmission path as a second path parameter at intervals of a first preset time period; acquiring a quality score of the first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of the second transmission path as a second quality score based on the second path parameter; and when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path. Therefore, the mobile terminal can dynamically switch the transmission path, and the path with higher quality score is used as the transmission path of the audio and video data.

Description

Data transmission control method, device, mobile terminal and storage medium
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a data transmission control method and apparatus, a mobile terminal, and a storage medium.
Background
With the rapid development of mobile internet technology, audio and video communication with others through mobile terminals has become popular in life and work. In the related art, audio and video data in a call process are generally forwarded through a server, but when a network connected between a mobile terminal and the server is abnormal, the transmitted audio and video data have the problems of packet loss, time delay and the like, so that call sound or picture blockage is caused, and the communication quality of audio and video calls is poor.
Disclosure of Invention
In view of this, the present application provides a data transmission control method, apparatus, mobile terminal and storage medium.
In a first aspect, an embodiment of the present application provides a data transmission control method, where the method includes: when a video call is carried out, the first mobile terminal sends audio and video data to a second mobile terminal through a first transmission path, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal; acquiring a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of a second transmission path as a second path parameter every other first preset time period, wherein the second transmission path is a path between the first mobile terminal and the second mobile terminal for forwarding the audio and video data through a server, and the service quality parameter at least comprises a transmission delay value, a transmission packet loss rate and a transmission delay change value; acquiring a quality score of the first transmission path as a first quality score based on the first path parameter; acquiring a quality score of the second transmission path as a second quality score based on the second path parameter; and when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path.
In a second aspect, an embodiment of the present application provides a data transmission control apparatus, where the apparatus includes: the device comprises a data sending module, a path parameter acquisition module, a quality score acquisition module and a transmission path switching module. The data sending module is used for sending audio and video data to a second mobile terminal through a first transmission path when a video call is carried out, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal; a path parameter obtaining module, configured to obtain, every first preset time period, a service quality parameter of the first transmission path as a first path parameter, and a service quality parameter of a second transmission path as a second path parameter, where the second transmission path is a path between the first mobile terminal and the second mobile terminal through which the audio and video data is forwarded by a server, and the service quality parameter at least includes a transmission delay value, a transmission packet loss rate, and a transmission delay variation value; a quality score obtaining module, configured to obtain a quality score of the first transmission path as a first quality score based on the first path parameter, and obtain a quality score of the second transmission path as a second quality score based on the second path parameter; and the transmission path switching module is used for switching the transmission path of the audio and video data to the second transmission path when the first quality score is smaller than the second quality score.
In a third aspect, an embodiment of the present application provides a mobile terminal, including: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the data transfer control method provided by the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be invoked by a processor to execute the data transmission control method provided in the first aspect.
In the scheme provided by the application, when a video call is carried out, a first mobile terminal sends audio and video data to a second mobile terminal through a first transmission path, and obtains a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of the second transmission path as a second path parameter at intervals of a first preset time period; acquiring a quality score of a first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of a second transmission path as a second quality score based on the second path parameter; and when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data into the second transmission path. Therefore, the mobile terminal can communicate with other terminals end to end and transmit audio and video data, video call is achieved, call delay and blockage are reduced, transmission paths can be dynamically switched, the path with high quality score is used as the transmission path of the audio and video data, and communication quality of the video call and call experience of users are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of an application scenario provided in an embodiment of the present application.
Fig. 2 is a schematic flowchart illustrating a data transmission control method according to an embodiment of the present application.
Fig. 3 is a schematic flowchart illustrating a data transmission control method according to another embodiment of the present application.
Fig. 4 is a flow chart illustrating sub-steps of step S306 shown in fig. 3 in one embodiment.
Fig. 5 is a flowchart illustrating a data transmission control method according to another embodiment of the present application.
Fig. 6 is a flowchart illustrating a data transmission control method according to still another embodiment of the present application.
Fig. 7 is a block diagram of a data transmission control apparatus according to an embodiment of the present application.
Fig. 8 is a block diagram of a mobile terminal for executing a data transmission control method according to an embodiment of the present application.
Fig. 9 is a storage unit according to an embodiment of the present application, configured to store or carry program codes for implementing a data transmission control method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the related technology of network video call, a fixed path is usually adopted to transmit audio and video data, for example, a server is used to forward the data, or the audio and video data is transmitted in a direct connection manner, and an abnormal condition may occur in a communication path, thereby causing a jam problem in the audio and video call.
In view of the above problems, the inventors propose a data transmission control method, a data transmission control device, a mobile terminal, and a storage medium, which can implement video call by performing end-to-end communication with other terminals and transmitting audio/video data, reduce call delay and congestion, acquire quality of service parameters of a first transmission path and a second transmission path, and respectively acquire quality scores corresponding to the two transmission paths based on the quality of service parameters of the two transmission paths, and switch the transmission path of the audio/video data to a transmission path with a higher quality score by comparing the quality scores of the transmission paths. This is described in detail below.
An application environment of the data transmission control method provided by the embodiment of the present application is described below.
Referring to fig. 1, fig. 1 shows a Network structure diagram of an application scenario of the embodiment of the present application, where the application scenario may include a data transmission control system 10, and the data transmission control system 10 may include a server 100, a first mobile terminal 200, a second mobile terminal 300, a first Network Address Translation (NAT) firewall 400, and a second NAT firewall 500. The first mobile terminal 200 may communicate with the second mobile terminal 300 through a server forwarding path, and perform data transfer through the server to complete data interaction; after the intranet penetration is performed on the first NAT firewall 400 and the second NAT firewall 500, the first mobile terminal 200 may also directly communicate with the second mobile terminal 300 through a Peer-to-Peer (P2P) path, so as to complete data interaction. The server 100 may forward data between the first mobile terminal 200 and the second mobile terminal 300, and may also provide data information for establishing the P2P path, such as an external network Internet Protocol Address (IP Address) and a first port number corresponding to the first NAT firewall 400, and an external network IP Address and a second port number corresponding to the second NAT firewall 500.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a data transmission control method according to an embodiment of the present application. The data transmission control method provided in the embodiment of the present application will be described in detail with reference to fig. 2. The data transmission control method may include the steps of:
step S201: when a video call is carried out, the first mobile terminal sends audio and video data to the second mobile terminal through a first transmission path, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal.
In this embodiment, the first mobile terminal and the second mobile terminal may be electronic devices such as a mobile phone, a computer, a tablet computer, and a smart watch; the audio and video data may be data generated during a video call. The first mobile terminal sends the audio and video data to the second mobile terminal through the point-to-point transmission path, which can be understood as that the first mobile terminal performs audio and video data transmission with the second mobile terminal through the P2P network. In the P2P network, the peer nodes can be accessed directly without passing through an intermediate entity (such as a server), so that the first mobile terminal and the second mobile terminal can directly transmit audio and video data without passing through the server to transfer the audio and video data. In practical application, a server is connected with a plurality of mobile terminals, and due to the limitations of parameters such as the capability of a Central Processing Unit (CPU), the size of a memory, and network bandwidth, if audio/video data during a call of a plurality of mobile terminals is forwarded at the same time, the audio/video data may exceed the bearing capacity of the server, which may cause problems such as packet loss or delayed arrival of the audio/video data, and therefore, a P2P network may be introduced between the mobile terminals to transmit the audio/video data.
Step S202: and acquiring a service quality parameter of the first transmission path as a first path parameter every other first preset time period, and acquiring a service quality parameter of a second transmission path as a second path parameter, wherein the second transmission path is a path for forwarding the audio and video data between the first mobile terminal and the second mobile terminal through a server, and the service quality parameter at least comprises a transmission delay value, a transmission packet loss rate and a transmission delay change value.
In this embodiment, the first mobile terminal and the second mobile terminal maintain a transmission path for forwarding the audio and video data through the server while introducing the point-to-point transmission path, that is, two transmission paths exist between the first mobile terminal and the second mobile terminal. The first mobile terminal can select a transmission path with better service quality as a transmission path of the audio and video data so as to ensure that the audio and video data are transmitted to the second mobile terminal in time and further ensure the fluency of video call. Further, the QoS of the transmission path may be determined based on QoS parameters of the transmission path, where the QoS (Quality of Service) refers to a network that can provide better Service capability for a specified network communication by using various basic technologies, and is a security mechanism of the network, which is a technology for solving the problems of network delay and congestion.
Specifically, the qos parameter of the first transmission path may be acquired every first preset time period as the first path parameter, and the qos parameter of the second transmission path may be acquired as the second path parameter. Since the performance of the network and the mobile terminal may change at any time, the qos parameters of the first transmission path and the second transmission path may be obtained every first preset time period. The first preset time period may be 1 millisecond, 2 milliseconds, or 5 milliseconds, which is not limited in this embodiment; the service quality parameter may include a transmission delay value, a transmission packet loss rate, and a transmission delay change value, where the transmission delay value may be a time (e.g., 0.5 ms) when an audio/video data packet is transmitted from the first mobile terminal to the second mobile terminal and when the corresponding feedback information returned by the second mobile terminal device based on the audio/video data packet is received; the transmission packet loss rate can be the ratio of the number of the lost audio and video data packets to the total number of the transmitted audio and video data packets; the transmission delay variation value may be a variation value of transmission delay values of different groups of audio/video data packets, for example, the transmission delay value of the first group of audio/video data packets is 0.5 ms, the transmission delay value of the second group of audio/video data packets is 0.6 ms, and correspondingly, the transmission delay variation value is 0.1 ms.
In this embodiment, the quality of service parameters may further include availability and throughput, where availability may be a percentage of time that the network is ready to operate when needed by a user, and throughput may be a measure of traffic (or bandwidth) on the network over a certain period of time.
Step S203: and acquiring the quality score of the first transmission path as a first quality score based on the first path parameter.
In this embodiment, the quality score of the first transmission path may be obtained based on the obtained transmission delay value, the obtained transmission packet loss rate, and the obtained transmission delay change value of the first transmission path, and the quality score may be used as the first quality score. Specifically, a transmission delay value of the first transmission path is quantized into a transmission delay score, a transmission packet loss rate is quantized into a transmission packet loss rate score, and a transmission delay variation value is quantized into a transmission delay variation score; and then directly summing or weighting and summing the transmission delay value, the transmission packet loss rate value and the transmission delay change value to obtain a total score, and taking the total score as a first quality score of the first transmission path. Wherein a higher first quality score indicates a higher transmission efficiency of the first transmission path, and vice versa.
Step S204: and acquiring the quality score of the second transmission path as a second quality score based on the second path parameter.
In this embodiment, the quality score of the second transmission path may be obtained based on the obtained transmission delay value, the obtained transmission packet loss rate, and the obtained transmission delay change value of the second transmission path, and the quality score may be used as the second quality score. Wherein a higher second quality score indicates a higher transmission efficiency of the second transmission path, and vice versa.
Step S205: and when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path.
In this embodiment, after the first quality score and the second quality score are obtained, by comparing the first quality score of the first transmission path with the second quality score of the second transmission path, when the first quality score is smaller than the second quality score, it is indicated that the transmission quality of the current first transmission path is worse than the transmission quality of the second transmission path. Therefore, when the first quality score is smaller than the second quality score, the first mobile terminal can switch the transmission path of the audio and video data to a second transmission path with better transmission quality. When the first quality score is not less than the second quality score, the transmission quality of the current first transmission path is not worse than that of the second transmission path, so that the first transmission path is still kept as the transmission path of the audio and video data.
In this embodiment, when a video call is performed, a first mobile terminal sends audio/video data to a second mobile terminal through a first transmission path, and obtains a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of a second transmission path as a second path parameter every a first preset time period; acquiring a quality score of a first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of a second transmission path as a second quality score based on the second path parameter; and when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data into the second transmission path. Therefore, the mobile terminal can dynamically switch the transmission path, and the path with higher quality score is used as the transmission path of the audio and video data, so that the communication quality of video call and the call experience of a user are improved.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a data transmission control method according to another embodiment of the present application. The data transmission control method provided in the embodiment of the present application will be described in detail below with reference to fig. 3. The data transmission control method may include the steps of:
step S301: the first mobile terminal sends a relay request to the server, the relay request is used for indicating the server to send a data request packet to the second mobile terminal, and the data request packet is used for indicating the second mobile terminal to send a specified data packet to the first mobile terminal through the server.
In this embodiment, when a call between a first mobile terminal and a second mobile terminal is just established, the first mobile terminal establishes a communication connection with a server through a network, and the second mobile terminal establishes a communication connection with the server through the network, at this time, the first mobile terminal and the second mobile terminal cannot directly perform audio and video data transmission, and only can perform audio and video data transmission by forwarding through the server. Based on this, the first mobile terminal can send a relay request to the server, the server sends a data request packet to the second mobile terminal according to the relay request after receiving the relay request, and the second mobile terminal sends a specified data packet to the server after receiving the data request packet; the server may store the external network IP address and the port number of the second mobile terminal after receiving the designated data packet, and forward the designated data packet to the first mobile terminal.
Step S302: and receiving the specified data packet forwarded by the server.
In this embodiment, the first mobile terminal may receive a specified packet returned by the server based on the relay request, and correspondingly, the first mobile terminal may obtain the external network IP address and the port number of the second mobile terminal from the specified packet.
Step S303: and establishing the first transmission path with the second mobile terminal based on the specified data packet.
In this embodiment, after the first mobile terminal receives the specified data packet, the audio/video data may be directly sent to the second mobile terminal based on the external network IP address and the port number of the second mobile terminal, and the audio/video data does not need to be transferred through the server. Correspondingly, the first mobile terminal and the second mobile terminal successfully establish the starting point-to-point transmission path based on the specified data packet.
Step S304: when a video call is carried out, the first mobile terminal sends audio and video data to the second mobile terminal through a first transmission path, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal.
Step S305: and acquiring a service quality parameter of the first transmission path as a first path parameter every other first preset time period, and acquiring a service quality parameter of a second transmission path as a second path parameter, wherein the second transmission path is a path for forwarding the audio and video data between the first mobile terminal and the second mobile terminal through a server, and the service quality parameter at least comprises a transmission delay value, a transmission packet loss rate and a transmission delay change value.
In the embodiment of the present application, steps S304 to S305 may refer to the contents of steps S201 to S202 in the foregoing embodiment, and are not described herein again.
Step S306: and acquiring the quality score of the first transmission path as a first quality score based on the first path parameter.
In some embodiments, referring to fig. 4, step S306 may include:
step S3061: and obtaining a score corresponding to the transmission delay value, a score corresponding to the transmission packet loss rate and a score corresponding to the transmission delay change value in the first path parameter.
In some embodiments, after the transmission delay value, the transmission packet loss rate, and the transmission delay variation value in the first path parameter are obtained, the reciprocal of the transmission delay value may be used as a score corresponding to the transmission delay value, the reciprocal of the transmission packet loss rate may be used as a score corresponding to the transmission packet loss rate, and the transmission delay variation value may be used as a score corresponding to the transmission delay variation; or taking the ratio of the transmission delay threshold to the transmission delay value as the score corresponding to the transmission delay value, taking the ratio of the transmission packet loss rate threshold to the transmission packet loss rate as the score corresponding to the transmission packet loss rate, and taking the ratio of the transmission delay change threshold to the transmission delay change value as the score corresponding to the transmission delay change value. The transmission packet loss rate threshold may be preset, and the larger the transmission delay value, the transmission packet loss rate, and the transmission delay variation value is, the smaller the score corresponding to the transmission delay value, the score corresponding to the transmission packet loss rate, and the score corresponding to the transmission delay variation value are.
As a possible example, the transmission delay value, the transmission packet loss rate, and the transmission delay variation value in the first path parameter are 100 microseconds, 0.5, and 10 microseconds, respectively, and further, the value corresponding to the transmission delay value, the value corresponding to the transmission packet loss rate, and the value corresponding to the transmission delay variation value may be 0.01, 2, and 0.1, respectively.
In another possible example, the transmission delay value, the transmission packet loss rate, and the transmission delay variation value in the first path parameter are 100 microseconds, 0.5, and 10 microseconds, respectively, and the transmission delay threshold, the transmission packet loss rate threshold, and the transmission delay variation threshold are 1 millisecond, 0.8, and 100 milliseconds, respectively, and further, the value corresponding to the transmission delay value, the value corresponding to the transmission packet loss rate, and the value corresponding to the transmission delay variation value may be 10, 1.6, and 10, respectively.
Step S3062: and based on the weights respectively corresponding to the first transmission delay value, the first transmission packet loss rate and the first transmission delay change value, performing weighted summation on the score corresponding to the first transmission delay value, the score corresponding to the first transmission packet loss rate and the score corresponding to the first transmission delay change value, and obtaining the quality score of the first transmission path as the first quality score.
In this embodiment, the transmission delay value, the transmission packet loss rate, and the transmission delay variation value have different effects on the transmission quality of the transmission path, and therefore, the transmission delay value, the transmission packet loss rate, and the transmission delay variation value have a corresponding weight, and a score corresponding to the first transmission delay value, a score corresponding to the first transmission packet loss rate, and a score corresponding to the first transmission delay variation value may be weighted and summed based on the weight to obtain a quality score of the first transmission path, and the quality score of the first transmission path is used as the first quality score. The larger the first transmission delay value, the first transmission packet loss rate, and the first transmission delay variation value are, the smaller the score corresponding to the first transmission delay value, the score corresponding to the first transmission packet loss rate, and the score corresponding to the first transmission delay variation value are, and correspondingly, the smaller the first quality score is, the worse the transmission efficiency of the first transmission path is. The formula for calculating the quality score of the first transmission path may be as follows:
Q1=delay1*A1+lost1*B1+jitter1*C1
wherein Q1 represents the quality score of the first transmission path, a1, B1, and C1 represent the weight corresponding to the first transmission delay value, the weight corresponding to the first transmission packet loss rate, and the weight corresponding to the first transmission delay change value, respectively, delay1 represents the score corresponding to the first transmission delay value, lost1 represents the score corresponding to the first transmission packet loss rate, and jitter1 represents the score corresponding to the first transmission delay change value.
Illustratively, if the weight a1 corresponding to the first transmission delay value, the weight B1 corresponding to the first transmission packet loss rate, and the weight C1 corresponding to the first transmission delay value are 0.2, 0.3, and 0.5, respectively, the score delay1 corresponding to the first transmission delay value is 10, the score lost1 corresponding to the first transmission packet loss rate is 1.6, and the score jitter1 corresponding to the first transmission delay change value is 10. Based on this, a quality score of 11.8 for the first transmission path can be calculated.
In some embodiments, the transmission quality of a transmission path is also affected by the transmission bandwidth, the larger the transmission bandwidth of a transmission path, the correspondingly better the transmission quality of the transmission path. When the transmission quality of the transmission path changes, the transmission delay value, the transmission packet loss rate, and the influence of the transmission delay change on the transmission quality may also change, and further, the transmission delay value, the transmission packet loss rate, and the weight corresponding to the transmission delay change may also change. Therefore, the transmission bandwidth of the first transmission path may be acquired every fourth predetermined time period, and when the transmission bandwidth is lower than the predetermined bandwidth threshold, the weight corresponding to the first transmission packet loss rate is increased to a first predetermined value, and the weight corresponding to the first transmission delay value is increased to a second predetermined value. When the transmission bandwidth is lower than the preset bandwidth threshold, it can be determined that the transmission quality of the current transmission path is poor, and under the condition that the transmission quality is poor, the transmission packet loss rate and the transmission delay value have a large influence on the transmission quality. Therefore, the weight corresponding to the transmission packet loss rate and the weight corresponding to the transmission delay value can be increased, so as to ensure the accuracy of the quality score calculated based on the weights. The initial values of the first preset value and the second preset value can be preset.
And when the transmission bandwidth is higher than the preset bandwidth threshold, increasing the weight corresponding to the first transmission delay variation value to a third preset value, and increasing the weight corresponding to the first transmission delay value to a fourth preset value. When the transmission bandwidth is higher than the preset bandwidth threshold, it can be determined that the transmission quality of the current transmission path is relatively good, and under the condition that the transmission quality is relatively good, the transmission delay variation value and the influence of the transmission delay value on the transmission quality are relatively large. Therefore, the weight corresponding to the transmission delay change value and the weight corresponding to the transmission delay value can be increased, so that the accuracy of the quality score calculated based on the weights can be ensured. The initial values of the third preset value and the fourth preset value can be preset.
Step S307: and acquiring the quality score of the second transmission path as a second quality score based on the second path parameter.
In this embodiment, the formula for calculating the quality score of the second transmission path may be as follows:
Q2=delay2*A2+lost2*B2+jitter2*C2
q2 represents the quality score of the second transmission path, a2, B2, and C2 represent the weight corresponding to the second transmission delay value, the weight corresponding to the second transmission packet loss rate, and the weight corresponding to the second transmission delay change value, respectively, delay2 represents the score corresponding to the second transmission delay value, lost2 represents the score corresponding to the second transmission packet loss rate, and jitter2 represents the score corresponding to the second transmission delay change value.
Illustratively, if the weights corresponding to the second transmission delay value a2, the second transmission packet loss rate B2, and the second transmission delay change value C2 are 0.4, 0.2, and 0.4, respectively, the score delay2 corresponding to the second transmission delay value is 20, the score lost2 corresponding to the second transmission packet loss rate is 1.5, and the score jitter2 corresponding to the second transmission delay change value is 30. Based on this, the quality score of the second transmission path can be calculated to be 20.3.
Step S308: and when the first quality score is smaller than the second quality score, judging whether the first quality score is smaller than a first preset threshold value.
In this embodiment, when the first quality score is smaller than the second quality score, it represents that the transmission quality of the first transmission path is worse than the transmission quality of the second transmission path at this time, and further, it may be determined whether the first quality score is smaller than a first preset threshold. When the quality score of the transmission path is the first preset threshold, it represents that the transmission quality of the transmission path is very poor, and if the transmission of the audio/video data is still performed through the transmission path, problems such as packet loss and delay may be caused to be serious. Therefore, it is possible to determine whether to switch the transmission path by determining whether the first quality score is smaller than a first preset threshold.
Step S309: if the first quality score is smaller than the first preset threshold, obtaining a plurality of first quality scores in a second preset time period before the current time, wherein the time length corresponding to the second preset time period is longer than the time length corresponding to the first preset time period.
Step S310: and judging whether each first quality score in the second preset time period is smaller than the second quality score.
Step S311: and if the audio and video data are smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path.
In this embodiment, when the first quality score is smaller than the first preset threshold, it represents that the transmission quality of the first transmission path is very poor at the current time, so that a plurality of first quality scores in a second preset time period before the current time may be obtained, and it is determined whether each of the first quality scores in the second preset time period is smaller than the second quality score. If the transmission quality scores are smaller than the second quality score, the transmission quality of the second transmission path in a second preset time period before the current time is better than that of the first transmission path, and the transmission path of the audio and video data is switched to the second transmission path. The duration corresponding to the second preset time period is greater than the duration corresponding to the first preset time period, for example, when the duration corresponding to the first preset time period is 1 millisecond, the duration of the second preset time period may be 10 milliseconds.
For example, if the first quality score of the current time is 2.5, the first preset threshold is 3, and the second quality score is 5, because the first quality score is smaller than the first preset threshold, a plurality of first quality scores in a second preset time period before the current time may be obtained, for example, 5 first quality scores (e.g., 2.6, 2.8, 2, 2.9, 1.5) in 1 second before the current time are obtained, and then it may be determined that all the 5 first quality scores in 1 second before the current time are smaller than the second quality score, and further, the transmission path of the audio/video data may be switched to the second transmission path.
In this embodiment, when a video call is performed, a first mobile terminal sends audio/video data to a second mobile terminal through a first transmission path, and obtains a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of a second transmission path as a second path parameter every a first preset time period; acquiring a quality score of a first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of a second transmission path as a second quality score based on the second path parameter; when the first quality score is smaller than the second quality score, judging whether the first quality score is smaller than a first preset threshold value; if the first quality score is smaller than a first preset threshold value, acquiring a plurality of first quality scores in a second preset time period before the current time, and judging whether each first quality score in the second preset time period is smaller than a second quality score; and if the quality scores are smaller than the second quality score, switching the transmission path of the audio and video data into a second transmission path. Therefore, the mobile terminal can dynamically switch the transmission path, the transmission path with higher quality score is used as the transmission path of the audio and video data, and the communication quality of video call and the call experience of a user are improved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a data transmission control method according to another embodiment of the present application. The data transmission control method provided in the embodiment of the present application will be described in detail below with reference to fig. 5. The data transmission control method may include the steps of:
step S501: the first mobile terminal sends a relay request to the server, the relay request is used for indicating the server to send a data request packet to the second mobile terminal, and the data request packet is used for indicating the second mobile terminal to send a specified data packet to the first mobile terminal through the server.
Step S502: and receiving the specified data packet forwarded by the server.
Step S503: and establishing the first transmission path with the second mobile terminal based on the specified data packet.
Step S504: when a video call is carried out, the first mobile terminal sends audio and video data to the second mobile terminal through a first transmission path, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal.
Step S505: and acquiring a service quality parameter of the first transmission path as a first path parameter every other first preset time period, and acquiring a service quality parameter of a second transmission path as a second path parameter, wherein the second transmission path is a path for forwarding the audio and video data between the first mobile terminal and the second mobile terminal through a server, and the service quality parameter at least comprises a transmission delay value, a transmission packet loss rate and a transmission delay change value.
Step S506: and acquiring the quality score of the first transmission path as a first quality score based on the first path parameter.
Step S507: and acquiring the quality score of the second transmission path as a second quality score based on the second path parameter.
In the embodiment of the present application, steps S501 to S507 may refer to the contents of steps S301 to S307 in the foregoing embodiment, which are not described herein again.
Step S508: and when the first quality score is smaller than the second quality score, judging whether the first quality score is smaller than a second preset threshold value.
Step S509: and if the first quality score is smaller than the second preset threshold, acquiring a plurality of first transmission packet loss rates within a second preset time period before the current time.
Step S510: and when each first transmission packet loss rate in the second preset time period is greater than a preset packet loss rate threshold value, switching the transmission path of the audio and video data to the second transmission path.
In this embodiment, when the first quality score is smaller than the second quality score, it may be determined whether the first quality score is smaller than a second preset threshold, wherein when the quality score of the transmission path is smaller than the second preset threshold, the transmission quality of the transmission path is regarded as poor. When the first quality score is smaller than the second preset threshold, it may be determined that the transmission quality of the current first transmission path is poor, and when the transmission quality of the transmission path is poor, the transmission packet loss rate in the service quality parameter has the greatest influence on the transmission quality. Therefore, a plurality of first transmission packet loss rates in a second preset time period before the current time can be obtained, when each first transmission packet loss rate in the second preset time period is greater than a preset packet loss rate threshold value, it represents that packet loss is serious in the process of audio and video data, and the influence on the fluency of video conversation is large, and at the moment, the transmission quality of the second transmission path is better than that of the first transmission path, so that the transmission path of the audio and video data can be switched to the second transmission path.
Illustratively, if the first quality score at the current time is 3.5, the second preset threshold is 4, the second quality score is 5, and the preset packet loss threshold is 0.4, because the first quality score is smaller than the second quality score and smaller than the second preset threshold, a plurality of first transmission packet loss rates in a second preset time period before the current time may be obtained, for example, 5 first transmission packet loss rates (such as 0.7, 0.6, 0.8, and 0.7) in 1 second before the current time are obtained, and then it may be determined that all the 5 first transmission packet loss rates in 1 second before the current time are larger than the preset packet loss threshold, and further, the transmission path of the audio/video data may be switched to the second transmission path.
In this embodiment, when a video call is performed, a first mobile terminal sends audio/video data to a second mobile terminal through a first transmission path, and obtains a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of a second transmission path as a second path parameter every a first preset time period; acquiring a quality score of a first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of a second transmission path as a second quality score based on the second path parameter; when the first quality score is smaller than the second quality score, judging whether the first quality score is smaller than a second preset threshold value; if the first quality score is smaller than a second preset threshold value, acquiring a plurality of first transmission packet loss rates in a second preset time period before the current time; and when each first transmission packet loss rate in a second preset time period is greater than a preset packet loss rate threshold value, switching the transmission path of the audio and video data into a second transmission path. Therefore, the mobile terminal can dynamically switch the transmission path, the transmission path with higher quality score is used as the transmission path of the audio and video data, and the communication quality of video call and the call experience of a user are improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a data transmission control method according to still another embodiment of the present application. The data transmission control method provided in the embodiment of the present application will be described in detail below with reference to fig. 6. The data transmission control method may include the steps of:
step S601: the first mobile terminal sends a relay request to the server, the relay request is used for indicating the server to send a data request packet to the second mobile terminal, and the data request packet is used for indicating the second mobile terminal to send a specified data packet to the first mobile terminal through the server.
Step S602: and receiving the specified data packet forwarded by the server.
Step S603: and establishing the first transmission path with the second mobile terminal based on the specified data packet.
Step S604: when a video call is carried out, the first mobile terminal sends audio and video data to the second mobile terminal through a first transmission path, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal.
Step S605: and acquiring a service quality parameter of the first transmission path as a first path parameter every other first preset time period, and acquiring a service quality parameter of a second transmission path as a second path parameter, wherein the second transmission path is a path for forwarding the audio and video data between the first mobile terminal and the second mobile terminal through a server, and the service quality parameter at least comprises a transmission delay value, a transmission packet loss rate and a transmission delay change value.
Step S606: and acquiring the quality score of the first transmission path as a first quality score based on the first path parameter.
Step S607: and acquiring the quality score of the second transmission path as a second quality score based on the second path parameter.
In the embodiment of the present application, steps S601 to S607 may refer to the contents of steps S301 to S307 in the foregoing embodiment, which are not described herein again.
Step S608: and acquiring a plurality of first quality scores and a plurality of second quality scores in a third preset time period before the current time, wherein the time length corresponding to the third preset time period is longer than the time length corresponding to the first preset time period.
Step S609: and when the plurality of first quality scores are all smaller than a third preset threshold value, judging whether the plurality of second quality scores are all larger than the third preset threshold value.
Step S610: and if the audio and video data are all larger than the third preset threshold, switching the transmission path of the audio and video data to the second transmission path.
In this embodiment, a plurality of first quality scores and a plurality of second quality scores in a third preset time period before the current time may be respectively obtained, and when the plurality of first quality scores are all smaller than a third preset threshold, a state that the transmission quality of the first transmission path is poor in the third preset time period before the current time may be determined. And the duration corresponding to the third preset time period is longer than the duration corresponding to the first preset time period. Further, whether the plurality of second quality scores are all greater than the third preset threshold is judged, and if all the plurality of second quality scores are greater than the third preset threshold, it can be determined that the transmission quality of the second transmission path in a third preset time period before the current time is in a better state. Therefore, in order to ensure timely transmission of the audio and video data, the transmission path of the audio and video data can be switched to the second transmission path.
Illustratively, the acquired first quality scores in a third preset time period before the current time are respectively 7, 8, 9, 10 and 11, the second quality scores are respectively 20, 21, 25, 22 and 23, and the third preset threshold is 18. Therefore, it can be seen that the plurality of first quality scores in the third preset time period before the current time are all smaller than the third preset threshold, and the plurality of second quality scores are all larger than the third preset threshold, which means that the transmission quality of the second transmission path in the third preset time period before the current time is all better than the transmission quality of the first transmission path, so that the transmission path of the audio and video data can be switched to the second transmission path.
In some embodiments, after the transmission path of the audio/video data is switched to the second transmission path, the service quality parameter of the first transmission path may be continuously obtained as the first path parameter, and the service quality parameter of the second transmission path may be continuously obtained as the second path parameter; acquiring a first quality score corresponding to the first transmission path and a second quality score corresponding to the second transmission path based on the first path parameter and the second path parameter; and then judging whether the second quality score is smaller than the first quality score, if so, switching the transmission path of the audio and video data into a first transmission path so as to ensure that the audio and video data are transmitted by the transmission path with the best transmission quality all the time.
In this embodiment, when a video call is performed, a first mobile terminal sends audio/video data to a second mobile terminal through a first transmission path, and obtains a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of a second transmission path as a second path parameter every a first preset time period; acquiring a quality score of a first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of a second transmission path as a second quality score based on the second path parameter; when the first quality score is smaller than the second quality score, acquiring a plurality of first quality scores and a plurality of second quality scores in a third preset time period before the current time; when the plurality of first quality scores are all smaller than a third preset threshold value, judging whether the plurality of second quality scores are all larger than the third preset threshold value; and if the first transmission path and the second transmission path are both larger than the third preset threshold, switching the transmission path of the audio and video data to the second transmission path. Therefore, the mobile terminal can dynamically switch the transmission path, and the path with higher quality score is used as the transmission path of the audio and video data, so that the communication quality of video call and the call experience of a user are improved.
Referring to fig. 7, a block diagram of a data transmission control apparatus 700 according to an embodiment of the present application is shown. The apparatus 700 may include: a data sending module 710, a path parameter obtaining module 720, a quality score obtaining module 730 and a transmission path switching module 740.
The data sending module 710 is configured to, when performing a video call, send audio and video data to a second mobile terminal through a first transmission path by the first mobile terminal, where the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal.
The path parameter obtaining module 720 is configured to obtain, every first preset time period, a service quality parameter of the first transmission path as a first path parameter, and a service quality parameter of a second transmission path as a second path parameter, where the second transmission path is a path between the first mobile terminal and the second mobile terminal through which the audio and video data is forwarded by the server, and the service quality parameter at least includes a transmission delay value, a transmission packet loss rate, and a transmission delay variation value.
The quality score obtaining module 730 is configured to obtain a quality score of the first transmission path as a first quality score based on the first path parameter, and obtain a quality score of the second transmission path as a second quality score based on the second path parameter.
The transmission path switching module 740 is configured to switch the transmission path of the audio/video data to the second transmission path when the first quality score is smaller than the second quality score.
In some embodiments, the transmission path switching module 740 may include: the device comprises a first score comparing unit, a history score acquiring unit, a second score comparing unit and a path switching unit. The first score comparing unit may be configured to determine whether the first quality score is smaller than a first preset threshold when the first quality score is smaller than the second quality score. The history score obtaining unit may be configured to obtain a plurality of first quality scores in a second preset time period before the current time if the first quality score is smaller than the first preset threshold, where a duration corresponding to the second preset time period is longer than a duration corresponding to the first preset time period. The second score comparing unit may be configured to determine whether each of the first quality scores in the second preset time period is smaller than the second quality score. The path switching unit may be configured to switch the transmission path of the audio/video data to the second transmission path if both of the quality scores are smaller than the second quality score.
In some embodiments, the transmission path switching module 740 may further include: the device comprises a quality score comparing unit, a packet loss rate acquiring unit and a path switching unit. The quality score comparing unit may be configured to determine whether the first quality score is smaller than a second preset threshold when the first quality score is smaller than the second quality score. The packet loss rate obtaining unit may be configured to obtain a plurality of first transmission packet loss rates within the second preset time period before the current time if the first quality score is smaller than the second preset threshold. The path switching unit may be configured to switch the transmission path of the audio and video data to the second transmission path when each first transmission packet loss rate in the second preset time period is greater than a preset packet loss rate threshold.
In some embodiments, the transmission path switching module 740 may further include: a history quality score obtaining unit, a history quality score judging unit and a path switching unit. The historical quality score obtaining unit may be configured to obtain a plurality of the first quality scores and a plurality of the second quality scores in a third preset time period before the current time, where a duration corresponding to the third preset time period is longer than a duration corresponding to the first preset time period. The historical quality score judging unit may be configured to judge whether each of the plurality of second quality scores is greater than a third preset threshold when each of the plurality of first quality scores is less than the third preset threshold. The path switching unit may be configured to switch the transmission path of the audio/video data to the second transmission path if both of the paths are greater than the third preset threshold.
In some embodiments, the quality score obtaining module 730 may further include: a first path parameter score obtaining unit and a first quality score obtaining unit. The first path parameter score obtaining unit may be configured to obtain a score corresponding to a transmission delay value, a score corresponding to a transmission packet loss rate, and a score corresponding to a transmission delay variation value in the first path parameter. The first quality score obtaining unit may be configured to perform weighted summation on a score corresponding to the first transmission delay value, a score corresponding to the first transmission packet loss rate, and a score corresponding to the first transmission delay change value based on weights respectively corresponding to the first transmission delay value, the first transmission packet loss rate, and the first transmission delay change value, and obtain a quality score of the first transmission path as the first quality score.
In this manner, the quality score obtaining module 730 may further include: a transmission bandwidth obtaining unit and a weight adjusting unit. The transmission bandwidth acquiring unit may be configured to acquire the transmission bandwidth of the first transmission path every fourth predetermined period. The weight adjusting unit may be configured to, when the transmission bandwidth is lower than a preset bandwidth threshold, increase a weight corresponding to the first transmission packet loss rate by a first preset value, and increase a weight corresponding to the first transmission delay value by a second preset value; and when the transmission bandwidth is higher than the preset bandwidth threshold, increasing the weight corresponding to the first transmission delay variation value by a third preset value, and increasing the weight corresponding to the first transmission delay value by a fourth preset value.
In some embodiments, the data transmission control device 700 may further include: the device comprises a request sending module, a receiving module and a transmission path establishing module. The request sending module may be configured to send, by the first mobile terminal, a relay request to the server, where the relay request is used to instruct the server to send a data request packet to the second mobile terminal, and the data request packet is used to instruct the second mobile terminal to send a specified data packet to the first mobile terminal through the server. The receiving module may be configured to receive the specified data packet forwarded by the server. The transmission path establishing module may be configured to establish the first transmission path with the second mobile terminal based on the specified data packet.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
To sum up, in the scheme provided in this embodiment of the present application, when a video call is performed, a first mobile terminal sends audio/video data to a second mobile terminal through a first transmission path, and obtains a service quality parameter of the first transmission path as a first path parameter every a first preset time period, and obtains a service quality parameter of the second transmission path as a second path parameter; acquiring a quality score of a first transmission path as a first quality score based on the first path parameter, and acquiring a quality score of a second transmission path as a second quality score based on the second path parameter; and when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data into the second transmission path. Therefore, the mobile terminal can dynamically switch the transmission path, and the path with higher quality score is used as the transmission path of the audio and video data, so that the communication quality of video call and the call experience of a user are improved.
A mobile terminal provided by the present application will be described with reference to the drawings.
Referring to fig. 8, fig. 8 is a block diagram illustrating a structure of a mobile terminal 800 according to an embodiment of the present application, where the mobile terminal 800 may perform a data transmission control method according to the embodiment of the present application.
The mobile terminal 800 in the embodiments of the present application may include one or more of the following components: a processor 801, a memory 802, and one or more applications, wherein the one or more applications may be stored in the memory 802 and configured to be executed by the one or more processors 801, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
The processor 801 may include one or more processing cores. The processor 801 interfaces with various components throughout the mobile terminal 800 using various interfaces and lines to perform various functions of the mobile terminal 800 and process data by executing or performing instructions, programs, code sets, or instruction sets stored in the memory 802 and invoking data stored in the memory 802. Alternatively, the processor 801 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 801 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is to be understood that the modem may also be integrated into the processor 801, and implemented solely by a communication chip.
The Memory 802 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 802 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 802 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the mobile terminal 800 during use (such as the various correspondences described above), and so on.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 9, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 900 has stored therein program code that can be called by a processor to perform the methods described in the above-described method embodiments.
The computer-readable storage medium 900 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer readable storage medium 900 has storage space for program code 910 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 910 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (5)

1. A data transmission control method, applied to a first mobile terminal, the method comprising:
when a video call is carried out, the first mobile terminal sends audio and video data to a second mobile terminal through a first transmission path, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal;
acquiring a service quality parameter of the first transmission path as a first path parameter and a service quality parameter of a second transmission path as a second path parameter every other first preset time period, wherein the second transmission path is a path between the first mobile terminal and the second mobile terminal for forwarding the audio and video data through a server, and the service quality parameter at least comprises a transmission delay value, a transmission packet loss rate and a transmission delay change value;
acquiring a ratio of a transmission delay threshold to the transmission delay value as a score corresponding to the transmission delay value, acquiring a ratio of a transmission packet loss rate threshold to the transmission packet loss rate as a score corresponding to the transmission packet loss rate, and acquiring a ratio of a transmission delay change threshold to the transmission delay change value as a score corresponding to the transmission delay change value;
acquiring the transmission bandwidth of the first transmission path every fourth preset time period;
when the transmission bandwidth is lower than a preset bandwidth threshold, increasing the weight corresponding to a first transmission packet loss rate by a first preset value, and increasing the weight corresponding to a first transmission delay value by a second preset value, wherein the first transmission packet loss rate is used for indicating the transmission packet loss rate of the first transmission path, and the first transmission delay value is used for indicating the transmission delay value of the first transmission path;
when the transmission bandwidth is higher than the preset bandwidth threshold, increasing the weight corresponding to a first transmission delay change value by a third preset value, and increasing the weight corresponding to the first transmission delay value by a fourth preset value, wherein the first transmission delay change value is used for representing the transmission delay change value of the first transmission path;
based on the weights respectively corresponding to the first transmission delay value, the first transmission packet loss rate and the first transmission delay variation value, performing weighted summation on a score corresponding to the first transmission delay value, a score corresponding to the first transmission packet loss rate and a score corresponding to the first transmission delay variation value, and obtaining a quality score of the first transmission path as a first quality score;
acquiring a quality score of the second transmission path as a second quality score based on the second path parameter;
when the first quality score is smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path;
when the first quality score is smaller than the second quality score, switching the transmission path of the audio/video data to the second transmission path includes:
when the first quality score is smaller than the second quality score, judging whether the first quality score is smaller than a first preset threshold value;
if the first quality score is smaller than the first preset threshold, acquiring a plurality of first quality scores in a second preset time period before the current time, wherein the time length corresponding to the second preset time period is longer than the time length corresponding to the first preset time period;
judging whether each first quality score in the second preset time period is smaller than the second quality score;
and if the audio and video data are smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path.
2. The method according to claim 1, wherein before the first mobile terminal sends audio/video data to the second mobile terminal through the first transmission path while the video call is in progress, the method further comprises:
the first mobile terminal sends a relay request to the server, wherein the relay request is used for indicating the server to send a data request packet to the second mobile terminal, and the data request packet is used for indicating the second mobile terminal to send a specified data packet to the first mobile terminal through the server;
receiving the designated data packet forwarded by the server;
and establishing the first transmission path with the second mobile terminal based on the specified data packet.
3. A data transmission control apparatus, applied to a first mobile terminal, the apparatus comprising:
the data sending module is used for sending audio and video data to a second mobile terminal through a first transmission path when a video call is carried out, wherein the first transmission path is a point-to-point transmission path between the first mobile terminal and the second mobile terminal;
a path parameter obtaining module, configured to obtain, every first preset time period, a service quality parameter of the first transmission path as a first path parameter, and a service quality parameter of a second transmission path as a second path parameter, where the second transmission path is a path between the first mobile terminal and the second mobile terminal through which the audio and video data is forwarded by a server, and the service quality parameter at least includes a transmission delay value, a transmission packet loss rate, and a transmission delay variation value;
a quality score obtaining module, configured to obtain a ratio of a transmission delay threshold to the transmission delay value as a score corresponding to the transmission delay value, obtain a ratio of a transmission packet loss rate threshold to the transmission packet loss rate as a score corresponding to the transmission packet loss rate, and obtain a ratio of a transmission delay variation threshold to the transmission delay variation value as a score corresponding to the transmission delay variation value; acquiring the transmission bandwidth of the first transmission path every fourth preset time period; when the transmission bandwidth is lower than a preset bandwidth threshold, increasing the weight corresponding to a first transmission packet loss rate by a first preset value, and increasing the weight corresponding to a first transmission delay value by a second preset value, wherein the first transmission packet loss rate is used for indicating the transmission packet loss rate of the first transmission path, and the first transmission delay value is used for indicating the transmission delay value of the first transmission path; when the transmission bandwidth is higher than the preset bandwidth threshold, increasing the weight corresponding to a first transmission delay change value by a third preset value, and increasing the weight corresponding to the first transmission delay value by a fourth preset value, wherein the first transmission delay change value is used for representing the transmission delay change value of the first transmission path; based on the weights respectively corresponding to the first transmission delay value, the first transmission packet loss rate and the first transmission delay variation value, performing weighted summation on a score corresponding to the first transmission delay value, a score corresponding to the first transmission packet loss rate and a score corresponding to the first transmission delay variation value, and obtaining a quality score of the first transmission path as a first quality score; acquiring a quality score of the second transmission path as a second quality score based on the second path parameter;
a transmission path switching module, configured to determine whether the first quality score is smaller than a first preset threshold when the first quality score is smaller than the second quality score; if the first quality score is smaller than the first preset threshold, acquiring a plurality of first quality scores in a second preset time period before the current time, wherein the time length corresponding to the second preset time period is longer than the time length corresponding to the first preset time period; judging whether each first quality score in the second preset time period is smaller than the second quality score; and if the audio and video data are smaller than the second quality score, switching the transmission path of the audio and video data to the second transmission path.
4. A mobile terminal, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-2.
5. A computer-readable storage medium, characterized in that a program code is stored in the computer-readable storage medium, which program code can be called by a processor to perform the method according to any of claims 1-2.
CN202110050755.2A 2021-01-14 2021-01-14 Data transmission control method, device, mobile terminal and storage medium Active CN112367493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110050755.2A CN112367493B (en) 2021-01-14 2021-01-14 Data transmission control method, device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110050755.2A CN112367493B (en) 2021-01-14 2021-01-14 Data transmission control method, device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112367493A CN112367493A (en) 2021-02-12
CN112367493B true CN112367493B (en) 2021-06-01

Family

ID=74535017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110050755.2A Active CN112367493B (en) 2021-01-14 2021-01-14 Data transmission control method, device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112367493B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594242A (en) * 2009-06-23 2009-12-02 腾讯科技(深圳)有限公司 A kind of mthods, systems and devices of transmitting video data
CN102651701B (en) * 2011-02-28 2016-03-09 腾讯科技(深圳)有限公司 Set up the method and apparatus that audio/video communication connects
CN104935446B (en) * 2014-03-17 2019-03-05 华为技术有限公司 The network quality appraisal procedure and device excavated based on confidence level
CN104410509B (en) * 2014-10-16 2018-01-05 宁波菊风系统软件有限公司 A kind of multi-path data transmission method based on quality evaluation
CN107295286A (en) * 2016-03-31 2017-10-24 掌赢信息科技(上海)有限公司 A kind of video call data transmission method, system, server and video conversation apparatus
CN105897478B (en) * 2016-04-12 2019-02-05 腾讯科技(深圳)有限公司 A kind of method and decision device of link decisions
CN108990125B (en) * 2017-06-01 2020-12-22 华为技术有限公司 Data transmission method, terminal equipment and network equipment
CN110019174B (en) * 2018-12-13 2023-06-20 创新先进技术有限公司 Data quality determining method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112367493A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN113261247B (en) Method and client device for maintaining continuous network service
EP2625848B1 (en) Rate adaptation for video calling
CN110798868B (en) Network switching method, electronic equipment and chip subsystem
EP3311534B1 (en) Method and apparatus for multipath media delivery
US9049690B2 (en) Communication system, wireless communication terminal, communication method, wireless communication method, wireless communication apparatus and control method thereof
US9332583B2 (en) Multipoint communication device and method of performing switching from multipoint communication to point-to-point communication
EP2135407B1 (en) Method of transmitting data in a communication system
US7929453B2 (en) Method and apparatus for presenting quality information in a communication system
US10880342B2 (en) Dynamically controlling communication channels during a communication session
WO2014146100A1 (en) Methods and systems for dynamic adjustment of session parameters for effective video collaboration among heterogeneous devices
CN111246033A (en) Data transmission method, device, equipment and readable storage medium
CN103718532A (en) Data transmission method, apparatus and terminal device
US9130761B2 (en) Method and system for data transmission
EP2992648A1 (en) Rate control
WO2023000894A1 (en) Data transmission method and apparatus, and server, storage medium and program product
US20130065588A1 (en) Transmitting data over multiple networks
WO2007022440A2 (en) Resource selection in a communication network
CN106027599B (en) Data transmission channel establishing method, system and server
CN115767649A (en) Instant messaging method, instant messaging device, electronic equipment and storage medium
EP4228309A1 (en) Call method and device
CN115277806A (en) Cloud desktop connection method, device and equipment
CN112367493B (en) Data transmission control method, device, mobile terminal and storage medium
CN112929704A (en) Data transmission method, device, electronic equipment and storage medium
US20130067083A1 (en) Transmitting Data Over Multiple Networks
CN112995567A (en) Video call method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant