Video code rate adaptive adjustment method, device and equipment and readable storage medium
By capturing video bitrate in real time and blurring it, the problem of not being able to predict network quality degradation in existing technologies is solved, enabling smooth adjustment of video bitrate and improving transmission stability and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-10
AI Technical Summary
Existing video bitrate adaptive control schemes cannot predict rapid deterioration of network quality, resulting in unstable video transmission during response and an inability to adjust the bitrate in a timely manner.
By collecting video bitrate in real time, calculating the video bitrate change rate and stability index parameters, performing fuzzification processing, obtaining fuzzy membership degrees, and then truncating and defuzzifying the membership degrees to determine the bitrate adjustment value, thus achieving smooth bitrate adjustment.
Anticipate transmission risks in advance, avoid quality fluctuations, and achieve ultimate transmission stability and user experience.
Smart Images

Figure CN121644853A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication, and in particular to a video code rate adaptive adjustment method, device and equipment and readable storage medium. BACKGROUND
[0002] The existing video code rate adaptive control scheme, such as feedback control based on packet loss rate, adjustment mechanism based on buffer state or simple threshold control, only responds when the packet loss rate reaches the threshold or the buffer alarm, and cannot predict the rapid deterioration of network quality, resulting in unstable video transmission when responding and being forced to sharply reduce the code rate. SUMMARY
[0003] Therefore, the present application aims to overcome the deficiencies in the prior art and provide a video code rate adaptive adjustment method, device, equipment and readable storage medium.
[0004] The present application provides the following technical solutions: In a first aspect, the present application provides a video code rate adaptive adjustment method, comprising: real-time acquisition of a current video code rate, calculation of a video code rate change rate and a stability index parameter corresponding to the current video code rate according to the current video code rate; fuzzification of the current video code rate, the video code rate change rate and the stability index parameter to obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree; membership degree truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree to obtain a code rate adjustment value; adjustment of the current video code rate according to the code rate adjustment value.
[0005] In an embodiment, the calculation of the video code rate change rate and the stability index parameter corresponding to the current video code rate according to the current video code rate comprises: calculation of the video code rate change rate corresponding to the current video code rate based on a preset unit time; calculation of a video code rate mean value and a video code rate standard deviation within a preset sliding window according to the current video code rate; calculation of the stability index parameter according to the video code rate mean value and the video code rate standard deviation.
[0006] In an embodiment, the fuzzification of the current video code rate, the video code rate change rate and the stability index parameter to obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree comprises: The current video code rate, the video code rate change rate and the stability index parameter are respectively subjected to fuzzy membership degree conversion based on a preset fuzzy rule base, to obtain the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree.
[0007] In an embodiment, the preset fuzzy rule base comprises a plurality of preset output variable rules, and the membership degree truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree to obtain a code rate adjustment value comprises: For each preset output variable rule, a trigger strength corresponding to the preset output variable rule is calculated based on a minimum value function according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree corresponding to the preset output variable rule; The output membership degree function corresponding to the preset output variable rule is truncated according to the trigger strength, to obtain a truncated fuzzy membership degree corresponding to the preset output variable rule; The truncated fuzzy membership degrees corresponding to each preset output variable rule are aggregated based on a maximum value function, to obtain an aggregated membership degree; The code rate adjustment value is obtained based on a barycenter method according to the aggregated membership degree.
[0008] In an embodiment, the output membership degree function corresponding to the preset output variable rule is truncated according to the trigger strength, to obtain the truncated fuzzy membership degree corresponding to the preset output variable rule, comprising: The original membership degree of the output variable corresponding to the preset output variable rule is calculated based on a triangular membership degree function; The truncated fuzzy membership degree is determined from the trigger strength and the original membership degree based on the minimum value function.
[0009] In an embodiment, the current video code rate is adjusted according to the code rate adjustment value, comprising: A candidate video code rate is obtained according to the code rate adjustment value and the current video code rate; A target video code rate is obtained based on a preset code rate boundary and the candidate video code rate.
[0010] In an embodiment, the preset code rate boundary comprises an upper limit value of code rate and a lower limit value of code rate, and the target video code rate is obtained based on the preset code rate boundary and the candidate video code rate, comprising: If the candidate video code rate is less than or equal to the upper limit value of code rate and greater than or equal to the lower limit value of code rate, the candidate video code rate is the target video code rate; If the candidate video code rate is less than the lower limit value of code rate, the lower limit value of code rate is the target video code rate. If the candidate video code rate is greater than the upper limit of the code rate, the upper limit of the code rate is the target video code rate.
[0011] In a second aspect, the present application provides a video code rate adaptive adjustment device, comprising: A calculation module is configured to collect a current video code rate in real time, and calculate a video code rate change rate and a stability index parameter corresponding to the current video code rate according to the current video code rate. A fuzzification module is configured to fuzz the current video code rate, the video code rate change rate and the stability index parameter, to obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree. A reasoning module is configured to perform membership degree truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree, to obtain a code rate adjustment value. An adjustment module is configured to adjust the current video code rate according to the code rate adjustment value.
[0012] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the video code rate adaptive adjustment method according to the first aspect.
[0013] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the video code rate adaptive adjustment method according to the first aspect.
[0014] The video code rate adaptive adjustment method, device, equipment and readable storage medium disclosed by the present application collect a current video code rate in real time, calculate a video code rate change rate and a stability index parameter corresponding to the current video code rate according to the current video code rate, fuzz the current video code rate, the video code rate change rate and the stability index parameter, obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree, perform membership degree truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree, obtain a code rate adjustment value, and adjust the current video code rate according to the code rate adjustment value. In this way, based on the current video code rate and the video code rate change rate and the stability index parameter reflecting the change trend, the future transmission risk is predicted through fuzzification, membership degree stage and defuzzification, the code rate adjustment value is determined, the smooth and appropriate amplitude code rate adjustment is made in advance, the quality chasing phenomenon is avoided, and the extreme transmission stability and user experience are realized. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope of protection of the present application. In the various drawings, similar components are denoted by similar reference numerals.
[0016] Figure 1 A flowchart of the video code rate adaptive adjustment method proposed in the embodiment is shown; Figure 2 Another flowchart of the video code rate adaptive adjustment method proposed in the embodiment is shown; Figure 3 Still another flowchart of the video code rate adaptive adjustment method proposed in the embodiment is shown; Figure 4 Still another flowchart of the video code rate adaptive adjustment method proposed in the embodiment is shown; Figure 5 A structural diagram of the video code rate adaptive adjustment device proposed in the embodiment is shown.
[0017] Explanation of the drawing: 500-video code rate adaptive adjustment device; 501-computing module; 502-fuzzy module; 503-inference module; 504-adjustment module. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments.
[0019] The components of the embodiments of the present application generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0020] In the following, the terms "include", "have", and their synonymous words used in various embodiments of the present application are only intended to represent a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be understood as first excluding the existence or possibility of adding one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing.
[0021] In addition, the terms "first", "second", "third", and the like are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
[0022] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present application belong. The terms (such as terms defined in a generally used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized or overly formal meaning unless clearly defined in various embodiments of the present application.
[0023] Embodiment 1 The embodiments of the present disclosure provide a video code rate adaptive adjustment method, which utilizes a video code rate change rate and a stability index parameter corresponding to a current video code rate, and combines fuzzy control prediction, so as to control the video code rate earlier, more smoothly and more intelligently, further optimizing the balance of transmission stability, picture continuity and bandwidth utilization efficiency.
[0024] Please refer to Figure 1 The video code rate adaptive adjustment method comprises steps S101-S104, which will be described in detail below.
[0025] In step S101, a current video code rate is collected in real time, and a video code rate change rate and a stability index parameter corresponding to the current video code rate are calculated according to the current video code rate.
[0026] In the embodiment, the current video code rate is collected in real time by a received signal strength indication (RSSI) sensor, and the current video code rate is an RSSI value. Further, the video code rate change rate and the stability index parameter corresponding to the current video code rate are calculated. The video code rate change rate reflects the dynamic trend of the code rate, and the stability index parameter reflects the comprehensive quality index of the network transmission capability. By using the video code rate change rate and the stability index parameter, potential unstable states can be identified in advance, and adjustment can be started before packet loss occurs, so as to avoid sudden increase of delay caused by freezing or retransmission.
[0027] Please refer to Figure 2 In a specific embodiment, step S101 comprises steps S1011-S1013, which will be described in detail below.
[0028] In step S1011, the video code rate change rate corresponding to the current video code rate is calculated based on a preset unit time.
[0029] In the embodiment, the video code rate change rate corresponding to the current video code rate is calculated every preset unit time The current video bitrate RSSI_Current, which is collected in real time, is then updated within a preset unit time. The change in value within t is used as the video bitrate change rate. This reflects the rate of bitrate fluctuation. Specifically, the video bitrate change rate... The calculation formula is: In the formula, RSSI_Previous is the RSSI value read at the previous time step.
[0030] Step S1012: Calculate the mean video bitrate and standard deviation of the video bitrate within the preset sliding window based on the current video bitrate.
[0031] In this embodiment, historical bitrate data is statistically analyzed and its average is calculated within a preset sliding window (such as the most recent 10 sampling points). and standard deviation This is used to quantify the degree of short-term volatility. Among them, the mean... The calculation formula is: , In the formula, N is the length of the preset sliding window. The preset sliding window can be adaptively adjusted, but this embodiment does not limit it.
[0032] Step S1013: Calculate the stability index parameter based on the mean video bitrate and the standard deviation of the video bitrate.
[0033] In this embodiment, the stability index parameter is determined based on the ratio of the mean video bitrate to the standard deviation of the video bitrate. It enables a comprehensive assessment of long-term transmission quality trends and short-term jitter, avoiding the frequent switching of video bitrate between "high bitrate" and "low bitrate" that occurs in traditional solutions. This avoids drastic fluctuations in video quality and obvious image jitter caused by high-frequency bitrate changes, ensuring a better viewing experience for users.
[0034] Among them, stability index parameters The calculation formula is: .if If RSSI_Stability is set to 1, it reflects extreme instability.
[0035] It should be noted that the stability index parameter can also be the coefficient of variation or other parameters.
[0036] Step S102: The current video bitrate, the video bitrate change rate, and the stability index parameters are fuzzified to obtain a first fuzzy membership degree, a second fuzzy membership degree, and a third fuzzy membership degree.
[0037] In the embodiment, the current video code rate, the corresponding video code rate change rate and the stability index parameter are fuzzified to obtain a first fuzzy membership, a second fuzzy membership and a third fuzzy membership. The first fuzzy membership corresponds to the linguistic membership of the current video code rate, the second fuzzy membership corresponds to the linguistic membership of the video code rate, and the third fuzzy membership corresponds to the linguistic membership of the stability index parameter. The parameter fuzzification reduces the dependence on accurate modeling, has strong fault tolerance, clear semantics and is convenient for debugging.
[0038] Meanwhile, the limitation of a single network index is broken through, and the current video code rate, the corresponding video code rate change rate and the stability index parameter are creatively taken as core inputs. The difference in wireless channel characteristics in indoor stable environment and mobile scenarios can be perceived, the decision process is strongly related to the actual physical state of the wireless channel, and real channel adaptation and intelligent control are realized.
[0039] In a specific embodiment, the step S102 comprises: performing fuzzy membership conversion on the current video code rate, the video code rate change rate and the stability index parameter based on a preset fuzzy rule base to obtain the first fuzzy membership, the second fuzzy membership and the third fuzzy membership.
[0040] In the embodiment, the current video code rate, the video code rate change rate and the stability index parameter are respectively converted into fuzzy membership degrees by using a triangular membership function based on a plurality of fuzzy sets defined in the preset fuzzy rule base to obtain the first fuzzy membership, the second fuzzy membership and the third fuzzy membership. The fuzzy rule base integrates the experience and historical optimization results of wireless communication experts, so that stable control performance can be maintained in complex and variable wireless environments.
[0041] For example, refer to part of the preset fuzzy rule base shown in Table 1. The preset fuzzy rule base includes fuzzy sets corresponding to each variable and preset output variable fuzzy rules. The fuzzy set corresponding to the current video code rate RSSI_Current is {very low, low, medium, high, very high}, the fuzzy set corresponding to the video code rate change rate RSSI_Rate is {negative large, negative small, zero, positive small, positive large}, and the fuzzy set corresponding to the stability index parameter RSSI_Stability is {unstable, relatively unstable, medium, relatively stable, stable}. The current video code rate RSSI_Current, the video code rate change rate RSSI_Rate and the stability index parameter RSSI_Stability are input variables, and the fuzzy set of the code rate adjustment value Δbitrate as an output variable is {greatly reduced, moderately reduced, maintained, moderately increased, greatly increased}. Meanwhile, each row in Table 1 is a preset output variable fuzzy rule.
[0042] Table 1:
[0043] Taking the current video bitrate RSSI_Current as an example, the horizontal coordinate parameters (a, b, c) of the three endpoints of its triangular membership function are shown in Table 2.
[0044] Table 2:
[0045] For example, for RSSI_current = -75 dBm, we can substitute this into the triangular membership function calculation to obtain the membership degree of RSSI_Current in the "very low" set: ; Calculate the membership degree in the "low" set: ; calculate the membership degrees of the other variables in turn.
[0046] Step S103: Perform membership truncation and defuzzification based on the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree to obtain the bitrate adjustment value.
[0047] In this embodiment, membership truncation and defuzzification are performed based on the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree to obtain the bitrate adjustment value, thereby achieving advance prediction and proactive adjustment.
[0048] Please see Figure 3 In one specific embodiment, the preset fuzzy rule base includes multiple preset output variable rules, and step S103 includes steps S1031 to S1034. Each step is described in detail below.
[0049] Step S1031: For each of the preset output variable rules, based on the minimum value function, calculate the trigger strength corresponding to the preset output variable rule according to the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree. By logically truncating the first, second, and third fuzzy membership degrees, it is ensured that the corresponding rule is strongly activated only when all conditions are significantly satisfied, thus enhancing control stability. At the same time, through defuzzification, the final bitrate adjustment value is continuously adjustable, avoiding step jumps and improving the subjective visual experience.
[0050] In this embodiment, for each preset output variable rule, based on the minimum value The function calculates the preset output variable rule based on the first, second, and third fuzzy membership degrees corresponding to the preset output variable rule. Corresponding trigger strength .
[0051] Exemplary, trigger strength The calculation formula is: In the formula, The first fuzzy membership degree corresponding to the currently selected output variable rule. The second fuzzy membership degree corresponding to the currently selected output variable rule. This represents the third fuzzy membership degree corresponding to the currently selected output variable rule.
[0052] Step S1032: Truncate the output membership function corresponding to the preset output variable rule according to the trigger strength to obtain the truncated fuzzy membership degree corresponding to the preset output variable rule.
[0053] In this embodiment, the trigger strength is utilized, and the output membership function corresponding to the preset output variable rule is truncated using the min function to obtain the truncated fuzzy membership degree corresponding to the preset output variable rule. This prevents drastic adjustments caused by a sudden change in a certain input and improves the dynamic stability of the system.
[0054] In one specific embodiment, step S1032 includes: calculating the original membership degree of the output variable corresponding to the preset output variable rule based on the triangular membership degree function; and determining the truncated fuzzy membership degree from the trigger intensity and the original membership degree based on the minimum value function.
[0055] In this embodiment, the original membership degree of each sampling point in the sampling point range (the range of bit rate adjustment values) corresponding to the output variable is calculated based on the triangular membership function under the currently selected preset output variable rule; for each sampling point, the truncated fuzzy membership degree corresponding to the sampling point is determined from the trigger strength and the original membership degree corresponding to the sampling point based on the minimum value min function.
[0056] Step S1033: Aggregate the truncated fuzzy membership degrees corresponding to each preset output variable rule based on the maximum value function to obtain the aggregated membership degree.
[0057] In this embodiment, for each sampling point, the truncated fuzzy membership degree corresponding to the sampling point in all preset output variable rules is aggregated based on the maximum value function to obtain the aggregated membership degree corresponding to the sampling point.
[0058] Step S1034: Obtain the bitrate adjustment value based on the aggregation membership degree using the centroid method.
[0059] In this embodiment, the centroid method is used to calculate the membership degree of each sampling point and its corresponding aggregation, thus obtaining the final bitrate adjustment value. Bitrate. Bitrate adjustment value. The formula for calculating bitrate is: In the formula, It is the k-th sampling point in the output domain, i.e., the current video bitrate. It is the aggregate membership value corresponding to the kth sampling point, and M is the number of sampling points.
[0060] Step S104: Adjust the current video bitrate according to the bitrate adjustment value.
[0061] In this embodiment, the current video bitrate is adaptively adjusted based on the bitrate adjustment value obtained from fuzzy inference, which can make a smooth bitrate adjustment several seconds in advance, resulting in an extremely smooth bitrate adjustment curve.
[0062] Please see Figure 4 In one specific embodiment, step S104 includes steps S1041 to S1042, and each step is described in detail below.
[0063] Step S1041: Obtain the candidate video bitrate based on the bitrate adjustment value and the current video bitrate.
[0064] In this embodiment, the candidate video bitrate is obtained by adding the bitrate adjustment value to the product of the current video bitrate and a preset smoothing factor. The preset smoothing factor avoids sudden changes and fluctuations in the bitrate.
[0065] Step S1042: Obtain the target video bitrate based on the preset bitrate boundary and the candidate video bitrate.
[0066] In this embodiment, the target video bitrate is obtained based on the preset bitrate boundary and the candidate video bitrate, thereby effectively avoiding encoding failure, frame stacking or crashing caused by the candidate bitrate exceeding the physical capacity of the encoder. At the same time, it avoids the complete unrecognizable picture caused by the bitrate being too low in a weak network environment, thus improving user tolerance.
[0067] In one specific embodiment, the preset bitrate boundary includes an upper bitrate limit and a lower bitrate limit. Step S1042 includes: if the candidate video bitrate is less than or equal to the upper bitrate limit and greater than or equal to the lower bitrate limit, then the candidate video bitrate is the target video bitrate; if the candidate video bitrate is less than the lower bitrate limit, then the lower bitrate limit is the target video bitrate; if the candidate video bitrate is greater than the upper bitrate limit, then the upper bitrate limit is the target video bitrate.
[0068] In this embodiment, the upper limit of the bitrate is the maximum video bitrate allowed by the system, and the lower limit of the bitrate is the minimum video bitrate allowed by the system. By ensuring that the target video bitrate remains within the range of video bitrates allowed by the system, the system stability is enhanced.
[0069] Furthermore, the final target video bitrate value is transmitted to the encoder for bitrate control. During the streaming process, performance metrics such as transmission quality monitoring, data transmission buffer status, and user experience are continuously collected for subsequent optimization. For example, transmission quality can be quantified using transmission success rate, calculated as: Transmission Success Rate = Number of Successfully Transmitted Frames / Total Number of Frames. Simultaneously, the fuzzy rule base is periodically optimized, using historical data and a genetic algorithm to periodically optimize the weights of the rules.
[0070] It should be noted that the fuzzy rule base is configurable, and the membership function and weight coefficients can be flexibly adjusted to adapt to the characteristics of different wireless environments and application scenarios. The architecture reserves space for future upgrades, such as accessing more complex machine learning algorithms, adding more channel quality indicators, and cloud-based intelligent optimization.
[0071] The video bitrate adaptive adjustment method proposed in this embodiment collects the current video bitrate in real time, calculates the corresponding video bitrate change rate and stability index parameters based on the current video bitrate, fuzzifies the current video bitrate, the video bitrate change rate, and the stability index parameters to obtain a first fuzzy membership degree, a second fuzzy membership degree, and a third fuzzy membership degree, truncates and defuzzifies the membership degrees based on the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree to obtain a bitrate adjustment value, and adjusts the current video bitrate based on the bitrate adjustment value. In this way, based on the current video bitrate and the video bitrate change rate and stability index parameters reflecting the changing trend, by using fuzzification, membership degree stages, and defuzzification to anticipate future transmission risks, and determining the bitrate adjustment value, a smooth and appropriately sized bitrate adjustment can be made in advance to avoid quality catch-up phenomena and achieve ultimate transmission stability and user experience.
[0072] Example 2 Furthermore, this disclosure provides a video bitrate adaptive adjustment device 500, please refer to [link to relevant documentation]. Figure 5 ,include: The calculation module 501 is used to collect the current video bitrate in real time and calculate the video bitrate change rate and stability index parameters corresponding to the current video bitrate based on the current video bitrate. The fuzzy module 502 is used to fuzzify the current video bitrate, the video bitrate change rate, and the stability index parameters to obtain a first fuzzy membership degree, a second fuzzy membership degree, and a third fuzzy membership degree. Inference module 503 is used to perform membership truncation and defuzzification based on the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree to obtain the bit rate adjustment value; The adjustment module 504 is used to adjust the current video bitrate according to the bitrate adjustment value.
[0073] Optionally, the calculation module 501 is further configured to calculate the video bitrate change rate corresponding to the current video bitrate based on a preset unit time; calculate the mean video bitrate and the standard deviation of the video bitrate within a preset sliding window based on the current video bitrate; and calculate the stability index parameter based on the mean video bitrate and the standard deviation of the video bitrate.
[0074] Optionally, the fuzzy module 502 is further configured to perform fuzzy membership transformation on the current video bitrate, the video bitrate change rate, and the stability index parameter based on a preset fuzzy rule library, respectively, to obtain the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree.
[0075] Optionally, the preset fuzzy rule base includes multiple preset output variable rules. The inference module 503 is further configured to, for each preset output variable rule, calculate the trigger strength corresponding to the preset output variable rule based on the minimum value function and according to the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree corresponding to the preset output variable rule; truncate the output membership degree function corresponding to the preset output variable rule according to the trigger strength to obtain the truncated fuzzy membership degree corresponding to the preset output variable rule; aggregate the truncated fuzzy membership degrees corresponding to each preset output variable rule based on the maximum value function to obtain the aggregated membership degree; and obtain the bitrate adjustment value based on the aggregated membership degree using the centroid method.
[0076] Optionally, the inference module 503 is further configured to calculate the original membership degree of the output variable corresponding to the preset output variable rule based on the triangular membership degree function; and to determine the truncated fuzzy membership degree from the trigger intensity and the original membership degree based on the minimum value function.
[0077] Optionally, the adjustment module 504 is further configured to obtain a candidate video bitrate based on the bitrate adjustment value and the current video bitrate; and to obtain a target video bitrate based on a preset bitrate boundary and the candidate video bitrate.
[0078] Optionally, the adjustment module 504 is further configured to: if the candidate video bitrate is less than or equal to the upper bitrate value and greater than or equal to the lower bitrate value, then the candidate video bitrate is the target video bitrate; if the candidate video bitrate is less than the lower bitrate value, then the lower bitrate value is the target video bitrate; if the candidate video bitrate is greater than the upper bitrate value, then the upper bitrate value is the target video bitrate.
[0079] The apparatus provided in this embodiment can execute the steps of the video bitrate adaptive adjustment method provided in Embodiment 1. To avoid repetition, it will not be described again.
[0080] The video bitrate adaptive adjustment device proposed in this embodiment collects the current video bitrate in real time, calculates the corresponding video bitrate change rate and stability index parameters based on the current video bitrate, fuzzifies the current video bitrate, the video bitrate change rate, and the stability index parameters to obtain a first fuzzy membership degree, a second fuzzy membership degree, and a third fuzzy membership degree, truncates and defuzzifies the membership degree based on the first fuzzy membership degree, the second fuzzy membership degree, and the third fuzzy membership degree to obtain a bitrate adjustment value, and adjusts the current video bitrate based on the bitrate adjustment value. In this way, based on the current video bitrate and the video bitrate change rate and stability index parameters reflecting the changing trend, by using fuzzification, membership degree stages, and defuzzification to anticipate future transmission risks, the bitrate adjustment value is determined to make smooth and appropriately sized bitrate adjustments in advance, thereby avoiding quality catch-up phenomena and achieving ultimate transmission stability and user experience.
[0081] Example 3 Furthermore, this disclosure provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the video bitrate adaptive adjustment method described in Embodiment 1.
[0082] The device provided in this embodiment can execute the steps of the video bitrate adaptive adjustment method provided in Embodiment 1. To avoid repetition, the steps will not be repeated.
[0083] Example 4 This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the video bitrate adaptive adjustment method described in Embodiment 1.
[0084] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0085] The computer-readable storage medium provided in this embodiment can implement the video bitrate adaptive adjustment method provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0086] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.
[0087] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0088] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for video rate adaptation, the method comprising: The method comprises: real-time acquisition of a current video code rate, calculation of a video code rate change rate and a stability index parameter corresponding to the current video code rate according to the current video code rate; fuzzification of the current video code rate, the video code rate change rate and the stability index parameter to obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree; membership degree truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree to obtain a code rate adjustment value; adjustment of the current video code rate according to the code rate adjustment value.
2. The method of claim 1, wherein, The calculation of the video code rate change rate and the stability index parameter corresponding to the current video code rate according to the current video code rate comprises: calculation of the video code rate change rate corresponding to the current video code rate based on a preset unit time; calculation of a video code rate mean value and a video code rate standard deviation within a preset sliding window according to the current video code rate; calculation of the stability index parameter according to the video code rate mean value and the video code rate standard deviation.
3. The method of claim 1, wherein, The fuzzification of the current video code rate, the video code rate change rate and the stability index parameter to obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree comprises: fuzzy membership degree conversion of the current video code rate, the video code rate change rate and the stability index parameter based on a preset fuzzy rule base to obtain the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree.
4. The method of claim 3, wherein, The preset fuzzy rule base comprises a plurality of preset output variable rules, and the membership degree truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree to obtain a code rate adjustment value comprises: for each preset output variable rule, calculation of a trigger strength corresponding to the preset output variable rule according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree corresponding to the preset output variable rule based on a minimum value function; truncation of an output membership function corresponding to the preset output variable rule according to the trigger strength to obtain a truncated fuzzy membership degree corresponding to the preset output variable rule; aggregation of the truncated fuzzy membership degrees corresponding to each preset output variable rule based on a maximum value function to obtain an aggregated membership degree; obtaining of the code rate adjustment value according to the aggregated membership degree based on a barycentric method.
5. The method of claim 4, wherein, The truncation of the output membership function corresponding to the preset output variable rule according to the trigger strength to obtain the truncated fuzzy membership degree corresponding to the preset output variable rule comprises: calculation of an original membership degree of an output variable corresponding to the preset output variable rule based on a triangular membership function; determination of the truncated fuzzy membership degree from the trigger strength and the original membership degree based on the minimum value function.
6. The method of claim 1, wherein, The adjustment of the current video code rate according to the code rate adjustment value comprises: obtaining of a candidate video code rate according to the code rate adjustment value and the current video code rate; obtaining of a target video code rate based on a preset code rate boundary and the candidate video code rate.
7. The method of claim 6, wherein, The preset code rate boundary comprises a code rate upper limit value and a code rate lower limit value, and the target video code rate is obtained based on the preset code rate boundary and the candidate video code rate, comprising: if the candidate video code rate is less than or equal to the code rate upper limit value and greater than or equal to the code rate lower limit value, the candidate video code rate is the target video code rate; if the candidate video code rate is less than the code rate lower limit value, the code rate lower limit value is the target video code rate; if the candidate video code rate is greater than the code rate upper limit value, the code rate upper limit value is the target video code rate.
8. A video rate self-adaptation adjustment apparatus, characterized by, comprising: a calculation module configured to collect a current video code rate in real time, and calculate a video code rate change rate and a stability index parameter corresponding to the current video code rate according to the current video code rate; a fuzzification module configured to fuzz the current video code rate, the video code rate change rate and the stability index parameter to obtain a first fuzzy membership degree, a second fuzzy membership degree and a third fuzzy membership degree; an inference module configured to perform membership truncation and defuzzification according to the first fuzzy membership degree, the second fuzzy membership degree and the third fuzzy membership degree to obtain a code rate adjustment value; an adjustment module configured to adjust the current video code rate according to the code rate adjustment value.
9. A computer device, comprising: comprising a memory and a processor, the memory storing a computer program, and the computer program being executed by the processor to implement the video code rate self-adaptive adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the memory and executed by the processor to implement the video code rate self-adaptive adjustment method according to any one of claims 1 to 7.