Method and device for optimizing cloud application screen freeze

By dynamically adjusting the resolution of the cloud server encoder, the frame rate drop and picture lag caused by insufficient real-time encoding resources for cloud application videos is solved, and the balance between stable frame rate and clear picture quality is achieved.

CN119342043BActive Publication Date: 2025-02-28HAIMA CLOUD TIANJIN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411886533.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-02-28
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The real-time video encoding resources of cloud applications on cloud servers are insufficient, resulting in a decrease in frame rate or unstable, which in turn causes the problem of terminal playback screen stuttering.

Method used

By obtaining the encoder's current encoding resource usage or code rate, dynamically adjusting the encoding attributes, determining the target encoding resource usage or target code rate from the preset correspondence relationship, and adjusting the encoder's resolution according to the target data, so as to maintain the picture quality clear while stabilizing the frame rate or reducing the encoding output code rate.

Benefits of technology

While ensuring clear picture quality, the frame rate is effectively maintained or stabilized, reducing the stuttering of the terminal's cloud application screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application provides a method and device for optimizing the freeze of a cloud application screen, the method comprising: obtaining the current encoding resource usage of an encoder, and when the current encoding resource usage is greater than a first value, determining the target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, encoding resource usage and VMAF value, determining at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to a second value, and if the number of at least one piece of data is greater than 1, determining at least one piece of data with the largest corresponding VMAF value among the at least one piece of data, determining the target data from the at least one piece of data with the largest corresponding VMAF value, determining the target resolution according to the resolution of the target data, and adjusting the resolution of the encoder to the target resolution, so as to reduce the freeze when the terminal plays the cloud application screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud applications, and in particular to a method and device for optimizing screen freezes in cloud applications. Background Art

[0002] Cloud services based on video generation and processing technologies have flourished in recent years and have been widely used in cloud applications, live broadcasts, short videos, long videos and other fields. Cloud applications and other services require real-time video processing on cloud servers. Only by generating video streams that meet the terminal playback requirements in real time can the user viewing experience be guaranteed. However, due to the performance of the cloud server's encoder and / or its own factors, problems such as insufficient real-time encoding resources leading to a drop in frame rate or unstable frame rate and / or the encoding output bit rate exceeding the set bit rate may occur, resulting in abnormalities such as freezes in the terminal playback of cloud application screens.

[0003] In view of this, how to dynamically adjust the encoding properties based on the performance of the cloud server to reduce the lag of terminal playback of cloud application images has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of the technical problems existing in the prior art, the embodiments of the present application provide a method and device for optimizing the freeze of cloud application screens.

[0005] In a first aspect, an embodiment of the present application provides a method for optimizing the freeze of a cloud application screen, which is applied to a cloud server and includes:

[0006] Obtaining a current encoding resource usage of the encoder, and when the current encoding resource usage is greater than a first value, determining a target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, an encoding resource usage, and a VMAF value, determining at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to a second value, and if the number of the at least one piece of data is greater than 1, determining at least one piece of data with a maximum corresponding VMAF value among the at least one piece of data, determining target data from the at least one piece of data with a maximum corresponding VMAF value, determining a target resolution according to a resolution of the target data, and adjusting the resolution of the encoder to the target resolution, wherein the first correspondence relationship includes a plurality of pieces of data, each of the plurality of pieces of data includes a set of first encoding attributes, an encoding resource usage, and a VMAF value, the first encoding attribute includes a resolution, the second value is determined according to the current encoding resource usage and the target encoding resource usage, and the target data is one piece of data among the at least one piece of data with a maximum corresponding VMAF value; and / or

[0007] The method comprises: obtaining a current bit rate of the encoder, and when the current bit rate is greater than a third value, determining a target bit rate from a second correspondence relationship between a preset second encoding attribute and a VMAF value, determining at least one data in the second correspondence relationship whose bit rate is less than or equal to a fourth value, and if the number of the at least one data is greater than 1, determining at least one data with a maximum corresponding VMAF value among the at least one data, determining target data from the at least one data with a maximum corresponding VMAF value, determining a target resolution according to a resolution of the target data, and adjusting the resolution of the encoder to the target resolution, wherein the second correspondence relationship includes multiple data, each of the multiple data includes a set of second encoding attributes and a VMAF value, the second encoding attribute includes a resolution and a bit rate, the fourth value is determined according to the current bit rate and the target bit rate, and the target data is one data among the at least one data with a maximum corresponding VMAF value.

