A method, apparatus, electronic device, and storage medium for media data transmission

By obtaining the available bandwidth value of the terminal device in the SIP communication platform and dynamically adjusting the encoding parameters, the data transmission congestion caused by the mismatch between the media negotiation code rate and the network bandwidth is solved, and a more stable and efficient audio and video call data transmission is achieved.

CN115941601BActive Publication Date: 2025-06-27E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211372072.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2025-06-27
Estimated Expiration
2042-11-03

AI Technical Summary

Technical Problem

In the audio and video call scenario of the SIP protocol, the media negotiation code rate of the terminal device does not match the actual network bandwidth, resulting in data transmission congestion and video delay, lag or blurred picture problems.

Method used

By receiving the registration request of the terminal device in the SIP communication platform, obtaining its available bandwidth value, and determining the appropriate encoding parameters based on the value for media data transmission. During the data transmission process, the heartbeat detection request of the terminal device is received regularly, and the encoded parameters are dynamically adjusted to match bandwidth changes.

Benefits of technology

It effectively reduces the risk of congestion when terminal devices transmit data to SIP communication platform, avoids delay, lag and blurred picture problems in video calls, and improves the stability and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941601B_ABST
    Figure CN115941601B_ABST
Patent Text Reader

Abstract

The present invention discloses a media data transmission method, apparatus, electronic device and storage medium, which are used to solve the technical problem that media data is prone to congestion during transmission. The present invention includes: receiving a registration request initiated by the terminal device; responding to the registration request to obtain the available bandwidth value of the terminal device, and sending the available bandwidth value to the terminal device; receiving an initiate session request sent by the terminal device based on the available bandwidth value, and determining an encoding parameter according to the initiate session request; receiving media data transmitted by the terminal device through the encoding parameter; during the receiving process of the media data, periodically receiving a heartbeat detection request sent by the terminal device; determining an updated encoding parameter according to the heartbeat detection request, and receiving the media data according to the updated encoding parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular, to a method, device, electronic device and storage medium for media data transmission. Background Art

[0002] The SIP protocol (Session Initiation Protocol), with the increasing maturity of converged communication technologies, has been widely recognized and commonly adopted as the mainstream protocol in the IMS network.

[0003] Through the SIP protocol, audio and video calls can be realized between general intelligent terminals and existing fixed-line phones and mobile phones in the network. However, in the actual process of the project, it is found that the media negotiation of the terminal device only combines the capabilities of the hardware device itself and does not fit the actual available bandwidth. Therefore, the negotiation result often does not match the bandwidth. If the media negotiation bit rate is too high, it may cause data overtransmission, resulting in the amount of data sent being greater than the capacity of the actual network, and then causing delays and lags in the video picture. If the media negotiation bit rate is too low, it often leads to the amount of data sent being much lower than the capacity of the actual network, and the network bandwidth cannot be utilized well, ultimately resulting in a blurred video picture and obvious mosaic phenomena.

[0004] The prior art mainly uses the SLoPS algorithm for adaptive voice coding to solve the above problems. However, the SLoPS algorithm is a congestion control algorithm based on delay. Although it can accurately estimate the bandwidth state, the algorithm convergence speed is relatively slow and the test time is relatively long. In audio and video communication scenarios with high timeliness requirements, it may cause new delay bottlenecks. In addition, the prior art performs network detection for all devices without screening according to the device type and network type of the device. For example, when the device is in a 5G network environment with strong signals, such network detection will not have a substantial impact on the media negotiation result. Moreover, the prior art does not propose a solution for how to perform adaptive voice coding and media negotiation when the network environment changes during a call, resulting in congestion during the media data transmission process. Summary of the Invention

[0005] The present invention provides a method, device, electronic device and storage medium for media data transmission, which are used to solve the technical problem that media data is prone to congestion during transmission.

[0006] The present invention provides a method for media data transmission, which is applied to an SIP communication platform that communicates with a terminal device; the method includes:

[0007] Receiving a registration request initiated by the terminal device;

[0008] Obtain the available bandwidth value of the terminal device in response to the registration request, and send the available bandwidth value to the terminal device;

[0009] Receive the session initiation request sent by the terminal device based on the available bandwidth value, and determine the encoding parameters according to the session initiation request;

