Cloud desktop encoding method and device, system, electronic equipment and storage medium
By identifying and merging high-frame-rate partitions in the cloud desktop and optimizing data transmission using different encoding formats, the problem of latency and stuttering in the cloud desktop at high resolution and high frame rate is solved, resulting in a smoother user experience and higher system performance.
Patent Information
- Application Number
- CN202411352583.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Cloud desktops, at high resolutions and high frame rates, face a greater risk of latency and stuttering due to increased data transmission demands and excessive network load caused by the increased demand for data transmission.
By obtaining the moving average frame rate of the cloud desktop partitions, high frame rate partitions are identified and merged. Different encoding formats are used to encode the data in the merged and non-merged areas. The merged areas use an efficient encoding format, while the non-merged areas use a normal encoding format to optimize data transmission.
It reduces the risk of cloud desktop latency and lag, improves system response speed and stability, and optimizes data transmission efficiency.
Smart Images

Figure CN119299049B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data processing, in particular to a cloud desktop encoding method and device, system, electronic equipment and storage medium. BACKGROUND
[0002] In the cloud desktop encoding method, user experience is the most important concern, and the most direct and subjective feeling of the user is the smooth operation of the cloud desktop. In low resolution and low frame rate, the cloud desktop needs to transmit less data, the demand for bandwidth and network burden is low, and the cloud desktop can maintain good response speed. However, with the increase of resolution and frame rate, the cloud desktop needs to transmit more data, which increases the demand for bandwidth and network burden, resulting in a greater risk of delay and lag of the cloud desktop. SUMMARY
[0003] The present disclosure provides a cloud desktop encoding method and device, system, electronic equipment and storage medium. The main purpose is to solve the problem that the cloud desktop has a greater risk of delay and lag.
[0004] According to a first aspect of the present disclosure, a cloud desktop encoding method is provided, wherein the method is applied to a server, comprising:
[0005] Respectively acquire the moving average frame rate of all partitions in the cloud desktop, and compare the moving average frame rate with a preset first threshold; the data in the all partitions is encoded by a preset first encoding format;
[0006] If there is a moving average frame rate greater than the preset first threshold in the moving average frame rate, the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold is determined as a first to-be-merged area;
[0007] If there is a second to-be-merged area adjacent to the first to-be-merged area in the all partitions, the second to-be-merged area and the first to-be-merged area are merged to obtain a current merged area; the second to-be-merged area is composed of two adjacent partitions in the all partitions whose moving average frame rate difference is less than a preset second threshold;
[0008] The data in the current merged area is encoded by a preset second encoding format, so that the data in the current merged area and the data in the partitions other than the current merged area in the all partitions are transmitted to the client based on the preset first encoding format and the preset second encoding format.
[0009] Optionally, before merging the second to-be-merged area and the first to-be-merged area, the method further comprises:
[0010] determining that the first partition is the second to-be-merged region in a case where a moving average frame rate difference between the first partition and the first to-be-merged region is less than the preset second threshold value; the first partition is a partition adjacent to the first to-be-merged region among the all partitions;
[0011] adding a second partition adjacent to the second to-be-merged region into the second to-be-merged region until there is no second partition adjacent to the second to-be-merged region among the all partitions; the second partition is a partition other than the first partition among the all partitions and having a moving average frame rate difference with the first to-be-merged region less than the preset second threshold value.
[0012] Optionally, before determining the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value as the first to-be-merged region, the method further comprises:
[0013] judging whether there is a historical merged region among the all partitions; the historical merged region is a merged region obtained by merging all historical partitions in the cloud desktop; data in the historical merged region is encoded in the preset second encoding format;
[0014] in a case where it is determined that there is the historical merged region among the all partitions, acquiring a moving average frame rate of the historical merged region;
[0015] if the moving average frame rate of the historical merged region is less than or equal to the preset first threshold value, restoring the historical merged region into at least one initial partition, and encoding data in the at least one initial partition in the preset first encoding format.
[0016] Optionally, after acquiring the moving average frame rate of the historical merged region, the method further comprises:
[0017] if the moving average frame rate of the historical merged region is greater than the preset first threshold value, updating the historical merged region into the current merged region, and stopping the execution of determining the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value as the first to-be-merged region.
[0018] Optionally, before acquiring the moving average frame rate of each partition in the cloud desktop, the method further comprises:
[0019] acquiring a resolution of the cloud desktop; the resolution comprises a horizontal resolution and a vertical resolution;
[0020] determining a maximum value of the horizontal resolution and the vertical resolution as a target resolution, and determining a direction of the target resolution of the cloud desktop as a partition direction;
[0021] According to a pre-established mapping relationship between resolution and partition number, a target partition number of the target resolution is searched;
[0022] Based on the target partition number and the partition direction, the cloud desktop is partitioned to obtain at least two partitions.
[0023] Optionally, after encoding the data in the current merged region by using the preset second encoding format, the method further includes:
[0024] obtaining region boundary coordinates of the cloud desktop; the region boundary coordinates include first boundary coordinates of the current merged region and second boundary coordinates of partitions other than the current merged region in all partitions of the cloud desktop;
[0025] sending the first boundary coordinates and the second boundary coordinates to the client, so that the client partitions a display desktop of the client based on the first boundary coordinates and the second boundary coordinates.
[0026] According to a second aspect of the present disclosure, a cloud desktop encoding method is provided, wherein the method is applied to a client and includes:
[0027] receiving encoded data sent by the server; the encoded data includes first encoded data encoded by the server by using a preset first encoding format and second encoded data encoded by the server by using a preset second encoding format;
[0028] decoding the first encoded data by using a preset first decoding format corresponding to the preset first encoding format;
[0029] decoding the second encoded data by using a preset second decoding format corresponding to the preset second encoding format.
[0030] Optionally, before receiving the encoded data sent by the server, the method further includes:
[0031] receiving region boundary coordinates of the cloud desktop sent by the server; the region boundary coordinates include first boundary coordinates of a current merged region and second boundary coordinates of partitions other than the current merged region in all partitions of the cloud desktop; the current merged region is a region obtained by merging based on a moving average frame rate of all partitions in the cloud desktop;
[0032] dividing a display desktop of the client into partitions consistent with a partition result of the cloud desktop according to the first boundary coordinates and the second boundary coordinates; the partition result includes the current merged region and the partitions other than the current merged region in all partitions of the cloud desktop.
[0033] According to a third aspect of the present disclosure, an encoding apparatus of a cloud desktop is provided, wherein the apparatus is applied to a server side, and comprises:
[0034] a comparison unit configured to respectively acquire moving average frame rates of all partitions in the cloud desktop, and compare the moving average frame rates with a preset first threshold value;
[0035] a first determination unit configured to, when there is a moving average frame rate greater than the preset first threshold value in the moving average frame rates, determine a partition corresponding to a maximum value of the moving average frame rates greater than the preset first threshold value as a first to-be-merged area;
[0036] a merging unit configured to, when there is a second to-be-merged area adjacent to the first to-be-merged area in the all partitions, merge the second to-be-merged area with the first to-be-merged area to obtain a current merged area; the second to-be-merged area is composed of two-by-two adjacent partitions in the all partitions having a moving average frame rate difference less than a preset second threshold value with the first to-be-merged area;
[0037] an encoding unit configured to encode data in the current merged area by a preset second encoding format, so as to transmit the data in the current merged area and data in partitions other than the current merged area in the all partitions to a client based on the preset first encoding format and the preset second encoding format.
[0038] Optionally, the apparatus further comprises:
[0039] the first determination unit is further configured to, before merging the second to-be-merged area with the first to-be-merged area, determine a first partition as the second to-be-merged area in a case where a moving average frame rate difference between the first partition and the first to-be-merged area is less than the preset second threshold value; the first partition is a partition adjacent to the first to-be-merged area in the all partitions;
[0040] the first determination unit is further configured to add a second partition adjacent to the second to-be-merged area to the second to-be-merged area until there is no second partition adjacent to the second to-be-merged area in the all partitions; the second partition is a partition other than the first partition and having a moving average frame rate difference less than the preset second threshold value with the first to-be-merged area in the all partitions.
[0041] Optionally, the apparatus further comprises:
[0042] The judgment unit is configured to judge whether there is a historical merged area in the all partitions before determining the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value as a first to-be-merged area; the historical merged area is a merged area obtained by merging all historical partitions in the cloud desktop; data in the historical merged area is encoded by using the preset second encoding format;
[0043] The first acquisition unit is configured to acquire a moving average frame rate of the historical merged area in a case where it is determined that the historical merged area exists in the all partitions.
[0044] The restoring unit is configured to restore the historical merged area to at least one initial partition when the moving average frame rate of the historical merged area is less than or equal to the preset first threshold value, and encode data in the at least one initial partition by using the preset first encoding format.
[0045] Optionally, the apparatus further comprises:
[0046] The updating unit is configured to update the historical merged area to the current merged area and stop the execution of the determination of the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value as the first to-be-merged area when the moving average frame rate of the historical merged area is greater than the preset first threshold value after the moving average frame rate of the historical merged area is acquired.
[0047] Optionally, the apparatus further comprises:
[0048] The second acquisition unit is configured to acquire a resolution of the cloud desktop before acquiring moving average frame rates of all partitions in the cloud desktop; the resolution comprises a horizontal resolution and a vertical resolution.
[0049] The second determination unit is configured to determine a maximum value of the horizontal resolution and the vertical resolution as a target resolution, and determine a direction of the target resolution of the cloud desktop as a partition direction.
[0050] The searching unit is configured to search for a target partition quantity of the target resolution according to a mapping relationship between resolutions and partition quantities that is established in advance.
[0051] The partition unit is configured to partition the cloud desktop based on the target partition quantity and the partition direction to obtain at least two partitions.
[0052] Optionally, the apparatus further comprises:
[0053] The third obtaining unit is configured to obtain the region boundary coordinates of the cloud desktop after encoding the data in the current merged region by using the preset second encoding format; the region boundary coordinates include first boundary coordinates of the current merged region and second boundary coordinates of the regions other than the current merged region in all the regions of the cloud desktop.
[0054] The sending unit is configured to send the first boundary coordinates and the second boundary coordinates to the client, so that the client partitions the display desktop of the client based on the first boundary coordinates and the second boundary coordinates.
[0055] According to a fourth aspect of the present disclosure, an encoding device of a cloud desktop is provided, wherein the device is applied to a client and includes:
[0056] The receiving unit is configured to receive the encoding data sent by the server; the encoding data includes first encoding data encoded by the server by using a preset first encoding format and second encoding data encoded by the server by using a preset second encoding format.
[0057] The first decoding unit is configured to decode the first encoding data by using a preset first decoding format corresponding to the preset first encoding format.
[0058] The second decoding unit is configured to decode the second encoding data by using a preset second decoding format corresponding to the preset second encoding format.
[0059] Optionally, the device further includes:
[0060] The receiving unit is further configured to receive the region boundary coordinates of the cloud desktop sent by the server before receiving the encoding data sent by the server; the region boundary coordinates include first boundary coordinates of a current merged region and second boundary coordinates of regions other than the current merged region in all the regions of the cloud desktop; the current merged region is a region obtained by merging based on the moving average frame rate of all the regions of the cloud desktop.
[0061] The partitioning unit is configured to partition the display desktop of the client into regions consistent with the partitioning result of the cloud desktop according to the first boundary coordinates and the second boundary coordinates; the partitioning result includes the current merged region and the regions other than the current merged region in all the regions of the cloud desktop.
[0062] According to a fifth aspect of the present disclosure, an encoding system of a cloud desktop is provided, the system including a server and a client, and including:
[0063] The server includes the encoding device of the cloud desktop according to the third aspect of the present disclosure.
[0064] The client comprises the encoding apparatus of the cloud desktop according to the fourth aspect of the present disclosure.
[0065] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:
[0066] at least one processor; and
[0067] a memory connected with the at least one processor in communication; wherein,
[0068] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect or the method according to the second aspect.
[0069] According to a sixth aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method according to the first aspect or the method according to the second aspect.
[0070] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method according to the first aspect or the method according to the second aspect.
[0071] The cloud desktop encoding method and device, system, electronic equipment and storage medium provided by the present disclosure respectively acquire the moving average frame rates of all partitions in the cloud desktop, and compare the moving average frame rates with a preset first threshold; data in the all partitions is encoded by a preset first encoding format; if there is a moving average frame rate greater than the preset first threshold in the moving average frame rates, the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold is determined as a first to-be-merged area; if there is a second to-be-merged area adjacent to the first to-be-merged area in the all partitions, the second to-be-merged area and the first to-be-merged area are merged to obtain a current merged area; the second to-be-merged area is composed of two adjacent partitions in the all partitions whose moving average frame rate difference is less than a preset second threshold; data in the current merged area is encoded by a preset second encoding format, so that data in the current merged area and data in partitions other than the current merged area in the all partitions are transmitted to a client based on the preset first encoding format and the preset second encoding format. Compared with the related art, the embodiment of the present disclosure divides the cloud desktop into different partitions, and merges the partitions based on the moving average frame rate to obtain a current merged area. Data in the partitions that do not belong to the current merged area is encoded by a preset first encoding format, and data in the current merged area is encoded by a preset second encoding format. Different encoding formats are used to encode data in partitions with different moving average frame rates, thereby reducing the risk of delay and lag of the cloud desktop.
[0072] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0073] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:
[0074] Figure 1 A flowchart of a cloud desktop encoding method provided by an embodiment of the present disclosure;
[0075] Figure 2 A schematic diagram of the composition architecture of a cloud desktop system provided by an embodiment of the present disclosure;
[0076] Figure 3 A schematic diagram of a merging process of a current merged area provided by an embodiment of the present disclosure;
[0077] Figure 4 A flowchart of a second to-be-merged area determination method provided by an embodiment of the present disclosure;
[0078] Figure 5 A partition effect schematic diagram of a cloud desktop provided by an embodiment of the present disclosure;
[0079] Figure 6 A flow schematic diagram of another encoding method of a cloud desktop provided by an embodiment of the present disclosure;
[0080] Figure 7 A structure schematic diagram of an encoding device of a cloud desktop provided by an embodiment of the present disclosure;
[0081] Figure 8 A structure schematic diagram of another encoding device of a cloud desktop provided by an embodiment of the present disclosure;
[0082] Figure 9 A structure schematic diagram of another encoding device of a cloud desktop provided by an embodiment of the present disclosure;
[0083] Figure 10 A structure schematic diagram of another encoding device of a cloud desktop provided by an embodiment of the present disclosure;
[0084] Figure 11 A schematic diagram of an encoding system of a cloud desktop provided by an embodiment of the present disclosure;
[0085] Figure 12 A schematic block diagram of an example electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0086] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to help in understanding, which should be considered in their context only. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.
[0087] The encoding method and device, system, electronic device and storage medium of a cloud desktop of an embodiment of the present disclosure are described below with reference to the accompanying drawings.
[0088] Figure 1 A flow schematic diagram of an encoding method of a cloud desktop provided by an embodiment of the present disclosure.
[0089] As Figure 1 shown, the method is applied in a server, and the method includes the following steps:
[0090] In step 101, the moving average frame rates of all partitions in the cloud desktop are respectively acquired, and the moving average frame rates are respectively compared with a preset first threshold; data in the all partitions is encoded by a preset first encoding format.
[0091] The cloud desktop system is composed of two parts, namely, a server and a client. In order to better understand the composition architecture of the cloud desktop system, as shown in Figure 2 Figure 2 The composition architecture of the cloud desktop system provided by the embodiment of the present disclosure is shown in the figure, wherein the server is deployed in a server, and the server is composed of two parts, namely, a management platform and a cloud computer. The management platform is mainly responsible for issuing partition strategies and encoding strategies in the cloud desktop. The cloud desktop is divided into regions according to the corresponding strategies, and the client is rendered according to the strategies. The cloud computer is responsible for the operation of the cloud desktop and the execution of the partition strategies issued by the management platform, and sends the display content of the cloud desktop to the client. The client is an electronic device for the user to remotely log in to the cloud desktop, including but not limited to a desktop computer, a notebook computer, a tablet computer, a smart phone, and a smart watch. The client can remotely operate the cloud computer.
[0092] The partition refers to the cloud desktop being divided into multiple independent regions, and each region can process and optimize data independently. The moving average frame rate refers to the average frame rate of all frame rates in the partition within a preset time range before the frame rate acquisition time.
[0093] The calculation formula of the moving average frame rate can be realized by formula (1):
[0094]
[0095] Among them, is the moving average frame rate, n is the preset time range, t is the frame rate acquisition time, y t is the frame rate of the partition at t, y t-1 is the frame rate of the partition at t-1, y t-n+1 is the frame rate of the partition at t-n+1.
[0096] In order to facilitate understanding, an example is provided, assuming that 12:10:04 is the frame rate acquisition time, n is 3 seconds, and there are three frame rates of a partition within n, which are the frame rate a of 12:10:04, the frame rate b of 12:10:03, and the frame rate c of 12:10:02. The frame rate a, the frame rate b, and the frame rate c are added to obtain the frame rate d, and the frame rate d is divided by n to obtain the moving average frame rate of a partition at 12:10:04. The preset time range is any value, and the embodiment of the present disclosure is not limited.
[0097] Each partition in the cloud desktop has a corresponding encoder, which encodes the data in the corresponding partition by a preset first encoding format. The preset first encoding format is a pre-set data encoding format, which is used to process and compress the data in the partition to optimize the transmission efficiency. For example, the preset first encoding format can be yuv444, but it should be clear that this statement is not intended to limit the preset first encoding format to yuv444 only, but also to other encoding formats. The data in the partition is the data corresponding to the content displayed in the partition, which includes but is not limited to text, images, and video streams. After encoding, the data is transmitted to the client over the network, and the client decodes the encoded data and displays the decoded data.
[0098] Exemplarily, the preset first threshold value can be any value, and the embodiments of the present disclosure do not limit the value of the preset first threshold value.
[0099] By obtaining the moving average frame rate of all partitions in the cloud desktop and comparing it with the preset first threshold value, the partition with excellent performance is identified. In this way, it can be ensured that in the case of high load, those partitions with higher smoothness are preferentially merged, thereby improving the overall user experience. At the same time, using the preset first encoding format to encode the data helps to optimize the data transmission efficiency and ensure smooth data transmission to the client. The ultimate goal of this is to improve the response speed and stability of the system.
[0100] Step 102, if there is a moving average frame rate greater than the preset first threshold value in the moving average frame rate, the partition corresponding to the maximum value greater than the preset first threshold value is determined as the first to-be-merged area.
[0101] For ease of understanding, an example is provided, assuming that there are 2 partitions in the cloud desktop, namely partition a and partition b, the moving average frame rate of partition a is 15, the moving average frame rate of partition b is 24, and the preset first threshold value is 20. The first to-be-merged area is partition b.
[0102] Exemplarily, if there are two identical maximum values in the moving average frame rate corresponding to all partitions respectively, a partition corresponding to a random maximum value is selected as the first to-be-merged area.
[0103] For ease of understanding, an example is provided, assuming that there are 3 partitions in the cloud desktop, namely partition a, partition b, and partition c, the moving average frame rate of partition a is 15, the moving average frame rate of partition b is 24, and the moving average frame rate of partition c is 24. The first to-be-merged area is partition b or partition c.
[0104] By identifying the partitions with higher fluency, it can be ensured that the areas with better performance are prioritized during merging, thereby improving the overall system response capability and user experience.
[0105] In step 103, if there is a second to-be-merged area adjacent to the first to-be-merged area among all the partitions, the second to-be-merged area is merged with the first to-be-merged area to obtain a current merged area; the second to-be-merged area is composed of two adjacent partitions in the all partitions whose moving average frame rate difference is less than a preset second threshold.
[0106] In order to better understand the merging process of the current merged area, as shown in Figure 3 , Figure 3 is a schematic diagram of the merging process of the current merged area provided by the embodiments of the present disclosure, assuming that the preset first threshold is 16 and the preset second threshold is 4, in Figure 3 , the maximum value of the moving average frame rate is 20, Figure 3 , there are 2 maximum values, and a partition corresponding to a randomly selected maximum value is the first to-be-merged area, assuming that partition 6 is determined as the first to-be-merged area, since partition 5 is adjacent to partition 6, partition 7 is adjacent to partition 6, the moving average frame rate difference between partition 5 and partition 6 is less than 4, the moving average frame rate difference between partition 7 and partition 6 is less than 4, partition 8 is adjacent to partition 7, the moving average frame rate difference between partition 8 and partition 6 is less than 4, partition 4 is adjacent to partition 5, and the moving average frame rate difference between partition 4 and partition 6 is greater than 4, so partition 5 is a second to-be-merged area, and partition 7 and partition 8 form a second to-be-merged area.
[0107] Exemplarily, the preset second threshold can be any value, and the embodiments of the present disclosure are not limited.
[0108] By merging the partitions adjacent to the first to-be-merged area and having a frame rate difference less than the preset second threshold, it can be ensured that the performance of these areas is similar, thereby optimizing the encoding and transmission process, reducing the delay, and improving the overall user experience. This strategy helps to achieve the best balance between resource utilization and performance.
[0109] In step 104, the data in the current merged area is encoded by a preset second encoding format, so as to transmit the data in the current merged area and the data in the partitions other than the current merged area among all the partitions to the client based on the preset first encoding format and the preset second encoding format.
[0110] The preset second encoding format is a preset data encoding format different from the preset first encoding format, the encoding speed of the preset second encoding format is higher than that of the preset first encoding format, and the encoding data amount of the preset second encoding format is smaller than that of the preset second encoding format. For example, the preset second encoding format can be yuv420, but it should be clear that this statement is not intended to limit the preset second encoding format to yuv420, but can also be other encoding formats.
[0111] To facilitate understanding, an example is provided, assuming that the preset first encoding format is yuv444 and the preset second encoding format is yuv420. The encoding data amount of yuv420 is only half of that of yuv444, but the clarity of the encoding data of yuv420 is lower than that of yuv444. Essentially, higher frame rate is achieved at the expense of image quality. Therefore, the encoding speed of the preset second encoding format will be faster, and a higher frame rate can be achieved under the same resources. Since the moving average frame rate of the current merged area is large, yuv420 needs to be used for encoding.
[0112] The preset second encoding format can be optimized for high frame rate, high dynamic range, or specific types of content, thus providing more efficient compression ratio. The amount of data transmitted can be reduced, thereby speeding up data transmission and reducing bandwidth occupation.
[0113] The cloud desktop encoding method provided in the present disclosure comprises the following steps: obtaining the moving average frame rates of all partitions in a cloud desktop respectively, and comparing the moving average frame rates with a preset first threshold respectively; encoding the data in all the partitions by using a preset first encoding format; if there is a moving average frame rate greater than the preset first threshold in the moving average frame rates, determining the partition corresponding to the maximum value of the moving average frame rates greater than the preset first threshold as a first to-be-merged area; if there is a second to-be-merged area adjacent to the first to-be-merged area in all the partitions, merging the second to-be-merged area with the first to-be-merged area to obtain a current merged area; the second to-be-merged area is composed of two adjacent partitions in all the partitions, and the moving average frame rate difference between the two adjacent partitions is less than a preset second threshold; and encoding the data in the current merged area by using a preset second encoding format, so as to transmit the data in the current merged area and the data in the partitions other than the current merged area in all the partitions to a client based on the preset first encoding format and the preset second encoding format. Compared with the related art, the present disclosure obtains the partitions in the cloud desktop, and merges the partitions based on the moving average frame rates to obtain the current merged area. The data in the partitions other than the current merged area is encoded by using the preset first encoding format, and the data in the current merged area is encoded by using the preset second encoding format. Thus, the data in the partitions with different moving average frame rates is encoded by using different encoding formats, thereby reducing the risk of delay and lag of the cloud desktop.
[0114] In actual application, before merging the second to-be-merged area with the first to-be-merged area, it is necessary to determine whether there is a second to-be-merged area in all the partitions of the cloud desktop. The determination can be implemented by using, but not limited to, the following method. Figure 4 As shown in Figure 4 FIG. 1 is a flowchart of an example of a method for determining a second to-be-merged area provided in the present disclosure, which comprises the following steps:
[0115] In step 201, if the moving average frame rate difference between the first partition and the first to-be-merged area is less than the preset second threshold, the first partition is determined as the second to-be-merged area. The first partition is a partition adjacent to the first to-be-merged area in all the partitions.
[0116] For the convenience of understanding, an example is provided. Please continue to refer to Figure 3 Assuming that partition 7 is determined as the first to-be-merged area, and the preset second threshold is 5, partition 6 and partition 8 are both first partitions, the moving average frame rate difference between partition 6 and partition 7 is less than the preset second threshold, the moving average frame rate difference between partition 8 and partition 7 is less than the preset second threshold, and partition 6 and partition 8 are both second to-be-merged areas.
[0117] The content integration and optimization of adjacent areas are realized to improve the coding efficiency, reduce the transmission delay and bandwidth occupation, and ultimately improve the user's viewing experience.
[0118] In step 202, a second partition adjacent to the second to-be-merged area is added to the second to-be-merged area until there is no second partition adjacent to the second to-be-merged area in all partitions; the second partition is a partition in all partitions except the first partition, and the moving average frame rate difference between the first to-be-merged area is less than the preset second threshold.
[0119] For the convenience of understanding, an example is provided, please continue to refer to Figure 3 Assuming that partition 7 is determined as the first to-be-merged area, the preset second threshold is 5, partition 6 is the second to-be-merged area, partition 8 is the second to-be-merged area, partition 5 and partition 6 are the second partition, and partition 5 is adjacent to the second to-be-merged area, partition 5 is added to the second to-be-merged area, partition 1 is not adjacent to the second to-be-merged area, and partition 1 cannot be added to the second to-be-merged area, partition 5 and partition 6 form a second to-be-merged area, and partition 8 is a to-be-merged area.
[0120] By merging partitions with similar frame rates, the number of areas that need to be processed separately can be reduced, thereby improving the processing efficiency in video coding, frame rate conversion, video analysis and other tasks.
[0121] In actual application, before determining the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold as the first to-be-merged area, in order to control the bandwidth of the transmission data of the cloud desktop, there can be only one merged area in the cloud desktop, in order to ensure that there is only one merged area in the cloud desktop, the following methods can be used but are not limited to: judging whether there is a historical merged area in all partitions; the historical merged area is a merged area obtained by merging all historical partitions in the cloud desktop; the data in the historical merged area is encoded by the preset second encoding format; in the case that it is determined that there is the historical merged area in all partitions, the moving average frame rate of the historical merged area is obtained; if the moving average frame rate of the historical merged area is less than or equal to the preset first threshold, the historical merged area is restored to at least one initial partition, and the data in the at least one initial partition is encoded by the preset first encoding format.
[0122] For example, assuming that the preset first threshold is 20, the moving average frame rate of the historical merged area is 15, and the historical merged area is composed of two historical partitions, the historical merged area is restored to two initial partitions.
[0123] By dynamically adjusting the partition and encoding format strategy in the cloud desktop, the system performance is optimized, the user experience is improved, the system resources are reasonably utilized, and the adaptability of the system to dynamic changes is enhanced.
[0124] In practical applications, after obtaining the moving average frame rate of the historical merged region, the method for ensuring that there is only one merged region in the cloud desktop can also be implemented in the following manner, but is not limited thereto: if the moving average frame rate of the historical merged region is greater than the preset first threshold value, the historical merged region is updated to the current merged region, and the execution of determining the partition corresponding to the maximum value in the moving average frame rate greater than the preset first threshold value as the first to-be-merged region is stopped. By updating the historical merged region to the current merged region, unnecessary merging and splitting operations can be avoided, thereby maintaining the stability and performance advantage of the system.
[0125] In practical applications, before obtaining the moving average frame rate of each partition in the cloud desktop, in order to improve the data transmission efficiency of the cloud desktop, the cloud desktop needs to be partitioned so that the data in the cloud desktop can be transmitted in parallel, thereby improving the data transmission efficiency. The partitioning method of the cloud desktop can be implemented in the following manner, but is not limited thereto: obtaining the resolution of the cloud desktop; the resolution includes a horizontal resolution and a vertical resolution; determining the maximum value in the horizontal resolution and the vertical resolution as a target resolution, and determining the direction of the target resolution of the cloud desktop as a partition direction; according to a pre-established mapping relationship between resolution and partition quantity, finding a target partition quantity of the target resolution; based on the target partition quantity and the partition direction, partitioning the cloud desktop to obtain at least two partitions.
[0126] For the sake of better understanding the partitioning of the cloud desktop, as shown in Figure 5 , Figure 5 is a schematic diagram of the partitioning effect of a cloud desktop provided by an embodiment of the present disclosure. Assuming that the horizontal resolution of the cloud desktop is 1920 and the vertical resolution is 1080, the partition direction is the horizontal direction, as shown in Figure 5 (b). Assuming that the horizontal resolution of the desktop is 1080 and the vertical resolution is 1920, the partition direction is the vertical direction, as shown in Figure 5 (a).
[0127] As another implementation manner of the embodiment of the present disclosure, the partition method of the cloud desktop can also be partitioned according to the comparison result of the target resolution and the preset value range. For example, assuming that the preset value range includes three, which are less than 720, greater than 720 and less than 1920, greater than 1920 and less than 2560, the partition number of less than 720 is 4, the partition number of greater than 720 and less than 1920 is 8, the partition number of greater than 1920 and less than 2560 is 16, and the target resolution is 1080, then the partition number is 8.
[0128] Exemplarily, the partition width of the first n-1 partitions is l / n, and the partition width of the last partition is l-(n-1)×(l / n), wherein n is the partition number, and l is the target resolution.
[0129] According to the resolution characteristics of the cloud desktop, reasonable partition is performed to improve the display effect, optimize resource allocation, realize uniform performance distribution, adapt to different display requirements, simplify system management, and support multi-user or multi-task operation
[0130] In actual application, after the data in the current merged area is encoded by the preset second encoding format, in order to make the display desktop of the client and the cloud desktop have the same display effect, the partition results of the display desktop and the cloud desktop need to be the same, and the following methods can be used but are not limited to the following methods: obtaining the area boundary coordinates of the cloud desktop; the area boundary coordinates include the first boundary coordinates of the current merged area and the second boundary coordinates of the partitions except the current merged area; sending the first boundary coordinates and the second boundary coordinates to the client, so that the client partitions the display desktop of the client based on the first boundary coordinates and the second boundary coordinates.
[0131] The cloud desktop is usually run on the server side, and the user accesses the cloud desktop through the client. Sending the area boundary coordinates of the cloud desktop to the client can ensure that the display desktop of the client can accurately simulate and reflect the partition layout of the cloud desktop, thereby realizing the consistency and continuity of the user interface.
[0132] The above embodiment illustrates the encoding method of the cloud desktop applied to the server side, and the subsequent embodiment illustrates the encoding method of the cloud desktop applied to the client, Figure 6 The flowchart of another encoding method of the cloud desktop provided by the embodiment of the present disclosure is shown.
[0133] As Figure 6 shown, the method is applied to the client, and the method includes the following steps:
[0134] Step 301, receiving the encoding data sent by the server; the encoding data includes first encoding data encoded by the server through a preset first encoding format and second encoding data encoded by the server through a preset second encoding format.
[0135] Different encoding formats may differ in compression rate, transmission speed, decoding complexity, etc. The server selects the most suitable encoding format for encoding according to the characteristics of the data and the transmission environment, which can optimize the transmission efficiency of the data and reduce the transmission time and bandwidth occupation.
[0136] Step 302, decoding the first encoding data using a preset first decoding format corresponding to the preset first encoding format.
[0137] Encoding and decoding are a pair of interdependent processes that must be strictly matched to ensure the accuracy and consistency of the data. Using the preset first decoding format corresponding to the preset first encoding format for decoding can ensure that the decoded data is completely consistent with the original data, avoiding errors or distortion of the data in the transmission or processing process.
[0138] Step 303, decoding the second encoding data using a preset second decoding format corresponding to the preset second encoding format.
[0139] Encoding and decoding are a pair of interdependent processes that must be strictly matched to ensure the accuracy and consistency of the data. Using the preset second decoding format corresponding to the preset second encoding format for decoding can ensure that the decoded data is completely consistent with the original data, avoiding errors or distortion of the data in the transmission or processing process.
[0140] The cloud desktop encoding method disclosed herein obtains the moving average frame rate of all partitions in the cloud desktop and compares each moving average frame rate with a preset first threshold. Data in all partitions is encoded using a preset first encoding format. If any moving average frame rate exceeds the preset first threshold, the partition corresponding to the maximum value of the moving average frame rate exceeding the preset first threshold is identified as a first region to be merged. If any second region to be merged exists adjacent to the first region to be merged, the second region to be merged is merged with the first region to be merged to obtain a current merged region. The second region to be merged consists of two adjacent partitions whose moving average frame rate difference with the first region to be merged is less than a preset second threshold. Data in the current merged region is encoded using a preset second encoding format so that, based on the preset first and preset second encoding formats, data in the current merged region and data from partitions other than the current merged region are transmitted to the client. Compared with related technologies, the embodiments of this disclosure obtain the cloud desktop divided into different partitions, and merge the partitions based on the moving average frame rate to obtain the current merged area. Data in the partition that does not belong to the current merged area is encoded using a preset first encoding format, and data in the current merged area is encoded using a preset second encoding format. This realizes that data in partitions with different moving average frame rates is encoded using different encoding formats, reducing the risk of cloud desktop latency and stuttering.
[0141] In practical applications, before receiving the encoded data sent by the server, in order to ensure that the client's displayed desktop has the same display effect as the cloud desktop, the partitioning results of the displayed desktop and the cloud desktop need to be the same. This can be achieved in the following ways, but is not limited to: receiving the region boundary coordinates of the cloud desktop sent by the server; the region boundary coordinates include the first boundary coordinates of the currently merged region and the second boundary coordinates of all partitions in the cloud desktop except for the currently merged region; the currently merged region is the region obtained by merging based on the moving average frame rate of all partitions in the cloud desktop; according to the first boundary coordinates and the second boundary coordinates, the client's displayed desktop is divided into partitions consistent with the partitioning results of the cloud desktop; the partitioning results include the currently merged region and all partitions in the cloud desktop except for the currently merged region.
[0142] By ensuring that the desktop partitions displayed on the client are completely identical to those on the cloud desktop, users can obtain a visual and operational experience almost identical to that on the cloud desktop on their local devices. This helps reduce the adaptation time for users when switching devices or environments, improving overall user satisfaction and work efficiency.
[0143] To sum up, the embodiment of the disclosure can achieve the following effects:
[0144] The embodiment of the disclosure obtains that the cloud desktop is divided into different partitions, and merges the partitions based on the moving average frame rate to obtain a current merging area, data in the partitions that does not belong to the current merging area is encoded by a preset first encoding format, and data in the current merging area is encoded by a preset second encoding format, so that data in the partitions with different moving average frame rates is encoded using different encoding formats, and the risk of delay and lag of the cloud desktop is reduced.
[0145] Corresponding to the above-mentioned cloud desktop encoding method, the application also proposes a cloud desktop encoding device. Since the device embodiment of the application corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, which will not be described in detail in the application.
[0146] Figure 7 A structural schematic diagram of a cloud desktop encoding device provided by the embodiment of the disclosure is shown in the figure, the device is applied to a server, such as Figure 7 As shown, it comprises:
[0147] The comparison unit 401 is configured to obtain the moving average frame rate of all partitions in the cloud desktop respectively, and compare the moving average frame rate with a preset first threshold respectively; the data in the all partitions is encoded by a preset first encoding format;
[0148] The first determination unit 402 is configured to determine the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold as the first merging area to be merged when the moving average frame rate greater than the preset first threshold exists in the moving average frame rate;
[0149] The merging unit 403 is configured to merge the second merging area to be merged and the first merging area to be merged to obtain a current merging area when the second merging area to be merged exists in the all partitions adjacent to the first merging area to be merged; the second merging area to be merged is composed of two adjacent partitions in the all partitions with the moving average frame rate difference between the first merging area to be merged being less than a preset second threshold;
[0150] The encoding unit 404 is configured to encode the data in the current merging area by a preset second encoding format, so as to transmit the data in the current merging area and the data in the partitions other than the current merging area in the all partitions to the client based on the preset first encoding format and the preset second encoding format.
[0151] The cloud desktop encoding apparatus provided by the present disclosure acquires the moving average frame rates of all partitions in the cloud desktop respectively, and compares the moving average frame rates with a preset first threshold respectively; data in the all partitions is encoded by a preset first encoding format; if there is a moving average frame rate greater than the preset first threshold in the moving average frame rates, a partition corresponding to a maximum value of the moving average frame rates greater than the preset first threshold is determined as a first to-be-merged area; if there is a second to-be-merged area adjacent to the first to-be-merged area in the all partitions, the second to-be-merged area and the first to-be-merged area are merged to obtain a current merged area; the second to-be-merged area is composed of two-by-two adjacent partitions in the all partitions whose moving average frame rate difference is less than a preset second threshold; data in the current merged area is encoded by a preset second encoding format, so that data in the current merged area and data in partitions other than the current merged area in the all partitions are transmitted to a client based on the preset first encoding format and the preset second encoding format. Compared with related technologies, the embodiment of the present disclosure divides the cloud desktop into different partitions, merges the partitions based on the moving average frame rates to obtain a current merged area, encodes data in the partitions other than the current merged area by the preset first encoding format, and encodes data in the current merged area by the preset second encoding format, so that different encoding formats are used to encode data in the partitions with different moving average frame rates, and the risk of delay and lag of the cloud desktop is reduced.
[0152] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 8 The apparatus further includes:
[0153] The first determining unit 402 is further configured to, before merging the second to-be-merged area and the first to-be-merged area, in a case where a moving average frame rate difference between a first partition and the first to-be-merged area is less than the preset second threshold, determine the first partition as the second to-be-merged area; the first partition is a partition adjacent to the first to-be-merged area in the all partitions.
[0154] The first determining unit 402 is further configured to add a second partition adjacent to the second to-be-merged area to the second to-be-merged area until there is no second partition adjacent to the second to-be-merged area in the all partitions; the second partition is a partition other than the first partition and having a moving average frame rate difference less than the preset second threshold between the first to-be-merged area.
[0155] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 8As shown, the device further comprises:
[0156] The determination unit 405 is configured to determine, before determining the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value as the first to-be-merged region, whether there is a historical merged region in all the partitions; the historical merged region is a merged region obtained by merging all historical partitions in the cloud desktop; data in the historical merged region is encoded in the preset second encoding format.
[0157] The first acquisition unit 406 is configured to acquire a moving average frame rate of the historical merged region in a case where it is determined that there is the historical merged region in all the partitions.
[0158] The restoration unit 407 is configured to restore the historical merged region to at least one initial partition when the moving average frame rate of the historical merged region is less than or equal to the preset first threshold value, and encode data in the at least one initial partition in the preset first encoding format.
[0159] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 8 As shown, the device further comprises:
[0160] The update unit 408 is configured to, after acquiring the moving average frame rate of the historical merged region, update the historical merged region to the current merged region when the moving average frame rate of the historical merged region is greater than the preset first threshold value, and stop the execution of the determination of the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value as the first to-be-merged region.
[0161] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 8 As shown, the device further comprises:
[0162] The second acquisition unit 409 is configured to acquire a resolution of the cloud desktop before acquiring moving average frame rates of all the partitions in the cloud desktop; the resolution includes a horizontal resolution and a vertical resolution.
[0163] The second determination unit 410 is configured to determine a maximum value of the horizontal resolution and the vertical resolution as a target resolution, and determine a direction of the target resolution of the cloud desktop as a partition direction.
[0164] The searching unit 411 is configured to search for a target number of partitions of the target resolution according to a mapping relationship between resolutions and numbers of partitions that is established in advance.
[0165] The partition unit 412 is configured to partition the cloud desktop based on the target number of partitions and the partition direction, to obtain at least two partitions.
[0166] Further, in a possible implementation of the embodiment of the present disclosure, as shown in Figure 8 The apparatus further includes:
[0167] The third obtaining unit 413 is configured to obtain region boundary coordinates of the cloud desktop after encoding the data in the current merged region by using the preset second encoding format; the region boundary coordinates include first boundary coordinates of the current merged region and second boundary coordinates of the partition other than the current merged region among all the partitions.
[0168] The sending unit 414 is configured to send the first boundary coordinates and the second boundary coordinates to the client, so that the client partitions a display desktop of the client based on the first boundary coordinates and the second boundary coordinates.
[0169] Figure 9 Another structural schematic diagram of an encoding apparatus of a cloud desktop provided by the embodiment of the present disclosure is provided, and the apparatus is applied to a client, as shown in Figure 9 The apparatus includes:
[0170] The receiving unit 51 is configured to receive the encoding data sent by the server; the encoding data includes first encoding data encoded by the server by using a preset first encoding format and second encoding data encoded by the server by using a preset second encoding format.
[0171] The first decoding unit 52 is configured to decode the first encoding data by using a preset first decoding format corresponding to the preset first encoding format.
[0172] The second decoding unit 53 is configured to decode the second encoding data by using a preset second decoding format corresponding to the preset second encoding format.
[0173] The cloud desktop encoding apparatus provided in the present disclosure acquires the moving average frame rates of all partitions in the cloud desktop respectively, and compares the moving average frame rates respectively with a preset first threshold; data in the all partitions is encoded by a preset first encoding format; if there is a moving average frame rate greater than the preset first threshold in the moving average frame rates, a partition corresponding to a maximum value of the moving average frame rates greater than the preset first threshold is determined as a first to-be-merged area; if there is a second to-be-merged area adjacent to the first to-be-merged area in the all partitions, the second to-be-merged area and the first to-be-merged area are merged to obtain a current merged area; the second to-be-merged area is composed of two-by-two adjacent partitions in the all partitions, and a difference between moving average frame rates of the two-by-two adjacent partitions is less than a preset second threshold; data in the current merged area is encoded by a preset second encoding format, so that data in the current merged area and data in partitions other than the current merged area in the all partitions are transmitted to a client based on the preset first encoding format and the preset second encoding format. Compared with related technologies, the embodiment of the present disclosure acquires that the cloud desktop is divided into different partitions, and the partitions are merged based on the moving average frame rates to obtain the current merged area. Data in the partitions other than the current merged area is encoded by the preset first encoding format, and data in the current merged area is encoded by the preset second encoding format. Different encoding formats are used to encode data in the partitions with different moving average frame rates, thereby reducing the risk of delay and lag of the cloud desktop.
[0174] Further, in a possible implementation manner of the embodiment of the present disclosure, as shown in Figure 10 The apparatus further includes:
[0175] The receiving unit 51 is further configured to receive region boundary coordinates of the cloud desktop sent by the server before receiving the encoded data sent by the server; the region boundary coordinates include first boundary coordinates of a current merged area and second boundary coordinates of partitions other than the current merged area in all partitions of the cloud desktop; the current merged area is an area obtained by merging based on moving average frame rates of all partitions of the cloud desktop.
[0176] The dividing unit 54 is configured to divide a display desktop of the client into partitions consistent with a partition result of the cloud desktop according to the first boundary coordinates and the second boundary coordinates; the partition result includes the current merged area and the partitions other than the current merged area in all partitions of the cloud desktop.
[0177] Figure 11 A schematic diagram of a cloud desktop encoding system provided in the embodiment of the present disclosure, as shown in Figure 11 includes:
[0178] The service end 61 is a device configured on the service end, and the client end 62 is a device configured on the client end.
[0179] It should be noted that the foregoing explanation of the method embodiments is also applicable to the device of the embodiments of the present disclosure, and the principle is the same, and the device of the embodiments of the present disclosure is not limited herein.
[0180] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0181] Figure 12 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0182] As shown in Figure 12 The device 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 702 or a computer program loaded into a RAM (Random Access Memory) 703 from a storage unit 708. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An I / O (Input / Output) interface 705 is also connected to the bus 704.
[0183] A plurality of components in the device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, and the like; an output unit 707, such as various types of displays, a speaker, and the like; a storage unit 708, such as a magnetic disk, an optical disk, and the like; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0184] The computing unit 701 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 performs various methods and processes described above, such as the encoding method of the cloud desktop. For example, in some embodiments, the encoding method of the cloud desktop can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the aforementioned encoding method of the cloud desktop by any other appropriate means, such as by means of firmware.
[0185] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on a Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0186] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0187] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include one or more lines of electrical connections, portable computer disks, hard disk drives, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, fiber optics, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0188] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0189] The systems and techniques described here can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0190] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server is generally established using computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0191] It should be noted that artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors of humans (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several major directions.
[0192] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.
[0193] The above detailed description does not limit the scope of the disclosure. Various modifications, combinations, sub-combinations and alternatives can be made to the detailed description. Any modification, equivalent replacement and improvement etc. made within the spirit and principle of the disclosure shall be included in the scope of the disclosure.
Claims
1. A method of encoding a cloud desktop, the method comprising: The method is applied to a server and comprises the following steps: Respectively acquire moving average frame rates of all partitions in a cloud desktop, and respectively compare the moving average frame rates with a preset first threshold value; data in the all partitions is encoded by a preset first encoding format; If there is a moving average frame rate greater than the preset first threshold value in the moving average frame rates, a partition corresponding to a maximum value of the moving average frame rate greater than the preset first threshold value is determined as a first to-be-merged area; If there is a second to-be-merged area adjacent to the first to-be-merged area in the all partitions, the second to-be-merged area and the first to-be-merged area are merged to obtain a current merged area; the second to-be-merged area is composed of two-by-two adjacent partitions in the all partitions and a moving average frame rate difference between the two-by-two adjacent partitions is less than a preset second threshold value; Data in the current merged area is encoded by a preset second encoding format, so that data in the current merged area and data in partitions other than the current merged area in the all partitions are transmitted to a client based on the preset first encoding format and the preset second encoding format; an encoding speed of the preset second encoding format is higher than that of the preset first encoding format, and an encoding data amount of the preset second encoding format is less than that of the preset first encoding format.
2. The method of claim 1, wherein, Before the second to-be-merged area and the first to-be-merged area are merged, the method further comprises the following steps: In a case where a moving average frame rate difference between a first partition and the first to-be-merged area is less than the preset second threshold value, the first partition is determined as the second to-be-merged area; the first partition is a partition adjacent to the first to-be-merged area in the all partitions; A second partition adjacent to the second to-be-merged area is added to the second to-be-merged area until there is no second partition adjacent to the second to-be-merged area in the all partitions; the second partition is a partition other than the first partition and a moving average frame rate difference between the first to-be-merged area is less than the preset second threshold value.
3. The method of claim 1, wherein, Before the partition corresponding to the maximum value of the moving average frame rate greater than the preset first threshold value is determined as the first to-be-merged area, the method further comprises the following steps: Determine whether there is a historical merged area in the all partitions; the historical merged area is a merged area obtained based on all historical partitions in the cloud desktop; data in the historical merged area is encoded by the preset second encoding format; In a case where it is determined that there is the historical merged area in the all partitions, acquire a moving average frame rate of the historical merged area; If the moving average frame rate of the historical merged area is less than or equal to the preset first threshold value, restore the historical merged area to at least one initial partition, and encode data in the at least one initial partition by the preset first encoding format.
4. The method of claim 3, wherein, After the moving average frame rate of the historical merged area is acquired, the method further comprises the following steps: If the moving average frame rate of the historical merged region is greater than the preset first threshold, the historical merged region is updated to the current merged region, and the execution of determining the partition corresponding to the maximum value in the moving average frame rate greater than the preset first threshold as the first to-be-merged region is stopped.
5. The method of claim 1, wherein, Before acquiring the moving average frame rates of all partitions in the cloud desktop respectively, the method further comprises: acquiring a resolution of the cloud desktop; the resolution comprises a horizontal resolution and a vertical resolution; determining the maximum value in the horizontal resolution and the vertical resolution as a target resolution, and determining a direction of the target resolution of the cloud desktop as a partition direction; looking up a target partition quantity of the target resolution according to a pre-established mapping relationship between resolutions and partition quantities; partitioning the cloud desktop based on the target partition quantity and the partition direction to obtain at least two partitions.
6. The method of claim 1, wherein, After encoding the data in the current merged region by using a preset second encoding format, the method further comprises: acquiring region boundary coordinates of the cloud desktop; the region boundary coordinates comprise first boundary coordinates of the current merged region and second boundary coordinates of partitions other than the current merged region among all partitions of the cloud desktop; sending the first boundary coordinates and the second boundary coordinates to the client, so that the client partitions a display desktop of the client based on the first boundary coordinates and the second boundary coordinates.
7. A method of encoding a cloud desktop, the method comprising: The method is applied to a client and comprises: receiving encoded data sent by a server; the encoded data comprises first encoded data encoded by a preset first encoding format and second encoded data encoded by a preset second encoding format based on the cloud desktop encoding method of the cloud desktop of claim 1; decoding the first encoded data by using a preset first decoding format corresponding to the preset first encoding format; decoding the second encoded data by using a preset second decoding format corresponding to the preset second encoding format.
8. The method of claim 7, wherein, Before receiving the encoded data sent by the server, the method further comprises: receiving region boundary coordinates of the cloud desktop sent by the server; the region boundary coordinates comprise first boundary coordinates of a current merged region and second boundary coordinates of partitions other than the current merged region among all partitions of the cloud desktop; dividing a display desktop of the client into partitions consistent with a partition result of the cloud desktop according to the first boundary coordinates and the second boundary coordinates; the partition result comprises the current merged region and the partitions other than the current merged region among all partitions of the cloud desktop.
9. An encoding apparatus of a cloud desktop, characterized by comprising: The device is applied to a server and comprises: a comparison unit configured to acquire moving average frame rates of all partitions in a cloud desktop respectively, and compare the moving average frame rates with a preset first threshold respectively; data in the all partitions is encoded by using a preset first encoding format; a first determination unit configured to, when there is a moving average frame rate greater than the preset first threshold in the moving average frame rates, determine a partition corresponding to a maximum value in the moving average frame rate greater than the preset first threshold as a first to-be-merged region; The merging unit is configured to merge a second to-be-merged region with the first to-be-merged region to obtain a current merged region when the second to-be-merged region exists in the all partitions and is adjacent to the first to-be-merged region; the second to-be-merged region is composed of two-by-two adjacent partitions in the all partitions, and a moving average frame rate difference between the two-by-two adjacent partitions is less than a preset second threshold value; The encoding unit is configured to encode data in the current merged region by using a preset second encoding format, so as to transmit the data in the current merged region and data in partitions other than the current merged region in the all partitions to a client based on the preset first encoding format and the preset second encoding format; an encoding speed of the preset second encoding format is higher than that of the preset first encoding format, and an encoding data amount of the preset second encoding format is less than that of the preset first encoding format.
10. An encoding apparatus of a cloud desktop, characterized by comprising: The device is applied to a client and includes: The receiving unit is configured to receive encoded data transmitted by a server; the encoded data includes first encoded data encoded by the encoding device of the cloud desktop of the server by using a preset first encoding format and second encoded data encoded by using a preset second encoding format; The first decoding unit is configured to decode the first encoded data by using a preset first decoding format corresponding to the preset first encoding format; The second decoding unit is configured to decode the second encoded data by using a preset second decoding format corresponding to the preset second encoding format.
11. An encoding system of a cloud desktop, characterized by, The system includes a server and a client and includes: The server includes the encoding device of the cloud desktop according to claim 9; The client includes the encoding device of the cloud desktop according to claim 10.
12. An electronic device, comprising: It includes: At least one processor; And A memory connected to the at least one processor in communication; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any one of claims 1-6 or the method in claims 7-8.
13. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to execute the method in any one of claims 1-6 or the method in claims 7-8.
14. A computer program product, characterised in that, It includes a computer program, which, when executed by a processor, implements the method in any one of claims 1-6 or the method in claims 7-8.
Citation Information
Patent Citations
Cloud desktop display method, image display method, equipment and storage medium
CN116668741A
Image processing method and device, electronic equipment and storage medium
CN118264664A