[0008] In a second aspect, the embodiment of the present application further provides a cloud application screen freeze optimization device, which is applied to a cloud server, comprising:

[0009] a first adjustment unit, configured to obtain a current encoding resource usage of the encoder, and when the current encoding resource usage is greater than a first value, determine a target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, an encoding resource usage, and a VMAF value, determine at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to a second value, and if the number of the at least one piece of data is greater than 1, determine at least one piece of data with a maximum corresponding VMAF value among the at least one piece of data, determine target data from the at least one piece of data with a maximum corresponding VMAF value, determine a target resolution according to a resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the first correspondence relationship includes a plurality of pieces of data, each of the plurality of pieces of data includes a set of first encoding attributes, an encoding resource usage, and a VMAF value, the first encoding attribute includes a resolution, the second value is determined according to the current encoding resource usage and the target encoding resource usage, and the target data is one piece of data among the at least one piece of data with a maximum corresponding VMAF value; and / or

[0010] The second adjustment unit is used to obtain the current bit rate of the encoder, and when the current bit rate is greater than the third value, determine the target bit rate from the second correspondence between the preset second encoding attribute and the VMAF value, determine at least one data in the second correspondence whose bit rate is less than or equal to the fourth value, if the number of the at least one data is greater than 1, determine at least one data with the largest corresponding VMAF value among the at least one data, determine the target data from the at least one data with the largest corresponding VMAF value, determine the target resolution according to the resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the second correspondence includes multiple data, each of the multiple data includes a set of second encoding attributes and a VMAF value, the second encoding attribute includes resolution and bit rate, the fourth value is determined according to the current bit rate and the target bit rate, and the target data is one data among the at least one data with the largest corresponding VMAF value.

[0011] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the cloud application screen freeze optimization method as described in the first aspect are executed.

[0012] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the cloud application screen freeze optimization method as described in the first aspect.

[0013] In summary, the cloud application screen freeze optimization method and device, electronic device and storage medium provided by the embodiments of the present application, when the current encoding resource usage of the encoder is greater than the first value, the target encoding resource usage is determined from the first correspondence relationship between the preset first encoding attribute, the encoding resource usage and the VMAF value, and at least one data in the first correspondence relationship whose encoding resource usage is less than or equal to the second value is determined according to the target encoding resource usage, and the target data is determined from the at least one data, and the resolution of the encoder is adjusted according to the target data, so that when the real-time encoding resources are insufficient, the frame rate can be maintained / stabilized while ensuring clear picture quality; and / or when the current bit rate of the encoder is greater than the third value, the target bit rate is determined from the second correspondence relationship between the preset second encoding attribute and the VMAF value, and at least one data in the second correspondence relationship whose bit rate is less than or equal to the fourth value is determined according to the target bit rate, and the target data is determined from the at least one data, and the resolution of the encoder is adjusted according to the target data, and when the encoding output bit rate of the encoder exceeds the set bit rate, the encoding output bit rate can be reduced while ensuring clear picture quality. That is to say, through the above scheme, the freeze of the cloud application screen played by the terminal can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 A flowchart of an embodiment of a method for optimizing a cloud application screen freeze provided in an embodiment of the present application;

[0015] Figure 2 A structural diagram of an embodiment of a cloud application screen freeze optimization device provided in an embodiment of the present application;

[0016] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0018] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various 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 application claimed for protection, but merely represents the 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 making creative work belong to the scope of protection of the present application.

[0019] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0020] Reference Figure 1 As shown, an embodiment of the present application provides a flow chart of a method for optimizing a cloud application screen freeze, the method being applied to a cloud server, comprising:

[0021] S10, obtaining the current encoding resource usage of the encoder, and when the current encoding resource usage is greater than the first value, determining the target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, encoding resource usage and VMAF value, determining at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to the second value, and if the number of the at least one piece of data is greater than 1, determining at least one piece of data with the largest corresponding VMAF value among the at least one piece of data, determining the target data from the at least one piece of data with the largest corresponding VMAF value, determining the target resolution according to the resolution of the target data, and adjusting the resolution of the encoder to the target resolution, wherein the first correspondence relationship includes multiple pieces of data, each of the multiple pieces of data includes a set of first encoding attributes, a encoding resource usage and a VMAF value, the first encoding attribute includes resolution, the second value is determined according to the current encoding resource usage and the target encoding resource usage, and the target data is one piece of data among the at least one piece of data with the largest corresponding VMAF value; and / or

[0022] S11. Obtain a current bit rate of the encoder, and when the current bit rate is greater than a third value, determine a target bit rate from a second correspondence between a preset second encoding attribute and a VMAF value, determine at least one data in the second correspondence whose bit rate is less than or equal to a fourth value, and if the number of the at least one data is greater than 1, determine at least one data with a maximum corresponding VMAF value among the at least one data, determine the target data from the at least one data with the maximum corresponding VMAF value, determine the target resolution according to the resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the second correspondence includes multiple data, each of the multiple data includes a set of second encoding attributes and a VMAF value, the second encoding attributes include resolution and bit rate, the fourth value is determined according to the current bit rate and the target bit rate, and the target data is one data among the at least one data with the maximum corresponding VMAF value.

[0023] In this embodiment, it should be noted that before step S10 is executed, the first corresponding relationship needs to be determined; before step S11 is executed, the second corresponding relationship needs to be determined. When determining the first correspondence and the second correspondence, multiple resolutions can be generated based on the lowest resolution and the highest resolution of the cloud application online business (the multiple resolutions are between the lowest resolution and the highest resolution or the multiple resolutions are between the resolutions composed of the short sides of the lowest resolution and the highest resolution and the resolutions composed of the long sides of the lowest resolution and the highest resolution), and multiple bit rates can be generated based on the lowest bit rate and the highest bit rate of the cloud application online business (the multiple bit rates are between the lowest bit rate and the highest bit rate), and multiple encoding types (such as h264, h265, and vp8), multiple resolutions, and multiple bit rates are combined to obtain multiple sets of encoding attributes, and the encoder is set using the multiple sets of encoding attributes to obtain the encoding resource usage when the encoder is encoding, and the video encoded and output by the encoder, and the VMAF value of the video is calculated, so that multiple sets of data (each set of data includes an encoding type, a resolution, a bit rate, an encoding resource usage, and a VMAF value) can be obtained, and the first correspondence and the second correspondence can be obtained based on the multiple sets of data, such as using the multiple sets of data as the first correspondence and the second correspondence. The first value is a preset threshold value of the encoding resource usage; the third value is a preset threshold value of the bit rate. The encoding resource usage may be a usage rate of an encoding unit of a GPU.

[0024] In addition, if the target data includes other coding attributes in addition to resolution, the value of the coding attribute corresponding to the encoder can be adjusted according to the value of the other coding attributes contained in the target data. For example, if the target data also includes bit rate, the bit rate of the encoder can be adjusted according to the bit rate contained in the target data. Specifically, the bit rate of the encoder can be adjusted to the bit rate contained in the target data.

[0025] The cloud application screen freeze optimization method provided by the embodiment of the present application, when the current encoding resource usage of the encoder is greater than the first value, the target encoding resource usage is determined from the first corresponding relationship between the preset first encoding attribute, the encoding resource usage and the VMAF value, and at least one data in the first corresponding relationship whose encoding resource usage is less than or equal to the second value is determined according to the target encoding resource usage, and the target data is determined from the at least one data, and the resolution of the encoder is adjusted according to the target data, so that when the real-time encoding resources are insufficient, the frame rate can be maintained / stabilized while ensuring clear picture quality; and / or when the current bit rate of the encoder is greater than the third value, the target bit rate is determined from the second corresponding relationship between the preset second encoding attribute and the VMAF value, and at least one data in the second corresponding relationship whose bit rate is less than or equal to the fourth value is determined according to the target bit rate, and the target data is determined from the at least one data, and the resolution of the encoder is adjusted according to the target data, and when the encoding output bit rate of the encoder exceeds the set bit rate, the encoding output bit rate can be reduced while ensuring clear picture quality. That is, through the above scheme, the freeze of the cloud application screen played by the terminal can be reduced.

