Control method of cloud desktop system and electronic device

By monitoring the resource usage of terminal devices in real time in the cloud desktop system and migrating computing tasks to the cloud server, the problem of lag and service interruption caused by hardware resource exhaustion in the fat terminal architecture is solved, and global resource balancing and efficient utilization are achieved.

CN122240232APending Publication Date: 2026-06-19INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2026-05-19
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In cloud desktop systems, thick terminal architecture devices exhaust hardware resources when performing complex computing tasks, leading to lag and service interruptions, and existing solutions are costly.

Method used

By monitoring the resource usage of terminal devices in real time, when a threshold is reached, the computing tasks are offloaded to the target computing node on the cloud server. Data snapshots and incremental data are used to migrate the tasks and free up local hardware resources.

Benefits of technology

It enables intelligent load balancing between terminal devices and cloud servers, avoiding lag and service interruptions caused by hardware resource exhaustion, and improving the utilization efficiency of hardware resources and system smoothness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240232A_ABST
    Figure CN122240232A_ABST
Patent Text Reader

Abstract

This application discloses a control method and electronic device for a cloud desktop system, relating to the field of cloud desktop system technology. The method includes: acquiring device resource usage data of a terminal device while the cloud desktop system is executing a computational task; sending a computation request to a target server when the device resource usage data is greater than or equal to a first threshold; creating a data snapshot upon receiving a notification message from the target server; sending a synchronization message to a target computing node; receiving a computational data stream from the target computing node; and obtaining the execution result of the computational task based on the computational data stream. This approach enables intelligent load scheduling between the terminal device and the cloud server, solving the problem of lag and service interruption when the hardware resources of the terminal device running the cloud desktop system are exhausted, achieving global resource balancing of the cluster and improving the utilization efficiency of hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud desktop system technology, and in particular to a control method and electronic device for a cloud desktop system. Background Technology

[0002] In related technologies, the computing and storage tasks of the fat terminal architecture of the cloud desktop system are carried by the local hardware resources of the terminal device, such as CPU (Central Processing Unit), memory and storage media. The cloud server cluster is only responsible for management and control functions such as user authentication and image management. Therefore, it can make full use of the local performance of the terminal device.

[0003] When users perform complex computational tasks, local hardware resources may be exhausted, causing a sharp drop in terminal performance, resulting in lag and service interruptions. Summary of the Invention

[0004] This application provides a control method and electronic device for a cloud desktop system, which at least solves the problem of lag and service interruption when the hardware resources of the terminal device running the cloud desktop system are exhausted in the related art.

[0005] This application provides a control method for a cloud desktop system, applied to a terminal device, the method comprising: While running a cloud desktop system to perform computing tasks, obtain data on the device resource usage of the terminal device; If the device resource usage data is greater than or equal to the first threshold, a computation request is sent to the target server; the computation request carries the resource requirement data of the computation task. Upon receiving a notification message from the target server, a data snapshot is created; the notification message indicates the target computing node; the data snapshot includes data from running the cloud desktop system and performing computing tasks. Send a synchronization message to the target computing node; the synchronization message carries a data snapshot and incremental data; the incremental data is the data obtained after the data snapshot is created, based on the write operation to the storage device of the electronic device; the synchronization message is used to enable the target computing node to perform computing tasks based on the data snapshot and incremental data; Receive the computation data stream sent by the target computing node, and obtain the execution result of the computation task based on the computation data stream; the computation data stream is obtained by the target computing node executing the computation task.

[0006] This application also provides a control method for a cloud desktop system, applied to a target server, the method including: Receive computing requests sent by terminal devices; the computing requests carry resource requirement data for the computing task; Based on resource requirement data, target computing nodes are determined, and the target computing nodes are controlled to create initial computing instances. Send notification messages to terminal devices and receive synchronization messages from terminal devices; the notification messages indicate the target computing node; the synchronization messages include data snapshots and incremental data; the data snapshots include data from running the cloud desktop system and executing computing tasks; the incremental data is obtained based on write operations to the terminal devices; The target computing node is activated based on the initial computing instance, data snapshot, and incremental data; the target computing instance runs a replica system of the cloud desktop system, which is configured to execute computing tasks; The computation task is executed through the target computation instance to obtain the computation data stream; The computational data stream is sent to the terminal device.

[0007] This application also provides a control device for a cloud desktop system, applied to a terminal device, including: The acquisition module is used to acquire device resource usage data of terminal devices when the cloud desktop system is running and performing computing tasks. The first sending module is used to send a computation request to the target server when the device resource usage data is greater than or equal to a first threshold; the computation request carries the resource requirement data of the computation task. A creation module is used to create a data snapshot upon receiving a notification message from the target server; the notification message indicates the target computing node; the data snapshot includes data from running the cloud desktop system and performing computing tasks; The first sending module is also used to send a synchronization message to the target computing node; the synchronization message carries a data snapshot and incremental data; the incremental data is the data obtained after the data snapshot is created, based on the write operation of the storage device for the electronic device; the synchronization message is used to enable the target computing node to perform computing tasks based on the data snapshot and incremental data; The first receiving module is used to receive the computation data stream sent by the target computing node and obtain the execution result of the computation task based on the computation data stream; the computation data stream is obtained by the target computing node executing the computation task.

[0008] This application also provides a control device for a cloud desktop system, applied to a target server, comprising: The second receiving module is used to receive computing requests sent by the terminal device; the computing request carries resource requirement data for the computing task. The control module is used to determine the target computing node based on resource requirement data and control the target computing node to create an initial computing instance; The second sending module is used to send notification messages to the terminal device and receive synchronization messages sent by the terminal device; the notification message indicates the target computing node; the synchronization message includes data snapshots and incremental data; the data snapshots include data from running the cloud desktop system and performing computing tasks; the incremental data is obtained based on write operations to the terminal device; The control module is also used to control the target computing node to activate the target computing instance based on the initial computing instance, data snapshot and incremental data; the target computing instance runs a replica system of the cloud desktop system, and the replica system is configured to execute computing tasks; The execution module is used to execute computation tasks through the target computation instance and obtain the computation data stream; The second sending module is also used to send the computation data stream to the terminal device.

[0009] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the control method of any of the cloud desktop systems described above.

[0010] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the control method of any of the above-described cloud desktop systems.

[0011] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described cloud desktop system control methods.

[0012] This application enables real-time monitoring of resource usage on a terminal device running a cloud desktop system to perform computational tasks. When resource usage is high, the computational tasks executed using the terminal device's local hardware resources are transferred to a target server in the cloud. The target server creates a target computing node based on the resource requirements of the computational task, according to the computational request sent by the terminal device. The terminal device synchronizes data with the target computing node by sending data snapshots and incremental data. At this point, the target computing node possesses all the data required to execute the computational task, and the data content is completely synchronized with the terminal device. The computational task can then be executed through the target computing node. The terminal device obtains the data stream from the target computing node during task execution via a network connection and obtains the execution result based on the data stream. In this way, intelligent load scheduling between terminal devices and cloud servers can be achieved, allowing terminal devices to offload their load to idle computing nodes on the cloud server based on their own hardware resource usage. This solves the problem of lag and service interruption when the hardware resources of terminal devices running cloud desktop systems are exhausted, achieving the technical effect of global resource balancing and improving the utilization efficiency of hardware resources. Attached Figure Description

[0013] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A schematic diagram of the system architecture of a cloud desktop system according to some embodiments of the present disclosure is shown; Figure 2 One of the flowcharts illustrating a control method for a cloud desktop system according to some embodiments of the present disclosure is shown. Figure 3 A second flowchart illustrates a control method for a cloud desktop system according to some embodiments of the present disclosure; Figure 4 A structural block diagram of a first control device of a cloud desktop system according to some embodiments of the present disclosure is shown; Figure 5 A structural block diagram of a second control device for a cloud desktop system according to some embodiments of the present disclosure is shown; Figure 6 Structural block diagrams of electronic devices according to some embodiments of the present disclosure are shown. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0016] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] The specific application environment architecture or specific hardware architecture on which the control method of the cloud desktop system depends is described here.