[0010] Receive the media data transmitted by the terminal device through the encoding parameters;

[0011] During the reception of the media data, periodically receive the heartbeat detection request sent by the terminal device;

[0012] Determine updated encoding parameters according to the heartbeat detection request, and receive the media data according to the updated encoding parameters.

[0013] Optionally, the step of obtaining the available bandwidth value of the terminal device in response to the registration request and sending the available bandwidth value to the terminal device includes:

[0014] Obtain the extension field from the registration request; the extension field includes the network connection type and the signal strength;

[0015] Judge whether the network connection type is a preset type;

[0016] If the network connection type is a preset type, judge whether the signal strength meets the preset threshold;

[0017] If the signal strength does not meet the preset threshold, use the TCP-friendly rate control algorithm to obtain the available bandwidth value of the terminal device;

[0018] Send the available bandwidth value to the terminal device.

[0019] Optionally, the step of obtaining the available bandwidth value of the terminal device in response to the registration request and sending the available bandwidth value to the terminal device further includes:

[0020] If the network connection type is not a preset type, use the NADA algorithm to obtain the available bandwidth value of the terminal device.

[0021] Optionally, the step of obtaining the available bandwidth value of the terminal device in response to the registration request and sending the available bandwidth value to the terminal device further includes:

[0022] If the signal strength meets the preset threshold, set the available bandwidth value of the terminal device to be empty.

[0023] Optionally, the step of receiving the session initiation request sent by the terminal device based on the available bandwidth value and determining an encoding parameter according to the session initiation request includes:

[0024] Receiving the session initiation request sent by the terminal device based on the available bandwidth value;

[0025] Obtaining media encoding information from the session initiation request, where the media encoding information is generated by the extension field and the available bandwidth value;

[0026] Obtaining the available bandwidth value from the media encoding information;

[0027] When the available bandwidth value is not empty, obtaining a target media encoding type with a bandwidth requirement closest to the available bandwidth value in a preset media encoding type as the encoding parameter.

[0028] Optionally, the step of determining an updated encoding parameter according to the heartbeat detection request and receiving the media data according to the updated encoding parameter includes:

[0029] Judging whether to perform network detection according to the heartbeat detection request;

[0030] If so, obtaining the current available bandwidth value of the terminal device;

[0031] Calculating updated media encoding information according to the current available bandwidth value, and sending the updated media encoding information to the terminal device;

[0032] Receiving a modified session request sent by the terminal device carrying the updated media encoding information;

[0033] Generating an updated encoding parameter in response to the modified session request;

[0034] Receiving media data sent by the terminal device according to the updated encoding parameter.

[0035] Optionally, the step of calculating updated media encoding information according to the current available bandwidth value and sending the updated media encoding information to the terminal device includes:

[0036] Obtaining the current media encoding resolution of the terminal device;

[0037] Calculating updated media encoding information according to the current available bandwidth value and the current media encoding resolution;

[0038] Sending the updated media encoding information to the terminal device.

[0039] The present invention also provides a media data transmission device, which is applied to a SIP communication platform. The SIP communication platform communicates with terminal devices and includes:

[0040] A registration request receiving module, configured to receive a registration request initiated by the terminal device;

[0041] An available bandwidth value obtaining module, configured to obtain the available bandwidth value of the terminal device in response to the registration request and send the available bandwidth value to the terminal device;

[0042] An encoding parameter determining module, configured to receive an initiate session request sent by the terminal device based on the available bandwidth value and determine encoding parameters according to the initiate session request;

[0043] A media data receiving module, configured to receive media data transmitted by the terminal device through the encoding parameters;

[0044] A heartbeat detection request receiving module, configured to periodically receive a heartbeat detection request sent by the terminal device during the receiving process of the media data;

[0045] An updated encoding parameter determining module, configured to determine updated encoding parameters according to the heartbeat detection request and receive the media data according to the updated encoding parameters.

[0046] The present invention also provides an electronic device, which includes a processor and a memory:

[0047] The memory is used to store program codes and transmit the program codes to the processor;

[0048] The processor is configured to execute the media data transmission method described in any one of the above according to the instructions in the program codes.

[0049] The present invention also provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the media data transmission method described in any one of the above.

