Communication control method, device, equipment and computer readable storage medium
By obtaining the initial code rate in advance in video calls and adjusting the encoder parameters according to the wireless signal, the problem of adaptive adjustment of bit rate in the prior art is solved, and the bit rate accuracy and communication quality during the neutral period are improved.
Patent Information
- Application Number
- CN202210287874.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-03-22
AI Technical Summary
In the existing video call technology, the code rate adaptive adjustment algorithm lags behind, resulting in no code rate adaptive adjustment for a period of time after the video call is turned on, reducing the accuracy of the code rate and communication quality.
When the communication is not turned on, the encoder is configured by obtaining the initial code rate and performing hierarchical mapping according to the wireless signal. If the temporary maximum code rate request is not received when the communication is turned on, the step size is determined based on the received wireless signal. Calculate the target code rate to reconfigure the encoder to achieve adaptive adjustment of the code rate.
It improves the accuracy of the code rate and communication quality during the neutral period, avoids the lag problem of adaptive adjustment of the code rate, and improves the initial quality and resource utilization of video calls.
Smart Images

Figure CN114650420B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication control method, apparatus, device and computer-readable storage medium. Background Art
[0002] In current video calls, for example, Video over Long-Term Evolution (ViLTE), an algorithm for dynamically adjusting the video encoding bit rate is used to achieve adaptive bit rate adjustment of the sending terminal. The algorithm performs adaptive bit rate adjustment based on the received Real-time Transport Protocol (RTP) data packets. The adjustment process is as follows: after the sending terminal and the receiving terminal establish a video call connection, the receiving terminal receives the RTP data packet, and evaluates the data such as packet loss, jitter or delay of the RTP data packet to obtain the recommended target bit rate. Then, the Temporary Maximum Media Stream Bit Rate Request (TMMBR) is sent to the sending terminal through the RTP Control Protocol (RTCP). After receiving the TMMBR, the sending terminal encodes and outputs according to the target bit rate recommended in the TMMBR.
[0003] However, in the prior art, the bitrate is adaptively adjusted based on received data. In a period of time after a video call is started, data needs to be received first, and the evaluation algorithm is started according to packet loss, jitter or delay of the received data to make the first evaluation result. Therefore, the bitrate adaptive adjustment algorithm is lagging, resulting in a period of idle time after the video call is started. There is no bitrate adaptive adjustment during the idle time, which reduces the accuracy of the bitrate during the idle time and reduces the communication quality. Summary of the invention
[0004] The embodiments of the present application provide a communication control method, apparatus, device and computer-readable storage medium. After the communication is established, if the TMMBR is not received, the bit rate is adjusted according to the received wireless signal and the initial bit rate, thereby improving the accuracy of the bit rate during the idle period and improving the communication quality during the idle period.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a communication control method, which is applied to a sending terminal, and the method includes: when the communication is not connected, obtaining an initial bit rate, the initial bit rate is obtained by level mapping according to the downlink signal, and the initial bit rate is used to configure the encoding parameters of the encoder, so that when the communication is connected, the configured encoder is used for encoding to complete the data transmission in the communication; when the communication is connected, if the temporary maximum bit rate request sent by the receiving terminal is not received, determining the adjustment step according to the received wireless signal; according to the initial bit rate and the adjustment step, calculating the target bit rate, and the target bit rate is used to reconfigure the encoding parameters of the encoder to complete the communication.
[0007] In a second aspect, an embodiment of the present application provides a communication control device, comprising: an acquisition module, used to acquire an initial bit rate when communication is not connected, the initial bit rate is obtained by level mapping based on a downlink signal, and the initial bit rate is used to configure the encoding parameters of the encoder so that the configured encoder is used for encoding when the communication is connected to complete the data transmission in the communication; a determination module, used to determine an adjustment step size according to a received wireless signal if a temporary maximum bit rate request sent by a receiving terminal is not received when the communication is connected; a calculation module, used to calculate a target bit rate based on the initial bit rate and the adjustment step size, and the target bit rate is used to reconfigure the encoding parameters of the encoder to complete the communication.
[0008] In a third aspect, an embodiment of the present application provides a communication control device, which includes a memory for storing executable instructions and a processor for implementing the above-mentioned communication control method when executing the executable instructions stored in the memory.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having executable instructions stored thereon for implementing the above-mentioned communication control method when executed by a processor.
[0010] The embodiment of the present application provides a communication control method, device, equipment and computer-readable storage medium. According to the scheme provided by the embodiment of the present application, when the communication is not connected, the initial bit rate is obtained, and the initial bit rate is obtained by level mapping according to the downlink signal. The initial bit rate is used to configure the encoding parameters of the encoder, so that the configured encoder is used for encoding when the communication is connected to complete the data transmission in the communication. When the communication is connected, if the temporary maximum bit rate request sent by the receiving terminal is not received, it means that the communication is in a gap period, then the adjustment step size is determined according to the received wireless signal; the target bit rate is calculated according to the initial bit rate and the adjustment step size, and the target bit rate is used to reconfigure the encoding parameters of the encoder, so as to complete the communication, and realize the adaptive adjustment of the bit rate when the communication is connected, but the temporary maximum bit rate request sent by the receiving terminal is not received (i.e., in the gap period), which improves the accuracy of the bit rate when the communication is connected (i.e., in the gap period) and improves the communication quality when the communication is connected (i.e., in the gap period). BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 An optional flow chart of a communication control method provided in an embodiment of the present application;
[0012] Figure 2 An optional flowchart of another communication control method provided in an embodiment of the present application;
[0013] Figure 3 An optional flow chart of another communication control method provided in an embodiment of the present application;
[0014] Figure 4 An optional flow chart of a communication control method before communication connection provided in an embodiment of the present application;
[0015] Figure 5 An optional flowchart for predicting an initial bit rate provided in an embodiment of the present application;
[0016] Figure 6 An optional flow chart of a communication control method after communication is established provided in an embodiment of the present application;
[0017] Figure 7 An optional flow chart of predicting the adjustment step size provided in an embodiment of the present application;
[0018] Figure 8 A schematic diagram of the structure of a communication control device provided in an embodiment of the present application;
[0019] Fig. 9 A schematic diagram of the structure of a communication control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that some embodiments described here are only used to explain the technical solutions of the present application and are not used to limit the technical scope of the present application.
[0021] The communication control method provided in the embodiment of the present application can be applied to ViLTE calls, Video over New Radio (ViNR) calls, and can also be applied to other VoIP (Voice Over Internet Protocol) service types based on LTE and 5G NR, such as Voice over Long-Term Evolution (VoLTE) and Voice over New Radio (VoNR), which are not limited to the embodiments of the present application. Among them, ViLTE is "High Definition Video Call (Video over LTE)", which is an extension of VoLTE and enhances voice services. VoIP communication technology is a voice transmission call based on IP and is widely used in instant messaging.
[0022] The communication control method provided in the embodiment of the present application is applied to the communication between the sending terminal and the receiving terminal, for example, voice call and video call. Taking video call as an example, the sending terminal and the receiving terminal can both be clients, but not the same client. During the video call, the sending terminal sends a video call request to the receiving terminal through the server. When the communication network state is good, after the receiving terminal accepts the call request, a successful call connection is established between the two terminals. The encoders of the two terminals encode the video data stream and transmit it to the other party. The other party decodes the received video data stream and then displays the video screen. The process is repeated to realize end-to-end video communication. Since the data stream transmission between the two terminals is bidirectional, any terminal is both the sending end and the receiving end of the data, that is, the same client can be used as both the receiving end and the sending end. Without departing from the scope of the embodiment of the present application, the sending terminal can be referred to as the receiving terminal, and similarly, the receiving terminal can be referred to as the sending terminal. The above-mentioned terminal can be a vehicle-mounted device, a smart phone, a tablet computer, a wearable device, a personal computer (PC), a portable computer, etc., which is not limited to the embodiment of the present application.
[0023] To facilitate understanding of the present solution, prior to describing the embodiments of the present application, the relevant technologies in the embodiments of the present application are described.
[0024] Take video calls as an example. With the widespread application of video calls in various fields, users have higher and higher requirements for video quality. The most important aspects of video quality are clarity and fluency. The higher the bit rate, the higher the audio quality and video clarity. At the same time, the greater the amount of information, the larger the transmission bandwidth occupied. Bit rate refers to the number of bits transmitted per unit time, and the unit is bit / s (bit / s or bps), kilobit / s (kbit / s or kbps, k=1000) or megabit / s (Mbps, M=1000000). It can be understood as the data traffic used by video or audio files per unit time. The higher the bit rate, the more data is transmitted per second, and the clearer the picture quality. When the bit rate exceeds the network bandwidth, it will cause network congestion and video freeze. Since the bit rate parameter is directly related to the size of the encoded video or audio file, the bit rate is an important factor in controlling video quality. When users make video calls, automatically adjusting the bit rate can ensure that good video quality can be provided as much as possible under different network conditions.
[0025] Taking ViLTE video calls as an example, the audio and video bearers of ViLTE video calls are both guaranteed bit rate (GBR) type. GBR bearers are used for services with high real-time requirements, and the network scheduler needs to guarantee the lowest bit rate for this type of bearer. In theory, the network should allocate corresponding bandwidth resources to the terminal. For example, the bandwidth information (AS) value uses 2160kbps, that is, the reference bit rate standard value is 2160kbps. In fact, the video bearer established by the network for the terminal is also a 2160kbps GBR type bearer. In theory, the network should provide corresponding network transmission capabilities. However, in actual use, even in an environment with a relatively strong signal, packet loss will occur in the first few seconds of the video call. This is because the network scheduler provides bandwidth resources in a linear climbing process and cannot instantly schedule a lot of bearer resources to the terminal, especially for services such as video calls that require a lot of bandwidth. In the environment of medium signal, weak signal, and cell congestion, it is more difficult for the network to schedule video resources for the terminal, so the video packet loss phenomenon is more serious in the first few seconds.
[0026] For example, Figure 1 As shown, Figure 1An optional flow chart of a communication control method provided for an embodiment of the present application. The receiving terminal (Receiver) and the sending terminal (Sender) both include an RTP / RTCP processor (RTP / RTCPProcessing), which is used to establish a call connection through the RTP / RTCP protocol, and receive and send data based on the RTP / RTCP protocol. The receiving terminal performs packet loss estimation (Estimated Loss), jitter estimation (Estimated Jitter), delay estimation (Estimated Delay) and throughput estimation (Estimated Throughput) based on the received RTP data, thereby completing the rate adaptation algorithm evaluation (Rate Adaptation Algorithm), and calculating the suggested sending rate (Suggeated Sender Rate) of the sending terminal. Then, the receiving terminal sends the TMMBR to the sending terminal through the RTP / RTCP protocol. The TMMBR indicates that the current bandwidth of the receiving terminal is limited, and tells the sending terminal to control the bit rate. The TMMBR is used to request the sending terminal to transmit the data stream at the specified maximum bit rate during the call. The sending terminal transmits the received TMMBR to the rate enforcer or delay recovery, which is used to parse the RTP / RTCP protocol to obtain the TMMBR. The video encoder is configured according to the recommended sending bit rate, and the configured encoder encodes the video data, and then sends the encoded video to the receiving terminal using the RTP / RTCP protocol through the RTP / RTCP processor.
[0027] Above Figure 1 By estimating the RTP data sent by the sending terminal, parameters about the network status, such as packet loss rate, delay and jitter, are obtained to provide data support for adaptive bitrate adjustment. The RTP data is replaced with the recommended bitrate for the sending terminal, and the recommended bitrate is transmitted to the sending terminal in real time using the RTP / RTCP protocol. TMMBR can be defined in the RTP / RTCP protocol to achieve dynamic bitrate control. Figure 1 The communication control method described in has a lag. TMMBR is an algorithm for adaptive bit rate adjustment based on received data. There is a gap in the start of a video call. It is necessary to receive data for a period of time (for example, 3-6 seconds) before the first evaluation result can be made. This causes a gap in the first few seconds of ViLTE. There is no adaptive bit rate adjustment during the gap, which reduces the accuracy of the bit rate.
[0028] The present application embodiment provides a communication control method, such as Figure 2 As shown, Figure 2 An optional flow chart of a communication control method provided in an embodiment of the present application, the communication control method is applied to a sending terminal, and the communication control method comprises the following steps:
[0029] S101. When communication is not connected, an initial bit rate is obtained. The initial bit rate is obtained by level mapping according to a downlink signal. The initial bit rate is used to configure encoding parameters of an encoder so that when communication is connected, the configured encoder is used for encoding to complete data transmission in communication.
[0030] In the embodiment of the present application, when the communication is not connected, the encoding parameters of the encoder are configured according to the initial bit rate, so that the configured encoder is used for encoding when the communication is connected. Taking the communication as an example, if the initial bit rate is too low, such as 30kbps, the initial quality of the video call will be relatively poor, and it will take about tens of seconds to gradually improve the quality of the video call. If the initial bit rate is too high, it will be congested for a long time, resulting in failure to connect. For example, when the initial bit rate of both directions is 500kbps each, and the bandwidth of both directions is 50kbps each, network congestion is likely to occur, and the minimum recovery time is about tens of seconds.
[0031] In the embodiment of the present application, when the communication is not connected, the initial bit rate is obtained by level mapping based on the downlink signal. In the actual network, the downlink signal of the sending terminal can reflect the uplink capability to a certain extent. When the downlink receiving capability of the sending terminal is relatively poor, its uplink transmission capability is generally not very good. Therefore, the initial bit rate can be predicted by the downlink signal, thereby realizing the bit rate adjustment based on the downlink signal prediction during the communication gap, and improving the accuracy of the initial bit rate.
[0032] In some embodiments, after obtaining the initial bit rate, the communication control method further includes the following steps: determining the initial resolution and initial frame rate according to the initial bit rate; configuring the encoder according to the initial bit rate, initial resolution and initial frame rate; if a change in the downlink signal is detected, level mapping is performed according to the changed downlink signal to obtain an updated initial bit rate, and the updated initial bit rate is used to reconfigure the encoding parameters of the encoder until the communication is connected.
[0033] In an embodiment of the present application, the transmitting terminal continuously monitors the change of the downlink signal, and performs level mapping according to the downlink signal to obtain the initial bit rate. Since there is a corresponding relationship between the bit rate, the frame rate and the resolution, for example, when the bit rate is low, the resolution and frame rate are also relatively low. Therefore, after the bit rate is determined, the transmitting terminal can adapt the corresponding resolution and frame rate according to the bit rate. Then, the encoder is configured according to the initial bit rate, the initial resolution and the initial frame rate. For example, the initial resolution may include 1080P, 720P, VGA (Video Graphics Array) and QVGA (Quarter VGA), where p is the clarity, the resolution of 720P is 1280×720 pixels, VGA and QVGA are formats, VGA represents the display drawing matrix, equivalent to 640×480 pixels, QVGA is one quarter of VGA, and the resolution is 320×240 pixels.
[0034] In an embodiment of the present application, since the sending terminal continuously monitors changes in the downlink signal, when the downlink signal changes, the sending terminal will promptly update the initial bit rate according to the changed downlink signal, and then adapt the corresponding resolution and frame rate according to the updated initial bit rate, and then reconfigure the encoder.
[0035] It is understandable that the encoder can be configured with the latest initial bit rate only before the communication is connected, so that the encoder can be configured once, thereby reducing the number of configurations and reducing resource consumption. However, in the actual communication process, it is unknown when the communication is connected. Therefore, by configuring the encoder all the time, it is possible to use the configured encoder for encoding when the communication is connected to complete the data transmission in the communication, thereby improving the communication efficiency and the accuracy of the configuration parameters of the encoder when the communication is connected.
[0036] S102: When the communication is established, if no temporary maximum bit rate request is received from the receiving terminal, an adjustment step size is determined according to the received wireless signal.
[0037] In an embodiment of the present application, after the communication is connected, the transmitting terminal uses the configured encoder to encode, thereby transmitting data in the communication with the receiving terminal. And receive the wireless signal sent by the receiving terminal. The wireless signal is obtained after the data is transmitted between the transmitting terminal and the receiving terminal after the communication is connected. It is communication feedback and reflects the communication quality of the transmitting terminal and the receiving terminal to a certain extent. Therefore, in the idle period when the temporary maximum bit rate request sent by the receiving terminal is not received, the adjustment step size can be determined according to the wireless signal. The adjustment step size represents the adjustment direction and adjustment size of the bit rate, for example, how many steps to advance (increase) or how many steps to retreat (decrease).
[0038] S103, calculating a target bit rate according to the initial bit rate and the adjustment step size, and the target bit rate is used to reconfigure the encoding parameters of the encoder, thereby completing the communication.
[0039] In the embodiment of the present application, the target code rate is calculated based on the initial code rate and the adjustment step size, thereby realizing code rate adjustment based on feedback information (received wireless signal) during the communication idle period.
[0040] It is understandable that after the communication is established, before receiving the temporary maximum bit rate request sent by the receiving terminal, the transmitting terminal can periodically determine the adjustment step size according to the received wireless signal. Then, according to the periodic adjustment step size, the bit rate is periodically adjusted based on the bit rate adjusted last time, until the TMMBR sent by the receiving terminal is received, and then the bit rate is adjusted by the normal bit rate adaptive algorithm evaluation, as shown above. Figure 1 The code rate adaptive adjustment method shown in the figure adjusts the code rate by gradually increasing or decreasing the code rate to prevent sudden changes in the code rate, thereby improving the accuracy of the code rate during the idle period and improving the communication quality during the idle period.
[0041] The communication control scheme provided in the embodiment of the present application can solve the problem of easy packet loss during communication idle periods (when the transmitting terminal and the receiving terminal have not established a communication connection), and is a slow-start rate adaptive adjustment algorithm based on prediction and feedback. When the communication is not connected, the initial rate is predicted in advance based on the downlink signal of the transmitting terminal, and when the communication is connected, the rate is dynamically adjusted based on the feedback information. The multiple encoding formats supported by the communication control method provided in the embodiment of the present application are consistent with TMMBR, including but not limited to H.264 / AVC, VP8 and H.265 / HEVC. The communication control method has strong compatibility with the rate adaptive adjustment algorithm based on TMMBR, and is a supplement to the TMMBR algorithm.
[0042] According to the scheme provided by the embodiment of the present application, when the communication is not connected, the initial bit rate is obtained, and the initial bit rate is obtained by level mapping according to the downlink signal. The initial bit rate is used to configure the encoding parameters of the encoder, so that the configured encoder is used for encoding when the communication is connected to complete the data transmission in the communication. When the communication is connected, if the temporary maximum bit rate request sent by the receiving terminal is not received, it means that the communication is in a idle period, and the adjustment step size is determined according to the received wireless signal; the target bit rate is calculated according to the initial bit rate and the adjustment step size, and the target bit rate is used to reconfigure the encoding parameters of the encoder, so as to complete the communication, and realize the adaptive adjustment of the bit rate when the communication is connected, but the temporary maximum bit rate request sent by the receiving terminal is not received, which improves the accuracy of the bit rate when the communication is connected and improves the communication quality when the communication is connected.
[0043] In some embodiments, the above Figure 2The initial bit rate in S101 can be obtained through S201-S203. Figure 3 As shown, Figure 3 An optional flowchart of another communication control method provided in an embodiment of the present application.
[0044] S201. When the communication request flag is turned on, obtain a downlink signal.
[0045] The communication request flag is used to prompt the sending terminal to connect the communication. When the communication request flag is turned on, the status of the sending terminal is that the communication is not connected.
[0046] In an embodiment of the present application, a communication request flag is used to prompt the sending terminal and the receiving terminal whether the communication request is turned on. Taking the communication as a video call as an example, the communication request flag can be a call ringing, a call vibration, a call text message, etc. The embodiment of the present application does not limit the specific form of the communication request flag. Since the sending terminal has been monitoring the downlink signal when the communication is not connected, if the downlink signal is obtained, the initial bit rate is determined, and the encoder is configured when the communication request flag is not turned on, it is easy to cause a waste of resources. In an embodiment of the present application, when the communication request flag is turned on, it means that the sending terminal and the receiving terminal have a communication demand, obtain the downlink signal, and improve resource utilization.
[0047] S202: Determine a code rate level according to a mapping relationship between a preset code rate calibration level and a downlink signal interval, and a downlink signal.
[0048] In an embodiment of the present application, the value of the downlink signal is discretely distributed. By presetting the mapping relationship between the preset code rate calibration level and the downlink signal interval, after the downlink signal is acquired, the code rate calibration level corresponding to the interval where the downlink signal is located can be used as the code rate level of the transmitting terminal according to the preset mapping relationship. The preset code rate calibration level may include multiple calibration levels, for example, 5 calibration levels, shown in percentage form, which are 35%, 50%, 65%, 75% and 100% respectively. The preset code rate calibration level can also be shown in the form of a level, for example, 5 calibration levels, which are level one, level two, level three, level four and level five. The higher the level, the better the communication quality and the higher the code rate required.
[0049] It should be noted that the preset bit rate calibration level, the downlink signal interval division method and the correspondence between the two can be appropriately set by technical personnel in this field according to actual conditions, and a suitable division interval can be selected according to the numerical distribution of multiple downlink signals, and the embodiments of the present application do not impose any restrictions on this.
[0050] S203: Determine an initial bit rate according to the bit rate level and a preset reference bit rate standard value.
[0051] In an embodiment of the present application, the preset reference bit rate standard value is 2160kbps. If the bit rate level is expressed in the form of a percentage, the product of the bit rate level and 2160kbps is used as the initial bit rate; if the bit rate level is expressed in the form of a level, the product of the percentage corresponding to the bit rate level and 2160kbps is used as the initial bit rate.
[0052] In an embodiment of the present application, when the communication request flag is turned on, the bit rate level of the current sending terminal is determined based on the downlink signal of the sending terminal and a preset mapping relationship; the initial bit rate is determined according to the bit rate level and a preset reference bit rate standard value, thereby achieving an early prediction of the initial bit rate and improving the accuracy of the initial bit rate.
[0053] In some embodiments, the downlink signal includes a reference signal received power and a signal-to-noise ratio; the mapping relationship includes a first mapping relationship and a second mapping relationship, the first mapping relationship represents the correspondence between the first preset code rate calibration level and the reference signal received power interval, and the second mapping relationship represents the correspondence between the second preset code rate calibration level and the signal-to-noise ratio interval. Figure 3 S202 may be implemented in the following manner: determining a first level according to the reference signal received power and the first mapping relationship; determining a second level according to the signal-to-noise ratio and the second mapping relationship; and determining a code rate level according to the first level and the second level.
[0054] In the embodiment of the present application, when the reference signal received power (RSRP) of the downlink signal is weak and the signal-to-noise ratio (SNR) is high, it means that the downlink receiving capability of the transmitting terminal is relatively poor, and at the same time, its uplink transmission capability is generally not very good.
[0055] In an embodiment of the present application, the first mapping relationship is shown in Table 1, which is a mapping relationship table between reference signal received power and level provided in an embodiment of the present application.
[0056] Table 1
[0057] RSRP -75≤RSRP<-44 -85≤RSRP<-75 -95≤RSRP<-85 -140≤RSRP<-95 Grade 4 3 2 1
[0058] In the embodiment of the present application, RSRP in Table 1 represents the reference signal received power of the downlink signal, in dBm, divided into four intervals, each interval corresponds to a level (i.e., level), and Table 1 shows 4 groups of corresponding relationships, and the first preset code rate calibration level includes four levels. The larger the RSRP value in Table 1, the stronger the signal strength, and the higher the corresponding level.
[0059] It should be noted that the RSRP interval division method, the correspondence between RSRP and grade, and the level of the grade can all be appropriately set by technical personnel in this field according to actual needs, and are not limited to the mapping relationship in Table 1. The embodiments of this application are only exemplary and not restrictive.
[0060] In the embodiment of the present application, the second mapping relationship is shown in Table 2, which is a mapping relationship table between signal-to-noise ratio and level provided in the embodiment of the present application.
[0061] Table 2
[0062] SNR SNR<-5 -5≤SNR<0 0≤SNR<5 5≤SNR Calibration value -2 -1 0 1
[0063] In the embodiment of the present application, SNR in Table 2 represents the signal-to-noise ratio of the downlink signal, in dB, divided into four intervals, each interval corresponds to a calibration value (i.e., level), and Table 2 shows 4 groups of corresponding relationships, and the second preset code rate calibration level includes four calibration values. The larger the value of SNR in Table 2, the smaller the interference signal in the communication, and the higher the corresponding calibration value.
[0064] It should be noted that the SNR interval division method, the corresponding relationship between the SNR and the calibration value, and the high and low calibration values can all be appropriately set by technical personnel in this field according to actual needs, and are not limited to the mapping relationship in Table 2. The embodiments of this application are only illustrative and not restrictive.
[0065] In the embodiment of the present application, when the code rate level is determined according to the first level and the second level, the sum of the first level and the second level can be used as the code rate level. It is also possible to assign different weight values to RSRP and SNR according to the importance of RSRP and SNR, multiply the first level by the weight corresponding to RSRP, multiply the second level by the weight corresponding to SNR, and then use the sum of the two products as the code rate level.
[0066] In the embodiment of the present application, the level is determined respectively by the reference signal received power and the signal-to-noise ratio, and the two levels are combined to obtain the code rate level. The code rate level reflects the impact of RSRP and SNR on the communication quality, thereby improving the accuracy of the code rate level.
[0067] In some embodiments, the above Figure 3 S203 can be implemented in the following manner: determining the calibration ratio value according to the mapping relationship between the third preset bit rate calibration level and the preset ratio value, and the bit rate level; and taking the product of the calibration ratio value and the preset reference bit rate standard value as the initial bit rate.
[0068] In an embodiment of the present application, a third mapping relationship represents a correspondence between a third preset bit rate calibration level and a preset ratio value. The third mapping relationship is shown in Table 3, which is a mapping relationship table between a ratio value and a level provided in an embodiment of the present application.
[0069] Table 3
[0070] Calibration level 1 2 3 4 Discount ratio 35% 50% 65% 75%
[0071] In the embodiment of the present application, the calibration level (i.e., code rate level) in Table 3 is divided into four intervals, each interval corresponds to a discount ratio (i.e., calibration ratio value), and Table 3 shows 4 groups of corresponding relationships, and the third preset code rate calibration level includes four discount ratios. The larger the value of the calibration level in Table 3, the better the communication quality, and the higher the corresponding discount ratio.
[0072] It should be noted that the calibration level interval division method, the correspondence between the calibration level and the discount ratio, and the discount ratio can all be appropriately set by technical personnel in this field according to actual needs, and are not limited to the mapping relationship in Table 3. The embodiments of this application are only illustrative and not restrictive.
[0073] In an embodiment of the present application, a calibration ratio value is determined according to a bit rate level and a preset mapping relationship; the product of the calibration ratio value and a preset reference bit rate standard value is used as the initial bit rate, thereby achieving an early prediction of the initial bit rate and improving the accuracy of the initial bit rate.
[0074] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0075] In the embodiment of the present application, the downlink signal of the transmitting terminal can reflect the uplink capability to a certain extent. Taking the communication as a video call and the communication request flag being turned on as a call ringing as an example, the initial bit rate is predicted by referring to the RSRP and SNR of the downlink signal, such as Figure 4 As shown, Figure 4 An optional flowchart of a communication control method before communication is established provided in an embodiment of the present application.
[0076] S401, the call rings.
[0077] S402: The transmitting terminal monitors changes in the reference signal received power and signal-to-noise ratio of the downlink signal.
[0078] S403: When the reference signal received power and the signal-to-noise ratio change, use Algorithm 1 to predict the initial bit rate.
[0079] It should be noted that when the initial bit rate is predicted for the first time, the initial bit rate is predicted using Algorithm 1 based on the reference signal received power and signal-to-noise ratio monitored after the call rings. In the subsequent loop process, only when the reference signal received power and signal-to-noise ratio are monitored to change, Algorithm 1 is used to re-predict the initial bit rate and reconfigure the encoder. If the reference signal received power and signal-to-noise ratio do not change, there is no need to execute the loop process, thereby reducing resource consumption.
[0080] In the embodiment of the present application, Algorithm 1 is implemented through S4031-S4036. The process of Algorithm 1 is as follows Figure 5 As shown, Figure 5 An optional flowchart for predicting an initial bit rate is provided in an embodiment of the present application.
[0081] S4031. Read the reference signal received power and signal-to-noise ratio of the downlink signal.
[0082] S4032. Obtain signal grade A according to a mapping relationship table between reference signal received power and grade, and the reference signal received power of the downlink signal.
[0083] S4033: Obtain a calibration value B according to a mapping relationship table between the signal-to-noise ratio and the level and the signal-to-noise ratio of the downlink signal.
[0084] S4034. Calculate the bit rate level C, C=A+B.
[0085] S4035. According to the mapping relationship table between the ratio value and the level, and the bit rate level C, obtain the discount ratio of the initial bit rate.
[0086] S4036: The product of the discount ratio and the preset reference bit rate standard value is used as the initial bit rate.
[0087] S404: Adapt the initial resolution and initial frame rate according to the initial bit rate.
[0088] S405 . Configure the encoder according to the initial bit rate, initial resolution, and initial frame rate to obtain a configured encoder.
[0089] After the encoder is configured in S405, it is necessary to continue to monitor changes in the downlink signal. When the downlink signal changes, it is necessary to re-execute S403-S405, that is, re-configure the encoder until the call is connected.
[0090] S406: The call is connected.
[0091] In the embodiment of the present application, when the call rings, the initial bit rate is predicted based on the downlink signal of the transmitting terminal monitored, and the encoding parameters of the encoder are configured using the initial bit rate. When the downlink signal is monitored to change, the initial bit rate is updated, and the encoding parameters of the encoder are updated based on the updated initial bit rate, so that when the call is connected, the configured encoder can be used for video or voice encoding, thereby improving the call efficiency.
[0092] In some embodiments, the above Figure 2 S102 can be implemented in the following manner: Determine the adjustment step size according to the wireless signal received within a preset time period after the communication is established; wherein the preset time period is less than the time taken by the transmitting terminal and the receiving terminal to establish a communication connection.
[0093] In the embodiment of the present application, the above Figure 2 The communication control method described in the specification can adjust the bit rate once to obtain the target bit rate, and then perform communication control according to the target bit rate. The bit rate can also be adjusted periodically, where a period is a preset time period, that is, the bit rate is repeatedly adjusted after each preset time period after the communication is established.
[0094] It should be noted that the preset time period can be appropriately set by those skilled in the art according to actual conditions, as long as it is less than the time taken by the sending terminal and the receiving terminal to establish a communication connection, and the length of the preset time period is not limited in the embodiment of the present application. For example, the time taken by the sending terminal and the receiving terminal to establish a communication connection is 5s, and the preset time period is set to 0.5s, 1s, 2s, etc.
[0095] In some embodiments, the above Figure 2 After S103, the communication control method further includes: S104-S106.
[0096] S104: Determine a target resolution and a target frame rate according to the target bit rate.
[0097] In the embodiment of the present application, since there is a corresponding relationship between the bit rate, the frame rate and the resolution, after the bit rate is determined, the sending terminal can adapt the corresponding resolution and frame rate according to the bit rate.
[0098] S105 . Reconfigure the encoding parameters of the encoder according to the target bit rate, target resolution, and target frame rate to implement the communication control process within the next preset time period.
[0099] In the embodiment of the present application, taking the preset time period of 1s as an example, the encoding parameters of the encoder are configured using the initial bit rate, initial resolution and initial frame rate. After the configuration is completed, the encoder is used to encode the video or voice within the first second when the communication is connected, complete the data transmission in the communication with the receiving terminal, and receive the wireless signal sent by the receiving terminal. According to the wireless signal received within the first second, the adjustment step size is determined, and the initial bit rate is adjusted (forward or backward) according to the adjustment step size to obtain the target bit rate. The encoding parameters of the encoder are reconfigured using the target bit rate, target resolution and target frame rate. After the reconfiguration is completed, the encoder is used to encode the video or voice within the next second, complete the data transmission in the communication with the receiving terminal, and receive the wireless signal sent by the receiving terminal to realize the communication control process within the next second.
[0100] S106. If the next preset time period is exceeded and the temporary maximum bit rate request sent by the receiving terminal is not received, the process of determining the next bit rate and reconfiguring the encoding parameters of the encoder next time is continued according to the wireless signal received within the next preset time period until the temporary maximum bit rate request sent by the receiving terminal is received, thereby achieving adaptive adjustment of the bit rate.
[0101] In the embodiment of the present application, taking the preset time period of 1s as an example, if the sending terminal does not receive the TMMBR sent by the receiving terminal after the next second, it means that the sending terminal and the receiving terminal have not established a communication connection, then the bit rate is adjusted once every 1s, and the encoder is reconfigured once until the TMMBR sent by the receiving terminal is received, thereby realizing adaptive adjustment of the bit rate during the communication gap period.
[0102] In an embodiment of the present application, if TMMBR is not received, it means that the communication is in an idle period, and the timer is always in an on state. Each time the timer times out, the above-mentioned bit rate adjustment process is executed once, and this cycle is repeated until TMMBR is received, and the timer is stopped, thereby realizing adaptive adjustment of the bit rate during the idle period, thereby improving the accuracy of the bit rate during the idle period and improving the communication quality during the idle period.
[0103] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0104] In the embodiment of the present application, the communication is a video call, the preset time period is 1s, and the received wireless signal includes the number of key frame requests (Picture Loss Indication, PLI) and the packet loss rate (fractionLost) in the reception report. When the call is connected, a 1S timer T1 is started. When T1 times out, the target bit rate is calculated using Algorithm 2. When the first TMMBR packet is received, the timer T1 is stopped. Figure 6 As shown, based on Figure 4 , Figure 6 An optional flowchart of a communication control method after communication is established provided in an embodiment of the present application.
[0105] S601: The call is connected, and the encoder is used to complete the data transmission during the call.
[0106] According to the above Figure 4 The encoder configured in S405 performs data transmission during the call.
[0107] S602: Start a 1s timer.
[0108] S603: Complete the data transmission during the call based on the encoder and receive RTCP within 1 second.
[0109] S604: Analyze the number of key frame requests and the packet loss rate in the receiving report according to RTCP.
[0110] S605: The timer times out.
[0111] In the embodiment of the present application, the timer is used cyclically, that is, when the timer times out (i.e., every 1 second), S606-S610 are re-executed until the TMMBR sent by the receiving terminal is received.
[0112] S606: Determine whether the sending terminal has received the TMMBR sent by the receiving terminal. If so, execute S607; if not, execute S608.
[0113] S607: Stop the 1s timer.
[0114] S608 . Calculate the target bit rate using Algorithm 2 according to the number of key frame requests in S604 and the packet loss rate in the receiving report.
[0115] S609: Adapt the target resolution and target frame rate according to the target bit rate.
[0116] S610: Configure the encoder according to the target bit rate, target resolution, and target frame rate.
[0117] In the embodiment of the present application, after the call is connected, the bit rate is dynamically adjusted based on the RTCP feedback information, thereby achieving periodic adaptive adjustment of the bit rate during the idle period, improving the accuracy of the target bit rate, and improving the call quality.
[0118] In some embodiments, the received wireless signal includes a packet loss rate in a reception report sent by the receiving terminal, and the number of received key frame requests. The above implementation method of determining the adjustment step size may include three examples.
[0119] In the embodiment of the present application, when the sending terminal and the receiving terminal are communicating, if the signal is not good, the network conditions are unstable, etc., network packet loss may occur during the transmission of the communication data. Taking a video call as an example, the loss of video data packets may cause mosaic or incomplete images on the received video screen. The video data packet loss rate reflects the quality of the current video call network. The greater the video data packet loss rate, the worse the network quality. The receiving terminal can calculate the data packet loss rate of the call in real time during the call and send it to the sending terminal in the form of a receive report (Receive Report, RR). The receive report is an RR message sent by the receiving terminal to the sending terminal. The fraction lost field of the RR message occupies 8 bits. Since the last time the RR message was sent, the receiving terminal estimates the packet loss rate of the RTP packet received from the sending terminal, obtains the packet loss rate in the RR message, and sends it to the sending terminal. The number of key frame requests may include PLI and SLI (Slice Loss Indication). The key frame request is used for the receiving terminal to request the sending terminal to regenerate and send a key frame when the key frame is lost and cannot be decoded. When the transmitting terminal receives the PLI or SLI fed back by the receiving terminal, it is necessary to let the encoder generate the key frame again and send it to the receiving terminal.
[0120] In the first example, when the packet loss rate in the received report within the preset time period is greater than the first preset value, and the packet loss rate in the received report within the previous preset time period is greater than the second preset value, the adjustment step size is determined to be the back-off first value.
[0121] In the embodiment of the present application, in the first preset time period, since there is no packet loss rate in the reception report of the previous preset time period, the packet loss rate in the reception report of the previous preset time period is set to 0. The first value can be appropriately set by those skilled in the art according to actual needs. For example, the first value is a specific parameter, and the first value can be set to 4, and the backward first value is represented by -4.
[0122] Exemplarily, taking the case where both the first preset value and the second preset value are 0, the preset time period is 1s, and the first numerical value is 4, when the packet loss rate in the received report within this second is greater than 0, and the packet loss rate in the received report within the previous second is greater than 0, the adjustment step is determined to be -4.
[0123] It should be noted that the adjustment step is in units of step size, and a step size can be 10kbps or 200kbps, which is not limited in the embodiment of the present application. For example, taking a step size of 100kbps as an example, the adjustment step size is -4, indicating that the current bit rate needs to be adjusted to fall back 400kbps. The first preset value and the second preset value can be appropriately set by those skilled in the art according to actual needs, as long as they can reflect the severity of the packet loss rate. The first preset value and the second preset value can be the same or different, which is not limited in the embodiment of the present application.
[0124] In the second example, when the packet loss rate in the received report within the preset time period is greater than the first preset value, and the packet loss rate in the received report within the previous preset time period is less than or equal to the second preset value, the adjustment step size is determined to be a second value.
[0125] In the embodiment of the present application, the second value can be appropriately set by those skilled in the art according to actual needs. For example, the second value is a specific parameter, and the second value is set to 1. The second value can also be determined according to the bit rate level in a preset time period. For example, the second value is set to 5-ratio / 25, where ratio represents the average bit rate level corresponding to the downlink signal in the preset time period, or the bit rate level corresponding to the downlink signal after the preset time period. When calculating ratio, you can refer to the above Figure 3-Figure 5 The process of calculating the bit rate level in the above code rate level is not repeated here. The difference from the above code rate level is that the ratio here is an integer multiple of 25, for example, 25, 50, 75, 100, etc. Of course, the second value can also be set to C-5, where C is the value of Figure 5 The bit rate level within the preset time period calculated by the steps in .
[0126] In the embodiment of the present application, when the second preset value is set to 0, it is sufficient to determine whether the packet loss rate in the received report within the last preset time period is equal to 0. Exemplarily, taking the first preset value and the second preset value as 0, the preset time period is 1s, and the second value is 5-ratio / 25 as an example, when the packet loss rate in the received report within the one second is greater than 0, and the packet loss rate in the received report within the last second is equal to 0, the adjustment step size is determined to be (ratio / 25-5), (ratio / 25-5) is a negative number, that is, the adjustment step size is backward (5-ratio / 25).
[0127] In a third example, when the packet loss rate in the received report within the preset time period is less than or equal to the first preset value, and the number of key frame requests received within the preset time period is greater than that within the previous preset time period, the adjustment step size is determined to be a third value.
[0128] In the embodiment of the present application, in the first preset time period, since there is no key frame request number received in the previous preset time period, the key frame request number received in the previous preset time period is set to 0. When the first preset value is set to 0, it is sufficient to determine whether the packet loss rate in the reception report in the preset time period is equal to 0. The third value can be appropriately set by those skilled in the art according to actual needs. For example, the third value is a specific parameter, and the third value is set to 2.
[0129] Exemplarily, taking the second preset value as 0, the preset time period as 1s, and the third value as 2, when the packet loss rate in the received report within one second is equal to 0, and the number of key frame requests received within one second is greater than the number of key frame requests received within the previous second, the adjustment step is determined to be -2.
[0130] In the embodiment of the present application, the conditions met are determined according to the packet loss rate in the reception report sent by the receiving terminal and the number of key frame requests received, and the corresponding adjustment step is determined according to the met conditions. The adjustment is performed by gradually increasing or decreasing the bit rate to prevent sudden changes in the bit rate, improve the accuracy of the bit rate during the idle period, and improve the communication quality during the idle period.
[0131] In some embodiments, the above adjustment step may also include the following implementation methods: when the packet loss rate in the received report within the preset time period is less than or equal to the first preset value, and the number of key frame requests received within the preset time period is less than or equal to the number of key frame requests received within the previous preset time period, the number of packet losses corresponding to the local area within the preset time period is obtained; and the adjustment step is determined according to the number of packet losses corresponding to the local area within the preset time period.
[0132] In the embodiment of the present application, the local corresponding packet loss number is obtained by the sending terminal counting the local packet loss number within a preset time period, which reflects the local network communication quality.
[0133] Exemplarily, taking the first preset value being 0 and the preset time period being 1s as an example, when the packet loss rate in the received report within that one second is equal to 0, and the number of key frame requests received within the preset time period is less than or equal to the number of key frame requests received within the previous preset time period, it is necessary to further determine the adjustment step size based on the corresponding number of packet losses locally within that one second, thereby improving the accuracy of the adjustment step size.
[0134] In an embodiment of the present application, the bit rate is dynamically adjusted based on RTCP feedback information and local signal changes of the sending terminal, thereby achieving periodic adaptive adjustment of the bit rate during the idle period, improving the accuracy of the target bit rate, and improving the communication quality.
[0135] In some embodiments, the above-mentioned determination of the adjustment step size according to the number of local packet losses corresponding to a preset time period can be implemented in the following manner.
[0136] In the fourth example, when the number of packet losses corresponding locally within the preset time period is less than or equal to the third preset value, or the number of packet losses corresponding locally within the preset time period is less than or equal to the number of packet losses corresponding locally within the previous preset time period, the adjustment step is determined to be the fourth value of the retreat.
[0137] In the embodiment of the present application, in the first preset time period, since there is no local corresponding packet loss number in the previous preset time period, the local corresponding packet loss number in the previous preset time period is set to 0. The fourth value can be appropriately set by those skilled in the art according to actual needs. For example, the fourth value is a specific parameter, and the fourth value can be set to 2.
[0138] Exemplarily, taking the third preset value being 0, the preset time period being 1s, and the fourth value being 2 as an example, when the number of packet losses corresponding locally within that second is equal to 0, or the number of packet losses corresponding locally within that second is less than or equal to the number of packet losses corresponding locally within the previous second, the adjustment step is determined to be -2.
[0139] In some embodiments, when the number of packet losses corresponding locally within a preset time period is greater than a third preset value, and the number of packet losses corresponding locally within the preset time period is greater than the number of packet losses corresponding locally within the previous preset time period, the average values of multiple bitrate levels within the preset time period and the average values of multiple bitrate levels within the previous preset time period are calculated; the adjustment step size is determined based on the average values of multiple bitrate levels within the preset time period and the average values of multiple bitrate levels within the previous preset time period.
[0140] In the embodiment of the present application, in the first preset time period, due to the average value of multiple bitrate levels in the previous preset time period, the average value of multiple bitrate levels in the previous preset time period is set to 0. The average value of multiple bitrate levels represents the long-term average value of the bitrate level, reflecting the local network communication quality and the stability of the local network in the preset time period. When calculating multiple bitrate levels in the preset time period, you can refer to the above Figure 5 The calculation is carried out by following the steps in .
[0141] Exemplarily, taking the third preset value being 0 and the preset time period being 1s as an example, when the number of packet losses corresponding locally in that second is greater than 0, and the number of packet losses corresponding locally in that second is greater than the number of packet losses corresponding locally in the previous second, it is necessary to further determine the adjustment step size by judging whether the average value of multiple bitrate levels in that second is greater than the average value of multiple bitrate levels in the previous second, thereby improving the accuracy of the adjustment step size.
[0142] In some embodiments, the above-mentioned determination of the adjustment step size according to the average values of multiple bit rate levels in the preset time period and the average values of multiple bit rate levels in the previous preset time period may include three examples.
[0143] In a fifth example, when the average value of the multiple bit rate levels in the preset time period is less than the average value of the multiple bit rate levels in the previous preset time period, the adjustment step size is determined to be the fifth backward value.
[0144] In the embodiment of the present application, the fifth value can be appropriately set by those skilled in the art according to actual needs. For example, the fifth value is a specific parameter, and the fifth value can be set to 1.
[0145] Exemplarily, taking the preset time period as 1 second and the fifth value as 1 as an example, when the average value of multiple bitrate levels within this second is less than the average value of multiple bitrate levels within the previous second, the adjustment step is determined to be -1.
[0146] In a sixth example, when an average value of a plurality of bit rate levels within a preset time period is greater than an average value of a plurality of bit rate levels within a previous preset time period, the adjustment step size is determined to be a sixth value.
[0147] In the embodiment of the present application, the sixth value can be appropriately set by those skilled in the art according to actual needs. For example, the sixth value is a specific parameter, and the sixth value can be set to 4. The sixth value can also be determined according to the bit rate level in a preset time period. For example, the sixth value is set to ratio / 25, where ratio represents the average bit rate level corresponding to the downlink signal in the preset time period, or the bit rate level corresponding to the downlink signal after the preset time period.
[0148] Exemplarily, taking the preset time period as 1 second and the sixth value as ratio / 25, when the average value of multiple rate levels in this second is less than the average value of multiple rate levels in the previous second, the adjustment step size is determined to be ratio / 25.
[0149] In a seventh example, when the average value of the multiple bit rate levels within the preset time period is equal to the average value of the multiple bit rate levels within the previous preset time period, the adjustment step size is determined to be a seventh value forward.
[0150] In the embodiment of the present application, the seventh value can be appropriately set by those skilled in the art according to actual needs. For example, the seventh value is a specific parameter, and the seventh value can be set to 3. The seventh value can also be determined according to the bit rate level in a preset time period. For example, the seventh value is set to (ratio / 25-1).
[0151] Exemplarily, taking the preset time period as 1s and the seventh value as (ratio / 25-1), when the average value of multiple rate levels within this second is less than the average value of multiple rate levels within the previous second, the adjustment step size is determined to be (ratio / 25-1).
[0152] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0153] In the embodiment of the present application, the first preset value, the second preset value, and the third preset value are all 0, mRemotelost represents the packet loss rate in the reception report sent by the receiving terminal within the preset time period (that is, the value of fractionLost in the received RR), mLastFractionLost represents the packet loss rate in the reception report sent by the receiving terminal within the previous preset time period, mPLICount represents the number of key frame requests received within the preset time period, mLastPLI represents the number of key frame requests received within the previous preset time period, mlocallost represents the number of packet losses corresponding to the local area within the preset time period, mLastlocal represents the number of packet losses corresponding to the local area within the previous preset time period, mScore represents the adjustment step size, ratio represents the code rate level corresponding to the downlink signal, sigLong represents the average value of multiple code rate levels within the preset time period, and mLastSi represents the average value of multiple code rate levels within the previous preset time period. Figure 7 As shown, Figure 7 An optional flowchart of predicting an adjustment step size is provided for an embodiment of the present application, and the steps of predicting an adjustment step size include S701-S717.
[0154] S701. Obtain a packet loss rate, a key frame request number, a local corresponding packet loss number, and an average value of multiple bit rate levels in a reception report sent by a receiving terminal.
[0155] Among them, the packet loss rate in the reception report sent by the receiving terminal in S701 includes the packet loss rate in the reception report sent by the receiving terminal within the preset time period (mRemotelost) and the packet loss rate in the reception report sent by the receiving terminal within the previous preset time period (mLastFractionLost); the number of key frame requests includes the number of key frame requests received within the preset time period (mPLICount) and the number of key frame requests received within the previous preset time period (mLastPLI); the number of locally corresponding packet losses includes the number of locally corresponding packet losses within the preset time period (mlocallost) and the number of locally corresponding packet losses in the previous preset time period (mLastlocal); the average value of multiple bitrate levels includes the average value of multiple bitrate levels within the preset time period (sigLong) and the average value of multiple bitrate levels in the previous preset time period (mLastSi).
[0156] S702: Determine whether the packet loss rate (mRemotelost) in the reception report sent by the receiving terminal within a preset time period is greater than 0. If mRemotelost is greater than 0, execute S703; if mRemotelost is equal to 0, execute S706.
[0157] S703, determine whether the packet loss rate (mLastFractionLost) in the reception report sent by the receiving terminal in the last preset time period is greater than 0, if mLastFractionLost is greater than 0, execute S704, if mLastFractionLost is equal to 0, execute S705.
[0158] S704. Determine the adjustment step size (mScore) as -4.
[0159] S705. Determine the adjustment step size (mScore) as (ratio / 25-5).
[0160] S706. Determine whether the number of key frame requests received within the preset time period (mPLICount) is greater than the number of key frame requests received within the previous preset time period (mLastPLI). If mPLICount is greater than mLastPL, execute S707; if mPLICount is less than or equal to mLastPL, execute S708.
[0161] S707. Determine the adjustment step size (mScore) as -2.
[0162] S708. Determine whether the number of packet losses corresponding to the local area (mlocallost) within the preset time period is greater than 0, and whether the number of packet losses corresponding to the local area (mlocallost) within the preset time period is greater than the number of packet losses corresponding to the local area (mLastlocal) within the previous preset time period. If mlocallost is equal to 0, or mlocallost is less than or equal to mLastlocal, execute S709. If mlocallost is greater than 0, and mlocallost is greater than mLastlocal, execute S710.
[0163] S709: Determine the adjustment step size (mScore) as -2.
[0164] S710, determine whether there is an average value (sigLong) of multiple bit rate levels within a preset time period, if not, execute S711, if yes, execute S712.
[0165] S711. Determine the adjustment step size (mScore) as 2.
[0166] It should be noted that S710 and S711 may not be executed, and S712 may be executed directly, that is, there is no need to determine whether sigLong exists. Reliable operation of the program can be ensured by executing S710.
[0167] S712, determine whether the average value (sigLong) of multiple bit rate levels within the preset time period is less than the average value (mLastSi) of multiple bit rate levels within the previous preset time period; if sigLong is less than mLastSi, execute S713; if sigLong is greater than or equal to mLastSi, execute S714.
[0168] S713. Determine the adjustment step size (mScore) as -1.
[0169] S714, determine whether the average value (sigLong) of multiple bit rate levels within the preset time period is greater than the average value (mLastSi) of multiple bit rate levels within the previous preset time period; if sigLong is greater than mLastSi, execute S715; if sigLong is equal to mLastSi, execute S716.
[0170] S715. Determine the adjustment step size (mScore) as ratio / 25.
[0171] S716: Determine whether the average value (sigLong) of the multiple bit rate levels in the preset time period is equal to the average value (mLastSi) of the multiple bit rate levels in the previous preset time period. If sigLong is equal to mLastSi, execute S717.
[0172] S717. Determine the adjustment step size (mScore) as ratio / 25-1.
[0173] It should be noted that after executing S715, S717 is directly executed without the step of determining whether sigLong is equal to mLastSi. The reliable operation of the program can be ensured by executing S716.
[0174] In an embodiment of the present application, the bit rate is dynamically adjusted based on RTCP feedback information and local signal changes of the sending terminal, thereby achieving periodic adaptive adjustment of the bit rate during the idle period, improving the accuracy of the target bit rate, and improving call quality.
[0175] Based on the communication control method of the embodiment of the present application, the embodiment of the present application also provides a communication control device, such as Figure 8 As shown, Figure 8A structural schematic diagram of a communication control device provided in an embodiment of the present application, the communication control device 80 includes: an acquisition module 801, used to acquire an initial bit rate when communication is not connected, the initial bit rate is obtained by level mapping according to a downlink signal, and the initial bit rate is used to configure the encoding parameters of the encoder so that the configured encoder is used for encoding when the communication is connected to complete the data transmission in the communication; a determination module 802, used to determine an adjustment step size according to a received wireless signal if a temporary maximum bit rate request sent by a receiving terminal is not received when the communication is connected; a calculation module 803, used to calculate a target bit rate according to the initial bit rate and the adjustment step size, and the target bit rate is used to reconfigure the encoding parameters of the encoder to complete the communication.
[0176] In some embodiments, the acquisition module 801 is further used to acquire the downlink signal when the communication request flag is turned on; wherein the communication request flag is used to prompt the sending terminal to connect the communication, and when the communication request flag is turned on, the state of the sending terminal is that the communication is not connected;
[0177] The determination module 802 is further configured to determine the bit rate level according to a mapping relationship between a preset bit rate calibration level and a downlink signal interval, and the downlink signal; and determine the initial bit rate according to the bit rate level and a preset reference bit rate standard value.
[0178] In some embodiments, the downlink signal includes a reference signal received power and a signal-to-noise ratio; the mapping relationship includes a first mapping relationship and a second mapping relationship, the first mapping relationship represents a correspondence between a first preset code rate calibration level and a reference signal received power interval, and the second mapping relationship represents a correspondence between a second preset code rate calibration level and a signal-to-noise ratio interval;
[0179] The determination module 802 is further configured to determine a first level according to the reference signal received power and the first mapping relationship; determine a second level according to the signal-to-noise ratio and the second mapping relationship; and determine the coding rate level according to the first level and the second level.
[0180] In some embodiments, the determination module 802 is further used to determine the calibration ratio value based on the mapping relationship between the third preset bit rate calibration level and the preset ratio value, and the bit rate level; and take the product of the calibration ratio value and the preset reference bit rate standard value as the initial bit rate.
[0181] In some embodiments, the communication control device 80 further includes a configuration module;
[0182] The determination module 802 is further configured to determine an initial resolution and an initial frame rate according to the initial bit rate;
[0183] The configuration module is used to configure the encoder according to the initial bit rate, the initial resolution and the initial frame rate; if the downlink signal is monitored to change, level mapping is performed according to the changed downlink signal to obtain an updated initial bit rate, and the updated initial bit rate is used to reconfigure the encoding parameters of the encoder until the communication is established.
[0184] In some embodiments, the determination module 802 is also used to determine the adjustment step size based on the wireless signal received within a preset time period after the communication is established; wherein the preset time period is less than the time taken for the transmitting terminal to establish a communication connection with the receiving terminal; and determine the target resolution and the target frame rate based on the target bit rate; reconfigure the encoding parameters of the encoder based on the target bit rate, the target resolution and the target frame rate to achieve the communication control process within the next preset time period; if the next preset time period is exceeded and the temporary maximum bit rate request sent by the receiving terminal is not received, then according to the wireless signal received within the next preset time period, continue to determine the next bit rate and reconfigure the encoding parameters of the encoder for the next time, until the temporary maximum bit rate request sent by the receiving terminal is received and stop, thereby achieving adaptive adjustment of the bit rate.
[0185] In some embodiments, the received wireless signal includes a packet loss rate in a reception report sent by the receiving terminal, and a number of key frame requests received;
[0186] The determination module 802 is also used to determine the adjustment step to be a first value to retreat to when the packet loss rate in the received report within the preset time period is greater than the first preset value, and the packet loss rate in the received report within the previous preset time period is greater than the second preset value; when the packet loss rate in the received report within the preset time period is greater than the first preset value, and the packet loss rate in the received report within the previous preset time period is less than or equal to the second preset value, determine the adjustment step to be a second value to retreat to; when the packet loss rate in the received report within the preset time period is less than or equal to the first preset value, and the number of key frame requests received within the preset time period is greater than the number of key frame requests received within the previous preset time period, determine the adjustment step to be a third value to retreat to.
[0187] In some embodiments, the determination module 802 is also used to obtain the locally corresponding number of packet losses within the preset time period when the packet loss rate in the received report within the preset time period is less than or equal to the first preset value, and the number of key frame requests received within the preset time period is less than or equal to the number of key frame requests received within the previous preset time period; and determine the adjustment step size based on the locally corresponding number of packet losses within the preset time period.
[0188] In some embodiments, the determination module 802 is further configured to determine the adjustment step size as a fourth value when the number of packet losses corresponding to the local area in the preset time period is less than or equal to the third preset value, or the number of packet losses corresponding to the local area in the preset time period is less than or equal to the number of packet losses corresponding to the local area in the previous preset time period;
[0189] The calculation module 803 is further configured to calculate the average values of multiple bitrate levels in the preset time period and the average values of multiple bitrate levels in the previous preset time period when the number of packet losses corresponding to the local area in the preset time period is greater than the third preset value and the number of packet losses corresponding to the local area in the preset time period is greater than the number of packet losses corresponding to the local area in the previous preset time period;
[0190] The determination module 802 is further configured to determine the adjustment step size according to an average value of a plurality of bit rate levels within the preset time period and an average value of a plurality of bit rate levels within the previous preset time period.
[0191] In some embodiments, the determination module 802 is further used to determine the adjustment step size as the fifth value to move backward when the average value of multiple rate levels within the preset time period is less than the average value of multiple rate levels within the previous preset time period; to determine the adjustment step size as the sixth value to move forward when the average value of multiple rate levels within the preset time period is greater than the average value of multiple rate levels within the previous preset time period; and to determine the adjustment step size as the seventh value to move forward when the average value of multiple rate levels within the preset time period is equal to the average value of multiple rate levels within the previous preset time period.
[0192] It should be noted that the communication control device provided in the above embodiment only uses the division of the above program modules as an example when performing communication control. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the communication control device and the communication control method embodiment provided in the above embodiment belong to the same concept. The specific implementation process and beneficial effects are detailed in the method embodiment, which will not be repeated here. For technical details not disclosed in the embodiment of this device, please refer to the description of the method embodiment of this application for understanding.
[0193] In the embodiments of the present application, Fig. 9 This is a schematic diagram of the structure of the communication control device proposed in the embodiment of the present application, such as Fig. 9 As shown, the device 90 proposed in the embodiment of the present application may also include a processor 901 and a memory 902 storing executable instructions of the processor 901. In some embodiments, the communication control device 90 may also include a communication interface 903 and a bus 904 for connecting the processor 901, the memory 902 and the communication interface 903.
[0194] In the embodiment of the present application, the processor 901 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present application does not specifically limit it.
[0195] In the embodiment of the present application, the bus 904 is used to connect the communication interface 903, the processor 901 and the memory 902, as well as the mutual communication between these devices.
[0196] In an embodiment of the present application, the processor 901 is configured to execute the communication control method described in any of the above embodiments.
[0197] The memory 902 in the communication control device 90 can be connected to the processor 901. The memory 902 is used to store executable program code and data. The program code includes computer operation instructions. The memory 902 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories. In practical applications, the above-mentioned memory 902 can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor 901.
[0198] In addition, each functional module in the embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules.
[0199] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0200] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the communication control method as described in any of the above embodiments is implemented.
[0201] Exemplarily, program instructions corresponding to a communication control method in this embodiment can be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instructions corresponding to a communication control method in the storage medium are read or executed by an electronic device, the communication control method described in any of the above embodiments can be implemented.
[0202] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0203] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0204] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0205] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0206] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A communication control method, characterized in that: Applied to a sending terminal, the method comprises: When the communication is not connected, an initial bit rate is obtained, the initial bit rate is obtained by level mapping according to the downlink signal, and the initial bit rate is used to configure the encoding parameters of the encoder, so that the configured encoder is used for encoding when the communication is connected to complete the data transmission in the communication; When the communication is connected, if the temporary maximum bit rate request sent by the receiving terminal is not received, the adjustment step size is determined according to the received wireless signal; wherein the received wireless signal includes the packet loss rate in the reception report sent by the receiving terminal and the number of key frame requests received; the adjustment step size represents the adjustment direction and adjustment size of the bit rate; Calculating a target bit rate according to the initial bit rate and the adjustment step size, wherein the target bit rate is used to reconfigure encoding parameters of the encoder to complete communication; Wherein, when the communication is not connected, obtaining the initial bit rate includes: When the communication request flag is turned on, the downlink signal is acquired; wherein the communication request flag is used to prompt the sending terminal to connect the communication, and when the communication request flag is turned on, the state of the sending terminal is that the communication is not connected; Determine a bit rate level according to a mapping relationship between a preset bit rate calibration level and a downlink signal interval, and the downlink signal; Determining the initial bit rate according to the bit rate level and a preset reference bit rate standard value; The step of determining the adjustment step size according to the received wireless signal includes: The adjustment step is determined according to wireless signals received within a preset time period after the communication is established; wherein the preset time period is less than the time taken by the transmitting terminal and the receiving terminal to establish a communication connection.
2. The method according to claim 1, characterized in that: The downlink signal includes a reference signal received power and a signal-to-noise ratio; the mapping relationship includes a first mapping relationship and a second mapping relationship, the first mapping relationship represents a correspondence between a first preset code rate calibration level and a reference signal received power interval, and the second mapping relationship represents a correspondence between a second preset code rate calibration level and a signal-to-noise ratio interval; The determining the bit rate level according to the mapping relationship between the preset bit rate calibration level and the downlink signal interval, and the downlink signal, includes: Determining a first level according to the reference signal received power and the first mapping relationship; Determining a second level according to the signal-to-noise ratio and the second mapping relationship; The coding rate level is determined according to the first level and the second level.
3. The method according to claim 2, characterized in that The determining the initial bit rate according to the bit rate level and a preset reference bit rate standard value includes: Determine the calibration ratio value according to a mapping relationship between a third preset bit rate calibration level and a preset ratio value, and the bit rate level; The product of the calibration ratio value and the preset reference bit rate standard value is used as the initial bit rate.
4. The method according to claim 1, characterized in that: After calculating the initial bit rate, the method further includes: Determine an initial resolution and an initial frame rate according to the initial bit rate; configuring the encoder according to the initial bit rate, the initial resolution, and the initial frame rate; If it is monitored that the downlink signal changes, level mapping is performed according to the changed downlink signal to obtain an updated initial bit rate, and the updated initial bit rate is used to reconfigure the encoding parameters of the encoder until the communication is connected.
5. The method according to claim 1, characterized in that After calculating the target bit rate, the method further includes: Determine a target resolution and a target frame rate according to the target bit rate; reconfiguring encoding parameters of an encoder according to the target bit rate, the target resolution, and the target frame rate to implement a communication control process within a next preset time period; If the next preset time period is exceeded and the temporary maximum bit rate request sent by the receiving terminal is not received, the process of determining the next bit rate and reconfiguring the encoding parameters of the encoder next time is continued according to the wireless signal received within the next preset time period until the temporary maximum bit rate request sent by the receiving terminal is received, thereby achieving adaptive adjustment of the bit rate.
6. The method according to claim 5, characterized in that The step of determining the adjustment step size according to the wireless signal received within a preset time period after the communication is established includes: When the packet loss rate in the received report within the preset time period is greater than the first preset value, and the packet loss rate in the received report within the previous preset time period is greater than the second preset value, the adjustment step size is determined to be a backward first value; When the packet loss rate in the received report within the preset time period is greater than the first preset value, and the packet loss rate in the received report within the previous preset time period is less than or equal to the second preset value, the adjustment step is determined to be a second value; When the packet loss rate in the received report within the preset time period is less than or equal to the first preset value, and the number of key frame requests received within the preset time period is greater than the number of key frame requests received in the previous preset time period, the adjustment step is determined to be a third value.
7. The method according to claim 6, characterized in that The step of determining the adjustment step size according to the wireless signal received within a preset time period after the communication is established includes: When the packet loss rate in the received report within the preset time period is less than or equal to the first preset value, and the number of key frame requests received within the preset time period is less than or equal to the number of key frame requests received within the previous preset time period, obtaining the corresponding number of packet losses locally within the preset time period; The adjustment step size is determined according to the number of local packet losses corresponding to the preset time period.
8. The method according to claim 6, characterized in that Determining the adjustment step size according to the number of local packet losses corresponding to the preset time period includes: When the number of packet losses corresponding to the local area in the preset time period is less than or equal to the third preset value, or the number of packet losses corresponding to the local area in the preset time period is less than or equal to the number of packet losses corresponding to the local area in the previous preset time period, the adjustment step is determined to be a fourth value of the retreat; When the number of packet losses corresponding to the local area in the preset time period is greater than the third preset value, and the number of packet losses corresponding to the local area in the preset time period is greater than the number of packet losses corresponding to the local area in the previous preset time period, calculating the average values of multiple bitrate levels in the preset time period and the average values of multiple bitrate levels in the previous preset time period; The adjustment step size is determined according to an average value of a plurality of bit rate levels within the preset time period and an average value of a plurality of bit rate levels within the previous preset time period.
9. The method according to claim 8, characterized in that Determining the adjustment step size according to an average value of a plurality of bit rate levels within the preset time period and an average value of a plurality of bit rate levels within the previous preset time period includes: When the average value of the multiple bit rate levels in the preset time period is less than the average value of the multiple bit rate levels in the previous preset time period, the adjustment step is determined to be the fifth backward value; When the average value of the multiple bit rate levels in the preset time period is greater than the average value of the multiple bit rate levels in the previous preset time period, determining the adjustment step size to be a sixth value; When the average value of the multiple bit rate levels in the preset time period is equal to the average value of the multiple bit rate levels in the previous preset time period, the adjustment step is determined to be the seventh value.
10. A communication control device, characterized in that: The device comprises: An acquisition module, used to acquire an initial bit rate when the communication is not connected, the initial bit rate is obtained by level mapping according to the downlink signal, and the initial bit rate is used to configure the encoding parameters of the encoder, so that the configured encoder is used for encoding when the communication is connected to complete the data transmission in the communication; The acquisition module is further used to acquire the downlink signal when the communication request flag is turned on; wherein the communication request flag is used to prompt the sending terminal to connect the communication, and when the communication request flag is turned on, the state of the sending terminal is that the communication is not connected; A determination module, configured to determine a bit rate level according to a mapping relationship between a preset bit rate calibration level and a downlink signal interval, and the downlink signal; and determine the initial bit rate according to the bit rate level and a preset reference bit rate standard value; The determination module is further configured to determine the adjustment step size according to the received wireless signal if the temporary maximum bit rate request sent by the receiving terminal is not received when the communication is connected; wherein the received wireless signal includes the packet loss rate in the reception report sent by the receiving terminal and the number of key frame requests received; and the adjustment step size represents the adjustment direction and adjustment size of the bit rate; The determination module is further configured to determine the adjustment step size according to wireless signals received within a preset time period after the communication is established; wherein the preset time period is less than the time taken for the transmitting terminal to establish a communication connection with the receiving terminal; The calculation module is used to calculate a target bit rate according to the initial bit rate and the adjustment step size, and the target bit rate is used to reconfigure the encoding parameters of the encoder to complete the communication.
11. A communication control device, characterized in that: The device comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that: Executable instructions are stored thereon, which are used to implement the method described in any one of claims 1-9 when executed by a processor.