[0019] For example, Figure 1 The following are schematic diagrams illustrating the system architecture of a cloud desktop system according to some embodiments of this disclosure, such as... Figure 1 As shown, the cloud desktop system architecture includes a terminal device 110 and a target server 120. The terminal device 110 runs a cloud desktop operating system. The target server 120 includes at least one computing node, including a target computing node. The terminal device 110 is capable of data communication with the target server 120 and the target computing node.

[0020] Some of the nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows: Cloud Desktop: is an application of cloud computing technology. Cloud Desktop uses cloud servers to authenticate and manage terminal devices.

[0021] Thin client: An architecture for cloud desktop systems. A thin client is a "light front-end, heavy back-end" architecture. In a thin client architecture cloud desktop system, both computing and storage tasks are performed by back-end servers, while the front-end terminal device is only responsible for interacting with the user.

[0022] Fat terminal: Another architecture for cloud desktop systems. A fat terminal is an architecture that prioritizes the front-end over the back-end. In a fat terminal architecture, both computing and storage tasks are completed locally on the front-end terminal device, while the back-end server focuses on centralized management, radial distribution, and policy control.

[0023] Device resources: In this embodiment of the disclosure, device resources specifically refer to the hardware resources of the terminal device, such as CPU computing power resources, memory resources, and storage space resources.

[0024] Compute Node: The core computing unit of the backend server in a cloud desktop system, responsible for providing the computing resources required to execute computing tasks, including but not limited to CPU computing power and memory resources. Compute nodes are used to support the actual operation of user virtual machines in the cloud desktop system.

[0025] Data snapshot: A data snapshot is a complete read-only copy of a dataset created for a terminal device at a specific point in time. This copy records the complete state of the data on the terminal device at that point in time.

[0026] Incremental data: New or modified data that is added to or modified compared to the data snapshot content due to write operations performed on the local storage medium after a data snapshot is generated.

[0027] Computational Example: A virtual machine running on a compute node is equivalent to virtualizing the computing resources of a physical server into independent, isolated virtual units. The compute node requests and allocates resources based on the image of the terminal device to create a copy of the operating system on the terminal device.

[0028] The embodiments of this application provide a control method for a cloud desktop system. The method is described in detail below in conjunction with the execution flow of the control method for the cloud desktop system.

[0029] In related technologies, the architecture of a cloud desktop system includes front-end devices and back-end servers. Cloud desktop systems mainly include thin client architecture and thick client architecture. In thin client architecture, all computing and storage tasks are executed by the back-end server, while the front-end device is only responsible for user interaction, such as displaying the desktop interface and receiving user input. Thin client architecture has low requirements for the local hardware resources of the front-end device, and can perform complex computing tasks even with limited hardware resources. However, because all computing tasks are executed by the back-end server, the hardware resources of the front-end device may remain idle for extended periods, resulting in resource waste. Furthermore, due to the lack of use of local hardware resources, thin client architecture has poor compatibility with some peripheral devices.

[0030] In a fat client architecture, computation and storage tasks are executed using the local hardware resources of the front-end device, while the back-end server is only responsible for management and control functions such as user authentication and image management. The front-end device and the back-end server are connected through a management link. Because the computation of the fat client occurs locally, it can make full use of local hardware resources and is highly compatible with peripheral devices such as U-keys, printers, and scanners, thus offering better compatibility.

[0031] For cloud desktop systems with a fat client architecture, all computing tasks are performed using local hardware resources, such as CPU, memory, and storage. When the computing tasks are complex and have high hardware resource requirements, it may lead to high resource consumption on the terminal device, or even resource exhaustion.

[0032] Once a terminal device's resources are exhausted or excessively utilized, its performance may drastically decline, leading to lag and service interruptions. The only solution to address this issue is to upgrade the terminal device's hardware configuration, reserving sufficient resource redundancy for complex computing tasks. However, this results in high ownership and maintenance costs for the terminal device.

[0033] To address the aforementioned issues, this disclosure provides a control method for a cloud desktop system, applicable to terminal devices. Figure 2 One of the flowcharts illustrating a control method for a cloud desktop system according to some embodiments of this disclosure is shown, such as... Figure 2 As shown, the method includes: S202, while running a cloud desktop system to perform computing tasks, obtains device resource usage data of the terminal device.

[0034] In this embodiment of the disclosure, the computational task can be a task executed by an application, such as a video encoding task, a model inference task, or an image rendering task. The terminal device runs a cloud desktop system and performs computational tasks through local hardware devices, including a CPU, memory, and storage media.

[0035] During the execution of computational tasks, the device resource usage data of the terminal device is monitored in real time. For example, the device resource usage data includes, but is not limited to, CPU utilization, memory utilization, and storage I / O load data.

[0036] S204: If the device resource usage data is greater than or equal to the first threshold, send a computation request to the target server.

[0037] The computation request carries resource requirement data for the computation task. The first threshold is a threshold used to determine whether device resource usage is too high. For example, the first threshold includes a CPU utilization threshold, a memory utilization threshold, and a storage I / O load threshold.

[0038] For example, when the CPU utilization rate exceeds the CPU utilization rate threshold, process scheduling latency increases significantly, system responsiveness decreases, and device lag occurs. For example, the CPU utilization rate threshold is set within the range of 75% to 85%. Taking a CPU utilization rate threshold of 80% as an example, when the CPU utilization rate in the terminal device's resource usage data reaches or exceeds 80%, it is determined that the resource usage data is greater than or equal to the first threshold.

[0039] For example, a high CPU utilization warning is triggered when the CPU utilization exceeds a CPU utilization threshold and the duration reaches a first duration threshold. For example, the first duration threshold ranges from 30 seconds to 2 minutes.

[0040] For example, when memory usage exceeds a threshold, the desktop system is more likely to activate swap, which can lead to data transfer bottlenecks caused by page swapping in and out, slowing down the overall system performance. For example, the memory usage threshold is set between 80% and 90%. Taking a memory usage of 90% as an example, when the memory usage in the terminal device's resource usage data reaches or exceeds 90%, it is determined that the resource usage data is greater than or equal to the first threshold.

[0041] For example, a high memory usage warning is triggered when the memory usage exceeds a memory usage threshold and the duration reaches a second duration threshold. For example, the second duration threshold ranges from 10 seconds to 30 seconds.

[0042] For example, when the storage I / O load exceeds the storage I / O load threshold, it can cause the I / O request queue of the storage device to become congested, directly impacting the performance of all applications that rely on storage response. For example, the storage I / O load threshold can be set based on the number of input / output operations per second (IOPS) or data throughput (in MB / s) of the storage medium. For example, the I / O load threshold is 65% to 80% of the theoretical maximum performance of IOPS or data throughput. Taking an I / O load threshold of 70% of the theoretical maximum performance of IOPS as an example, when the resource usage data of the terminal device is detected to show that the number of IOPS reaches or exceeds 70% of the maximum performance, it is determined that the resource usage data is greater than or equal to the first threshold.

[0043] For example, when the I / O load data continuously exceeds 70% of the disk's theoretical performance and the duration reaches a third duration threshold, an alert for excessive I / O load is issued. For example, the third duration threshold ranges from 5 seconds to 15 seconds.

[0044] When the device resource usage data is determined to be greater than or equal to a first threshold, the terminal device sends a computation request to the server. This computation request carries the resource requirement data needed to execute the computation task currently being performed on the terminal device.

[0045] For example, after determining that the device resource usage data is greater than or equal to a first threshold, the terminal device enables a resource demand diagnostic session. This resource demand diagnostic session comprehensively analyzes the resource usage pattern of the currently running process, historical load trends, and user interaction status, and calculates and generates a minimum resource specification that can meet the smooth operation of the current desktop session, i.e., the aforementioned resource demand data.