[0050] As can be seen from the above technical solutions, the present invention has the following advantages: The present invention provides a method for transmitting media data, which is applied to a SIP communication platform communicating with a terminal device, and includes: receiving a registration request initiated by the terminal device; responding to the registration request to obtain the available bandwidth value of the terminal device, and sending the available bandwidth value to the terminal device; receiving an initiate session request sent by the terminal device based on the available bandwidth value, and determining encoding parameters according to the initiate session request; receiving media data transmitted by the terminal device through the encoding parameters; during the receiving process of the media data, periodically receiving a heartbeat detection request sent by the terminal device; determining updated encoding parameters according to the heartbeat detection request, and receiving media data according to the updated encoding parameters. The present invention can select appropriate encoding parameters for data transmission based on the available bandwidth value of the terminal, which can reduce the congestion risk when the terminal device transmits data to the SIP communication platform; in addition, the present invention dynamically adjusts the encoding parameters in the media data transmission process by periodically obtaining the change situation of the available bandwidth value of the terminal device during the data transmission process, thereby reducing the congestion risk during the data transmission process. Description of the Drawings

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0052] Figure 1 It is a flowchart of the steps of a method for transmitting media data provided by an embodiment of the present invention;

[0053] Figure 2 It is a flowchart of the steps of a method for transmitting media data provided by another embodiment of the present invention;

[0054] Figure 3 It is a block diagram of the structure of a device for transmitting media data provided by an embodiment of the present invention. Detailed Embodiments

[0055] The embodiments of the present invention provide a method, device, electronic device and storage medium for transmitting media data, which are used to solve the technical problem that media data is prone to congestion during the transmission process.

[0056] In order to make the objectives, features, and advantages of the present invention more obvious and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0057] Please refer to Figure 1 , Figure 1 , which is a flowchart of the steps of a media data transmission method provided by an embodiment of the present invention.

[0058] A media data transmission method provided by the present invention is applied to an SIP communication platform and specifically may include the following steps:

[0059] Step 101, receiving a registration request initiated by a terminal device;

[0060] SIP (Session Initiation Protocol) is a text-based application layer control protocol used to create, modify, and release sessions of one or more participants. SIP is an IP voice session control protocol originating from the Internet and has characteristics such as flexibility, easy implementation, and convenient expansion.

[0061] In an embodiment of the present invention, the SIP communication platform may receive a registration request initiated by a terminal device to establish a communication connection with the terminal device.

[0062] Step 102, responding to the registration request to obtain the available bandwidth value of the terminal device and sending the available bandwidth value to the terminal device;

[0063] In a specific implementation, the registration request may carry an SIP extension field, which records the device type, network type, signal strength, and bandwidth information of the terminal device and is used to determine whether to detect the available bandwidth value of the terminal device.

[0064] When it is determined that the available bandwidth value of the terminal device needs to be obtained, corresponding bandwidth calculation methods may be selected according to different network types and signal strengths to obtain the available bandwidth value of the terminal device. And the calculated available bandwidth value is sent to the terminal device for local storage.

[0065] Step 103, receiving a session initiation request sent by the terminal device based on the available bandwidth value and determining encoding parameters according to the session initiation request;

[0066] In an embodiment of the present invention, the encoding parameters may include bit rate, resolution, etc.

[0067] After the terminal device obtains the available bandwidth value, it can generate media encoding information (Session Description Protocol, SDP) based on the SIP extension field and the available bandwidth value, and then send the Invite of the session initiation request carrying the SIP extension field and SDP to the SIP communication platform, so that the SIP communication platform can determine the current optimal encoding parameters of the terminal device based on the session initiation request.

[0068] In specific implementation, different available bandwidth values can correspond to a form of encoding parameters. When the SIP communication platform obtains the available bandwidth value, it can match the corresponding encoding parameters for the terminal device.

[0069] In the embodiment of the present invention, by selecting the encoding parameters matching the available bandwidth value of the terminal device itself, it can be ensured that there is no congestion when the media data is transmitted to the SIP communication platform, thereby avoiding the risk of stuttering when the media data is played.

[0070] SDP is used to provide multimedia session descriptions for purposes such as session notification, session invitation, and initialization of other forms of multimedia sessions.

[0071] Step 104, receive the media data transmitted by the terminal device through the encoding parameters;

