Operation resource allocation method and device, computer equipment, readable storage medium and program product
Through the screening and allocation of computing resource allocation prediction model, the fragmentation problem of computing power resource allocation in cloud computing is solved, the resource utilization rate and acquisition accuracy are improved, and the existence of fragmented resources is reduced.
Patent Information
- Application Number
- CN202411127256.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-13
AI Technical Summary
In the existing cloud computing technology, there is fragmented waste in the allocation of computing power resources, resulting in low utilization rate of computing resources and inability to effectively meet user needs.
Through the calculation resource allocation prediction model, we predict the allocation flow direction and allocation capacity of each initial calculation resource at the target request time, filter out the appropriate calculation resources to be allocated, and determine the target calculation resources based on the calculation resource request type and required capacity, and carry out resources in advance Allocate to reduce fragmented resources.
It improves the utilization rate of computing resources, improves the accuracy and efficiency of acquisition of target computing resources, reduces the possibility of providing unsatisfactory capacity, and avoids the existence of fragmented resources.
Smart Images

Figure CN119127469A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing, and in particular to a computing resource allocation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of Internet technology, the concept of cloud computing has been proposed, and more and more industries and users have joined in. By establishing a computing power pool, users do not need to configure local computing devices when they need to perform large amounts of calculations. By sending a calculation instance allocation request, the cloud computing power pool will allocate and schedule the corresponding computing power for the user's calculation, thereby solving the user's computing power configuration problem.
[0003] In related technologies, how to rationally allocate computing power is a problem that needs to be solved. Currently, the concept of elastic resource allocation is proposed to achieve elastic scheduling of computing power. However, in actual operation, computing power is encapsulated through different containers. When scheduling computing power, the computing power margin in a certain container is often insufficient to support user needs, resulting in fragmented computing power waste, resulting in low computing resource utilization in related technologies. Summary of the invention
[0004] Based on this, it is necessary to provide a computing resource allocation method, device, computer equipment, computer-readable storage medium and computer program product that can improve resource utilization in response to the above technical problems.
[0005] In a first aspect, the present application provides a computing resource allocation method, comprising:
[0006] Obtaining a computing resource acquisition request, the computing resource acquisition request carrying a computing resource request type, a required computing resource capacity, and a target request time;
[0007] Obtaining initial computing resources;
[0008] Inputting the target request time and the initial computing resources into the computing resource allocation prediction model to obtain each predicted allocation flow direction corresponding to each of the initial computing resources and each predicted allocation capacity corresponding to each predicted allocation flow direction;
[0009] Using the computing resource request type and each predicted allocation flow, the computing resources to be allocated are screened out from each initial computing resource;
[0010] The target computing resources are determined based on the predicted allocation capacity corresponding to the computing resources to be allocated and the required capacity of the computing resources.
[0011] In one embodiment, after determining the target computing resources, the computing resource allocation method includes: obtaining a first real-time operating parameter of the target computing resource; when the first real-time operating parameter exceeds a preset operating parameter, obtaining a current computing task corresponding to the target computing resource; determining a priority of the current computing task based on a task type and a user identifier included in the current computing task; and processing the current computing task based on the priority of the current computing task and the target computing resource.
[0012] In one of the embodiments, the current computing task is processed according to the priority of the current computing task and the target computing resources, including: obtaining the remaining computing margin corresponding to the target computing resources; determining the target current computing task according to the remaining computing margin, the priority of the current computing task and the computing demand corresponding to the current computing task; and processing the target current computing task.
[0013] In one embodiment, after determining the target current computing task, the computing resource allocation method includes: when there are other current computing tasks, obtaining the second real-time operating parameters of other computing resources except the target computing resources; and processing the other current computing tasks according to the second real-time operating parameters and the computing capacity corresponding to the other current computing tasks.
[0014] In one of the embodiments, a target computing resource is determined based on a predicted allocation capacity corresponding to the computing resources to be allocated and a required capacity of the computing resources, including: selecting intermediate computing resources from the computing resources to be allocated, wherein the predicted allocation capacity corresponding to the intermediate computing resources is greater than or equal to the required capacity of the computing resources; obtaining distance information between the intermediate computing resources and a terminal sending a computing resource acquisition request; and determining the target computing resource from the intermediate computing resources based on the distance information.
[0015] In one embodiment, before inputting the target request time into the computing resource allocation prediction model, the computing resource allocation method also includes: obtaining sample data, the sample data including the historical allocation flow of computing resources, the historical allocation capacity corresponding to the historical allocation flow, and the historical allocation time; using the historical allocation flow of computing resources, the historical allocation capacity corresponding to the historical allocation flow, and the historical allocation time to train a neural network to generate a computing resource allocation prediction model.
[0016] In a second aspect, the present application further provides a computing resource allocation device, comprising:
[0017] A request acquisition module is used to acquire a computing resource acquisition request, wherein the computing resource acquisition request carries a computing resource request type, a required computing resource capacity, and a target request time;
[0018] An initial resource acquisition module, used to acquire various initial computing resources;
[0019] An allocation prediction module is used to input the target request time and the initial computing resources into the computing resource allocation prediction model to obtain each predicted allocation flow direction corresponding to each initial computing resource and each predicted allocation capacity corresponding to each predicted allocation flow direction;
[0020] A screening module, used to screen out the computing resources to be allocated from the initial computing resources by using the computing resource request type and the predicted allocation directions;
[0021] The computing resource determination module is used to determine the target computing resources according to the predicted allocation capacity corresponding to the computing resources to be allocated and the required capacity of the computing resources.
[0022] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.
[0023] In a fourth aspect, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method embodiments are implemented.
[0024] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned method embodiments when executed by a processor.
[0025] The above-mentioned computing resource allocation method, device, computer equipment, computer-readable storage medium and computer program product, in the above-mentioned computing resource allocation method, the computing resource allocation prediction model is used to predict the allocation flow direction of each initial computing resource at the target request time and the allocation capacity corresponding to the allocation flow direction, so that the initial computing resources can be allocated in advance, and when the computing resource acquisition request is received, the target computing resources can be determined according to the computing resources allocated in advance, thereby improving the data processing efficiency. Further, based on the predicted allocation flow direction of each initial computing resource at the target request time and the allocation capacity corresponding to each predicted allocation flow direction, combined with the computing resource request type and the computing resource required capacity carried in the computing resource acquisition request, the target computing resource is determined, and the target computing resource is determined based on the computing resource required capacity and the computing resource request type carried in the computing resource acquisition request, which can effectively improve the accuracy of the target computing resource acquisition, and the determination of the target computing resource is based on the advance prediction of the initial computing resource, and the advance planning of computing resources can reduce the possibility of providing computing resources that do not meet the required capacity, reduce the existence of fragmented computing resources, and effectively improve the utilization rate of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 A diagram of an application environment of a computing resource allocation method in an embodiment;
[0028] Figure 2 A schematic diagram of a flow chart of a computing resource allocation method in one embodiment;
[0029] Figure 3 is a flow chart of a computing resource allocation method in another embodiment;
[0030] Figure 4 is a structural block diagram of a computing resource allocation device in one embodiment;
[0031] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] The computing resource allocation method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the computing resource acquisition request sent by the terminal 102, and the computing resource acquisition request carries the computing resource request type, the required capacity of the computing resource and the target request time, obtains each initial computing resource, inputs the target request time and the initial computing resource into the computing resource allocation prediction model, obtains each predicted allocation flow direction corresponding to each initial computing resource, and each predicted allocation capacity corresponding to each predicted allocation flow direction, uses the computing resource request type and each predicted allocation flow direction to filter out the computing resources to be allocated from each initial computing resource, and determines the target computing resource according to the predicted allocation capacity corresponding to the computing resources to be allocated and the required capacity of the computing resources. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0034] In an exemplary embodiment, Figure 2 As shown, a computing resource allocation method is provided, which is applied to Figure 1 The server in the example is used to illustrate, including the following steps 202 to 210. Among them:
[0035] Step 202: Obtain a computing resource acquisition request.
[0036] The computing resource acquisition request is used to request the acquisition of computing resources.
[0037] In one embodiment, the computing resource acquisition request may be initiated by the terminal. For example, when the terminal is performing computing, if the computing capacity of the terminal is insufficient, the terminal may initiate a computing resource acquisition request to the server, so that the server may provide computing resources to the terminal according to the computing resource acquisition request, and the terminal may perform computing according to the computing resources provided by the server.
[0038] In an optional embodiment, the computing resource acquisition request carries the computing resource request type, the required capacity of the computing resource and the target request time.
[0039] The computing resource request type is used to characterize the type of service provided by the requested computing resource. Optionally, the computing resource request type may be generated when the terminal initiates a computing resource acquisition request, and the computing resource request type is encapsulated in the computing resource acquisition request and sent to the server together. After receiving the computing resource acquisition request, the server extracts the computing resource request type from the computing resource acquisition request. Exemplarily, the computing resource request type may be related to the application type of the application that initiates the computing resource acquisition request.
[0040] In one embodiment, the required capacity of computing resources can be automatically acquired by the terminal, and the acquired required capacity of computing resources can be encapsulated in a computing resource acquisition request. After the terminal sends the computing resource acquisition request to the server, the server can extract the required capacity of computing resources from the received computing resource acquisition request.
[0041] In an optional embodiment, the target request time can be determined by a user operating the terminal. The user operates the terminal to determine the target request time, and encapsulates the target request time in a computing resource acquisition request, which is sent by the terminal to the server. After the server obtains the computing resource acquisition request, it extracts the target request time from the computing resource acquisition request. The server can provide the required computing resources to the terminal at the target request time.
[0042] Step 204, obtaining initial computing resources.
[0043] The computing resources are used to provide resources required for cloud computing. Optionally, the computing resources are provided by a service device.
[0044] In one embodiment, there may be multiple service devices that provide computing resources, and the control center can call each service device to achieve the calling and allocation of computing resources.
[0045] In one embodiment, the control center may broadcast a service device acquisition instruction, and after receiving information returned by the service device, generate a topology diagram according to the information returned by the service device, and use the nodes of the topology diagram to represent the service device.
[0046] In one embodiment, the control center can use HPLC technology (low voltage power line high speed carrier communication) to achieve communication connection with each service device in the topology diagram to obtain the operating parameters of each service device, and determine the operating status of the service device through the operating parameters, so that the allocation of computing resources can be adjusted according to the operating status of the service device.
[0047] In an optional embodiment, the control center may periodically send parameter acquisition requests to the initial computing resources in the topology diagram. After the initial computing resources receive the parameter acquisition requests, they report their own operating parameters to the control center. After receiving the operating parameters sent by the computing resources, the control center may determine the operating status of the computing resources based on the operating parameters, for example, determine the resource occupancy rate and remaining available capacity of the computing resources.
[0048] Step 206 , input the target request time and the initial computing resources into the computing resource allocation prediction model to obtain each predicted allocation direction corresponding to each initial computing resource and each predicted allocation capacity corresponding to each predicted allocation direction.
[0049] The computing resource allocation prediction model is used to predict the allocation direction of computing resources at a prediction time point.
[0050] The predicted allocation flow direction is used to characterize the possible allocation direction of the initial computing resources at the target request time, and the allocation direction is used to characterize the usage types of different allocated computing resources.
[0051] The predicted allocation capacity is used to represent the size of the capacity provided by the computing resources in the predicted allocation flow for implementing the calculation.
[0052] In one embodiment, after obtaining a computing resource acquisition request and extracting the target request time from the computing resource acquisition request, the target request time is input into a computing resource allocation prediction model, and the computing resource allocation prediction model predicts the possible allocation direction of each initial computing resource at the target request time and the allocation capacity corresponding to each allocation direction according to the target request time. Thus, each initial computing resource can be allocated in advance according to the predicted allocation direction and the predicted allocation capacity corresponding to the predicted allocation direction, so that the allocated computing resources can be formed into an overall usable form rather than a fragmented form. When determining the target computing resource based on the computing resource acquisition request, the target computing resource can be determined according to the computing resource allocated in advance, which can improve the efficiency of determining the target computing resource and realize the acquisition of complete available computing resources, reduce the possibility of obtaining fragmented computing resources, and improve the utilization rate of computing resources.
[0053] In an optional embodiment, before the target request time is input into the computing resource allocation prediction model, a computing resource allocation prediction model generation method may be included, which may include: obtaining sample data, the sample data including the historical allocation flow of computing resources, the historical allocation capacity corresponding to the historical allocation flow, and the historical allocation time; using the historical allocation flow of computing resources, the historical allocation capacity corresponding to the historical allocation flow, and the historical allocation time to train a neural network to generate a computing resource allocation prediction model.
[0054] Optionally, when the initial computing resources realize the computing resource allocation direction and the allocation capacity corresponding to the allocation flow, the allocation time can be recorded, and the allocation time can be set corresponding to the allocation flow and the allocation capacity corresponding to the allocation flow as historical data. Sample data can be generated based on the historical data to realize the generation of a computing resource allocation prediction model.
[0055] In one embodiment, each time the initial computing resources determine the computing resource allocation direction and the allocation capacity corresponding to the allocation flow, they are recorded to update the sample data so that the generated sample data can effectively ensure the accuracy of the sample data and improve the accuracy of the trained computing resource allocation prediction model, thereby improving the accuracy of predictions made using the computing resource allocation model and improving computing resource utilization.
[0056] Step 208 , using the computing resource request type and each predicted allocation direction, filter out the computing resources to be allocated from each initial computing resource.
[0057] Step 210, determining the target computing resources according to the predicted allocation capacity corresponding to the computing resources to be allocated and the required capacity of the computing resources.
[0058] In one embodiment, after using the computing resource allocation prediction request to predict the predicted allocation directions of each initial computing resource at the target request time, each predicted allocation direction can be matched with the computing resource request type carried in the computing resource acquisition request. When the predicted allocation flow direction matches the computing resource request type, it can be considered that the predicted allocation flow direction is the required allocation flow direction and is the computing resource to be allocated.
[0059] In an optional embodiment, after determining the computing resources to be allocated, the computing resources to be allocated are matched with the required capacity of the computing resources carried in the computing resource acquisition request. When they match, the computing resources to be allocated can be determined to be the target computing resources. Optionally, the matching of the computing resources to be allocated and the required capacity of the computing resources carried in the computing resource acquisition request can be that the remaining available capacity of the computing resources to be allocated is greater than or equal to the required capacity of the computing resources.
[0060] In one embodiment, when there are multiple target computing resources, the final target computing resource can be further determined in combination with other parameters, for example, the failure rate of each target computing resource, and the one with the smallest failure rate is selected as the final target computing resource, or the target computing resource with the largest remaining capacity is determined as the final target computing resource, or the computing resource whose capacity exactly matches the required capacity is selected as the final target computing resource, or the selection is made based on the distance between the target computing resource and the terminal that initiates the computing resource acquisition request. For example, the target computing resource with the shortest distance can be selected as the final target computing resource, or the final target computing resource can be determined in combination with multiple parameters.
[0061] In one of the embodiments, determining the target computing resource based on the predicted allocation capacity corresponding to the computing resources to be allocated and the required capacity of the computing resources can include: screening out intermediate computing resources from the computing resources to be allocated, the predicted allocation capacity corresponding to the intermediate computing resources being greater than or equal to the required capacity of the computing resources, obtaining distance information between the intermediate computing resources and the terminal sending the computing resource acquisition request, and determining the target computing resource from the intermediate computing resources based on the distance information.
[0062] Optionally, the predicted allocation capacity corresponding to the computing resources to be allocated can be matched with the required capacity of the computing resources, and computing resources whose predicted allocation capacity is greater than or equal to the required capacity of the computing resources can be determined from the computing resources to be allocated, and recorded as intermediate computing resources. Computing resources whose predicted allocation capacity is equal to the required capacity of the computing resources can be selected as intermediate computing resources, so that the obtained intermediate computing resources just fit the required capacity of the computing resources, thereby reducing the waste of computing resources and improving the utilization rate of computing resources.
[0063] In one embodiment, when there is only one intermediate computing resource, the intermediate computing resource is used as the target computing resource.
[0064] In one embodiment, when there are multiple intermediate computing resources, the first location information corresponding to the intermediate computing resources and the second location information of the terminal that initiates the computing resource acquisition request can be obtained, and the target computing resource can be determined from the intermediate computing resources based on the first location information and the second location information. For example, the distance between the first location information and the second location information can be calculated, and the computing resource corresponding to the first location information when the distance is the smallest is selected as the target computing resource.
[0065] In one of the embodiments, after determining the target computing resource, a first real-time operating parameter of the target computing resource can also be obtained. When the first real-time operating parameter exceeds the preset operating parameter, the current computing task corresponding to the target computing resource is obtained, and the priority of the current computing task is determined based on the task type and user identifier included in the current computing task. The current computing task is processed based on the priority of the current computing task and the target computing resource.
[0066] The task type is used to characterize the type of the task. Optionally, the task type may be determined by the application type of the application that initiates the computing resource acquisition request.
[0067] The user ID is used to distinguish different users. Optionally, the user may include but is not limited to an individual, a company, etc.
[0068] In one embodiment, after determining the target computing resource, the target computing resource can upload its own first real-time operating parameters, or the server can initiate an operating parameter acquisition instruction to the target computing resource, and after receiving the operating parameter acquisition instruction, the target computing resource sends the first real-time operating parameters to the server. Optionally, the first real-time operating parameters may include, but are not limited to, computing power margin, computing power throughput, computing power peer speed, etc.
[0069] In one of the embodiments, after receiving the first real-time operating parameter, the server matches the first real-time operating parameter with the preset operating parameter. If the first real-time operating parameter exceeds the preset operating parameter, it can be considered that there is a certain risk in the operation of the target computing resource, and an alarm can be issued.
[0070] In one embodiment, when the first real-time operating parameter of the target computing resource exceeds the preset operating parameter, all tasks currently processed by the target computing resource can also be obtained, and the task type and user identifier corresponding to each task can be obtained, and the priority of the task can be determined according to the task type and user identifier, and the target computing resource processes the tasks in sequence according to the priority.
[0071] In one embodiment, after determining the task priority, the processable capacity corresponding to the target computing resource can also be determined, and the amount of tasks that can be processed by the target computing resource can be determined based on the priority and the processable capacity, and the amount of tasks that cannot be processed by the target computing resource can be determined from all currently processed tasks and the processable amount of tasks, and the unprocessable amount of tasks can be redistributed to improve the utilization of computing resources and ensure the processing efficiency of tasks. Optionally, it can include: obtaining the remaining computing margin corresponding to the target computing resource, determining the target current computing task based on the remaining computing margin, the priority of the current computing task, and the computing demand corresponding to the current computing task, and processing the target current computing task.
[0072] Exemplarily, after determining the target current computing task, it is determined whether there are other current computing tasks on the target computing resource. If so, the other current computing tasks can be processed by other computing resources other than the target computing resource. For example, the other computing tasks can be allocated and processed according to the second embodiment operation parameters of the other computing resources. Optionally, it can include: when there are other current computing tasks, obtaining the second real-time operation parameters of other computing resources other than the target computing resource, and processing the other current computing tasks according to the second real-time operation parameters and the computing capacity corresponding to the other current computing tasks.
[0073] In the above-mentioned computing resource allocation method, the computing resource allocation prediction model is used to predict the allocation flow of each initial computing resource at the target request time and the allocation capacity corresponding to the allocation flow, so that the initial computing resources can be allocated in advance. Then, when receiving the computing resource acquisition request, the target computing resource can be determined according to the computing resources allocated in advance, thereby improving the data processing efficiency. Further, based on the predicted allocation flow of each initial computing resource at the target request time and the allocation capacity corresponding to each predicted allocation flow, combined with the computing resource request type and the computing resource required capacity carried in the computing resource acquisition request, the target computing resource is determined. The target computing resource is determined based on the computing resource required capacity and the computing resource request type carried in the computing resource acquisition request, which can effectively improve the accuracy of the target computing resource acquisition. Moreover, the target computing resource is determined on the basis of the advance prediction of the initial computing resource. The computing resources are planned in advance, which can reduce the possibility of providing computing resources that do not meet the required capacity, reduce the existence of fragmented computing resources, and effectively improve the utilization rate of computing resources.
[0074] In an exemplary embodiment, Figure 3 As shown, a computing resource allocation method is provided, which is applied to Figure 1 The server in the example is used to illustrate, including the following steps 302 to 330. Among them:
[0075] Step 302: Obtain a computing resource acquisition request.
[0076] Optionally, the computing resource acquisition request carries the computing resource request type, the required capacity of the computing resource and the target request time.
[0077] Step 304, obtaining initial computing resources.
[0078] Step 306 , input the target request time and the initial computing resources into the computing resource allocation prediction model to obtain each predicted allocation direction corresponding to each initial computing resource and each predicted allocation capacity corresponding to each predicted allocation direction.
[0079] Step 308 : Filter the computing resources to be allocated from the initial computing resources by using the computing resource request type and the predicted allocation directions.
[0080] Step 310 , selecting intermediate computing resources from the computing resources to be allocated, wherein the predicted allocation capacity corresponding to the intermediate computing resources is greater than or equal to the required capacity of the computing resources.
[0081] Step 312: Obtain distance information between the intermediate computing resource and the terminal that sends the computing resource acquisition request.
[0082] Step 314: determine the target computing resource from the intermediate computing resources according to the distance information.
[0083] Step 316, obtaining a first real-time operating parameter of the target computing resource.
[0084] Step 318: When the first real-time operating parameter exceeds the preset operating parameter, the current computing task corresponding to the target computing resource is obtained.
[0085] Step 320: Determine the priority of the current computing task according to the task type and user identifier included in the current computing task.
[0086] Step 322, obtaining the remaining computing margin corresponding to the target computing resource.
[0087] Step 324, determining the target current computing task according to the remaining computing margin, the priority of the current computing task, and the computing demand corresponding to the current computing task.
[0088] Step 326, processing the target current computing task.
[0089] Step 328: When there are other current computing tasks, obtain second real-time operating parameters of other computing resources except the target computing resource.
[0090] Step 330 , processing other current computing tasks according to the second real-time operating parameter and the computing capacities corresponding to the other current computing tasks.
[0091] In the above-mentioned computing resource allocation method, the computing resource allocation prediction model is used to predict the allocation flow of each initial computing resource at the target request time and the allocation capacity corresponding to the allocation flow, so that the initial computing resources can be allocated in advance. Then, when receiving the computing resource acquisition request, the target computing resource can be determined according to the computing resources allocated in advance, thereby improving the data processing efficiency. Further, based on the predicted allocation flow of each initial computing resource at the target request time and the allocation capacity corresponding to each predicted allocation flow, combined with the computing resource request type and the computing resource required capacity carried in the computing resource acquisition request, the target computing resource is determined. The target computing resource is determined based on the computing resource required capacity and the computing resource request type carried in the computing resource acquisition request, which can effectively improve the accuracy of the target computing resource acquisition. Moreover, the target computing resource is determined on the basis of the advance prediction of the initial computing resource. The computing resources are planned in advance, which can reduce the possibility of providing computing resources that do not meet the required capacity, reduce the existence of fragmented computing resources, and effectively improve the utilization rate of computing resources. Moreover, after determining the target computing resources, the tasks currently running the target computing resources can be adjusted according to the real-time operating parameters of the target computing resources. After adjusting the running tasks of the target computing resources according to the task priority, other tasks and other computing resources can be reallocated, which can ensure the efficiency of task processing, improve data processing efficiency, ensure the reasonable allocation of computing resources, and improve the utilization rate of computing resources.
[0092] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0093] Based on the same inventive concept, the embodiment of the present application also provides a computing resource allocation device for implementing the computing resource allocation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more computing resource allocation device embodiments provided below can refer to the limitations on the computing resource allocation method above, and will not be repeated here.
[0094] In an exemplary embodiment, Figure 4 As shown, a computing resource allocation device 400 is provided, comprising: a request acquisition module 402, an initial resource acquisition module 404, an allocation prediction module 406, a screening module 408 and a computing resource determination module 410, wherein:
[0095] The request acquisition module 402 is used to acquire a computing resource acquisition request, where the computing resource acquisition request carries a computing resource request type, a required computing resource capacity, and a target request time.
[0096] The initial resource acquisition module 404 is used to acquire various initial computing resources.
[0097] The allocation prediction module 406 is used to input the target request time and the initial computing resources into the computing resource allocation prediction model to obtain each predicted allocation flow direction corresponding to each initial computing resource and each predicted allocation capacity corresponding to each predicted allocation flow direction.
[0098] The screening module 408 is used to screen the computing resources to be allocated from the initial computing resources by using the computing resource request type and the predicted allocation directions.
[0099] The computing resource determination module 410 is used to determine the target computing resource according to the predicted allocation capacity corresponding to the computing resource to be allocated and the required capacity of the computing resource.
[0100] In one embodiment, the computing resource allocation device also includes an adjustment module for obtaining a first real-time operating parameter of the target computing resource; when the first real-time operating parameter exceeds the preset operating parameter, obtaining a current computing task corresponding to the target computing resource; determining the priority of the current computing task based on the task type and user identifier included in the current computing task; and processing the current computing task based on the priority of the current computing task and the target computing resource.
[0101] In one of the embodiments, the adjustment module is also used to obtain the remaining computing margin corresponding to the target computing resource; determine the target current computing task based on the remaining computing margin, the priority of the current computing task and the computing demand corresponding to the current computing task; and process the target current computing task.
[0102] In one embodiment, the adjustment module is also used to obtain the second real-time operating parameters of other computing resources except the target computing resources when there are other current computing tasks; and process other current computing tasks according to the second real-time operating parameters and the computing capacity corresponding to the other current computing tasks.
[0103] In one of the embodiments, the computing resource determination module is also used to screen out intermediate computing resources from the computing resources to be allocated, and the predicted allocation capacity corresponding to the intermediate computing resources is greater than or equal to the required capacity of the computing resources; obtain the distance information between the intermediate computing resources and the terminal sending the computing resource acquisition request; and determine the target computing resource from the intermediate computing resources based on the distance information.
[0104] In one embodiment, the computing resource allocation device also includes a model generation module for acquiring sample data, the sample data including the historical allocation flow of computing resources, the historical allocation capacity corresponding to the historical allocation flow, and the historical allocation time; using the historical allocation flow of computing resources, the historical allocation capacity corresponding to the historical allocation flow, and the historical allocation time to train a neural network to generate a computing resource allocation prediction model.
[0105] Each module in the computing resource allocation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0106] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a computing resource allocation method is implemented.
[0107] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0108] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.
[0109] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments are implemented.
[0110] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned method embodiments when executed by a processor.
[0111] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0113] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0114] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A computing resource allocation method, characterized in that: The method comprises: Obtaining a computing resource acquisition request, wherein the computing resource acquisition request carries a computing resource request type, a required computing resource capacity, and a target request time; Obtaining initial computing resources; Inputting the target request time and the initial computing resources into a computing resource allocation prediction model to obtain each predicted allocation flow direction corresponding to each initial computing resource and each predicted allocation capacity corresponding to each predicted allocation flow direction; Filtering computing resources to be allocated from the initial computing resources by using the computing resource request type and the predicted allocation directions; The target computing resources are determined according to the predicted allocation capacity corresponding to the computing resources to be allocated and the required capacity of the computing resources.
2. The method according to claim 1, characterized in that: After determining the target computing resource, the method includes: Acquire a first real-time operating parameter of the target computing resource; When the first real-time operating parameter exceeds a preset operating parameter, obtaining a current computing task corresponding to the target computing resource; Determining the priority of the current computing task according to the task type and user identifier included in the current computing task; The current computing task is processed according to the priority of the current computing task and the target computing resource.
3. The method according to claim 2, characterized in that The processing of the current computing task according to the priority of the current computing task and the target computing resource includes: Obtaining the remaining computing margin corresponding to the target computing resource; Determining a target current computing task according to the remaining computing margin, the priority of the current computing task, and the computing demand corresponding to the current computing task; Process the target current computing task.
4. The method according to claim 3, characterized in that After determining the target current computing task, the method includes: When there are other current computing tasks, obtaining second real-time operating parameters of other computing resources except the target computing resource; The other current computing tasks are processed according to the second real-time operating parameter and the computing capacity corresponding to the other current computing tasks.
5. The method according to claim 1, characterized in that The determining the target computing resource according to the predicted allocation capacity corresponding to the computing resource to be allocated and the required capacity of the computing resource includes: Filtering out intermediate computing resources from the computing resources to be allocated, wherein the predicted allocation capacity corresponding to the intermediate computing resources is greater than or equal to the required capacity of the computing resources; Acquire distance information between the intermediate computing resource and the computing resource acquisition request sending terminal; The target computing resource is determined from the intermediate computing resources according to the distance information.
6. The method according to any one of claims 1 to 5, characterized in that: Before inputting the target request time into the computing resource allocation prediction model, the method further includes: Acquire sample data, wherein the sample data includes a historical allocation flow direction of computing resources, a historical allocation capacity corresponding to the historical allocation flow direction, and a historical allocation time; The computing resource allocation prediction model is generated by training a neural network using the computing resource historical allocation flow direction, the historical allocation capacity corresponding to the historical allocation flow direction, and the historical allocation time.
7. A computing resource allocation device, characterized in that: The device comprises: A request acquisition module, used to acquire a computing resource acquisition request, wherein the computing resource acquisition request carries a computing resource request type, a required computing resource capacity, and a target request time; An initial resource acquisition module, used to acquire various initial computing resources; an allocation prediction module, configured to input the target request time and the initial computing resources into a computing resource allocation prediction model, and obtain each predicted allocation flow direction corresponding to each initial computing resource, and each predicted allocation capacity corresponding to each predicted allocation flow direction; A screening module, configured to screen out computing resources to be allocated from the initial computing resources by using the computing resource request type and the predicted allocation directions; The computing resource determination module is used to determine the target computing resource according to the predicted allocation capacity corresponding to the computing resource to be allocated and the required capacity of the computing resource.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Resource regulation and control method and device, electronic equipment and storage medium
CN120045334A