[0046] S206, upon receiving a notification message from the target server, create a data snapshot.

[0047] In this embodiment of the disclosure, the notification message indicates the target computing node. Exemplarily, after receiving a computing request, the target server enters an optimal node addressing process to determine the optimal target computing node from multiple candidate computing nodes. After determining the target computing node, the target server creates an initial computing instance on the target computing node. After the initial computing instance is created, the target server sends a notification message to the terminal device. This notification message indicates the target computing node. At this time, a high-bandwidth communication link is established between the terminal device and the target computing node of the target server.

[0048] Data snapshots include data from running cloud desktop systems and performing computing tasks. For example, the terminal device creates a baseline snapshot of the current complete disk state, including operating system and application data (e.g., through LVM (Logical Volume Manager) snapshots or QEMU (Quick Emulator) snapshot technology) to obtain snapshot data.

[0049] S208, send a synchronization message to the target computing node.

[0050] In this embodiment of the disclosure, the synchronization message carries a data snapshot and incremental data. The snapshot data includes a copy of all data related to the execution of the computation task on the terminal device at the time the snapshot data was created. This snapshot data is sent to the target computation node via a high-bandwidth communication link between the terminal device and the target computation node of the target server.

[0051] Incremental data refers to data obtained after a data snapshot is created, based on write operations to the storage device of the terminal device. For example, after snapshot data is created, all write operations to the original disk data blocks of the terminal device are transparently redirected to a differential storage area. This differential storage area is a pre-allocated storage region on the storage medium of the terminal device. That is, the original data blocks remain unchanged, and the changes are recorded in the differential storage area. This incremental data is also sent to the target computing node via the high-bandwidth communication link between the terminal device and the target computing node of the target server.

[0052] Synchronization messages enable target computing nodes to execute computational tasks based on data snapshots and incremental data. For example, after receiving a synchronization message, the target computing node activates the initially created computing instance based on the message and the data snapshot and incremental data it carries, resulting in an activated target computing instance. This target computing instance has the same data as the terminal device and can continue executing the computational tasks currently being performed on the terminal device based on the same task progress as the terminal device. At this time, the hardware resources invoked by the target computing instance when executing computational tasks have been switched from the terminal device's local hardware resources to hardware resources allocated through the target computing node. The terminal device can then suspend locally executed computational tasks and release the hardware resources occupied by the computational tasks, thereby reducing the terminal device's resource consumption.

[0053] For example, the terminal device redirects all subsequent user requests (including keyboard input, mouse events, screen update requests, etc.) to the activated target computing instance through a high-bandwidth, low-latency network channel (e.g., a channel based on SPICE (Simple Protocol for Independent Computing Environments) or RDP (Remote Desktop Protocol) extensions).

[0054] For example, 4. After the baseline snapshot is established, all write operations to the original data blocks on the terminal C disk are transparently redirected to a pre-allocated difference region on the terminal C disk (e.g., through the dm-snapshot module of the Device Mapper or the Copy-on-Write (COW) mechanism of the file system). The original blocks remain unchanged, while the changed content is recorded in the difference region. At the same time, the new data blocks generated by the redirected write operations in these difference regions are also synchronized in real time to the newly created "auxiliary computing instance" on physical node A in a continuous and orderly data stream through the high-bandwidth link established in step 2. At the same time, a priority marking method is used (e.g., marking the CPU register status as the highest priority (P0), marking high-frequency access memory pages as the second highest priority (P1), and marking ordinary data blocks as ordinary priority (P2)) to ensure that critical states (such as CPU register mapping and high-frequency access memory pages) are synchronized preferentially and efficiently. The entire synchronization process not only ensures uninterrupted client service but also realizes "synchronization upon generation" of changes. The server merges the received incremental data with the baseline snapshot in real time, gradually building a bootable virtual disk and memory image that converges with the cloud desktop terminal C over time. This process efficiently completes the migration of underlying data and runtime state while ensuring that the current operation of the cloud desktop terminal C is not interrupted. Once data synchronization is complete (the criteria are: the amount of data to be synchronized in the difference area is less than a threshold, such as 10MB, and no new large-scale changes occur for 5 seconds), the "auxiliary computing instance" in physical node A is ready to be started.

[0055] S210: Receive the computation data stream sent by the target computing node, and obtain the execution result of the computation task based on the computation data stream.

[0056] The computation data stream is obtained by the target computing node executing the computation task. For example, after the target computing node continues to execute the computation task through the target computing instance, the computation results obtained in real time are sent to the terminal device in real time through the computation data stream, thereby realizing the seamless migration of the computation task from the terminal device to the target server.

[0057] This embodiment of the disclosure monitors the resource usage of a terminal device in real time during the execution of computing tasks using a cloud desktop system. When the terminal device's resource usage is high, the computing tasks executed using the terminal device's local hardware resources are transferred to a target server in the cloud. The target server creates a target computing node based on the resource requirements of the computing task, according to the computing request sent by the terminal device. The terminal device synchronizes data with the target computing node by sending data snapshots and incremental data. At this point, the target computing node has all the data required to execute the computing task, and the data content is completely synchronized with the terminal device. The computing task can then be executed through the target computing node. The terminal device obtains the data stream of the target computing node during the execution of the computing task through the network connection between the terminal device and the target computing node, and obtains the execution result of the computing task based on the data stream. In this way, intelligent load scheduling between terminal devices and cloud servers can be achieved, allowing terminal devices to offload their load to idle computing nodes on the cloud server based on their own hardware resource usage. This solves the problem of lag and service interruption when the hardware resources of terminal devices running cloud desktop systems are exhausted, achieving the technical effect of global resource balancing and improving the utilization efficiency of hardware resources.

[0058] Optionally, in some embodiments of this disclosure, before receiving the computational data stream sent by the target computing node, the method further includes: Upon receiving a confirmation message from the target computing node, the computing task executed by the cloud desktop system is suspended; the confirmation message is used to instruct the target computing node to start executing the computing task. Alternatively, upon receiving the computational data stream, the computational task executed by the cloud desktop system can be suspended.

[0059] In this embodiment of the disclosure, after creating an initial computing instance, the target computing node waits for data snapshots and incremental data to be sent by the terminal device. After receiving the data snapshots and differences, the target computing node activates the created initial computing instance based on the data snapshots and incremental data, thus obtaining an activated target computing instance.

[0060] In some implementations, after the target computing instance is activated, it continues to execute the computing task being performed on the terminal device based on the same task progress as the terminal device, and sends a confirmation message to the terminal device. The confirmation message conveys to the terminal device that the computing task has begun execution on the target computing node.

[0061] Upon receiving the confirmation message, the terminal device suspends the computing task currently being executed locally, thereby suspending the computing task being executed by the cloud desktop system. At this time, the device resources occupied by the computing task on the terminal device will be released, and the device resource usage will decrease.

[0062] At this point, the terminal device will have more available resources to handle new tasks or user interactions.

[0063] This embodiment of the disclosure controls the device resource usage below a threshold by suspending the local task and releasing the occupied device resources after offloading the locally executed computing task to the cloud server, thereby avoiding the problem of lag or service interruption caused by excessive device resource usage.

[0064] In other implementations, the computational data stream is the data stream generated when the target computing node continues to execute the computational task through the target computing instance. This computational data stream can reflect the real-time execution results of the computational task executed by the target computing node.

[0065] Therefore, when the terminal device receives the computation data stream, it indicates that the computation task has already begun execution on the target computing node. At this point, the terminal device suspends the computation task currently being executed locally, thereby suspending the computation task being executed by the cloud desktop system and releasing the device resources occupied by the computation task on the terminal device.

[0066] This embodiment of the present disclosure automatically suspends locally executed computing tasks after receiving the computing data stream sent by the target computing node to release device resources, thereby enabling the terminal device to have sufficient resources to handle user interactions and ensuring smooth operation of the terminal device.