[0072] After the terminal device obtains the corresponding encoding parameters, it can transmit the media data according to the encoding parameters.

[0073] In the embodiment of the present invention, the media data can be at least one of data forms such as audio data and video data.

[0074] Step 105, during the reception of the media data, periodically receive the heartbeat detection request sent by the terminal device;

[0075] Step 106, determine the updated encoding parameters according to the heartbeat detection request, and receive the media data according to the updated encoding parameters.

[0076] Furthermore, during the process of the terminal device sending media data to the SIP communication platform, the current available bandwidth value of the terminal device can be periodically detected to adjust the encoding parameters in real time when the terminal device transmits data to the SIP communication platform, ensuring that the media data will not cause transmission congestion due to changes in the bandwidth value during the transmission process.

[0077] The present invention selects appropriate encoding parameters for data transmission based on the available bandwidth value of the terminal, which can reduce the congestion risk when the terminal device transmits data to the SIP communication platform; in addition, the present invention dynamically adjusts the encoding parameters during the media data transmission process by periodically obtaining the change of the available bandwidth value during the data transmission process of the terminal device, thereby reducing the congestion risk during the data transmission process.

[0078] Please refer to Figure 2 , Figure 2 which is a flowchart of the steps of a media data transmission method provided by another embodiment of the present invention. Specifically, it may include the following steps:

[0079] Step 201, receiving a registration request initiated by the terminal device;

[0080] Step 201 is the same as step 101. For specific details, please refer to the description of step 101 and will not be elaborated here.

[0081] Step 202, obtaining the extended field from the registration request; the extended field includes the network connection type and the signal strength;

[0082] In the embodiment of the present invention, the extended field may include the device type, network type, signal strength, bandwidth information, etc. of the terminal device. The specific form is as follows:

[0083] sip-client-info: <client-type>,<network_type>,<network_strength><network_width>

[0084] Among them, sip-client-info represents an extended field, client-type is the device type, and information such as speaker, doorbell, camera, etc. can be filled in; network_type is the network type, such as wifi / 5G / 4G / 3G, etc.; network_strength is the signal strength, and high / mid / low can be filled in. network_width is the available bandwidth, which is default empty.

[0085] Step 203, determine whether the network connection type is a preset type;

[0086] After receiving the registration request, the SIP communication platform can parse the registration request to obtain the extended field from it; then, based on the extended field and the preset network detection strategy, it determines whether to perform network detection.

[0087] Among them, the network detection strategy records the judgment basis for whether to perform network detection. When the network connection type and signal strength of the terminal device do not meet the conditions listed in the network detection strategy, network detection is not performed, the available bandwidth value is returned as NULL, and the available bandwidth value is returned to the terminal device through the registered 2000K.

[0088] When the network connection type and / or signal strength of the terminal meet the conditions of the network detection strategy, network detection is performed.

[0089] Step 204, if the network connection type is a preset type, determine whether the signal strength meets the preset threshold;

[0090] Step 205, if the signal strength does not meet the preset threshold, use the TCP-friendly rate control algorithm to obtain the available bandwidth value of the terminal device;

[0091] In specific implementation, after obtaining the network connection type and signal strength from the extended field, it can be determined whether to establish a network connection based on the network connection type and signal strength.

[0092] When the network connection type is a preset type (such as Wifi or 5G or 4G), it represents that the network connection type is a strong network connection. At this time, it can be determined whether to perform network detection based on the signal strength. When the signal strength does not meet the preset threshold (the size can be flexibly set according to the actual situation), it represents that the signal strength is poor. At this time, the available bandwidth value of the terminal device can be obtained through the TCP-friendly rate control algorithm (TCP-Friendly Rate Control, TFRC).

[0093] TFRC is applicable to applications with a fixed packet size. It adjusts the data transmission rate by adjusting the number of packets sent per second according to the quality of the network environment. TFRC is a receiver-based mechanism that calculates congestion control information, such as the packet loss event rate, at the receiver.