[0026] Based on the foregoing method embodiment, determining the target coding resource usage from the first correspondence between the preset first coding attribute, the coding resource usage and the VMAF value may include:

[0027] Determining a comparison order of target data types in the first corresponding relationship, wherein the target data types include a resolution width and a resolution height;

[0028] According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present;

[0029] The first intermediate data is determined according to the finally obtained screening data, and the coding resource usage in the first intermediate data is determined as the target coding resource usage.

[0030] In this embodiment, a specific example is used to illustrate the process of determining the target coding resource usage, assuming that the target data type includes the coding type, the width of the resolution, the height of the resolution, and the bit rate, and the comparison order of the target data type is from front to back: coding type, resolution width, resolution height, and bit rate. First, the data containing the same encoding type as the current encoding type of the encoder can be filtered out from the first corresponding relationship to obtain the filtered data of the first traversal; then, the data containing the smallest absolute value of the difference between the width of the resolution and the width of the current resolution of the encoder can be filtered out from the filtered data of the first traversal to obtain the filtered data of the second traversal. It should be noted that if the data containing the smallest absolute value of the difference between the width of the resolution and the width of the current resolution of the encoder in the filtered data of the first traversal includes at least two data, then the filtered data of the second traversal is the data containing the width of the resolution smaller than the width of the current resolution of the encoder in the at least two data; then, the data containing the smallest absolute value of the difference between the height of the resolution and the height of the current resolution of the encoder can be filtered out from the filtered data of the second traversal to obtain the filtered data of the third traversal. If the data containing the smallest absolute value of the difference between the height of the resolution and the height of the current resolution of the encoder in the filtered data of the second traversal includes at least two data, then the filtered data of the third traversal is the data containing the height of the resolution smaller than the height of the current resolution of the encoder in the at least two data. Finally, the data with the smallest absolute value of the difference between the code rate and the current code rate of the encoder can be screened out from the filtered data of the third traversal to obtain the first intermediate data. If the data with the smallest absolute value of the difference between the code rate and the current code rate of the encoder contained in the filtered data of the third traversal includes one piece of data, then the piece of data is the first intermediate data, or if the data with the smallest absolute value of the difference between the code rate and the current code rate of the encoder contained in the filtered data of the third traversal includes at least two pieces of data, then the first intermediate data is the data whose code rate contained in the at least two pieces of data is less than the current code rate of the encoder. In addition, it should be noted that in the aforementioned traversal process, if a unique piece of data is determined when a certain target data type is traversed, then the piece of data is the first intermediate data. After the first intermediate data is determined, the coding resource usage in the first intermediate data is the target coding resource usage.

[0031] Based on the foregoing method embodiment, the second value=target coding resource usage-(current coding resource usage-first value).

[0032] Based on the foregoing method embodiment, determining the target bit rate from the second correspondence between the preset second encoding attribute and the VMAF value may include:

[0033] Determining a comparison order of target data types in the second corresponding relationship, wherein the target data types include resolution width, resolution height, and bit rate;

[0034] According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present;

[0035] The second intermediate data is determined according to the finally obtained screening data, and the bit rate in the second intermediate data is determined as the target bit rate.

[0036] The process of determining the second intermediate data in this embodiment is consistent with the process of determining the first intermediate data in the previous embodiment, and will not be repeated here.

[0037] Based on the foregoing method embodiment, the fourth value=target bit rate-(current bit rate-third value).