[0067] Optionally, in some embodiments of this disclosure, the method further includes: Upon receiving a migration instruction from the target computing node, activate the computing task executed by the cloud desktop system; Receive migration data sent by the target computing node, and execute computing tasks based on the migration data and data snapshots; the migration data is the data generated by the target computing node executing computing tasks, and the data snapshots do not include the migration data.

[0068] In this embodiment of the disclosure, during the execution of a computing task by the target computing node through the target computing instance, the target computing node monitors the device resource consumption in real time. When the execution progress of the computing task increases, or when the computing task reaches a stage where the device resource requirements are relatively low, the device resources required to execute the target task may decrease.

[0069] When the resource usage of the target computing node is detected to be less than or equal to a preset third threshold, it indicates that continuing to execute computing tasks locally on the terminal device will not lead to excessive resource usage. At this point, the target server sends a migration command to the terminal device.

[0070] Upon receiving the migration instruction, the terminal device reactivates the suspended computing task and receives migration data sent by the target computing node. This migration data consists of result data or intermediate data generated during the execution of the computing task by the target computing node. For example, the migration data is newly added data relative to a data snapshot.

[0071] After receiving the migration data, the terminal device can synchronize data with the target computing node based on the data snapshot and the migration data. At this point, the terminal device can resume executing the computing task based on the execution progress when the target computing node paused its computing task.

[0072] The embodiments disclosed herein can not only offload the computing tasks executed by the terminal device to the target computing node of the target server, but also migrate the computing tasks back to the terminal device for execution after the resource overhead of the device executing the computing tasks is reduced, thus achieving dynamic load balancing between the terminal device and the target server.

[0073] Optionally, in some embodiments of this disclosure, the method further includes, before sending the computation request to the target server: The processor resource requirements are determined based on the peak processor utilization of the first process in the cloud desktop system and the average processor load of the terminal device; the first process is the process whose processor utilization is greater than or equal to the utilization threshold. Based on the memory usage of the second process in the cloud desktop system and the peak memory usage of the terminal device, the memory resource requirements are determined; the second process is the active process in the cloud desktop system. Based on the image capacity and expected storage growth of the cloud desktop system, determine the storage resource requirements. Based on processor resource requirements, memory resource requirements, and storage resource requirements, resource requirement data is determined.

[0074] In this embodiment of the disclosure, for example, it is assumed that the resource requirement data is M, where M is a multi-dimensional resource specification vector. M includes CPU resource requirements, memory resource requirements, and storage capacity requirements.

[0075] For example, M = (CPU, MEM, STR). Where CPU is the required number of virtual CPU cores, MEM is the required memory capacity, and STR is the required storage capacity.

[0076] Here, CPU represents processor resource demand information. CPU = max(P_peak * α, L_avg * β). P_peak is the peak processor utilization of the first process. For example, P_peak is the sum of the peak CPU utilization of the top N processes with the highest resource usage within a window period before and after enabling the resource demand diagnostic session, representing the instantaneous peak processing demand. For example, the window period ranges from the first 30 seconds to the last 10 seconds.

[0077] L_avg represents the average processor load of the terminal device. For example, L_avg is the average CPU load over the most recent statistical period, such as the past 5 to 30 minutes, reflecting a basic level of sustained load.

[0078] α and β are preset weighting coefficients used to buffer prediction errors and system overhead. The final result is rounded up to the nearest integer number of cores, and has at least one core. For example, α ≥ 1.0, β ≥ 1.0. For example, α = 1.1, β = 1.05.

[0079] After calculating the CPU value using the above formula, the result is rounded up to obtain the closest number of cores, which is the processor resource requirement information.

[0080] Where MEM represents memory resource requirements. MEM = max(W_active, H_high) + Δ. Where W_active represents the memory usage of the second process. For example, W_active is the sum of the estimated working set memory values ​​of currently active processes, representing the minimum physical memory required to maintain the application's instantaneous responsiveness.

[0081] H_high represents peak memory usage information. For example, H_high is the peak memory usage during a typical high-load period, derived from historical load trend analysis, which uses an exponentially weighted moving average (EWMA) method with a half-life of 24 hours.

[0082] Δ represents a fixed or percentage of memory reserved for the operating system kernel and daemons (e.g., a fixed value of 2GB or 4GB, or 10% to 15% of the total physical memory). The final result is usually rounded up to the standard capacity specification (e.g., 1GB, 2GB, 4GB, 8GB, 16GB, etc.).

[0083] After calculating the MEM value using the above formula, the result is rounded up to the standard memory capacity specification, i.e., memory resource requirement information, such as 16GB, 24GB, 32GB, etc.

[0084] Where STR represents storage resource requirements. STR = B_base + R_growth + D_delta. B_base is the image capacity corresponding to the cloud desktop system, obtained by the client device by reading the local disk partition table. For example, B_base is the base image capacity of the operating system and necessary applications.

[0085] R_growth represents the expected storage growth. For example, R_growth is the expected growth capacity in the next recycling cycle, predicted based on the historical growth rate of user data, where the historical growth rate is calculated using linear regression of the daily growth over the past 7 to 30 days, and the recycling cycle is set to 24 hours by default.

[0086] D_delta is the incremental data storage space reserved to ensure the efficiency of incremental synchronization. Its size is related to the memory capacity and the expected change rate. For example, D_delta can be set to 50% to 100% of the memory capacity, and at least 512MB.

[0087] By calculating M, the resource requirements of the computing task can be clearly quantified, including the required number of virtual CPU cores, memory capacity, and storage capacity. This resource requirement data, along with the device identifier of the terminal device running the cloud desktop system and the real-time device resource usage data of the terminal device, is uploaded to the target server.

[0088] The embodiments disclosed herein can clearly quantify the resource requirements data needed to execute computing tasks, thereby enabling the target computing node to create computing instances that meet the computing task requirements based on the resource requirements data. This ensures that task requirements are met while avoiding the allocation of excessive resources and thus improving resource utilization.

[0089] This disclosure also provides a control method for a cloud desktop system, applied to a target server. Figure 3 A second flowchart illustrating a control method for a cloud desktop system according to some embodiments of this disclosure is shown, such as... Figure 3 As shown, the method includes: S302, Receive the computation request sent by the terminal device.

[0090] In this embodiment of the disclosure, the computation request carries resource requirement data for the computation task. The computation task is a task originally executed on the terminal device. Computation tasks include, but are not limited to, video encoding tasks, model inference tasks, and image rendering tasks.

[0091] During the execution of a computing task, the terminal device monitors its resource usage data in real time. When the resource usage data is determined to be greater than or equal to a first threshold, the terminal device sends a computing request to the server. This computing request carries the resource requirement data needed to execute the computing task currently being performed on the terminal device.

[0092] For example, resource requirements data include, but are not limited to, the number of virtual CPU cores, memory capacity, and storage capacity required to perform computational tasks.

[0093] S304 determines the target computing node based on resource requirement data and controls the target computing node to create an initial computing instance.

[0094] In this embodiment of the disclosure, after receiving a computation request, the target server enters an optimal node addressing process to determine the optimal target computation node from multiple candidate computation nodes. For example, the target computation node is a computation node capable of meeting the resource requirements of the data.

[0095] After determining the target computing node, the target server creates an initial computing instance on the target computing node.

[0096] S306, sends notification messages to the terminal device and receives synchronization messages sent by the terminal device.

[0097] In this embodiment of the disclosure, the notification message indicates the target computing node; the synchronization message includes data snapshots and incremental data; the data snapshots include data from running the cloud desktop system and performing computing tasks; the incremental data is obtained based on write operations to the terminal device.

[0098] Once the initial computing instance is created, the target server sends a notification message to the terminal device. This notification message indicates the target computing node. At this point, a high-bandwidth communication link is established between the terminal device and the target computing node of the target server.

[0099] The synchronization message carries snapshot data and incremental data. The snapshot data contains a copy of all data related to the execution of the computation task on the terminal device at the time the snapshot was created. The incremental data is data obtained after write operations to the storage device of the terminal device following the creation of the snapshot. Snapshot data is received via a high-bandwidth communication link between the terminal device and the target computing node on the target server.