[0094] In one example, when the network connection type is a preset type and the signal strength does not meet the preset threshold, the SIP communication platform can send detection data packets to the terminal device at a certain sending frequency through the network detection module; after receiving the detection data packets, the terminal device measures the incidence of packet loss or congestion events and feeds them back to the SIP communication platform; the network detection module measures the round-trip events using the received feedback information, and substitutes the packet loss event incidence and the round-trip events into the TFRC throughput formula to calculate the currently allowed TFRC flow throughput, that is, the available bandwidth value.

[0095] Step 206, if the network connection type is not the preset type, the NADA algorithm is used to obtain the available bandwidth value of the terminal device;

[0096] When the network connection type is not the preset type, the NADA algorithm can be used to obtain the available bandwidth value of the terminal device.

[0097] NADA is an algorithm based on delay estimation that can quickly stabilize the rate in a dynamic link, converge relatively quickly, and has a high bandwidth utilization rate when the link is not affected by random packet loss.

[0098] Step 207, if the signal strength meets the preset threshold, the available bandwidth value of the terminal device is set to empty;

[0099] When the signal strength of the terminal device meets the preset threshold, the available bandwidth value of the terminal device can be set to empty, so as not to perform network detection on the terminal device.

[0100] Step 208, send the available bandwidth value to the terminal device;

[0101] After calculating the available bandwidth value of the terminal device, the SIP communication platform can send the available bandwidth value to the terminal device for local storage.

[0102] Step 209, receive the session initiation request sent by the terminal device based on the available bandwidth value, and determine the encoding parameters according to the session initiation request;

[0103] In an embodiment of the present invention, after the terminal device obtains the available bandwidth value, it may generate media encoding information (Session Description Protocol, SDP) according to the SIP extension field and the available bandwidth value, and then send an Invite for initiating a session carrying the SIP extension field and the SDP to the SIP communication platform, so that the SIP communication platform can determine the current optimal encoding parameters of the terminal device based on the session initiation request.

[0104] In one example, the steps of receiving the session initiation request sent by the terminal device based on the available bandwidth value and determining the encoding parameters according to the session initiation request may specifically include the following sub-steps:

[0105] S11, receiving the session initiation request sent by the terminal device based on the available bandwidth value;

[0106] S12, obtaining the media encoding information from the session initiation request, where the media encoding information is generated by the extension field and the available bandwidth value;

[0107] S13, obtaining the available bandwidth value from the media encoding information;

[0108] S14, when the available bandwidth value is not empty, obtaining the target media encoding type whose bandwidth requirement is closest to the available bandwidth value in the preset media encoding types as the encoding parameter.

[0109] In a specific implementation, the terminal device may send the session initiation request including the extension field and the media encoding information to the SIP proxy server of the SIP communication platform; the SIP proxy server parses the session initiation request. If the available bandwidth value parsed is not empty, it may use the available bandwidth value as the upper limit of the media encoding, then filter out the media encoding types whose bandwidth requirements are greater than the available bandwidth value, and at the same time use the target media encoding type closest to the available bandwidth value as the encoding parameter.

[0110] Step 210, receiving the media data transmitted by the terminal device through the encoding parameter;

[0111] After determining the encoding parameters of the terminal device, the media data may be received from the terminal device according to the encoding parameters.

[0112] In an embodiment of the present invention, the encoding parameter stipulates the encoding requirements such as the bit rate and resolution when the terminal device sends media data to the SIP communication platform.

[0113] Step 211, during the reception of the media data, periodically receiving the heartbeat detection request sent by the terminal device;

[0114] Step 212, determining the updated encoding parameter according to the heartbeat detection request and receiving the media data according to the updated encoding parameter.

[0115] Further, during the process of the terminal device sending media data to the SIP communication platform, the current available bandwidth value of the terminal device can be detected at regular intervals to adjust the encoding parameters in real time when the terminal device transmits data to the SIP communication platform, ensuring that the media data will not cause transmission congestion due to changes in the bandwidth value during the transmission process.

[0116] In one example, the steps of determining updated encoding parameters according to the heartbeat detection request and receiving media data according to the updated encoding parameters may include the following sub-steps:

[0117] S21, determining whether to perform network detection according to the heartbeat detection request;

[0118] S22, if so, obtaining the current available bandwidth value of the terminal device;

[0119] S23, calculating updated media encoding information according to the current available bandwidth value and sending the updated media encoding information to the terminal device;