[0038] Based on the above method embodiment, the calculation formula of the width W2 of the target resolution can be: W2= (W1×H1×W / H) 1 / 2 The calculation formula for the target resolution height H2 can be: H2 = (W1 × H1 × H / W) 1 / 2 , where W1 and H1 are the width and height of the target data resolution, and W and H are the width and height of the encoder's current resolution.

[0039] Reference Figure 2 FIG. 1 is a schematic diagram of a structure of a cloud application screen freeze optimization device provided by an embodiment of the present application, and the device is applied to a cloud server, including:

[0040] A first adjustment unit 20 is configured to obtain a current encoding resource usage of the encoder, and when the current encoding resource usage is greater than a first value, determine a target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, an encoding resource usage, and a VMAF value, determine at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to a second value, and if the number of the at least one piece of data is greater than 1, determine at least one piece of data with a maximum corresponding VMAF value among the at least one piece of data, determine target data from the at least one piece of data with a maximum corresponding VMAF value, determine a target resolution according to a resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the first correspondence relationship includes a plurality of pieces of data, each of the plurality of pieces of data includes a set of first encoding attributes, an encoding resource usage, and a VMAF value, the first encoding attribute includes a resolution, the second value is determined according to the current encoding resource usage and the target encoding resource usage, and the target data is one piece of data among the at least one piece of data with a maximum corresponding VMAF value; and / or

[0041] The second adjustment unit 21 is used to obtain the current bit rate of the encoder, and when the current bit rate is greater than the third value, determine the target bit rate from the second corresponding relationship between the preset second encoding attribute and the VMAF value, determine at least one data whose bit rate is less than or equal to the fourth value in the second corresponding relationship, if the number of the at least one data is greater than 1, determine at least one data with the largest corresponding VMAF value among the at least one data, determine the target data from the at least one data with the largest corresponding VMAF value, determine the target resolution according to the resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the second corresponding relationship contains multiple data, each of the multiple data includes a set of second encoding attributes and a VMAF value, the second encoding attribute includes resolution and bit rate, the fourth value is determined according to the current bit rate and the target bit rate, and the target data is one data among the at least one data with the largest corresponding VMAF value.

[0042] The cloud application screen freeze optimization device provided by the embodiment of the present application determines the target coding resource usage from the first corresponding relationship between the preset first coding attribute, the coding resource usage and the VMAF value when the current coding resource usage of the encoder is greater than the first value, determines at least one data in the first corresponding relationship whose coding resource usage is less than or equal to the second value according to the target coding resource usage, and determines the target data from the at least one data, adjusts the resolution of the encoder according to the target data, and can maintain / stabilize the frame rate while ensuring clear picture quality when the real-time coding resources are insufficient; and / or when the current bit rate of the encoder is greater than the third value, determines the target bit rate from the second corresponding relationship between the preset second coding attribute and the VMAF value, determines at least one data in the second corresponding relationship whose bit rate is less than or equal to the fourth value according to the target bit rate, and determines the target data from the at least one data, adjusts the resolution of the encoder according to the target data, and can reduce the coding output bit rate while ensuring clear picture quality when the coding output bit rate of the encoder exceeds the set bit rate. That is, through the above scheme, the freeze of the cloud application screen played by the terminal can be reduced.

[0043] Based on the above device embodiment, the first adjustment unit may be used to:

[0044] Determining a comparison order of target data types in the first corresponding relationship, wherein the target data types include a resolution width and a resolution height;

[0045] According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present;

[0046] The first intermediate data is determined according to the finally obtained screening data, and the coding resource usage in the first intermediate data is determined as the target coding resource usage.

[0047] Based on the above device embodiment, the second adjustment unit may be used for:

[0048] Determining a comparison order of target data types in the second corresponding relationship, wherein the target data types include resolution width, resolution height, and bit rate;

[0049] According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present;

[0050] The second intermediate data is determined according to the finally obtained screening data, and the bit rate in the second intermediate data is determined as the target bit rate.