[0100] S308 controls the target computing node to activate the target computing instance based on the initial computing instance, data snapshot, and incremental data.

[0101] In this embodiment, the target computing instance runs a replica system of the cloud desktop system, which is configured to execute computing tasks. After the target computing node receives a synchronization message, it activates the initially created computing instance based on the synchronization message and the data snapshot and incremental data carried within it, thus obtaining an activated target computing instance. This target computing instance has the same data as the terminal device and can continue executing the computing tasks currently being performed on the terminal device based on the same task progress as the terminal device. At this time, the hardware resources called by the target computing instance when executing computing tasks have been switched from the local hardware resources of the terminal device to the hardware resources allocated by the target computing node. The terminal device can then suspend the locally executed computing tasks and release the hardware resources occupied by the computing tasks, thereby reducing the device resource consumption of the terminal device.

[0102] For example, based on the received resource requirement data M, the target server initiates a virtualization instance creation process on the target computing node. This process instantiates a lightweight virtual machine instance (e.g., a KVM (Kernel-based Virtual Machine) or Xen-based virtual machine) with resource specifications M in the local resource pool of the target computing node. This virtual machine instance is the initial computing instance. Through a high-bandwidth communication link between the target computing node and the terminal device, synchronization messages are received in a continuous and ordered data stream manner. Data snapshots and incremental data are synchronized to the initial computing instance. Priority marking is used to ensure that critical states, such as CPU register mapping files and frequently accessed memory pages, are synchronized to the initial computing instance preferentially and efficiently.