[0120] In a specific implementation, during the process of the terminal device transmitting media data to the SIP communication platform, a heartbeat detection request OPTION carrying an extended field can be sent to the SIP communication platform at regular intervals (such as every 1 minute). The SIP communication platform issues a task to the network detection module according to the extended field in the OPTION to detect the current available bandwidth value; then calculates updated media encoding information applicable to the current bandwidth situation according to the current available bandwidth value and sends the updated media encoding information to the terminal device.

[0121] In one example, the steps of calculating updated media encoding information according to the current available bandwidth value and sending the updated media encoding information to the terminal device may include the following sub-steps:

[0122] S231, obtaining the current media encoding resolution of the terminal device;

[0123] S232, calculating updated media encoding information according to the current available bandwidth value and the current media encoding resolution;

[0124] S233, sending the updated media encoding information to the terminal device.

[0125] In a specific implementation, the updated media encoding information can be determined by comparing the current media encoding resolution and the current available bandwidth value in the current call state of the terminal device.

[0126] For example, if the bit rate corresponding to the current available bandwidth value is still within the bit rate range allowed by the current media encoding resolution and the fluctuation compared with the original available bandwidth value is less than 10%, there is no need to modify the media encoding information.

[0127] If the bitrate corresponding to the current available bandwidth value is still within the bitrate range allowed by the current media encoding resolution and the upward fluctuation compared to the original available bandwidth value is greater than 10%, then calculate the new bitrate according to the following formula:

[0128] W 新 = min(W max , aW 当前 )

[0129] where, W 新 is the new bitrate, a is the bandwidth increment coefficient, W max is the maximum bitrate at the current media encoding resolution, and W 可用 is the bitrate of the currently transmitted data.

[0130] If the bitrate corresponding to the current available bandwidth value is still within the bitrate range allowed by the current media encoding resolution and the downward fluctuation compared to the original available bandwidth value is greater than 10%, then calculate the new bitrate according to the following formula:

[0131] W 新 = max(W min , W 当前 - b)

[0132] where, b is the bandwidth decrement coefficient, and W min is the minimum bitrate at the current media encoding resolution.

[0133] After obtaining the new bitrate, new encoding information such as the new resolution can be obtained according to the bitrate to obtain the updated media encoding information.

[0134] If the current available bandwidth value is no longer within the bitrate range of the current media encoding resolution, then use the media encoding information closest to the current available bandwidth value as the updated media encoding information.

[0135] S24, receive the modification session request carrying the updated media encoding information initiated by the terminal device;

[0136] S25, generate updated encoding parameters in response to the modification session request;

[0137] S26, receive the media data sent by the terminal device according to the updated encoding parameters.

[0138] In a specific implementation, it is possible to receive the re-invite modification session request carrying the updated media encoding information initiated by the terminal device, re-initiate media negotiation, generate updated encoding parameters, and then receive the media data sent by the terminal device according to the updated encoding parameters.

[0139] The present invention selects appropriate encoding parameters for data transmission based on the available bandwidth value of the terminal, which can reduce the congestion risk when the terminal device transmits data to the SIP communication platform. In addition, the present invention dynamically adjusts the encoding parameters during the media data transmission by periodically obtaining the change of the available bandwidth value of the terminal device during the data transmission process, thereby reducing the congestion risk during the data transmission process.

[0140] Please refer to Figure 3 , Figure 3 which is a structural block diagram of a media data transmission device provided by an embodiment of the present invention.

[0141] An embodiment of the present invention provides a media data transmission device, which is applied to a SIP communication platform and communicates with a terminal device. The device includes:

[0142] A registration request receiving module 301, configured to receive a registration request initiated by the terminal device;

[0143] An available bandwidth value obtaining module 302, configured to obtain the available bandwidth value of the terminal device in response to the registration request and send the available bandwidth value to the terminal device;

[0144] An encoding parameter determining module 303, configured to receive a session initiation request sent by the terminal device based on the available bandwidth value and determine the encoding parameter according to the session initiation request;

[0145] A media data receiving module 304, configured to receive the media data transmitted by the terminal device through the encoding parameter;

[0146] A heartbeat detection request receiving module 305, configured to periodically receive a heartbeat detection request sent by the terminal device during the receiving process of the media data;