[0051] Based on the above device embodiment, the calculation formula of the width W2 of the target resolution can be: W2= (W1×H1×W / H) 1 / 2 The calculation formula for the target resolution height H2 can be: H2 = (W1 × H1 × H / W) 1 / 2 , where W1 and H1 are the width and height of the target data resolution, and W and H are the width and height of the encoder's current resolution.

[0052] The cloud application screen freeze optimization device provided in the embodiment of the present application has an implementation process that is consistent with the cloud application screen freeze optimization method provided in the embodiment of the present application, and the effect that can be achieved is also the same as the cloud application screen freeze optimization method provided in the embodiment of the present application, and will not be repeated here.

[0053] like Figure 3 As shown, an electronic device provided by an embodiment of the present application includes: a processor 30, a memory 31 and a bus 32, wherein the memory 31 stores machine-readable instructions executable by the processor 30, and when the electronic device is running, the processor 30 communicates with the memory 31 through the bus 32, and the processor 30 executes the machine-readable instructions to perform the steps of the above-mentioned cloud application screen freeze optimization method.

[0054] Specifically, the above-mentioned memory 31 and processor 30 can be general-purpose memory and processor, which are not specifically limited here. When the processor 30 runs the computer program stored in the memory 31, the above-mentioned cloud application screen freeze optimization method can be executed.

[0055] Corresponding to the above-mentioned cloud application screen freeze optimization method, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned cloud application screen freeze optimization method are executed.

[0056] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for optimizing the freezing of cloud application screens, characterized in that: Applied to cloud servers, including: Obtaining a current encoding resource usage of the encoder, and when the current encoding resource usage is greater than a first value, determining a target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, an encoding resource usage, and a VMAF value, determining at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to a second value, and if the number of the at least one piece of data is greater than 1, determining at least one piece of data with a maximum corresponding VMAF value among the at least one piece of data, determining target data from the at least one piece of data with a maximum corresponding VMAF value, determining a target resolution according to a resolution of the target data, and adjusting the resolution of the encoder to the target resolution, wherein the first correspondence relationship includes a plurality of pieces of data, each of the plurality of pieces of data includes a set of first encoding attributes, an encoding resource usage, and a VMAF value, the first encoding attribute includes a resolution, the second value is determined according to the current encoding resource usage and the target encoding resource usage, and the target data is one piece of data among the at least one piece of data with a maximum corresponding VMAF value; and / or The method comprises: obtaining a current bit rate of the encoder, and when the current bit rate is greater than a third value, determining a target bit rate from a second correspondence relationship between a preset second encoding attribute and a VMAF value, determining at least one data in the second correspondence relationship whose bit rate is less than or equal to a fourth value, and if the number of the at least one data is greater than 1, determining at least one data with a maximum corresponding VMAF value among the at least one data, determining target data from the at least one data with a maximum corresponding VMAF value, determining a target resolution according to a resolution of the target data, and adjusting the resolution of the encoder to the target resolution, wherein the second correspondence relationship includes multiple data, each of the multiple data includes a set of second encoding attributes and a VMAF value, the second encoding attribute includes a resolution and a bit rate, the fourth value is determined according to the current bit rate and the target bit rate, and the target data is one data among the at least one data with a maximum corresponding VMAF value.

2. The method according to claim 1, characterized in that The determining the target coding resource usage from a first correspondence between a preset first coding attribute, a coding resource usage, and a VMAF value includes: Determining a comparison order of target data types in the first corresponding relationship, wherein the target data types include a resolution width and a resolution height; According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present; The first intermediate data is determined according to the finally obtained screening data, and the coding resource usage in the first intermediate data is determined as the target coding resource usage.

3. The method according to claim 1 or 2, characterized in that The second value = target coding resource usage - (current coding resource usage - first value).

4. The method according to claim 1, characterized in that The determining the target bit rate from a second correspondence between a preset second encoding attribute and a VMAF value includes: Determining a comparison order of target data types in the second corresponding relationship, wherein the target data types include resolution width, resolution height, and bit rate; According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present; The second intermediate data is determined according to the finally obtained screening data, and the bit rate in the second intermediate data is determined as the target bit rate.