[0103] The server device reads the network configuration information of cloud desktop terminal C (including IP address, subnet mask, default gateway, and DNS (Domain Name System) server address), configures the "auxiliary computing instance" to be on the same logical Layer 2 or Layer 3 routable network plane as cloud desktop terminal C, and sets its IP address (it can reuse terminal C's IP address or assign a new IP address within the same subnet), ensuring that there is a network-reachable communication link between it and cloud desktop terminal C, thus establishing a channel for subsequent state synchronization and task migration. The entire synchronization process not only ensures uninterrupted client services for the cloud desktop system but also achieves "synchronization upon creation" during task migration. The cloud server merges received incremental and variable data and data snapshots in real time, gradually building a bootable virtual disk and memory that operates in sync with the terminal device over time. This process efficiently completes the migration of underlying data and runtime states while ensuring uninterrupted operation of the terminal device. Once data synchronization is complete, the target computing instance is activated.

[0104] S310 executes the computation task through the target computation instance to obtain the computation data stream.

[0105] In this embodiment of the disclosure, after the target computing instance is activated, it can continue to execute computing tasks based on the same task execution progress as the terminal device. New data, such as computing results, is generated during the execution of the computing tasks, i.e., computing data streams.

[0106] S312 sends the computation data stream to the terminal device.

[0107] In this embodiment of the disclosure, the computational data stream generated during the execution of the computational task is pushed to the terminal device in real time. The terminal device can then monitor the execution progress of the computational task in real time through the computational data stream.

[0108] The embodiments disclosed herein can realize intelligent load scheduling between terminal devices and cloud servers, enabling terminal devices to offload their load to idle computing nodes on cloud servers based on their own hardware resource occupancy. Therefore, it can solve the problem of lag and service interruption when the hardware resources of terminal devices running cloud desktop systems are exhausted in related technologies, and achieve the technical effect of realizing global balance of cluster resources and improving the utilization efficiency of hardware resources.

[0109] Optionally, in some embodiments of this disclosure, performing a computational task through a target computation instance includes: Create a replica system of the cloud desktop system based on data snapshots; perform computational tasks in the replica system based on data snapshots and incremental data.

[0110] In this embodiment of the disclosure, after the target computing node receives all data snapshots, it synchronizes the data snapshots and incremental data to the initial computing instance and activates the initial computing instance as the target computing instance. After the target computing instance is activated, it creates a replica system that is completely identical to the cloud desktop system running on the terminal device based on the data snapshots.

[0111] By synchronizing data snapshots and incremental data to this replica system, the same computing tasks as those on the terminal device can continue to be executed on the replica system running on the target computing node.

[0112] For example, when the data synchronization status reaches a preset consistency checkpoint (the default automatic trigger condition is when the data is fully synchronized for the first time and the incremental synchronization queue length is less than a preset threshold (e.g., 100 I / O operations); it can also be triggered by the administrator based on a time point or by manual instructions), a switching action is triggered. At this time, the target server sends an instruction to the terminal device to capture the terminal device's complete memory state and CPU state at the last moment (final incremental snapshot, including CPU register values, page tables, open file handles, etc.), obtains the final incremental snapshot, and transmits it to the initial computing instance of the target computing node, activating it as the target computing instance. At this time, the terminal device receives a confirmation message, suspends its local computing tasks or switches to listening mode, and redirects all subsequent user requests to the activated target computing instance.

[0113] The embodiments disclosed herein can break the resource pool isolation between the terminal device and the target server, so that the load of the terminal device can be dynamically offloaded to the idle nodes of the cloud server cluster, thereby achieving global balancing and efficient utilization of server cluster resources, enabling the terminal device to perform more complex computing tasks without additional hardware upgrades.

[0114] Optionally, in some embodiments of this disclosure, after continuing to execute the computation task through the target computation instance, the method further includes: Obtain the device resource usage data of the target computing node; If the device resource usage data exceeds the second threshold, a replacement computing node is determined, and the replacement computing node is activated to replace the computing instance; the replacement computing instance runs a replica system of the cloud desktop system, and the replica system is configured to perform computing tasks; The computation task continues to be executed by replacing the computation instance, and the target computation node is controlled to reclaim the target computation instance.

[0115] In this embodiment of the disclosure, during the execution of computing tasks by the target computing node through the target computing instance, the target computing node monitors the changes in device resource consumption in real time. When the resource consumption of the target computing node increases, specifically when the increase exceeds a second threshold, it is determined that the device resources allocated by the target computing node to the target computing instance are insufficient, and increasing the instance quota still cannot meet the resource requirements of the target computing. At this time, among the multiple idle computing nodes of the target server, a replacement computing node that can meet the requirements for subsequent execution of computing tasks is determined.

[0116] After identifying the replacement computing node, the same steps are followed from the terminal device to the target computing node. A computing instance is created on the replacement computing node. The target computing node generates a baseline snapshot and incremental data based on its current data state during the computing task, and sends these to the replacement computing node to activate the replacement computing instance. The computing task continues to execute through the replacement computing instance, while the target computing node reclaims the target computing instance. After reclamation, the target computing node returns to an idle state.

[0117] In this process, after the computation task continues to be executed by replacing the computation instance, the replacement computation node sends the computation data stream generated during the execution of the computation task to the terminal device.

[0118] For example, the target compute node is defined as physical node A, and the replacement compute node is defined as physical node B. When the resource utilization of the target compute instance on physical node A continuously exceeds the preset elastic scaling threshold, and the performance requirements cannot be met by vertical scaling on physical node A itself, the target server will trigger a dynamic load balancing and cascading scaling process. First, the target server releases the resource markers reserved for this instance on physical node A and temporarily isolates it from the currently available node pool.

[0119] Then, a secondary addressing is initiated using the optimal collaborative node addressing process, with physical node A as the source and other healthy nodes within the cluster as the target set. The core objective of this evaluation focuses on the network performance within the cluster between the replacement node and physical node A, to ensure low latency and high throughput during cascading migration.

[0120] After addressing is complete, if a suitable suboptimal physical node B is found, the target server instantiates a new "replacement computation instance" on physical node B. Then, using the "target computation instance" on physical node A as the source, the computation task is seamlessly migrated from physical node A to physical node B. Upon successful migration, the "target computation instance" on physical node A is recycled, and the replacement computation instance on physical node B is activated.

[0121] This disclosure enables resource balancing among nodes within the target server. When the device resources of the physical node allocated to the terminal device are insufficient to continue executing computing tasks, the computing tasks can be reallocated to other physical nodes with sufficient resources, thereby ensuring that there are enough device resources to execute the computing tasks and guaranteeing the execution efficiency of the computing tasks.

[0122] Optionally, in some embodiments of this disclosure, after continuing to execute the computation task through the target computation instance, the method further includes: If the device resource usage data is less than or equal to the third threshold, a migration instruction is sent to the terminal device; the migration instruction is used to instruct the terminal device to activate the computing task to be executed by the cloud desktop system. Send migration data to the terminal device; migration data is the data generated during the execution of the computing task. The data snapshot does not include migration data. The migration data is used to enable the terminal device to continue executing the computing task based on the migration data and the data snapshot.

[0123] In this embodiment of the disclosure, during the execution of computing tasks by the target computing node through the target computing instance, the target computing node monitors the device resource consumption in real time. When the device resource consumption of the target computing node is detected to be less than or equal to a preset third threshold, it indicates that continuing to execute computing tasks locally on the terminal device will not lead to excessive resource consumption on the terminal device. At this time, the target server sends a migration command to the terminal device.

[0124] Upon receiving the migration instruction, the terminal device reactivates the suspended computing task and receives migration data sent by the target computing node. This migration data consists of result data or intermediate data generated during the execution of the computing task by the target computing node. For example, the migration data is newly added data relative to a data snapshot.

[0125] After receiving the migration data, the terminal device can synchronize data with the target computing node based on the data snapshot and the migration data. At this point, the terminal device can resume executing the computing task based on the execution progress when the target computing node paused its computing task.

[0126] The embodiments disclosed herein enable bidirectional migration of computing tasks between a terminal device and a target server, thereby achieving dynamic load balancing between the terminal device and the target server.

[0127] Optionally, in some embodiments of this disclosure, determining the target computing node based on resource requirement data includes: Generate a candidate computation node list; the candidate computation node list includes at least one available candidate computation node. Determine the communication link quality data between each candidate computing node in the candidate computing node list and the terminal device; The target computing node is determined based on communication link quality data, resource demand data, and idle resource data of candidate computing nodes.

[0128] In this embodiment of the disclosure, after receiving a computation request, the target server enters the optimal node addressing process to determine the optimal target computation node from multiple candidate computation nodes.

[0129] For example, let M be the resource requirement data for performing the computation task. After receiving the computation request, the target server first performs a quick network reachability filter on all idle physical nodes. Specifically, the target server scans the topology of the physical node cluster and generates a list of all physical nodes in the topology.

[0130] By employing service liveness and health check mechanisms, combined with network policies, a subset of physical nodes that are reachable from the terminal device at the network layer and have a healthy service status is filtered out to obtain a candidate computing node list. If the candidate computing node list is empty, the process terminates and a resource unavailability message is sent to the terminal device.

[0131] For example, the service liveness and health check mechanism can be probed via ICMP Echo (Internet Control Message Protocol Echo) or TCP (Transmission Control Protocol) ports, with a timeout set to 1 to 3 seconds.

[0132] For each candidate computing node in the candidate computing node list, the target server initiates communication link quality assessment and resource satisfaction assessment for each candidate computing node.

[0133] The communication link quality assessment evaluates the quality of the communication link between each candidate computing node and the terminal device. For example, a bidirectional network performance probe is initiated between each candidate computing node and the terminal device, measuring the communication link quality based on metrics such as latency, bandwidth, and packet loss rate, and generating a communication link quality score. For example, bandwidth has the highest weighting in this assessment.

[0134] For example, bandwidth can be measured by sending 100 to 1000 UDP (User Datagram Protocol) probe packets, and latency can be measured by ICMP Echo requests, with a sampling period of 1 to 5 seconds.

[0135] Resource satisfaction assessment is used to evaluate whether the device resources of each candidate computing node can meet the minimum requirements for executing computing tasks. For example, the target server attempts to query the resource pool status of each candidate computing node in real time to obtain the currently dynamically allocable CPU computing power, memory capacity, and remaining storage capacity.

[0136] The target server integrates the communication link evaluation results with the resource satisfaction evaluation results, and sorts the candidate computing nodes in the candidate computing node list according to the preset optimization objective function.

[0137] For example, the objective function to be optimized is: Score_i = w_BW * Normalize(BW_i) + w_Lat * Normalize(1 / Lat_i) + w_R *Normalize(Res_Compliance_i); Wherein, Score_i is the comprehensive score of candidate node operation point i; BW_i is the evaluation bandwidth between node i and the terminal device; Lat_i is the latency between node i and the terminal device; Normalize() is a function used to map different metrics (such as bandwidth, the reciprocal of latency, the reciprocal of packet loss rate, resource compliance, etc.) to the same interval, such as the interval [0,1] or [0,100]; Res_Compliance_i is the resource compliance of node i, which is a comprehensive indicator reflecting its resource sufficiency. It is the weighted value or geometric mean of the available resources (Avail_Resource / Total_Resource) of CPU, memory, and storage, used to encourage the selection of nodes with more abundant resources; w_BW is the bandwidth weight coefficient; w_Lat is the latency weight coefficient; w_R is the resource compliance weight coefficient; where w_BW + w_Lat + w_R = 1.

[0138] Based on the ranking results, the target server performs compliance checks on all candidate computing nodes, verifying whether the available resources of the candidate computing nodes meet the resource requirements (data M) for executing the computing task. The first candidate computing node that passes the verification is determined as the target computing node.

[0139] The embodiments disclosed herein can select the optimal target computing node based on multiple dimensions such as network quality and device resources. By having the target computing node take over the computing tasks offloaded by the terminal device, the execution efficiency when executing computing tasks can be guaranteed.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0141] Embodiments of this application also provide a control device for a cloud desktop system, applied to a terminal device. Figure 4 A structural block diagram of a first control device of a cloud desktop system according to some embodiments of the present disclosure is shown, such as... Figure 4 As shown, the first control device 400 includes: The acquisition module 402 is used to acquire device resource usage data of the terminal device when the cloud desktop system is running and performing computing tasks. The first sending module 404 is used to send a computation request to the target server when the device resource occupancy data is greater than or equal to a first threshold; the computation request carries the resource requirement data of the computation task. Module 406 is used to create a data snapshot upon receiving a notification message from the target server; the notification message indicates the target computing node; the data snapshot includes data on running the cloud desktop system and performing computing tasks; The first sending module 404 is also used to send a synchronization message to the target computing node; the synchronization message carries a data snapshot and incremental data; the incremental data is the data obtained after the data snapshot is created, based on the write operation of the storage device for the electronic device; the synchronization message is used to enable the target computing node to perform computing tasks based on the data snapshot and incremental data; The first receiving module 408 is used to receive the computation data stream sent by the target computing node and obtain the execution result of the computation task based on the computation data stream; the computation data stream is obtained by the target computing node executing the computation task.

[0142] This embodiment of the disclosure monitors the resource usage of a terminal device in real time during the execution of computing tasks using a cloud desktop system. When the terminal device's resource usage is high, the computing tasks executed using the terminal device's local hardware resources are transferred to a target server in the cloud. The target server creates a target computing node based on the resource requirements of the computing task, according to the computing request sent by the terminal device. The terminal device synchronizes data with the target computing node by sending data snapshots and incremental data. At this point, the target computing node has all the data required to execute the computing task, and the data content is completely synchronized with the terminal device. The computing task can then be executed through the target computing node. The terminal device obtains the data stream of the target computing node during the execution of the computing task through the network connection between the terminal device and the target computing node, and obtains the execution result of the computing task based on the data stream. In this way, intelligent load scheduling between terminal devices and cloud servers can be achieved, allowing terminal devices to offload their load to idle computing nodes on the cloud server based on their own hardware resource usage. This solves the problem of lag and service interruption when the hardware resources of terminal devices running cloud desktop systems are exhausted, achieving the technical effect of global resource balancing and improving the utilization efficiency of hardware resources.