[0147] An updated encoding parameter determining module 306, configured to determine an updated encoding parameter according to the heartbeat detection request and receive the media data according to the updated encoding parameter.

[0148] In the embodiment of the present invention, the available bandwidth value obtaining module 302 includes:

[0149] An extended field obtaining sub-module, configured to obtain an extended field from the registration request; the extended field includes a network connection type and a signal strength;

[0150] A preset type judging sub-module, configured to judge whether the network connection type is a preset type;

[0151] A preset threshold judging sub-module, configured to judge whether the signal strength meets a preset threshold if the network connection type is a preset type;

[0152] The first available bandwidth value acquisition sub-module is used to, if the signal strength does not meet the preset threshold, obtain the available bandwidth value of the terminal device by using the TCP-friendly rate control algorithm;

[0153] The available bandwidth value sending sub-module is used to send the available bandwidth value to the terminal device.

[0154] In an embodiment of the present invention, the available bandwidth value acquisition module 302 further includes:

[0155] The second available bandwidth value acquisition sub-module is used to, if the network connection type is not the preset type, obtain the available bandwidth value of the terminal device by using the NADA algorithm.

[0156] In an embodiment of the present invention, the available bandwidth value acquisition module 302 further includes:

[0157] The third available bandwidth value acquisition sub-module is used to, if the signal strength meets the preset threshold, set the available bandwidth value of the terminal device to be empty.

[0158] In an embodiment of the present invention, the encoding parameter determination module 303 includes:

[0159] The session initiation request receiving sub-module is used to receive the session initiation request sent by the terminal device based on the available bandwidth value;

[0160] The media encoding information acquisition sub-module is used to obtain the media encoding information from the session initiation request, and the media encoding information is generated by an extended field and the available bandwidth value;

[0161] The fourth available bandwidth value acquisition sub-module is used to obtain the available bandwidth value from the media encoding information;

[0162] The encoding parameter determination sub-module is used to, when the available bandwidth value is not empty, obtain the target media encoding type whose bandwidth requirement is closest to the available bandwidth value among the preset media encoding types as the encoding parameter.

[0163] In an embodiment of the present invention, the updated encoding parameter determination module 306 includes:

[0164] The network detection judgment sub-module is used to judge whether to perform network detection according to the heartbeat detection request;

[0165] The current available bandwidth value acquisition sub-module is used to, if so, obtain the current available bandwidth value of the terminal device;

[0166] The updated media encoding information calculation sub-module is used to calculate the updated media encoding information according to the current available bandwidth value and send the updated media encoding information to the terminal device;

[0167] The modified session request receiving sub-module is used to receive a modified session request carrying updated media encoding information initiated by a terminal device;

[0168] The updated encoding parameter generating sub-module is used to generate updated encoding parameters in response to the modified session request;

[0169] The media data receiving sub-module is used to receive media data sent by the terminal device according to the updated encoding parameters.

[0170] In an embodiment of the present invention, the updated media encoding information calculation sub-module includes:

[0171] The current media encoding resolution obtaining unit is used to obtain the current media encoding resolution of the terminal device;

[0172] The updated media encoding information calculation unit is used to calculate updated media encoding information according to the current available bandwidth value and the current media encoding resolution;

[0173] The updated media encoding information sending unit is used to send the updated media encoding information to the terminal device.

[0174] An embodiment of the present invention further provides an electronic device, which includes a processor and a memory:

[0175] The memory is used to store program code and transmit the program code to the processor;

[0176] The processor is used to execute the media data transmission method of the embodiment of the present invention according to the instructions in the program code.

[0177] An embodiment of the present invention further provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the media data transmission method of the embodiment of the present invention.

[0178] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0179] Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.

[0180] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0181] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0182] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operation steps are executed on the computer or other programmable terminal devices to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable terminal devices provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0184] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0185] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent in such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or terminal device comprising the said element.

