Business processing method and device
By distributing offline tasks to multiple edge servers in cloud applications and utilizing their idle computing resources, the problem of edge server resource waste is solved, resource utilization is improved, and operating costs are reduced.
Patent Information
- Application Number
- CN202110884435.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-02
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-08-02
AI Technical Summary
In the field of cloud applications, edge server resources are seriously wasted, especially during off-peak hours, resulting in low resource utilization and high operating costs.
By determining the computing resources required to perform offline tasks and distributing them to multiple edge servers, the idle computing resources of these servers are used to perform offline tasks, ensuring the normal operation of cloud applications.
It effectively utilizes the idle resources of edge servers, improves resource utilization, reduces operating costs, and ensures the stable operation of cloud applications during both peak and non-peak periods.
Smart Images

Figure CN113608871B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a business processing method and device. Background Art
[0002] Cloud applications transform traditional software installation and local computing into ready-to-use services, connecting to and controlling remote server clusters via the internet or local area network to complete logical or computational tasks. Simply put, a cloud application relies on cloud servers for execution and computing, with the terminal solely responsible for displaying the graphics. For example, cloud gaming, a typical example of a cloud application, relies on cloud computing technology and runs on remote servers. Terminals don't need to download or install games, nor do they need to consider terminal configuration, completely resolving the issue of insufficient terminal performance for running heavy games.
[0003] As can be seen, the operation of cloud applications requires extremely low network latency and extremely high network stability. Traditional network environments clearly cannot meet these requirements. Therefore, to provide users with a more stable network environment, cloud application servers are typically deployed on a large scale through edge servers, bringing cloud application servers closer to users. Typically, cloud application user onlineness exhibits a significant ebb and flow. For example, in cloud gaming, the number of online users is higher during peak hours, such as evenings, and lower during off-peak hours, such as mornings and middays. However, to provide users with a better cloud application experience, resources are allocated based on the maximum number of online users, regardless of the circumstances. This results in some resources being idle during off-peak hours, resulting in resource waste. Therefore, in the field of cloud applications, how to avoid resource waste and improve resource utilization has become a hot research topic. Summary of the Invention
[0004] The embodiments of the present invention provide a business processing method and device, which ensure the normal operation of cloud applications in edge servers while utilizing the idle computing resources of edge servers to perform offline tasks, thereby avoiding waste of resources in edge servers, improving the resource utilization of edge servers, and thus reducing the operating costs of edge servers.
[0005] In one aspect, an embodiment of the present invention provides a service processing method, including:
[0006] Determine the primary computing resources required to execute offline tasks;
[0007] Determining N edge servers for executing the offline task, where cloud applications are running on the N edge servers; idle computing resources of the N edge servers are greater than the first computing resources, where the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1;
[0008] The offline tasks are distributedly dispatched to the N edge servers, so that each of the N edge servers uses the idle computing resources of each edge server to execute the offline business while ensuring the normal operation of the cloud application.
[0009] In one aspect, an embodiment of the present invention provides another service processing method, which is executed by one edge server among N edge servers for executing offline tasks, wherein a cloud application runs on the N edge servers. The service processing method includes:
[0010] Receiving a distributed offline task distributedly scheduled by a management server, the distributed offline task including the offline task received by the management server; or the distributed offline task including a subtask matching the edge server among N subtasks, the N subtasks being obtained by segmenting the offline task based on idle computing resources of each of the N edge servers;
[0011] While ensuring the normal execution of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task.
[0012] In one aspect, an embodiment of the present invention further provides a service processing device, including:
[0013] a determining unit, configured to determine a first computing resource required to execute an offline task;
[0014] The determining unit is further configured to determine N edge servers for executing the offline task, wherein the N edge servers have cloud applications running thereon; the idle computing resources of the N edge servers are greater than the first computing resources, the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1;
[0015] A scheduling unit is used to distribute the offline business to the N edge servers, so that each of the N edge servers uses the idle computing resources in each edge server to perform the offline task while ensuring the normal operation of the cloud application.
[0016] In one aspect, an embodiment of the present invention provides a service processing device, characterized by comprising:
[0017] A receiving unit, configured to receive a distributed offline task distributedly scheduled by a management server, wherein the distributed offline task includes an offline task received by the management server, or the distributed offline task includes a subtask matching an edge server among N subtasks, wherein the N subtasks are obtained by segmenting the offline task based on idle computing resources of each of the N edge servers; the N edge servers are configured to execute the offline task, and cloud applications are running on the N edge servers;
[0018] The execution unit is used to use the idle computing resources in the edge server to execute the distributed offline task while ensuring the normal execution of the target cloud application.
[0019] In one aspect, an embodiment of the present invention provides a server, comprising:
[0020] A processor adapted to execute one or more computer programs; and a computer storage medium storing one or more computer programs, wherein the one or more computer programs are adapted to be loaded and executed by the processor:
[0021] Determine the primary computing resources required to execute offline tasks;
[0022] Determining N edge servers for executing the offline task, where cloud applications are running on the N edge servers; idle computing resources of the N edge servers are greater than the first computing resources, where the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1;
[0023] The offline tasks are distributedly dispatched to the N edge servers, so that each of the N edge servers uses the idle computing resources of each edge server to execute the offline business while ensuring the normal operation of the cloud application.
[0024] In one aspect, an embodiment of the present invention provides another server, characterized in that it includes:
[0025] A processor adapted to execute one or more computer programs; and a computer storage medium storing one or more computer programs, wherein the one or more computer programs are adapted to be loaded and executed by the processor:
[0026] Receiving a distributed offline task distributedly scheduled by a management server, the distributed offline task including the offline task received by the management server; or the distributed offline task including a subtask matching the edge server among N subtasks, the N subtasks being obtained by segmenting the offline task based on idle computing resources of each of the N edge servers;
[0027] While ensuring the normal execution of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task.
[0028] In one aspect, an embodiment of the present invention provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, is configured to perform:
[0029] Determine the primary computing resources required to execute offline tasks;
[0030] Determining N edge servers for executing the offline task, where cloud applications are running on the N edge servers; idle computing resources of the N edge servers are greater than the first computing resources, where the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1;
[0031] The offline tasks are distributedly dispatched to the N edge servers, so that each of the N edge servers uses the idle computing resources of each edge server to execute the offline business while ensuring the normal operation of the cloud application.
[0032] Alternatively, when the computer program is executed by a processor, it is used to perform:
[0033] Receiving a distributed offline task distributedly scheduled by a management server, the distributed offline task including the offline task received by the management server; or the distributed offline task including a subtask matching the edge server among N subtasks, the N subtasks being obtained by segmenting the offline task based on idle computing resources of each of the N edge servers;
[0034] While ensuring the normal execution of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task.
[0035] In one aspect, an embodiment of the present invention provides a computer program product or a computer program. The computer program product includes a computer program stored in a computer storage medium. A processor of a server reads the computer program from the computer storage medium and executes the computer program, causing the server to perform:
[0036] Determine the primary computing resources required to execute offline tasks;
[0037] Determining N edge servers for executing the offline task, where cloud applications are running on the N edge servers; idle computing resources of the N edge servers are greater than the first computing resources, where the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1;
[0038] The offline tasks are distributedly dispatched to the N edge servers, so that each of the N edge servers uses the idle computing resources of each edge server to execute the offline business while ensuring the normal operation of the cloud application.
[0039] Alternatively, a processor of the server reads the computer program from a computer storage medium, and the processor executes the computer program, causing the server to execute:
[0040] Receiving a distributed offline task distributedly scheduled by a management server, the distributed offline task including the offline task received by the management server; or the distributed offline task including a subtask matching the edge server among N subtasks, the N subtasks being obtained by segmenting the offline task based on idle computing resources of each of the N edge servers;
[0041] While ensuring the normal execution of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task.
[0042] In an embodiment of the present invention, upon receiving an offline task to be executed, the first computing resources required to execute the offline task are first evaluated. Furthermore, N edge servers for executing the offline task are obtained, where the idle computing resources of these N edge servers are greater than the first computing resources required to execute the offline task. The idle computing resources of the N edge servers refer to the sum of the idle computing resources of each edge server. The offline task is then distributed and dispatched to the N edge servers, so that each of the N edge servers uses its idle computing resources to execute the offline task while ensuring the normal operation of the cloud application.
[0043] In this way, while ensuring the normal operation of cloud applications during both peak and off-peak periods, the idle computing resources in each edge server can be used to execute offline tasks, avoiding the waste of computing resources in each edge server, improving the utilization rate of computing resources, and thus reducing the operating costs of edge servers. In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, facilitating the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is achieved. This distributed execution method not only ensures the execution progress of offline tasks, but also shares the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 This is a schematic diagram of the structure of a cloud application management system provided by an embodiment of the present invention;
[0046] Figure 2 This is a flowchart of a service processing method provided by an embodiment of the present invention;
[0047] Figure 3 is a flowchart of another service processing method provided by an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the structure of a business processing system provided by an embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of the structure of a service processing device provided by an embodiment of the present invention;
[0050] Figure 6 is a structural diagram of another service processing device provided by an embodiment of the present invention;
[0051] Figure 7 This is a schematic diagram of the structure of a server provided by an embodiment of the present invention;
[0052] Figure 8 It is a structural diagram of another server provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0054] An embodiment of the present invention provides a business processing solution that can fully utilize edge server resources, improve resource utilization, and reduce the operating costs of edge servers for cloud applications. In this business processing solution, when a management server receives an offline task to be executed, it can first evaluate the first computing power resources required to execute the offline task; then, it can determine N edge servers for executing the offline task, where it should be noted that the idle computing power resources of these N edge servers are greater than the first computing power resources; then, it can distribute and dispatch the offline task to the N edge servers. These N edge servers use their own idle computing power resources to execute the offline business while ensuring the normal operation of the cloud application. The value of N can be greater than or equal to 1. When the value of N is 1, distributed scheduling means assigning the offline task to the edge server for independent execution. When the value of N is greater than 1, distributed scheduling means assigning the offline task to multiple edge servers for joint execution. The offline task can be divided into several sub-services, and each edge server is assigned to execute a sub-service. In this way, the load of each edge server can be shared, ensuring the normal operation of the cloud application in each edge server. Alternatively, the offline task can be assigned to each edge server separately, and multiple edge servers execute the same offline task, which can improve the execution rate of the offline task. In the business processing solution provided by the embodiment of the present invention, whether in the peak period or non-peak period of the cloud application, the idle computing resources in each edge server can be used to execute offline tasks while ensuring the normal operation of the cloud application, thereby avoiding the waste of computing resources in each edge server, improving the utilization rate of computing resources, and thus reducing the operating cost of the edge server.
[0055] Based on the above business processing solution, the embodiment of the present invention provides a cloud application management system, see Figure 1 , is a structural diagram of a cloud application management system provided by an embodiment of the present invention, Figure 1 The cloud application management system shown includes at least one edge server 101, which can be used to run cloud applications. It should be noted that the at least one edge server 101 can run the same or different cloud applications. Common cloud applications include cloud gaming, cloud education, cloud conferencing, and cloud social networking.
[0056] Optionally, at least one edge server 101 can be assigned to multiple edge computing nodes. An edge computing node can be regarded as a node for edge computing. Edge computing can refer to an open platform that integrates network, computing, storage, and application core capabilities on the side close to the source of objects or data, providing the nearest service nearby. Its application is initiated on the edge side, resulting in faster network service response, meeting the basic needs of the industry in real-time business, application intelligence, security and privacy protection, etc. One or more edge servers run in each edge computing node. These edge servers have graphics processing computing capabilities, and each edge server can be called a computing node. For example, in Figure 1 In the example, edge computing node 1 includes four edge computing nodes, and edge computing node 2 may also include four edge computing nodes.
[0057] In one embodiment, Figure 1 The cloud application management system shown may also include a cloud application server 102, which is connected to at least one edge server 101. The cloud application server 102 may provide each edge server 101 with cloud application operation data so that each edge server 101 may run the cloud application based on the operation data provided by the cloud application server.
[0058] In one embodiment, Figure 1 The cloud application management system shown may also include a terminal 103, which may be connected to at least one edge server 102. Terminal 103 is configured to receive and display images rendered by edge server 102 for cloud applications. For example, terminal 103 may display game images rendered by edge server 102. Terminal 103 may refer to a mobile smart terminal, which refers to a device that has rich human-computer interaction methods, internet access, typically runs various operating systems, and has strong processing capabilities. Terminal 103 may include smartphones, tablets, laptops, desktop computers, smart speakers, smart watches, in-vehicle terminals, smart TVs, and the like.
[0059] In one embodiment, Figure 1The cloud application management system shown may also include a management server 104, which is connected to the terminal 103 and at least one edge server 101. The management server 104 can be used to manage and schedule the at least one edge server 101. For example, when it detects that any cloud application has been launched in any terminal, the management server 104 can select one or more appropriate edge servers to execute the cloud application launched in the terminal based on the current load and idle computing resources of each edge server 101. For another example, when a user submits an offline task to the management server 104, the management server 104 determines to schedule the offline task to one or more edge servers 102 based on the idle computing resources of each edge server. The one or more edge servers 102 assigned the offline task utilize their own idle computing resources to execute the assigned offline task while ensuring the normal operation of their respective cloud applications. In this way, the normal operation of the cloud application is guaranteed, the waste of idle computing resources in running the cloud application is avoided, and the resource utilization of each edge server is improved, thereby reducing the operating costs of the edge servers.
[0060] Based on the above business processing system, the embodiment of the present invention provides a business processing method. Figure 2 , which is a flow chart of a business processing method provided by an embodiment of the present invention, Figure 2 The service processing method shown may be executed by a management server, specifically by a processor of the management server. Figure 2 The business processing method shown may include the following steps:
[0061] Step S201: Determine the first computing power resources required to execute the offline task.
[0062] Among them, offline tasks refer to tasks that do not need to be completed in real time online, such as offline rendering of video special effects, offline training of artificial intelligence models, etc.
[0063] Optionally, the first computing power resource may vary depending on the type of primary load for executing offline tasks. Specifically, if the primary load for executing offline tasks is a graphics processing unit (GPU), meaning that the primary load for executing offline tasks is concentrated on the GPU, the first computing power resource may include any one or more of the following: network bandwidth, memory, floating-point operations per second (FLOPS), operations per second (OPS), and throughput.
[0064] If the primary load for executing offline tasks is of the Central Processing Unit (CPU) type, meaning the primary load for executing offline tasks is concentrated on the CPU, then the first computing resources may include any one or more of the following: memory, network bandwidth, floating-point operations per second (FLOPS), or operations per second (OPS). If the primary load for executing offline tasks is of a mixed type, meaning that the load requires both the CPU and the GPU, then the first computing resources are a combination of the first computing resources of the two aforementioned types.
[0065] Among them, the number of floating-point operations performed per second (FLOPS) can be divided into half-precision, single-precision, and double-precision. When calculating the floating-point operations per second of a graphics processing unit (GPU), it is necessary to separately calculate the number of half-precision floating-point operations per second, the number of single-precision floating-point operations per second, and the number of double-precision floating-point operations per second performed by the GPU. Similarly, when calculating the floating-point operations per second of a central processing unit (CPU), it is also necessary to separately calculate the number of half-precision floating-point operations per second, the number of single-precision floating-point operations per second, and the number of double-precision floating-point operations per second performed by the CPU. Currently, when using FLOPS to measure computing power, it can generally include teraFLOPS (TFLOPS), gigaFLOPS (GFLOPS), megaFLOPS (MFLOPS), and petaFLOPS (PFLOPS).
[0066] Currently, when using OPS to measure computing power, it can usually include Million Operations Per Second (MOPS), Giga Operations Per Second (GOPS), and Tera Operations Per Second (TOPS).
[0067] In one embodiment, the first computing power resources required to execute the offline task can be estimated based on the computing power resources used when executing historical offline tasks similar to the offline task. In a specific implementation, determining the first computing power resources required to execute the offline task can include: determining the computational complexity corresponding to the task type of the offline task based on the correspondence between the task type and the computational complexity; searching for at least one matching historical offline task from the historical offline tasks based on the determined computational complexity, where the computational complexity corresponding to each matching historical offline task matches the determined computational complexity; and estimating the computing power resources required for the offline task based on the computing power resources used to execute each matching historical offline task, thereby obtaining the first computing power resources required to execute the offline task.
[0068] Among them, tasks can be classified according to their content. For example, if the task content is to render an offline video, then the task type can be video rendering; for example, if the task content is to train a model, then the task type can be model training. Computational complexity can also be called algorithmic complexity. Algorithmic complexity refers to the resources required for the algorithm to run after it is written into an executable program. The required resources include time resources and memory resources. Time resources can be measured using the FLOPS and OPS mentioned above. In the embodiments of the present invention, executing offline tasks is essentially executing the executable program written into the offline task.
[0069] The correspondence between task type and computational complexity can be determined by the computational complexity of historical offline tasks, such as the computational complexity of model training tasks or offline video rendering tasks. The computational complexity associated with a task type can be used to reflect the magnitude of the complexity associated with executing that task.
[0070] Optionally, searching for at least one matching historical offline task based on the determined computational complexity may include searching for historical offline tasks whose computational complexity matches the determined computational complexity from each historical offline task, and determining these historical offline tasks as matching historical offline tasks. Two computational complexities may match if the complexity difference between the two computational complexities is less than a specified value. It should be noted that among the executed historical offline tasks, in addition to historical offline tasks of the same task type as the offline task, which may have a matching computational complexity, historical offline tasks of different task types may also have a matching computational complexity. Therefore, when determining matching historical offline tasks, the matching historical offline tasks are not selected based on the task type of the offline task, but rather based on the computational complexity corresponding to the offline task. This allows for the selection of more matching historical offline tasks from the historical offline tasks. When estimating the computing resources required for the offline task based on the computing resources used by these matching historical offline tasks, the estimated first computing resources are more accurate.
[0071] Of course, in actual applications, historical offline tasks with the same task type as the offline task can also be searched from various historical offline tasks as matching historical offline tasks, and the first computing power resources are estimated based on the computing power resources used by these matching historical offline tasks. This is not specifically limited in the embodiments of the present invention, and can be flexibly selected according to actual needs.
[0072] As can be seen from the foregoing, the first computing resources may include any one or more of graphics processor computing resources, central processing unit computing resources, memory, network bandwidth, and network throughput. Estimating the computing resources required for the offline task based on the computing resources used to execute each matching history offline task to obtain the first computing resources required for executing the offline task may include estimating the corresponding computing resources required for the offline task based on each computing resource used to execute each matching history offline task. For example, estimating the graphics computing resources required for executing the offline task based on the graphics computing resources used to execute each matching history task; or estimating the memory required for executing the offline task based on the memory resources used to execute each matching history task.
[0073] In a specific implementation, the computing power resources required for the offline task are estimated based on the computing power resources used to execute each matching history offline task to obtain the first computing power resources required to execute the offline task. This may include: averaging the computing power resources used to execute each matching history offline task, and using the calculation result as the first computing power resources required to execute the offline task.
[0074] In other embodiments, the computing resources required for the offline task are estimated based on the computing resources used to execute each matching historical offline task, thereby obtaining the first computing resources required to execute the offline task. This includes: assigning a weight value to each matching historical offline task based on the relationship between the task type of each matching historical offline task and the task type of the offline task; performing a weighted averaging operation on at least one matching historical offline task based on the weight value of each matching historical offline task, and using the result of the operation as the first computing resources required to execute the offline task. For example, if a matching historical offline task and an offline task have the same task type, then the matching historical offline task may be assigned a higher weight value; if a matching historical offline task and an offline task have different task types, then the matching historical offline task may be assigned a lower weight value.
[0075] In one embodiment, an offline task may correspond to an execution time threshold, and the first computing power resources required to execute the offline task may specifically refer to the first computing power resources required to complete the offline task within the execution time threshold; different execution time thresholds may also result in different first computing power resources.
[0076] Step S202: Determine N edge servers for executing offline tasks, wherein cloud applications are running on the N edge servers, and idle computing resources of the N edge servers are greater than the first computing resources.
[0077] It should be noted that the cloud application is deployed to M edge servers for operation, that is, M edge servers participate in the operation of the cloud application. The N edge servers in step S202 are selected from the M edge servers. When selecting the N edge servers for executing the offline task from the M edge servers, the selection can be directly based on the idle computing resources and the first computing resources of each of the M edge servers. The idle computing resources of each edge server can be determined based on the second computing resources required to run the cloud application on that edge server and the total computing resources of that edge server. The second computing resources required to run the cloud application on each edge server can also be estimated and determined by the management server based on the computing resources used in historical operations of the cloud application. For example, the management server can obtain the computing resources used in multiple historical operations of the cloud application, and then average these computing resources to estimate the second computing resources required for the edge server to run the cloud application. It should be understood that, as can be seen from the above, computing power resources may include multiple types. When determining each computing power resource, each computing power resource required for running the cloud application each time is averaged to obtain the computing power resource required by the edge server to run the cloud application.
[0078] Optionally, N is an integer greater than or equal to 1. When N is equal to 1, any edge server whose idle computing resources are greater than the first computing resources can be selected from the M edge servers as the edge server for executing the offline task.
[0079] When N is greater than 1, in one embodiment, determining N edge servers for executing offline tasks includes: comparing the idle computing resources of each of the M edge servers with a first computing resource; and determining the N edge servers whose idle computing resources are greater than the first computing resource as the N edge servers for executing offline tasks. The idle computing resources in each edge server can be determined based on the total computing resources of each edge server and the second computing resource required to run the cloud application. For example, the idle computing resources of each edge server can be obtained by subtracting the second computing resource from the total computing resource of each edge server. Another example is to add the second computing resource required for running the cloud application in each edge server to a reserved computing resource, and then subtract the added result from the total computing resource of each edge server to obtain the idle computing resource of each edge server. This is intended to reserve a portion of computing resources for the operation of the cloud application, avoiding the edge server's inability to respond in a timely manner when the computing resource requirements of the cloud application suddenly increase, thereby reducing the operation speed and response efficiency of the cloud application.
[0080] Simply put, the above method for determining N edge servers is: all edge servers whose idle resources are greater than the first computing power resources among the M edge servers are used as the N edge servers for executing offline tasks. Although the idle computing power resources of each edge server in these N edge servers are sufficient to enable each edge server to execute offline tasks independently, in an embodiment of the present invention, the offline tasks can be distributed and scheduled to these N edge servers for joint execution. In this way, the first computing power resources required for the offline tasks can be apportioned to different edge servers, and each edge server can reserve some excess computing power resources. In this way, when the computing power resources required for the cloud application in a certain edge server increase, it can be ensured that the edge server allocates the reserved computing power to the cloud application in a timely manner without suspending the execution of the offline task.
[0081] In another embodiment, determining N edge servers for executing an offline task includes: comparing the idle computing resources of each of the M edge servers with a first computing resource; if no edge server has a computing resource greater than the first computing resource; combining the M edge servers to obtain multiple combinations, each combination including at least two servers; calculating the sum of the idle computing resources of each combination, and determining the edge servers included in the combination whose sum of idle computing resources is greater than the first computing resource as the N edge servers for executing the offline task. In other words, if no edge server among the M edge servers has an idle computing resource greater than the first computing resource, the sum of the idle computing resources of the selected N edge servers is greater than the first computing resource.
[0082] Optionally, the M edge servers in an embodiment of the present invention can be distributed to P edge computing nodes, each edge computing node includes one or more edge servers, for example, the P edge computing nodes include edge computing node 1 and edge computing node 2, edge computing node 1 can include 5 edge servers, and edge computing node 2 can include M-5 edge servers.
[0083] Based on this, when determining N edge servers for executing offline tasks from M edge servers, L edge computing nodes can be first determined from P edge computing nodes, where the idle computing resources of these L edge computing nodes are greater than the first computing resource, and then N edge servers are selected from the determined L edge computing nodes. In a specific implementation, determining N edge servers for executing offline tasks includes the following steps:
[0084] S1: Select L edge computing nodes from P edge computing nodes, where idle computing resources of the L edge computing nodes are greater than the first computing resources.
[0085] Among them, the node idle computing power resources of the L edge computing nodes are the sum of the node idle computing power resources of each edge computing node in the L edge computing nodes. The node idle computing power resources of the L edge computing nodes are greater than the first computing power resources, which may include any one of the following situations: the node idle computing power of each edge computing node in the L edge computing nodes is greater than the first computing power resources, the node idle computing power of some edge computing nodes in the L edge computing nodes is greater than the first computing power resources, and the sum of the node idle computing power resources of the remaining edge computing nodes is greater than the first computing power resources; and the node idle computing power resources of each edge computing node in the L edge computing nodes are less than the first computing power resources, but the sum of the node idle computing power resources of the L edge computing nodes is greater than the first computing power resources.
[0086] Simply put, when selecting L edge computing nodes from P edge computing nodes, you can only select some edge computing nodes whose node idle computing resources are greater than the first computing resources; or, you can select both edge computing nodes whose node idle computing resources are greater than the first computing resources, and some edge computing nodes whose sum of node idle computing resources is greater than the first computing resources; or, if there is no edge node whose node idle computing resources are greater than the first computing resources among the P edge computing nodes, then at this time you can only select some edge computing nodes whose sum of node idle computing resources is greater than the first computing resources.
[0087] Among them, the node idle computing power resources of each edge computing node are determined based on the idle computing power resources of each edge server included in each edge computing node. For example, the idle computing power resources of multiple edge servers included in an edge computing node are added together to obtain the node idle computing power resources of the edge computing node; for another example, the idle computing power resources of multiple edge servers included in an edge computing node can be averaged to obtain the node idle computing power resources of the edge computing node. It should be noted that the embodiment of the present invention only lists two ways to calculate the idle computing power resources of the node. In specific applications, any method can be used to calculate the idle computing power resources of the node according to actual needs, and the embodiment of the present invention does not make specific limitations.
[0088] S2: Determine at least one candidate edge server from the edge servers included in the L edge computing nodes based on attribute information of each edge server included in the L edge computing nodes;
[0089] In one embodiment, the attribute information of each edge server may include the working status of each edge server, and the working status may include an idle state or a busy state. When the load of an edge server exceeds the load upper limit, the working status of the edge server is determined to be a busy state; conversely, when the load of an edge server is less than the load upper limit, the working status of the edge server is an idle state. An edge server in a busy state is not scheduled to perform offline tasks, while an edge server in an idle state can be scheduled to perform offline tasks. Therefore, based on the attribute information of each edge server included in the L edge computing nodes, a plurality of candidate edge servers are determined from the edge servers included in the L edge computing nodes, including: determining an edge server in an idle state among the edge servers included in the L edge computing nodes as a candidate edge server.
[0090] In another embodiment, the attribute information of each edge server includes the server type group to which each edge server belongs. The server type group includes a preset whitelist group and a general group. The edge servers in the preset whitelist group are used to run high-priority, non-interruptible real-time cloud applications. Therefore, the edge servers in the preset whitelist group are not scheduled for offline tasks. The edge servers in the general group can be scheduled for offline tasks. The edge servers in the preset whitelist group are dynamically changing. When an edge server in the preset whitelist group no longer executes high-priority, non-interruptible real-time tasks, this edge server is removed from the preset whitelist group and can be transferred to the general group. Therefore, based on the attribute information of each edge server included in the L edge computing nodes, multiple candidate edge servers are determined from the edge servers included in the L edge computing nodes, including: determining the edge servers included in the L edge computing nodes, whose server type group belongs to the general group, as candidate edge servers.
[0091] S3: Determine N edge servers from the at least one candidate edge server according to the idle computing resources of each edge server in the at least one candidate edge server and the first computing resource.
[0092] After obtaining some candidate edge servers in step S2, N edge servers are selected from at least one candidate edge server. In one embodiment, the idle computing resources of each candidate edge server can be compared with the first computing resource; edge servers whose idle computing resources are greater than the first computing resource are determined as the N edge servers.
[0093] In another embodiment, edge servers whose idle computing resources are greater than the first computing resource, and multiple edge servers whose sum of idle computing resources is greater than the first computing resource, among the candidate edge servers, are used as N edge servers. For example, if at least one candidate edge server includes edge server 1, edge server 2, and edge server 3, and the idle computing resources of edge server 1 are greater than the first computing resource, the idle computing resources of edge server 2 and the idle computing resources of edge server 3 are both less than the first computing resource, but the sum of the idle computing resources of edge server 2 and the idle computing resources of edge server 3 is greater than the first computing resource, then edge server 1, edge server 2, and edge server 3 can all be used as N edge servers for executing offline tasks.
[0094] In another embodiment, if there is no edge server whose idle computing power is greater than the first computing power resource among the candidate edge servers, then multiple edge servers whose sum of idle computing power is greater than the first computing power resource are used as the N edge servers.
[0095] It should be noted that the first computing power resources may include CPU computing power resources and / or GPU computing power resources. The idle computing power resources of each edge server include any one or more of CPU computing power resources, GPU computing power resources, network bandwidth, throughput, and memory. When the above-mentioned computing power resources are compared, or computing power resources are added and averaged, they are all performed between computing power resources of the same type. For example, the first computing power resources include GPU computing power resources, and GPU computing power resources include the number of half-precision floating-point operations performed by the GPU per second, the number of single-precision floating-point operations performed by the GPU per second, and the number of double-precision floating-point operations performed by the GPU per second; the idle computing power resources of any edge server include GPU computing power resources, and GPU computing power resources also include the number of half-precision floating-point operations performed by the GPU per second, the number of single-precision floating-point operations performed by the GPU per second, and the number of double-precision floating-point operations performed by the GPU per second. When comparing the idle computing resources of any edge server with the first computing resources, the specific comparison is the relationship between the number of half-precision floating-point operations performed by the two GPUs per second, the relationship between the number of single-precision floating-point operations performed by the two GPUs per second, and the relationship between the number of double-precision floating-point operations performed by the two GPUs per second.
[0096] Step S203: Distribute and dispatch the offline task to the N edge servers, so that each of the N edge servers uses the idle computing resources of each edge server to execute the offline task while ensuring the normal operation of the cloud application.
[0097] In one embodiment, distributed scheduling of offline tasks to N edge servers may include: dividing the offline task into N subtasks based on the idle computing resources of each edge server in the N edge servers, each of the N subtasks being matched with an edge server; the idle computing resources of the edge server matching each subtask being greater than the computing resources required to execute each subtask; and allocating each subtask to the edge server matching each subtask, so that each edge server executes the matching subtask.
[0098] As an optional implementation, if the idle computing resources of each of the N edge servers are greater than the first computing resource, then based on the idle computing resources of each edge server, the offline task is divided into N subtasks, including: evenly dividing the offline task into the N subtasks, and the computing resources required to execute each subtask can be equal to the first computing resource / N. For example, if the first computing resource is x, the offline task is evenly divided into 5 subtasks, and the computing resources required to execute each subtask are equal to x / 5; and the N subtasks are dispatched to the N edge servers respectively. In this case, each subtask matching an edge server can mean that a subtask matches any edge server.
[0099] As another embodiment, if there is no edge server among the N edge servers whose idle computing resources are greater than the first computing resources, and the sum of the idle computing resources of the N edge servers is greater than the first computing resources, then based on the idle computing resources of each edge server, the offline task is divided into N subtasks, including: dividing a subtask for each edge server, wherein the computing resources required to execute the subtask are less than the idle computing resources of each edge server, and in this case, each subtask corresponds to a fixed edge server. For example, the N edge servers include edge server 1, edge server 2, and edge server 3, the idle computing resources of edge server 1 are equal to x1, the idle computing resources of edge server 2 are equal to x2, and the idle computing resources of edge server 3 are equal to x3. The offline task is divided into three subtasks, where subtask 1 matches edge server 1, and the computing resources required to execute subtask 1 are less than or equal to x1; subtask 2 matches edge server 2, and the computing resources required to execute subtask 2 are less than or equal to x2; and subtask 3 matches edge server 3, and the computing resources required to execute subtask 3 are less than or equal to x3.
[0100] As another optional implementation method, if the N edge servers include a portion of edge servers whose idle computing resources are greater than the first computing resources, and also include a portion of edge servers whose idle computing resources are not greater than the first computing resources, then based on the idle computing resources of each edge server in the N edge servers, dividing the offline task into N subtasks can include: first dividing the offline task into several subtasks that match each edge server in the portion of edge servers whose idle computing resources are not greater than the first computing resources; and then evenly dividing the remaining offline tasks and assigning them to the other portion of edge servers whose idle computing resources are greater than the first computing resources.
[0101] The above are just a few implementation methods of distributed scheduling of N edge servers to perform offline tasks listed in the embodiments of the present invention. However, in actual applications, other methods can be selected to perform distributed scheduling of N edge servers to perform offline tasks according to specific needs, and the embodiments of the present invention do not make specific limitations.
[0102] In one embodiment, during the process of each edge server executing a matching subtask, the management server can monitor the execution status of each edge server for the matching subtask; if it is detected that any edge server among the N edge servers has an exception when executing the matching subtask, a new edge server is selected to execute the matching subtask of the any edge server. Optionally, the management server monitors the execution status of each edge server for the matching subtask based on the task execution status reported by each edge server. Detection of an exception in the execution of the matching subtask by any edge server among the N edge servers may include: the task execution status reported by any edge server to the management server indicates that the any edge server has an exception when executing the subtask; or the management server has not received the task execution status reported by any edge server for a long period of time.
[0103] As can be seen from the foregoing, an offline task corresponds to an execution time threshold, and N edge servers need to complete the offline task within the execution time threshold. Since the offline task is divided into N subtasks, each subtask also corresponds to an execution time threshold, and the execution time threshold of each subtask can be equal to the execution time threshold corresponding to the offline task. During the process of each edge server executing a matching subtask, if any edge server finds that it cannot complete the subtask within the corresponding execution time threshold, it needs to report a timeout message to the management server. This timeout message is used to instruct the management server to reassign a new edge server to execute the matching subtask of any edge server.
[0104] In an embodiment of the present invention, after receiving an offline task to be executed, the first computing power resources required to execute the offline task are first evaluated. Further, N edge servers for executing the offline task are obtained. The idle computing power resources of these N edge servers are greater than the first computing power resources required to execute the offline task. The idle computing power resources of the N edge servers refer to the sum of the idle computing power resources of each edge server. The offline task is distributed and dispatched to the N edge servers so that each of the N edge servers uses the idle computing power resources of each edge server to execute the offline task while ensuring the normal operation of the cloud application. In this way, whether in the peak period or non-peak period of the cloud application, the normal operation of the cloud application can be guaranteed, and the idle computing power resources in each edge server can also be used to execute the offline task, thereby avoiding the waste of computing power resources in each edge server, improving the utilization rate of computing power resources, and thus reducing the operating costs of the edge servers. In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, which facilitates the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is realized. This distributed execution method can not only ensure the execution progress of offline tasks, but also share the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server.
[0105] Based on the above-mentioned embodiment of the service processing method, the embodiment of the present invention provides another service processing method, see Figure 3 , which is a flow chart of another business processing method provided by an embodiment of the present invention. Figure 3 The service processing method shown can be executed by an edge server among N edge servers, specifically by a processor of the edge server. The edge server can be any one of the N edge servers, and a cloud application is running in the N edge servers. Figure 3 The business processing method shown may include the following steps:
[0106] Step S301: Receive distributed offline tasks distributedly scheduled by a management server.
[0107] The distributed offline task may be an offline task received by the management server, or may be any one of N subtasks into which the offline task is divided. The idle computing power resources of the edge server are greater than the computing power resources required to execute the distributed offline task.
[0108] The N subtasks are obtained by dividing the offline task based on the idle computing resources of each edge server in the N edge servers used to execute the offline task. For the specific implementation method, please refer to Figure 2 The description of the relevant contents in step S203 in the embodiment will not be repeated here.
[0109] Optionally, before receiving the distributed offline task distributedly scheduled by the management server, the edge server may count the idle computing resources of the edge server and report the idle computing resources of the edge server to the management server. The idle computing resources of the edge server may be determined based on the total computing resources of the edge server and the second computing resources required to run the cloud application.
[0110] As an optional implementation, the total computing power resources of the edge server can be subtracted from the second computing power resources, and the result of the subtraction operation can be used as the idle computing power resources of the edge server. That is, the idle computing power resources of the edge server can refer to the remaining computing power resources in the edge server excluding the second computing power resources for running cloud applications.
[0111] As another optional implementation, some reserved computing resources can be set up. These resources and the second computing resource required to run the cloud application can be subtracted from the edge server's total computing resources. The remaining computing resources are the edge server's idle computing resources. This way, if the computing resources required to run the cloud application suddenly increase, some of the reserved computing resources can be used to run the cloud application without interrupting the execution of the distributed offline task.
[0112] In actual applications, different cloud applications, as well as different scenarios of the same cloud application, have different requirements for computing resources. Therefore, when calculating the second computing resources required to run a cloud application, the computing resources required for each cloud application in different scenarios can be calculated, and then the smallest of these computing resources can be taken as the second computing resources required for the edge server to run the cloud application. Among them, the second computing resources can include any one or more of CPU computing resources, GPU computing resources, memory, network bandwidth, and throughput. CPU computing resources can generally include the number of floating-point operations performed by the CPU per second, and / or the number of operations performed by the CPU per second. GPU computing resources can include the number of floating-point operations performed by the GPU per second, and / or the number of operations performed by the GPU per second. Since a single edge server and the edge computing node to which the edge server belongs will affect the idle computing resources, the network bandwidth is determined based on the intranet bandwidth and the extranet bandwidth. Specifically, the smaller of the intranet bandwidth and the extranet bandwidth can be used as the network external bandwidth of the edge server.
[0113] Step S302: While ensuring the normal operation of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task.
[0114] As can be seen from the foregoing, offline tasks and each subtask obtained by dividing the offline task will correspond to an execution time threshold, so distributed offline tasks will also correspond to an execution time threshold. Optionally, when using the idle computing resources of the edge server to execute the distributed offline task, the method includes: determining the time required to execute the distributed offline task based on the idle computing resources of the edge server; if the required time is less than the execution time threshold corresponding to the distributed offline task, then using the idle computing resources of the edge server to execute the distributed offline task.
[0115] In one embodiment, the idle computing resources in each edge server may refer to the remaining computing resources in the edge server, excluding the second computing resources required to run the cloud application. When the edge server detects that the resources required to run the cloud application on the edge server suddenly increase and exceed the second computing resources while executing a distributed offline task, the edge server may need to perform a computing power release operation to ensure the normal operation of the cloud application. In a specific implementation, the length of time that the distributed offline task remains in the edge server can be obtained; the computing power release operation is performed based on the relationship between the length of time and the execution time threshold corresponding to the distributed offline task.
[0116] Among them, if the time difference between the stay duration and the execution duration threshold is greater than the time difference threshold, it indicates that there is still sufficient time to execute the distributed offline task. At this time, the computing power release operation may include pausing the execution of the distributed offline task so that when the computing power resources required by the cloud application are less than or equal to the second computing power resources, the distributed offline task can be restarted. If the time difference between the stay duration and the execution duration threshold is less than the time difference threshold, it indicates that there is not much time left to execute the distributed offline task. At this time, it may not be possible to wait for the edge server to restore sufficient idle resources before continuing to start the distributed offline task. It may be necessary to terminate the execution of the distributed offline task and inform the management server to reselect an edge server with sufficient idle computing resources to execute the distributed offline task. Therefore, if the time difference between the stay duration and the execution duration threshold is less than the time difference threshold, the computing power release operation may include terminating the execution of the distributed offline task.
[0117] Optionally, if the computing power release operation refers to suspending the execution of a distributed offline task, then after executing the computing power release operation, the edge server can periodically detect the idle computing power resources of the edge server; if it is detected that the idle computing power resources of the edge server are greater than the first computing power resources, then the distributed offline task is started; if the idle computing power resources of the edge server are less than the first computing power resources, and the difference between the residence time of the distributed offline task in the edge server and the execution time threshold is less than the time difference threshold, then the execution of the distributed offline task is terminated. That is to say, in the process of periodically detecting the idle computing power resources of the edge server, if it is found that the idle computing power resources of the edge server are not sufficient to execute the distributed offline task, but there is not much time left before the execution time threshold, then the edge server can only give up continuing the distributed offline task and inform the management server to reschedule a new edge server to execute the distributed offline task.
[0118] Optionally, when an edge server is executing a distributed offline task, if it is predicted that the edge server cannot complete the distributed offline task within the execution time threshold, a timeout prompt message may be sent to the management server. The timeout prompt message is used to inform the edge server that the time required to complete the distributed offline task is greater than the execution time threshold corresponding to the distributed offline task, and the management server should reallocate a new edge server to execute the distributed offline task.
[0119] In an embodiment of the present invention, an edge server receives a distributed offline task distributedly scheduled by a management server. The distributed offline task can be an offline task received by the management server, or a subtask among N tasks that matches the edge server. These N subtasks can be obtained by segmenting the offline task based on the idle computing resources of the N edge servers used to execute the offline task. While ensuring the normal operation of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task. In this way, the idle computing resources in the edge server can be used to execute the distributed offline task while ensuring the normal operation of the cloud application, regardless of whether it is during the peak period or the non-peak period of the cloud application, thereby avoiding the waste of computing resources in the edge server, improving the utilization rate of computing resources, and thus reducing the operating costs of the edge server.
[0120] Based on the above-mentioned embodiment of the service processing method, the embodiment of the present invention provides a service processing system. Figure 4 , which is a structural diagram of a business processing system provided by an embodiment of the present invention, Figure 4The business processing system shown may include a management server 401 for managing edge computing nodes, and at least one edge server 402, at least one edge server 402 is assigned to P edge computing nodes 403, and each edge computing node 403 includes one or more edge servers.
[0121] In one embodiment, each edge server 402 includes a core functional module, which is primarily used to implement the core functions of cloud applications. For example, for cloud gaming, this core functional module is used for game rendering, game logic, and other functions. In this embodiment of the present invention, the computing resource requirements of this module are set to the highest priority. That is, no matter what offline task an edge server is performing, if it is found that this module requires more computing resources, then sufficient computing resources will be allocated to it first.
[0122] In one embodiment, each edge server 402 may also include a computing power management module, which is used to manage the computing power resources of the edge server to ensure that the requirements of all real-time online tasks on the local server do not exceed the physical computing power limit. The main functions of the computing power management module may include:
[0123] (1) The local idle computing resources are collected and reported in real time. The data is reported to the management server, which can be used as the basis for subsequent offline task scheduling. It should be understood that at this time, the idle computing resources of the local machine can be directly reported to the management server 401, or the occupied computing resources and the total available computing resources of the local machine can be reported to the management server 401. The management server 401 calculates the idle computing resources of the edge server based on the occupied computing resources and the total available computing resources.
[0124] (2) Local computing power management: When the computing power required by a real-time online task (mainly referring to cloud applications in this embodiment of the present invention) exceeds the upper limit of the local computing power, if there are offline tasks running, the offline task scheduling module is notified to release the computing power; if there are no offline tasks or the computing power still exceeds the upper limit of the local computing power after all offline tasks are paused, the management server is notified to schedule some cloud application instances to other edge servers;
[0125] In one embodiment, the edge server 402 may further include an offline task scheduling module. The offline task scheduling module 4023 is mainly used to schedule offline tasks distributedly scheduled by the management server to the local machine. The main functions may include:
[0126] (1) Start the task. After receiving the offline task sent by the management server (the offline task here can refer to a complete offline task or a subtask after a completed offline task is divided), calculate whether the idle computing resources of the local machine meet the demand, mainly to determine whether the idle computing resources of the local machine can complete the offline task within the execution time threshold; if satisfied, start the offline task. The offline task scheduling module will also regularly check the execution status of the local offline tasks. For offline tasks that are suspended due to insufficient idle computing power, recheck the current idle computing resources. If the current idle computing resources are still insufficient, check the length of time the offline task stays on the local machine. If the time difference between the stay time and the execution time threshold is less than the time difference threshold, or the stay time exceeds the execution time threshold, terminate the execution of the offline task;
[0127] (2) Release computing power. When the computing power management module detects that the number of computing instances required for the current real-time online task is insufficient, it notifies this module to release the computing power. Specifically, it may include suspending the execution of offline tasks (for tasks that still have sufficient time to complete, that is, the time difference between the offline task's stay time on the local machine and the execution time threshold is greater than the time difference threshold), or terminating the execution of offline tasks (for tasks that need to be completed immediately, that is, the time difference between the offline task's stay time on the local machine and the execution time threshold is less than the time difference threshold).
[0128] (3) Pause offline tasks. Pause offline tasks according to the instructions for releasing computing power.
[0129] (4) Complete the offline task. When the offline task is completed, clean up the local temporary data and report the completed calculation to the management server;
[0130] (5) Terminate the offline task. When the idle computing resources of the local machine cannot complete the offline task within the execution time threshold, or when an abnormal situation occurs such as the local machine needs to be shut down for maintenance, the offline task is terminated and assigned to other edge servers through the management server.
[0131] In one embodiment, the management server 401 may include an idle capacity prediction module, which is mainly used to calculate the idle computing resources of each edge server and the node idle computing resources of each edge computing node based on the computing resource data reported by each edge server.
[0132] In one embodiment, the management server 401 may further include an offline task management module. The main functions of the offline task management module may include:
[0133] (1) Task reception. Receive offline tasks uploaded by users and classify them. The main classifications may include whether the offline task has timeliness requirements, whether the main load of the offline task is GPU-based or GPU-based, and whether the offline task can be executed in a distributed manner;
[0134] (2) Task allocation. The computing resources required to execute the offline task are matched with the idle computing resources of each edge server to allocate the offline task to the appropriate edge server. If a single edge server cannot complete the offline task alone, the offline task is distributed to the distributed scheduling module for allocation.
[0135] (3) Task process management. Receive the task execution status reported by the edge server that executes the cloud application. If the offline task is determined to be completed based on the task execution status, verify the execution result and provide feedback to the user. If the offline task execution is abnormal based on the task execution status, or if the task execution status reported by the edge server has not been received for a long time, reschedule the offline task to a new edge server.
[0136] In one embodiment, the management server 401 further includes a policy management module. The main functions of the policy management module 4013 may include:
[0137] (1) Whitelist management. For some edge servers that need to run high-priority, non-interruptible cloud applications, these edge servers need to be added to the preset whitelist to ensure that these edge servers are not scheduled for offline tasks. At the same time, these edge servers do not need to be in the preset list all the time. After the high-priority cloud application ends, these edge servers will be removed from the preset whitelist;
[0138] (2) Edge server status management. The working status of an edge server includes busy and idle states. When an edge server reports that the current edge server has exceeded the load limit, the working status of the edge server needs to be set to busy to avoid assigning new offline tasks and cloud application instances to the edge server. When the edge server informs the management server that it is currently idle, the working status of the edge server is changed to idle, and the idle computing resources of the edge server can be recalculated.
[0139] In one embodiment, the management server 401 may further include a distributed scheduling module. The main functions of the distributed scheduling module include:
[0140] (1) Task scheduling. A large offline task is split into multiple subtasks based on the idle computing resources of each edge server used to execute the offline task. Each subtask is assigned to an edge server for execution. After each edge server completes the execution of the corresponding subtask, it reports the execution result to the management server 401. The management server summarizes the reported execution results to obtain the final execution result.
[0141] (2) Abnormal edge server management. When an edge server encounters abnormalities such as real-time computing exceptions, disconnection, or computing timeout, it is discovered in time and the offline tasks are dispatched to other edge servers for execution.
[0142] In one embodiment, the management server 401 may also include a cloud application instance scheduling module, which is used to dynamically allocate cloud application instances based on the computing resources of each edge server and the node computing resources of each edge computing node to avoid overload of a single edge server.
[0143] In the above-described business processing system, when the management server receives an offline task to be executed, it first evaluates the first computing resources required to execute the offline task. Furthermore, it obtains N edge servers for executing the offline task, where the idle computing resources of these N edge servers are greater than the first computing resources required to execute the offline task. The idle computing resources of the N edge servers refer to the sum of the idle computing resources of each edge server. The offline task is then distributedly dispatched to the N edge servers.
[0144] After any one of the N edge servers receives an offline task distributedly scheduled by the management server, it uses its idle computing resources to execute the offline task while ensuring the normal operation of the cloud application. This ensures the normal operation of the cloud application during both peak and off-peak periods, while also utilizing the idle computing resources of the edge server to execute the distributed offline task. This avoids wasting computing resources in the edge server, improves computing resource utilization, and thus reduces the operating costs of the edge server.
[0145] In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, which facilitates the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is realized. This distributed execution method can not only ensure the execution progress of offline tasks, but also share the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server.
[0146] Based on the above-mentioned embodiment of the service processing method, the embodiment of the present invention provides a service processing device. Figure 5, which is a structural diagram of a business processing device provided by an embodiment of the present invention. Figure 5 The service processing device shown can run the following units:
[0147] A determining unit 501 is configured to determine a first computing resource required to perform an offline task;
[0148] The determining unit 501 is further configured to determine N edge servers for executing the offline task, wherein the N edge servers have cloud applications running thereon; the idle computing resources of the N edge servers are greater than the first computing resources, and the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, where N is an integer greater than or equal to 1;
[0149] The scheduling unit 502 is used to distribute the offline business to the N edge servers so that each of the N edge servers uses the idle computing resources in each edge server to perform the offline task while ensuring the normal operation of the cloud application.
[0150] In one embodiment, the scheduling unit 502 performs the following steps when distributing and scheduling the offline service to the N edge servers:
[0151] Based on the idle computing resources of each edge server in the N edge servers, the offline task is divided into N subtasks, each of the N subtasks is matched with an edge server; the idle computing resources of the edge server matching each subtask are greater than the computing resources required to execute each subtask; each subtask is respectively assigned to the edge server matching each subtask, so that each edge server executes the matching subtask.
[0152] In one embodiment, the cloud application is deployed to M edge servers for execution, and the M edge servers are distributed to P edge computing nodes. Each edge computing node is deployed with one or more edge servers, and M and P are both integers greater than or equal to 1. When determining the N edge servers for executing the offline task, the determining unit 501 performs the following steps:
[0153] Selecting L edge computing nodes from the P edge computing nodes, wherein the node idle computing resources of the L edge computing nodes are greater than the first computing resources, and the node idle computing resources of the L edge computing nodes refer to the sum of the node idle computing resources of each edge computing node; the node idle computing resources of each edge node are obtained based on the idle computing resources of the edge server deployed in each edge node;
[0154] Based on the attribute information of each edge server included in the L edge computing nodes, at least one candidate edge server is determined from the edge servers included in the L edge computing nodes; and according to the idle computing resources of each edge server in the at least one candidate edge server and the first computing resources, N edge servers are determined from the at least one candidate edge server.
[0155] In one embodiment, the attribute information of each edge server includes a working state of each edge server, where the working state includes an idle state or a busy state. When determining at least one candidate edge server from the edge servers included in the L edge computing nodes, the determining unit 501 performs the following steps:
[0156] An edge server in an idle state among the edge servers included in the L edge computing nodes is determined as a candidate edge server.
[0157] In one embodiment, the attribute information of each edge server includes a server type group to which each edge server belongs, and the server type group includes a preset whitelist group and a common group. Based on the attribute information of each edge server included in the L edge computing nodes, the determining unit 501 performs the following steps when determining at least one candidate edge server from the edge servers included in the L edge computing nodes:
[0158] Among the edge servers included in the L edge computing nodes, edge servers whose server types are grouped into a common group are determined as candidate edge servers.
[0159] In one embodiment, the business processing device also includes a processing unit 503, which is used to: monitor the execution of the matching subtask by each edge server during the execution of the matching subtask by each edge server; if it is monitored that an exception occurs in any one of the N edge servers when executing the matching subtask, then reselect an edge server to execute the matching subtask of any one of the edge servers.
[0160] In one embodiment, a subtask corresponds to an execution time threshold, and the business processing device also includes a receiving unit 504, which is used to receive a timeout prompt information reported by any edge server during the process of each edge server executing a matching subtask. The timeout prompt information is used to indicate that the time required for any edge server to complete the matching subtask is greater than the execution time threshold corresponding to the matching subtask, and a new edge server needs to be reallocated to execute the matching subtask of any edge server.
[0161] In one embodiment, the first computing power resources include any one or more of the following: graphics processor computing power resources, central processing unit computing power resources, memory, network bandwidth, and network throughput; wherein the graphics processor computing power resources include at least one of the following: the number of floating-point operations performed by the graphics processor per second and the number of operations performed by the graphics processor each time; the central processing unit computing power resources include at least one of the following: the number of floating-point operations performed by the central processing unit per second and the number of operations performed by the central processing unit per second.
[0162] In one embodiment, the determining unit performs the following steps when determining the first computing resources required to perform the offline task:
[0163] Based on the correspondence between task type and computational complexity, determine the computational complexity corresponding to the task type of the offline task; search for at least one matching historical offline task from the historical offline tasks according to the determined computational complexity, and the computational complexity corresponding to each matching historical offline task matches the determined computational complexity; estimate the computing power resources required for the offline task based on the computing power resources used to execute each matching historical offline task, and obtain the first computing power resources required to execute the offline task.
[0164] According to one embodiment of the present invention, Figure 2 The steps involved in the business processing method shown can be Figure 5 The various units in the business processing device shown are executed. For example, Figure 2 The steps S201 and S202 can be performed by Figure 5 The determining unit 501 in the service processing device shown in FIG. 1 is executed, and step S203 can be performed by Figure 5 The scheduling unit 502 in the service processing device shown is executed.
[0165] According to another embodiment of the present invention, Figure 5 The various units in the business processing device shown can be individually or all combined into one or several other units to form a whole, or one (or some) of the units can be further divided into multiple functionally smaller units to form a whole, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present invention, other units can also be included based on the business processing device. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0166] According to another embodiment of the present invention, the program can be executed by running a program on a general-purpose computing device such as a computer including a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), and other processing elements and storage elements. Figure 2 A computer program (including program code) for each step of the corresponding method shown in FIG. Figure 5 The business processing device shown in and the business processing method of the embodiment of the present invention are implemented. The computer program can be recorded on, for example, a computer storage medium, and loaded into the above-mentioned node device through the computer storage medium and run therein.
[0167] In an embodiment of the present invention, after receiving an offline task to be executed, the first computing power resources required to execute the offline task are first evaluated. Further, N edge servers for executing the offline task are obtained. The idle computing power resources of these N edge servers are greater than the first computing power resources required to execute the offline task. The idle computing power resources of the N edge servers refer to the sum of the idle computing power resources of each edge server. The offline task is distributed and dispatched to the N edge servers so that each of the N edge servers uses the idle computing power resources of each edge server to execute the offline task while ensuring the normal operation of the cloud application. In this way, whether in the peak period or non-peak period of the cloud application, the normal operation of the cloud application can be guaranteed, and the idle computing power resources in each edge server can also be used to execute the offline task, thereby avoiding the waste of computing power resources in each edge server, improving the utilization rate of computing power resources, and thus reducing the operating costs of the edge servers. In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, which facilitates the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is realized. This distributed execution method can not only ensure the execution progress of offline tasks, but also share the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server.
[0168] Based on the above embodiments of the service processing method and the service processing device, the present invention also provides another service processing device. Figure 6 , which is a structural diagram of another business processing device provided by an embodiment of the present invention. Figure 6 The service processing device shown can run the following units:
[0169] A receiving unit 601 is configured to receive a distributed offline task distributedly scheduled by a management server, wherein the distributed offline task includes an offline task received by the management server, or the distributed offline task includes a subtask matching an edge server among N subtasks, wherein the N subtasks are obtained by segmenting the offline task based on idle computing resources of each of the N edge servers; the N edge servers are configured to execute the offline task, and cloud applications are running on the N edge servers;
[0170] The execution unit 602 is configured to execute the distributed offline task using idle computing resources in the edge server while ensuring the normal execution of the target cloud application.
[0171] In one embodiment, the distributed offline task corresponds to an execution time threshold. When the execution unit 602 uses the idle computing resources in the edge server to execute the distributed offline task, the execution unit 602 performs the following steps:
[0172] The time required to complete the distributed offline task is determined based on the idle computing resources of the edge server; if the required time is less than the execution time threshold corresponding to the distributed offline task, the idle computing resources of the edge server are used to execute the distributed offline task.
[0173] In one embodiment, the idle computing resources of the edge server refer to the remaining computing resources of the edge server except the second computing resources required to run the cloud application; the business processing device further includes an acquisition unit 603;
[0174] The acquiring unit 603 is configured to acquire a retention time of the distributed offline task in the edge server when it is monitored that the resources required to run the cloud application in the edge server are greater than the second computing resources during the execution of the distributed offline task;
[0175] The execution unit 602 is configured to perform a computing power release operation based on the relationship between the stay duration and the execution duration threshold; wherein the computing power release operation includes suspending execution of the distributed offline task or terminating execution of the distributed offline task; if the time difference between the stay duration and the execution duration threshold is greater than a time difference threshold, the computing power release operation includes suspending execution of the distributed offline task; if the time difference between the stay duration and the execution duration threshold is less than the time difference threshold, the computing power release operation includes terminating execution of the distributed offline task.
[0176] In one embodiment, if the computing power release operation includes suspending the execution of the distributed offline task, the execution unit 602 is also used to: regularly detect the idle computing power resources of the edge server; if the idle computing power resources of the edge server are greater than the first computing power resources, start executing the distributed offline task; if the idle computing power resources of the edge server are less than the first computing power resources, and the difference between the residence time of the distributed offline task in the edge server and the execution time threshold is less than the time difference threshold, terminate the execution of the distributed offline task.
[0177] In one embodiment, the business processing device further includes a sending unit 604, which is used to send a timeout prompt message to the management server if it is predicted that the time required for the edge server to complete the distributed offline task is longer than the execution time threshold during the process of the edge server executing the distributed offline task. The timeout prompt message is used to indicate that the time required for the edge server to complete the distributed offline task is longer than the execution time threshold, and the management server needs to reallocate a new edge server to execute the distributed offline task.
[0178] According to one embodiment of the present invention, Figure 3 The steps involved in the business processing method shown can be Figure 6 The various units in the business processing device shown are executed. For example, Figure 3 The step S301 can be performed by Figure 6 The receiving unit 601 in the service processing device shown in FIG. 1 is executed, and step S302 can be performed by Figure 6 The execution unit 602 in the business processing device shown is used for execution.
[0179] According to another embodiment of the present invention, Figure 6 The various units in the business processing device shown can be individually or all combined into one or several other units to form a whole, or one (or some) of the units can be further divided into multiple functionally smaller units to form a whole, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present invention, other units can also be included based on the business processing device. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0180] According to another embodiment of the present invention, the program can be executed by running a program on a general-purpose computing device such as a computer including a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), and other processing elements and storage elements. Figure 3 A computer program (including program code) for each step of the corresponding method shown in FIG. Figure 6 The business processing device shown in and the business processing method of the embodiment of the present invention are implemented. The computer program can be recorded on, for example, a computer storage medium, and loaded into the above-mentioned node device through the computer storage medium and run therein.
[0181] In an embodiment of the present invention, an edge server receives a distributed offline task distributedly scheduled by a management server. The distributed offline task can be an offline task received by the management server, or a subtask among N tasks that matches the edge server. These N subtasks can be obtained by segmenting the offline task based on the idle computing resources of the N edge servers used to execute the offline task. While ensuring the normal operation of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task. In this way, the idle computing resources in the edge server can be used to execute the distributed offline task while ensuring the normal operation of the cloud application, regardless of whether it is during the peak period or the non-peak period of the cloud application, thereby avoiding the waste of computing resources in the edge server, improving the utilization rate of computing resources, and thus reducing the operating costs of the edge server.
[0182] Based on the above method embodiment and device embodiment, the embodiment of the present invention provides a server, see Figure 7 , which is a structural diagram of a server provided by an embodiment of the present invention. Figure 7 The server shown may correspond to the aforementioned management server, Figure 7 The server shown may include a processor 701, an input interface 702, an output interface 703, and a computer storage medium 704. The processor 701, the input interface 702, the output interface 703, and the computer storage medium 704 may be connected via a bus or other means.
[0183] The computer storage medium 704 can be stored in the memory of the server. The computer storage medium 704 is used to store computer programs, and the processor 701 is used to execute the computer programs stored in the computer storage medium 904. The processor 701 (also known as the CPU (Central Processing Unit)) is the computing core and control core of the server. It is suitable for implementing one or more computer programs, specifically for loading and executing:
[0184] Determine a first computing resource required to perform an offline task; determine N edge servers for performing the offline task, wherein a cloud application is running on the N edge servers; the idle computing resources of the N edge servers are greater than the first computing resources, and the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, where N is an integer greater than or equal to 1; and distribute the offline task to the N edge servers so that each of the N edge servers uses the idle computing resources of each edge server to perform the offline business while ensuring the normal operation of the cloud application.
[0185] In an embodiment of the present invention, after receiving an offline task to be executed, the first computing power resources required to execute the offline task are first evaluated. Further, N edge servers for executing the offline task are obtained. The idle computing power resources of these N edge servers are greater than the first computing power resources required to execute the offline task. The idle computing power resources of the N edge servers refer to the sum of the idle computing power resources of each edge server. The offline task is distributed and dispatched to the N edge servers so that each of the N edge servers uses the idle computing power resources of each edge server to execute the offline task while ensuring the normal operation of the cloud application. In this way, whether in the peak period or non-peak period of the cloud application, the normal operation of the cloud application can be guaranteed, and the idle computing power resources in each edge server can also be used to execute the offline task, thereby avoiding the waste of computing power resources in each edge server, improving the utilization rate of computing power resources, and thus reducing the operating costs of the edge servers. In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, which facilitates the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is realized. This distributed execution method can not only ensure the execution progress of offline tasks, but also share the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server.
[0186] Based on the above method embodiment and device embodiment, the embodiment of the present invention provides another server, see Figure 8 , which is a structural diagram of another server provided by an embodiment of the present invention, Figure 8 The servers shown may correspond to the aforementioned edge servers. Figure 8 The server shown may include a processor 801, an input interface 802, an output interface 803, and a computer storage medium 804. The processor 801, the input interface 802, the output interface 803, and the computer storage medium 804 may be connected via a bus or other means.
[0187] The computer storage medium 804 can be stored in the terminal's memory. The computer storage medium 904 is used to store computer programs, and the processor 801 is used to execute the computer programs stored in the computer storage medium 904. The processor 801 (or CPU (Central Processing Unit)) is the computing core and control core of the terminal. It is suitable for implementing one or more computer programs, specifically for loading and executing:
[0188] Receiving a distributed offline task distributedly scheduled by a management server, the distributed offline task including the offline task received by the management server; or the distributed offline task including a subtask matching the edge server among N subtasks, the N subtasks being obtained by segmenting the offline task based on idle computing resources of each of the N edge servers;
[0189] While ensuring the normal execution of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task.
[0190] In an embodiment of the present invention, an edge server receives a distributed offline task distributedly scheduled by a management server. The distributed offline task can be an offline task received by the management server, or a subtask among N tasks that matches the edge server. These N subtasks can be obtained by segmenting the offline task based on the idle computing resources of the N edge servers used to execute the offline task. While ensuring the normal operation of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task. In this way, the idle computing resources in the edge server can be used to execute the distributed offline task while ensuring the normal operation of the cloud application, regardless of whether it is during the peak period or the non-peak period of the cloud application, thereby avoiding the waste of computing resources in the edge server, improving the utilization rate of computing resources, and thus reducing the operating costs of the edge server.
[0191] An embodiment of the present invention also provides a computer storage medium (Memory), which is a memory device of the server for storing programs and data. It is understandable that the computer storage medium here can include both the built-in storage medium of the server and, of course, the extended storage medium supported by the server. The computer storage medium provides a storage space, which stores the operating system of the server. In addition, a computer program suitable for being loaded and executed by the processor 801 or the processor 901 is also stored in the storage space. It should be noted that the computer storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.
[0192] In one embodiment, the computer program stored in the computer storage medium can be loaded and executed by the processor 801:
[0193] Determine a first computing resource required to perform an offline task; determine N edge servers for performing the offline task, wherein a cloud application is running on the N edge servers; the idle computing resources of the N edge servers are greater than the first computing resources, and the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, where N is an integer greater than or equal to 1; and distribute the offline task to the N edge servers so that each of the N edge servers uses the idle computing resources of each edge server to perform the offline business while ensuring the normal operation of the cloud application.
[0194] In one embodiment, the processor 801 performs the following steps when distributing and dispatching the offline service to the N edge servers:
[0195] Based on the idle computing resources of each edge server in the N edge servers, the offline task is divided into N subtasks, each of the N subtasks is matched with an edge server; the idle computing resources of the edge server matching each subtask are greater than the computing resources required to execute each subtask; each subtask is respectively assigned to the edge server matching each subtask, so that each edge server executes the matching subtask.
[0196] In one embodiment, the cloud application is deployed to M edge servers for execution, and the M edge servers are distributed to P edge computing nodes. Each edge computing node is deployed with one or more edge servers, and M and P are both integers greater than or equal to 1. When determining the N edge servers for executing the offline task, the processor 801 performs the following steps:
[0197] Selecting L edge computing nodes from the P edge computing nodes, wherein the node idle computing resources of the L edge computing nodes are greater than the first computing resources, and the node idle computing resources of the L edge computing nodes refer to the sum of the node idle computing resources of each edge computing node; the node idle computing resources of each edge node are obtained based on the idle computing resources of the edge server deployed in each edge node;
[0198] Determine at least one candidate edge server from the edge servers included in the L edge computing nodes based on attribute information of each edge server included in the L edge computing nodes;
[0199] N edge servers are determined from the at least one candidate edge server according to the idle computing resources of each edge server in the at least one candidate edge server and the first computing resources.
[0200] In one embodiment, the attribute information of each edge server includes the working status of each edge server, and the working status includes an idle state or a busy state. The attribute information of each edge server included in the L edge computing nodes is based on the attribute information of each edge server; when the processor 801 determines at least one candidate edge server from the edge servers included in the L edge computing nodes, it performs the following steps: determining the edge server in the idle state among the edge servers included in the L edge computing nodes as a candidate edge server.
[0201] In one embodiment, the attribute information of each edge server includes a server type group to which each edge server belongs, and the server type group includes a preset whitelist group and a general group. Based on the attribute information of each edge server included in the L edge computing nodes, the processor 801 performs the following steps when determining at least one candidate edge server from the edge servers included in the L edge computing nodes: determining the edge servers included in the L edge computing nodes, whose server type group is a general group, as candidate edge servers.
[0202] In one embodiment, the processor 801 is further used to: monitor the execution of the matching subtask by each edge server during the execution of the matching subtask by each edge server; if it is monitored that an exception occurs in any one of the N edge servers when executing the matching subtask, then reselect an edge server to execute the matching subtask of the any one edge server.
[0203] In one embodiment, a subtask corresponds to an execution time threshold, and the processor 801 is further used to: receive a timeout prompt information reported by any edge server during the process of each edge server executing a matching subtask, and the timeout prompt information is used to indicate that the time required for any edge server to complete the matching subtask is greater than the execution time threshold corresponding to the matching subtask, and a new edge server needs to be reallocated to execute the matching subtask of any edge server.
[0204] In one embodiment, the first computing power resources include any one or more of the following: graphics processor computing power resources, central processing unit computing power resources, memory, network bandwidth, and network throughput; wherein the graphics processor computing power resources include at least one of the following: the number of floating-point operations performed by the graphics processor per second and the number of operations performed by the graphics processor each time; the central processing unit computing power resources include at least one of the following: the number of floating-point operations performed by the central processing unit per second and the number of operations performed by the central processing unit per second.
[0205] In one embodiment, when determining the first computing power resources required to execute an offline task, the processor 801 performs the following steps: determining the computing complexity corresponding to the task type of the offline task based on the correspondence between the task type and the computing complexity; searching for at least one matching historical offline task from historical offline tasks according to the determined computing complexity, wherein the computing complexity corresponding to each matching historical offline task matches the determined computing complexity; estimating the computing power resources required for the offline task based on the computing power resources used to execute each matching historical offline task, and obtaining the first computing power resources required to execute the offline task.
[0206] In an embodiment of the present invention, after receiving an offline task to be executed, the first computing power resources required to execute the offline task are first evaluated. Further, N edge servers for executing the offline task are obtained. The idle computing power resources of these N edge servers are greater than the first computing power resources required to execute the offline task. The idle computing power resources of the N edge servers refer to the sum of the idle computing power resources of each edge server. The offline task is distributed and dispatched to the N edge servers so that each of the N edge servers uses the idle computing power resources of each edge server to execute the offline task while ensuring the normal operation of the cloud application. In this way, whether in the peak period or non-peak period of the cloud application, the normal operation of the cloud application can be guaranteed, and the idle computing power resources in each edge server can also be used to execute the offline task, thereby avoiding the waste of computing power resources in each edge server, improving the utilization rate of computing power resources, and thus reducing the operating costs of the edge servers. In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, which facilitates the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is realized. This distributed execution method can not only ensure the execution progress of offline tasks, but also share the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server.
[0207] In one embodiment, the computer program stored in the computer storage medium may be loaded and executed by the processor 901:
[0208] Receive a distributed offline task distributedly scheduled by a management server, where the distributed offline task includes the offline task received by the management server; or, the distributed offline task includes a subtask that matches the edge server among N subtasks, where the N subtasks are obtained by segmenting the offline task based on the idle computing resources of each of the N edge servers; and execute the distributed offline task using the idle computing resources of the edge server while ensuring the normal execution of the cloud application.
[0209] In one embodiment, the distributed offline task corresponds to an execution time threshold. When the processor 901 uses the idle computing resources of the edge server to execute the distributed offline task, the processor 901 performs the following steps:
[0210] The time required to complete the distributed offline task is determined based on the idle computing resources of the edge server; if the required time is less than the execution time threshold corresponding to the distributed offline task, the idle computing resources of the edge server are used to execute the distributed offline task.
[0211] In one embodiment, the idle computing resources of the edge server refer to the remaining computing resources of the edge server other than the second computing resources required to run the cloud application; the processor 901 is further configured to execute:
[0212] During the execution of the distributed offline task, when it is monitored that the resources required to run the cloud application in the edge server are greater than the second computing resources, obtaining a stay time of the distributed offline task in the edge server;
[0213] A computing power release operation is performed based on the relationship between the stay duration and the execution duration threshold; wherein the computing power release operation includes suspending execution of the distributed offline task or terminating execution of the distributed offline task; if the time difference between the stay duration and the execution duration threshold is greater than a time difference threshold, the computing power release operation includes suspending execution of the distributed offline task; if the time difference between the stay duration and the execution duration threshold is less than the time difference threshold, the computing power release operation includes terminating execution of the distributed offline task.
[0214] In one embodiment, the computing power release operation includes suspending execution of the distributed offline task. After executing the computing power release operation, the processor 901 is further configured to execute:
[0215] Regularly detect the idle computing resources of the edge server; if the idle computing resources of the edge server are greater than the first computing resources, start executing the distributed offline task; if the idle computing resources of the edge server are less than the first computing resources, and the difference between the residence time of the distributed offline task in the edge server and the execution time threshold is less than the time difference threshold, terminate the execution of the distributed offline task.
[0216] In one embodiment, the processor 901 is further configured to: during the process of the edge server executing the distributed offline task, if it is predicted that the time required for the edge server to complete the distributed offline task is longer than the execution time threshold, send a timeout prompt message to the management server, where the timeout prompt message is used to indicate that the time required for the edge server to complete the distributed offline task is longer than the execution time threshold, and the management server needs to reallocate a new edge server to execute the distributed offline task.
[0217] In an embodiment of the present invention, an edge server receives a distributed offline task distributedly scheduled by a management server. The distributed offline task can be an offline task received by the management server, or a subtask among N tasks that matches the edge server. These N subtasks can be obtained by segmenting the offline task based on the idle computing resources of the N edge servers used to execute the offline task. While ensuring the normal operation of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task. In this way, the idle computing resources in the edge server can be used to execute the distributed offline task while ensuring the normal operation of the cloud application, regardless of whether it is during the peak period or the non-peak period of the cloud application, thereby avoiding the waste of computing resources in the edge server, improving the utilization rate of computing resources, and thus reducing the operating costs of the edge server.
[0218] According to one aspect of the present application, an embodiment of the present invention further provides a computer product or a computer program. The computer product includes a computer program, and the computer program is stored in a computer storage medium.
[0219] Optionally, the processor 801 reads a computer program from a computing storage medium, so that the server loads and executes: determining a first computing power resource required to perform an offline task; determining N edge servers for performing the offline task, wherein a cloud application is running on the N edge servers; the idle computing power resources of the N edge servers are greater than the first computing power resources, and the idle computing power resources of the N edge servers refer to the sum of the idle computing power resources of each edge server in the N edge servers, where N is an integer greater than or equal to 1; and distributively scheduling the offline task to the N edge servers, so that each edge server in the N edge servers uses the idle computing power resources of each edge server to perform the offline business while ensuring the normal operation of the cloud application.
[0220] In an embodiment of the present invention, after receiving an offline task to be executed, the first computing power resources required to execute the offline task are first evaluated. Further, N edge servers for executing the offline task are obtained. The idle computing power resources of these N edge servers are greater than the first computing power resources required to execute the offline task. The idle computing power resources of the N edge servers refer to the sum of the idle computing power resources of each edge server. The offline task is distributed and dispatched to the N edge servers so that each of the N edge servers uses the idle computing power resources of each edge server to execute the offline task while ensuring the normal operation of the cloud application. In this way, whether in the peak period or non-peak period of the cloud application, the normal operation of the cloud application can be guaranteed, and the idle computing power resources in each edge server can also be used to execute the offline task, thereby avoiding the waste of computing power resources in each edge server, improving the utilization rate of computing power resources, and thus reducing the operating costs of the edge servers. In addition, N can be 1 or greater than 1. When N is 1, the centralized execution of offline tasks can be guaranteed, which facilitates the execution and management of offline tasks. When N is greater than 1, the distributed execution of offline tasks is realized. This distributed execution method can not only ensure the execution progress of offline tasks, but also share the load of each edge server, thereby ensuring the normal operation of cloud applications in each edge server.
[0221] Optionally, the processor 901 reads a computer program from a computer storage medium, and the processor 901 executes the computer program, causing the server to execute:
[0222] Receive a distributed offline task distributedly scheduled by a management server, where the distributed offline task includes the offline task received by the management server; or, the distributed offline task includes a subtask that matches the edge server among N subtasks, where the N subtasks are obtained by segmenting the offline task based on the idle computing resources of each of the N edge servers; and execute the distributed offline task using the idle computing resources of the edge server while ensuring the normal execution of the cloud application.
[0223] In an embodiment of the present invention, an edge server receives a distributed offline task distributedly scheduled by a management server. The distributed offline task can be an offline task received by the management server, or a subtask among N tasks that matches the edge server. These N subtasks can be obtained by segmenting the offline task based on the idle computing resources of the N edge servers used to execute the offline task. While ensuring the normal operation of the cloud application, the idle computing resources of the edge server are used to execute the distributed offline task. In this way, the idle computing resources in the edge server can be used to execute the distributed offline task while ensuring the normal operation of the cloud application, regardless of whether it is during the peak period or the non-peak period of the cloud application, thereby avoiding the waste of computing resources in the edge server, improving the utilization rate of computing resources, and thus reducing the operating costs of the edge server.
Claims
1. A business processing method, characterized in that: include: Determine the primary computing resources required to execute offline tasks; Determining N edge servers for executing the offline task, where cloud applications are running on the N edge servers; idle computing resources of the N edge servers are greater than the first computing resources, where the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1; Distributedly dispatching the offline task to the N edge servers, so that each of the N edge servers uses idle computing resources of each edge server to execute the offline service while ensuring the normal operation of the cloud application; the idle computing resources of any edge server among the N edge servers refer to the remaining computing resources of the edge server except the second computing resources required to run the cloud application; Among them, when any of the edge servers is executing the distributed offline task of the distributed scheduling, if it is monitored that the resources required to run the cloud application are greater than the second computing power resources, the edge server obtains the residence time of the distributed offline task in the edge server, and performs a computing power release operation based on the relationship between the residence time and the execution time threshold corresponding to the distributed offline task.
2. The method according to claim 1, wherein The distributed scheduling of the offline service to the N edge servers includes: Based on the idle computing resources of each edge server in the N edge servers, the offline task is divided into N subtasks, each of the N subtasks is matched with an edge server; the idle computing resources of the edge server matching each subtask are greater than the computing resources required to execute each subtask; Each of the subtasks is respectively assigned to an edge server that matches the subtask, so that each edge server executes the matching subtask.
3. The method according to claim 1, wherein The cloud application is deployed to M edge servers for execution, and the M edge servers are distributed to P edge computing nodes, each edge computing node is deployed with one or more edge servers, where M and P are both integers greater than or equal to 1; The determining of N edge servers for executing the offline task includes: Selecting L edge computing nodes from the P edge computing nodes, wherein the node idle computing resources of the L edge computing nodes are greater than the first computing resources, and the node idle computing resources of the L edge computing nodes refer to the sum of the node idle computing resources of each edge computing node; the node idle computing resources of each edge node are obtained based on the idle computing resources of the edge server deployed in each edge node; Determine at least one candidate edge server from the edge servers included in the L edge computing nodes based on attribute information of each edge server included in the L edge computing nodes; N edge servers are determined from the at least one candidate edge server according to the idle computing resources of each edge server in the at least one candidate edge server and the first computing resources.
4. The method according to claim 3, wherein The attribute information of each edge server includes a working state of each edge server, where the working state includes an idle state or a busy state. The determining, based on the attribute information of each edge server included in the L edge computing nodes, at least one candidate edge server from the edge servers included in the L edge computing nodes includes: An edge server in an idle state among the edge servers included in the L edge computing nodes is determined as a candidate edge server.
5. The method according to claim 3, wherein The attribute information of each edge server includes a server type group to which each edge server belongs, the server type group including a preset whitelist group and a common group, and determining at least one candidate edge server from the edge servers included in the L edge computing nodes based on the attribute information of each edge server included in the L edge computing nodes includes: Among the edge servers included in the L edge computing nodes, edge servers whose server types are grouped into a common group are determined as candidate edge servers.
6. The method according to claim 2, wherein The method further comprises: During the process of each edge server executing the matched subtask, monitoring the execution status of each edge server on the matched subtask; If it is monitored that an exception occurs in any one of the N edge servers when executing a matching subtask, a new edge server is selected to execute the matching subtask of the any one edge server.
7. The method according to claim 2, wherein Each subtask corresponds to an execution time threshold, and the method further includes: During the process of each edge server executing the matched subtask, a timeout prompt information reported by any edge server is received, where the timeout prompt information is used to indicate that the time required for any edge server to complete the matched subtask is longer than the execution time threshold corresponding to the matched subtask, and a new edge server needs to be reallocated to execute the matched subtask of any edge server.
8. The method according to claim 1, wherein The first computing power resources include any one or more of the following: graphics processor computing power resources, central processing unit computing power resources, memory, network bandwidth and network throughput; wherein the graphics processor computing power resources include at least one of the following: the number of floating-point operations performed by the graphics processor per second and the number of operations performed by the graphics processor each time; the central processing unit computing power resources include at least one of the following: the number of floating-point operations performed by the central processing unit per second and the number of operations performed by the central processing unit per second.
9. The method of claim 1, wherein determining the first computing resource required to execute the offline task comprises: Determining the computational complexity corresponding to the task type of the offline task based on the corresponding relationship between the task type and the computational complexity; Searching for at least one matching historical offline task from the historical offline tasks according to the determined computational complexity, wherein the computational complexity corresponding to each matching historical offline task matches the determined computational complexity; The computing resources required for the offline task are estimated based on the computing resources used to execute each matching history offline task, to obtain the first computing resources required to execute the offline task.
10. A business processing method, characterized in that: The service processing method is executed by one edge server among N edge servers for executing offline tasks, wherein a cloud application is running on the N edge servers, and the method includes: Receiving a distributed offline task distributedly scheduled by a management server, the distributed offline task including the offline task received by the management server; or the distributed offline task including a subtask among N subtasks that matches the edge server, the N subtasks being obtained by segmenting the offline task based on idle computing resources of each of the N edge servers; the distributed offline task corresponding to an execution time threshold; Under the condition that the cloud application is executed normally, the idle computing resources of the edge server are used to execute the distributed offline task, where the idle computing resources of the edge server refer to the remaining computing resources of the edge server except the second computing resources required to run the cloud application; During the execution of the distributed offline task, when it is monitored that the resources required to run the cloud application in the edge server are greater than the second computing resources, obtaining a stay time of the distributed offline task in the edge server; A computing power release operation is performed according to the relationship between the stay time and the execution time threshold.
11. The method according to claim 10, wherein The distributed offline task corresponds to an execution time threshold, and the idle computing resources of the edge server are used to execute the distributed offline task, including: Determining the time required to complete the distributed offline task based on the idle computing resources of the edge server; If the required duration is less than the execution duration threshold corresponding to the distributed offline task, the idle computing resources of the edge server are used to execute the distributed offline task.
12. The method according to claim 11, wherein The computing power release operation includes suspending the execution of the distributed offline task or terminating the execution of the distributed offline task; if the time difference between the stay duration and the execution duration threshold is greater than the time difference threshold, the computing power release operation includes suspending the execution of the distributed offline task; if the time difference between the stay duration and the execution duration threshold is less than the time difference threshold, the computing power release operation includes terminating the execution of the distributed offline task.
13. The method according to claim 12, wherein: The computing power release operation includes suspending execution of the distributed offline task. After performing the computing power release operation, the method further includes: Regularly detecting the idle computing resources of the edge server; If the idle computing power resources of the edge server are greater than the first computing power resources, starting to execute the distributed offline task; If the idle computing power resources of the edge server are less than the first computing power resources, and the difference between the residence time of the distributed offline task in the edge server and the execution time threshold is less than the time difference threshold, the execution of the distributed offline task is terminated.
14. The method according to claim 11, wherein The method further comprises: During the process of the edge server executing the distributed offline task, if it is predicted that the time required for the edge server to complete the distributed offline task is longer than the execution time threshold, a timeout prompt message is sent to the management server. The timeout prompt message is used to indicate that the time required for the edge server to complete the distributed offline task is longer than the execution time threshold, and the management server needs to reallocate a new edge server to execute the distributed offline task.
15. A business processing device, characterized in that: include: a determining unit, configured to determine a first computing resource required to execute an offline task; The determining unit is further configured to determine N edge servers for executing the offline task, wherein the N edge servers have cloud applications running thereon; the idle computing resources of the N edge servers are greater than the first computing resources, the idle computing resources of the N edge servers refer to the sum of the idle computing resources of each of the N edge servers, and N is an integer greater than or equal to 1; a scheduling unit, configured to dispatch the offline service to the N edge servers in a distributed manner, so that each of the N edge servers uses idle computing resources in each edge server to perform the offline task while ensuring the normal operation of the cloud application, where the idle computing resources of any one of the N edge servers refer to the remaining computing resources of the edge server except the second computing resources required to run the cloud application; Among them, when any of the edge servers is executing the distributed offline task of the distributed scheduling, if it is monitored that the resources required to run the cloud application are greater than the second computing power resources, the edge server obtains the residence time of the distributed offline task in the edge server, and performs a computing power release operation based on the relationship between the residence time and the execution time threshold corresponding to the distributed offline task.
16. A business processing device, characterized in that: include: A receiving unit, configured to receive a distributed offline task distributedly scheduled by a management server, wherein the distributed offline task includes an offline task received by the management server, or the distributed offline task includes a subtask matching an edge server among N subtasks, wherein the N subtasks are obtained by segmenting the offline task based on idle computing resources of each of the N edge servers; the N edge servers are configured to execute the offline task, and cloud applications are running on the N edge servers; and the distributed offline task corresponds to an execution time threshold; an execution unit, configured to execute the distributed offline task using idle computing resources in the edge server while ensuring normal execution of the target cloud application, where the idle computing resources of the edge server refer to the remaining computing resources of the edge server other than the second computing resources required to run the cloud application; an acquiring unit, configured to, during the execution of the distributed offline task, acquire a retention time of the distributed offline task in the edge server when it is monitored that the resources required for running the cloud application in the edge server are greater than the second computing resources; The execution unit is further configured to execute a computing power release operation based on a relationship between the stay time and the execution time threshold.
17. A computer storage medium, characterized in that The computer storage medium stores a computer program, which, when executed by a processor, is used to execute the business processing method according to any one of claims 1 to 9; or, the computer program, when executed by a processor, is used to execute the business processing method according to any one of claims 10 to 14.
18. A server, characterized in that: The server includes a processor and a computer storage medium, wherein: The computer storage medium is used to store computer programs; The processor is configured to load and execute the computer program to execute the service processing method according to any one of claims 1 to 9; or to execute the service processing method according to any one of claims 10 to 14.
19. A computer product, characterized in that The computer product includes a computer program, which is stored in a computer storage medium and is suitable for being loaded and executed by a processor to implement the business processing method according to any one of claims 1 to 9; or, to implement the business processing method according to any one of claims 10 to 14.
Citation Information
Patent Citations
Offline application-based resource control method, system, equipment and storage medium
CN110362410A
Business processing method and device and storage medium
CN113018871A
Server resource allocation method and device, storage medium and electronic device
CN113157418A