[0143] In some embodiments of this disclosure, the first control device may optionally further include a suspension module, used to suspend the computing task executed by the cloud desktop system upon receiving a confirmation message sent by the target computing node; the confirmation message is used to instruct the target computing node to start executing the computing task; or, upon receiving a computing data stream, to suspend the computing task executed by the cloud desktop system.

[0144] This embodiment of the disclosure controls the device resource usage below a threshold by suspending the local task and releasing the occupied device resources after offloading the locally executed computing task to the cloud server. This avoids the problem of lag or service interruption caused by excessive device resource usage, and ensures that the terminal device has enough resources to handle user interaction and ensures smooth operation of the terminal device.

[0145] In some embodiments of this disclosure, the first control device further includes an activation module, used to activate the computing task executed by the cloud desktop system upon receiving a migration instruction sent by the target computing node. The first receiving module is also used to activate the computing task executed by the cloud desktop system when a migration instruction is received from the target computing node; to receive migration data sent by the target computing node, and to execute the computing task based on the migration data and the data snapshot; the migration data is the data generated by the target computing node in executing the computing task, and the data snapshot does not include the migration data.

[0146] The embodiments disclosed herein can not only offload the computing tasks executed by the terminal device to the target computing node of the target server, but also migrate the computing tasks back to the terminal device for execution after the resource overhead of the device executing the computing tasks is reduced, thus achieving dynamic load balancing between the terminal device and the target server.

[0147] In some embodiments of this disclosure, the first control device further includes a determination module, used to determine processor resource requirement information based on the peak processor utilization of the first process in the cloud desktop system and the average processor load of the terminal device; the first process is a process whose processor utilization is greater than or equal to a utilization threshold. Based on the memory usage of the second process in the cloud desktop system and the peak memory usage of the terminal device, the memory resource requirements are determined; the second process is the active process in the cloud desktop system. Based on the image capacity and expected storage growth of the cloud desktop system, determine the storage resource requirements. Based on processor resource requirements, memory resource requirements, and storage resource requirements, resource requirement data is determined.

[0148] The embodiments disclosed herein can clearly quantify the resource requirements data needed to execute computing tasks, thereby enabling the target computing node to create computing instances that meet the computing task requirements based on the resource requirements data. This ensures that task requirements are met while avoiding the allocation of excessive resources and thus improving resource utilization.

[0149] In some embodiments of this disclosure, a method for generating elastic computing requests based on weighted calculation of multi-dimensional resource indicators is proposed. Specifically, the client device monitors three core indicators in real time: CPU utilization, memory usage, and storage I / O load. When any one of these indicators continuously exceeds a preset threshold (CPU: 70%~85%; Memory: 80%~90%; I / O: 70% of theoretical peak) for a corresponding duration (CPU: 30 seconds~2 minutes; Memory: 10 seconds~30 seconds; I / O: 5 seconds~15 seconds), it is determined that the system has entered a resource constraint state, and a resource specification request M is generated.

[0150] For example, P_peak is the sum of the peak CPU utilization of the top X processes (X=3~5) with the highest resource consumption; L_avg is the average CPU load over the past 5 to 30 minutes; and H_high is calculated based on the exponentially weighted moving average (EWMA) method with a half-life of 24 hours.

[0151] After receiving the elastic request, the server device sequentially performs network reachability screening, parallel link quality and resource assessment, weighted scoring and sorting, soft reservation and compliance verification.

[0152] The soft reservation timeout is set to 30 to 120 seconds, after which the reserved resources are automatically released.

[0153] To ensure business continuity, desktop-level online migration utilizes a combination of baseline snapshots and copy-on-write (COW) difference region synchronization for incremental state synchronization, specifically including: 1. Create a baseline snapshot of the terminal disk and stream the baseline data to the cloud-based auxiliary computing instance.

[0154] 2. Redirect subsequent write operations on the terminal disk to the difference zone and synchronize the changed blocks to the cloud in real time.

[0155] 3. Use a priority marking strategy to synchronize critical states (CPU register states are P0 with the highest priority, high-frequency memory pages are P1, and ordinary data is P2).

[0156] 4. When the amount of data to be synchronized in the difference area is less than the threshold (e.g., 10MB) and remains stable (e.g., no large-scale changes in 5 seconds), the final switchover is triggered.

[0157] For example, transparent switching includes: capturing a snapshot of the terminal's final memory and CPU state and transmitting it to the cloud instance; activating the cloud instance as the primary compute instance; silently suspending the terminal and redirecting user I / O to the cloud; and controlling the downtime of the entire switching process to between 100 milliseconds and 500 milliseconds.

[0158] Bidirectional elastic resource orchestration based on load threshold triggering, wherein forward scaling means: when local resources on the terminal are insufficient, computing tasks are offloaded to the cloud.

[0159] Cascading expansion means that when the utilization rate of cloud instance resources exceeds the expansion threshold (e.g., CPU > 85% for 3 minutes) and vertical expansion cannot meet the requirements, secondary addressing is automatically triggered to migrate the task to other nodes in the cluster.

[0160] Reverse migration means that when the utilization rate of cloud instance resources is lower than the recycling threshold for a long period of time (such as CPU < 20% for 30 minutes), the task will be automatically migrated back to the local terminal and the cloud resources will be released.

[0161] For example, the difference between secondary addressing and primary addressing is that the evaluation target changes from the link quality from "terminal to node" to the intra-cluster network performance from "node to node".

[0162] The above methods can be applied to thick and thin client solutions for cloud desktops, and can also be extended to server clusters and clients, i.e., virtual clusters (in environments with inconsistent hardware resource configurations and resource sizes), for resource scheduling.

[0163] The above method can also be applied to edge computing scenarios, such as the dynamic offloading and migration of computing tasks between terminal devices and edge nodes based on the collaborative scheduling method of this invention.

[0164] The above methods can also be applied to containerized desktop scenarios, such as replacing auxiliary computing instances with container instances, which is suitable for lightweight desktop virtualization environments.

[0165] The above method can also be applied to mobile cloud desktop scenarios, and is suitable for elastic scheduling of computing tasks between mobile terminals such as mobile phones and tablets and cloud servers.

[0166] Embodiments of this application also provide a control device for a cloud desktop system, applied to a target server. Figure 5 A structural block diagram of a second control device for a cloud desktop system according to some embodiments of the present disclosure is shown, such as... Figure 5 As shown, the second control device 500 includes: The second receiving module 502 is used to receive a computing request sent by the terminal device; the computing request carries resource requirement data of the computing task. Control module 504 is used to determine the target computing node based on resource requirement data and control the target computing node to create an initial computing instance; The second sending module 506 is used to send a notification message to the terminal device and receive a synchronization message sent by the terminal device; the notification message indicates the target computing node; the synchronization message includes data snapshots and incremental data; the data snapshots include data on running the cloud desktop system and performing computing tasks; the incremental data is obtained based on write operations to the terminal device; Control module 504 is also used to control the target computing node to activate the target computing instance based on the initial computing instance, data snapshot and incremental data; the target computing instance runs a replica system of the cloud desktop system, and the replica system is configured to perform computing tasks; Execution module 508 is used to execute computation tasks through the target computation instance and obtain computation data stream; The second sending module 506 is also used to send the computation data stream to the terminal device.

[0167] The embodiments disclosed herein can realize intelligent load scheduling between terminal devices and cloud servers, enabling terminal devices to offload their load to idle computing nodes on cloud servers based on their own hardware resource occupancy. Therefore, it can solve the problem of lag and service interruption when the hardware resources of terminal devices running cloud desktop systems are exhausted in related technologies, and achieve the technical effect of realizing global balance of cluster resources and improving the utilization efficiency of hardware resources.