5. The method according to claim 1 or 4, characterized in that The fourth value = target bit rate - (current bit rate - third value).

6. The method according to claim 1, characterized in that The calculation formula for the width W2 of the target resolution is: W2 = (W1×H1×W / H) 1 / 2 The calculation formula for the target resolution height H2 is: H2 = (W1×H1×H / W) 1 / 2 , where W1 and H1 are the width and height of the target data resolution, and W and H are the width and height of the encoder's current resolution.

7. A cloud application screen freeze optimization device, characterized in that: Applied to cloud servers, including: a first adjustment unit, configured to obtain a current encoding resource usage of the encoder, and when the current encoding resource usage is greater than a first value, determine a target encoding resource usage from a first correspondence relationship among a preset first encoding attribute, an encoding resource usage, and a VMAF value, determine at least one piece of data in the first correspondence relationship whose encoding resource usage is less than or equal to a second value, and if the number of the at least one piece of data is greater than 1, determine at least one piece of data with a maximum corresponding VMAF value among the at least one piece of data, determine target data from the at least one piece of data with a maximum corresponding VMAF value, determine a target resolution according to a resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the first correspondence relationship includes a plurality of pieces of data, each of the plurality of pieces of data includes a set of first encoding attributes, an encoding resource usage, and a VMAF value, the first encoding attribute includes a resolution, the second value is determined according to the current encoding resource usage and the target encoding resource usage, and the target data is one piece of data among the at least one piece of data with a maximum corresponding VMAF value; and / or The second adjustment unit is used to obtain the current bit rate of the encoder, and when the current bit rate is greater than the third value, determine the target bit rate from the second corresponding relationship between the preset second encoding attribute and the VMAF value, determine at least one data in the second corresponding relationship whose bit rate is less than or equal to the fourth value, if the number of the at least one data is greater than 1, determine at least one data with the largest corresponding VMAF value among the at least one data, determine the target data from the at least one data with the largest corresponding VMAF value, determine the target resolution according to the resolution of the target data, and adjust the resolution of the encoder to the target resolution, wherein the second corresponding relationship includes multiple data, each of the multiple data includes a set of second encoding attributes and a VMAF value, the second encoding attribute includes resolution and bit rate, the fourth value is determined according to the current bit rate and the target bit rate, and the target data is one data among the at least one data with the largest corresponding VMAF value.

8. The device according to claim 7, characterized in that The first adjustment unit is used to: Determining a comparison order of target data types in the first corresponding relationship, wherein the target data types include a resolution width and a resolution height; According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present; The first intermediate data is determined according to the finally obtained screening data, and the coding resource usage in the first intermediate data is determined as the target coding resource usage.

9. The device according to claim 7, characterized in that The second adjustment unit is used for: Determining a comparison order of target data types in the second corresponding relationship, wherein the target data types include resolution width, resolution height, and bit rate; According to the comparison order of the target data types, traverse each bit of the target data type in the comparison order, filter the data whose value under the target data type of the bit in the first corresponding relationship is the same as the value under the target data type of the encoder at present or the data whose absolute value of the difference is the smallest, to obtain the filtered data, wherein the data source filtered in the latter traversal is the filtered data obtained in the previous traversal, and if the data with the smallest absolute value of the difference includes at least two data, then the corresponding filtered data is the data whose value under the target data type of the bit in the at least two data is smaller than the value under the target data type of the encoder at present; The second intermediate data is determined according to the finally obtained screening data, and the bit rate in the second intermediate data is determined as the target bit rate.

10. The device according to claim 7, characterized in that The calculation formula for the width W2 of the target resolution is: W2 = (W1×H1×W / H) 1 / 2 The calculation formula for the target resolution height H2 is: H2 = (W1×H1×H / W) 1 / 2 , where W1 and H1 are the width and height of the target data resolution, and W and H are the width and height of the encoder's current resolution.

Citation Information

Patent Citations

  • Dynamic bandwidth resource management method and device

    CN118449863A

  • Methods and devices for producing a bit rate ladder for video streaming

    WO2024038019A1