[0186] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A media data transmission method, characterized in that, Applied to the SIP communication platform, which communicates with terminal devices; the method includes: Receiving a registration request initiated by the terminal device; Responding to the registration request to obtain the available bandwidth value of the terminal device, and sending the available bandwidth value to the terminal device; Receiving an initiate session request sent by the terminal device based on the available bandwidth value, and determining encoding parameters according to the initiate session request; Receiving media data transmitted by the terminal device through the encoding parameters; During the receiving process of the media data, periodically receiving a heartbeat detection request sent by the terminal device; Determining updated encoding parameters according to the heartbeat detection request, and receiving the media data according to the updated encoding parameters; The step of responding to the registration request to obtain the available bandwidth value of the terminal device and sending the available bandwidth value to the terminal device includes: Obtaining an extension field from the registration request; the extension field includes a network connection type and a signal strength; Judging whether the network connection type is a preset type; If the network connection type is a preset type, judging whether the signal strength meets a preset threshold; If the signal strength does not meet the preset threshold, the TCP-friendly rate control algorithm is used to obtain the available bandwidth value of the terminal device; Sending the available bandwidth value to the terminal device.

2. The method according to claim 1, characterized in that, The step of responding to the registration request to obtain the available bandwidth value of the terminal device and sending the available bandwidth value to the terminal device further includes: If the network connection type is not a preset type, the NADA algorithm is used to obtain the available bandwidth value of the terminal device.

3. The method according to claim 1, wherein The step of responding to the registration request to obtain the available bandwidth value of the terminal device and sending the available bandwidth value to the terminal device further includes: If the signal strength meets the preset threshold, the available bandwidth value of the terminal device is set to be empty.

4. The method according to claim 1, wherein The step of receiving the initiate session request sent by the terminal device based on the available bandwidth value and determining encoding parameters according to the initiate session request includes: Receiving the initiate session request sent by the terminal device based on the available bandwidth value; Obtaining media encoding information from the initiate session request, where the media encoding information is generated by the extension field and the available bandwidth value; Obtaining the available bandwidth value from the media encoding information; When the available bandwidth value is not empty, obtaining a target media encoding type whose bandwidth requirement is closest to the available bandwidth value among preset media encoding types as encoding parameters.

5. The method according to claim 1, wherein The step of determining updated encoding parameters according to the heartbeat detection request and receiving the media data according to the updated encoding parameters includes: Judging whether to perform network detection according to the heartbeat detection request; If so, obtaining the current available bandwidth value of the terminal device; Calculating updated media encoding information according to the current available bandwidth value, and sending the updated media encoding information to the terminal device; Receiving a modify session request initiated by the terminal device carrying the updated media encoding information; Responding to the modify session request to generate updated encoding parameters; Receive the media data sent by the terminal device according to the updated encoding parameters.

6. The method according to claim 5, characterized in that, The step of calculating updated media encoding information according to the current available bandwidth value and sending the updated media encoding information to the terminal device includes: Obtain the current media encoding resolution of the terminal device; Calculate updated media encoding information according to the current available bandwidth value and the current media encoding resolution; Send the updated media encoding information to the terminal device.

7. A media data transmission device, characterized in that, Applied to the SIP communication platform, the SIP communication platform communicates with the terminal device; includes: A registration request receiving module, configured to receive a registration request initiated by the terminal device; An available bandwidth value obtaining module, configured to obtain the available bandwidth value of the terminal device in response to the registration request and send the available bandwidth value to the terminal device; An encoding parameter determining module, configured to receive an initiate session request sent by the terminal device based on the available bandwidth value and determine encoding parameters according to the initiate session request; A media data receiving module, configured to receive the media data transmitted by the terminal device through the encoding parameters; A heartbeat detection request receiving module, configured to periodically receive a heartbeat detection request sent by the terminal device during the receiving process of the media data; An updated encoding parameter determining module, configured to determine updated encoding parameters according to the heartbeat detection request and receive the media data according to the updated encoding parameters; The encoding parameter determining module is further configured to obtain an extension field from the registration request; the extension field includes a network connection type and a signal strength; determine whether the network connection type is a preset type; if the network connection type is the preset type, determine whether the signal strength meets a preset threshold; if the signal strength does not meet the preset threshold, then use the TCP-friendly rate control algorithm to obtain the available bandwidth value of the terminal device; send the available bandwidth value to the terminal device.

8. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the media data transmission method according to any one of claims 1-6 according to the instructions in the program code.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code, and the program code is used to execute the media data transmission method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Video coding parameter setting method, device and video coding device for live video

    CN105163134A

  • Live video parameter adjustment method, system, device and equipment and storage medium

    CN114286128A