[0168] In some embodiments of this disclosure, optionally, the execution module is further configured to create a copy system of the cloud desktop system based on a data snapshot; and to perform computational tasks in the copy system based on the data snapshot and incremental data.

[0169] The embodiments disclosed herein can break the resource pool isolation between the terminal device and the target server, so that the load of the terminal device can be dynamically offloaded to the idle nodes of the cloud server cluster, thereby achieving global balancing and efficient utilization of server cluster resources, enabling the terminal device to perform more complex computing tasks without additional hardware upgrades.

[0170] Optionally, in some embodiments of this disclosure, the second control device further includes a determining module, configured to determine a replacement computing node when the device resource occupancy data is greater than a second threshold, and control the replacement computing node to activate a replacement computing instance; the replacement computing instance runs a copy system of the cloud desktop system, and the copy system is configured to perform computing tasks; The control module is also used to continue executing computation tasks by replacing computation instances and to control the target computation node to reclaim the target computation instance.

[0171] This disclosure enables resource balancing among nodes within the target server. When the device resources of the physical node allocated to the terminal device are insufficient to continue executing computing tasks, the computing tasks can be reallocated to other physical nodes with sufficient resources, thereby ensuring that there are enough device resources to execute the computing tasks and guaranteeing the execution efficiency of the computing tasks.

[0172] Optionally, in some embodiments of this disclosure, the second sending module is further configured to send a migration instruction to the terminal device when the device resource occupancy data is less than or equal to a third threshold; the migration instruction is used to instruct the terminal device to activate the computing task executed by the cloud desktop system; and to send migration data to the terminal device; the migration data is the data generated by executing the computing task, the data snapshot does not include the migration data, and the migration data is used to enable the terminal device to continue executing the computing task based on the migration data and the data snapshot.

[0173] The embodiments disclosed herein enable bidirectional migration of computing tasks between a terminal device and a target server, thereby achieving dynamic load balancing between the terminal device and the target server.

[0174] Optionally, in some embodiments of this disclosure, the second control device further includes a generation module for generating a candidate computation node list; the candidate computation node list includes at least one available candidate computation node. The determination module is also used to determine the communication link quality data between each candidate computing node in the candidate computing node list and the terminal device; and to determine the target computing node based on the communication link quality data, resource requirement data, and idle resource data of the candidate computing nodes.

[0175] The embodiments disclosed herein can select the optimal target computing node based on multiple dimensions such as network quality and device resources. By having the target computing node take over the computing tasks offloaded by the terminal device, the execution efficiency when executing computing tasks can be guaranteed.

[0176] For a description of the features of the control device of the cloud desktop system in the corresponding embodiment, please refer to the relevant description of the control method of the cloud desktop system in the corresponding embodiment, which will not be repeated here.

[0177] Embodiments of this application also provide an electronic device. Figure 6 Structural block diagrams of electronic devices according to some embodiments of the present disclosure are shown, such as Figure 6 As shown, the electronic device 600 includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to run the computer program to perform the steps in any of the above-described cloud desktop system control method embodiments.

[0178] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described cloud desktop system control method embodiments when running.

[0179] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0180] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described XX method embodiments.

[0181] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described XX method embodiments.

[0182] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), 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), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0183] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0184] The control method and electronic device for a cloud desktop system provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A control method for a cloud desktop system, applied to a terminal device, characterized in that, The method includes: While running a cloud desktop system to perform computing tasks, obtain the device resource usage data of the terminal device; If the device resource usage data is greater than or equal to a first threshold, a computation request is sent to the target server; the computation request carries the resource requirement data of the computation task. Upon receiving a notification message from the target server, a data snapshot is created; the notification message instructs the target computing node; the data snapshot includes data on running the cloud desktop system and performing the computing tasks. A synchronization message is sent to the target computing node; the synchronization message carries a data snapshot and incremental data; the incremental data is data obtained based on write operations to the storage device of the terminal device after the data snapshot is created; the synchronization message is used to enable the target computing node to execute the computing task based on the data snapshot and the incremental data. The system receives a computational data stream sent by the target computing node and obtains the execution result of the computational task based on the computational data stream; the computational data stream is obtained by the target computing node executing the computational task.

2. The method according to claim 1, characterized in that, Before receiving the computational data stream sent by the target computing node, the method further includes: Upon receiving a confirmation message from the target computing node, the computing task being executed by the cloud desktop system is suspended; the confirmation message is used to instruct the target computing node to start executing the computing task. Alternatively, upon receiving the computational data stream, the computational task being executed by the cloud desktop system can be suspended.

3. The method according to claim 2, characterized in that, The method further includes: Upon receiving a migration instruction from the target computing node, the computing task executed by the cloud desktop system is activated; The system receives migration data sent by the target computing node and executes the computing task based on the migration data and the data snapshot; the migration data is the data generated by the target computing node executing the computing task, and the data snapshot does not include the migration data.

4. The method according to any one of claims 1 to 3, characterized in that, Before sending the computation request to the target server, the method further includes: Based on the peak processor utilization of the first process in the cloud desktop system and the average processor load of the terminal device, processor resource requirement information is determined; the first process is a process whose processor utilization is greater than or equal to the utilization threshold. Based on the memory usage of the second process in the cloud desktop system and the peak memory usage information of the terminal device, the memory resource requirement information is determined; the second process is the process that is active in the cloud desktop system. Based on the image capacity and expected storage growth of the cloud desktop system, determine the storage resource requirements. Based on the processor resource requirement information, the memory resource requirement information, and the storage resource requirement information, the resource requirement data is determined.

5. A control method for a cloud desktop system, applied to a target server, characterized in that, The method includes: Receive a computation request sent by a terminal device; the computation request carries resource requirement data for the computation task; Based on the resource requirement data, the target computing node is determined, and the target computing node is controlled to create an initial computing instance. Send a notification message to the terminal device and receive a synchronization message sent by the terminal device; the notification message indicates the target computing node; the synchronization message includes a data snapshot and incremental data; the data snapshot includes data on running the cloud desktop system and executing the computing task; the incremental data is obtained based on write operations to the terminal device; The target computing node is controlled to activate the target computing instance based on the initial computing instance, the data snapshot, and the incremental data; the target computing instance runs a replica system of the cloud desktop system, and the replica system is configured to execute the computing task; The computation task is executed through the target computation instance to obtain the computation data stream; The computational data stream is sent to the terminal device.

6. The method according to claim 5, characterized in that, The execution of the computation task through the target computation instance includes: A replica of the cloud desktop system is created based on the data snapshot; The computational task is executed in the replica system based on the data snapshot and the incremental data.

7. The method according to claim 5, characterized in that, After continuing to execute the computation task through the target computation instance, the method further includes: Obtain the device resource usage data of the target computing node; If the device resource usage data exceeds a second threshold, a replacement computing node is determined, and the replacement computing node is controlled to activate a replacement computing instance; the replacement computing instance runs a replica system of the cloud desktop system, and the replica system is configured to execute the computing task; The computation task continues to be executed through the replacement computation instance, and the target computation node is controlled to reclaim the target computation instance.

8. The method according to claim 7, characterized in that, After continuing to execute the computation task through the target computation instance, the method further includes: If the device resource usage data is less than or equal to a third threshold, a migration instruction is sent to the terminal device; the migration instruction is used to instruct the terminal device to activate the computing task executed by the cloud desktop system; Migration data is sent to the terminal device; the migration data is data generated during the execution of the computation task, the data snapshot does not include the migration data, and the migration data is used to enable the terminal device to continue executing the computation task based on the migration data and the data snapshot.

9. The method according to any one of claims 5 to 8, characterized in that, The step of determining the target computing node based on the resource requirement data includes: Generate a candidate computation node list; the candidate computation node list includes at least one available candidate computation node; Determine the communication link quality data between each candidate computing node in the candidate computing node list and the terminal device; The target computing node is determined based on the communication link quality data, the resource requirement data, and the idle resource data of the candidate computing nodes.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as claimed in any one of claims 1 to 9.