Method, apparatus, and storage medium for resource data processing
By receiving resource allocation tasks from projects, evaluating and allocating resource quotas, the problem of excessive resource requests in public cloud resource management has been solved, achieving efficient utilization and reasonable allocation of resources.
Patent Information
- Application Number
- CN202211192598.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-09-28
AI Technical Summary
In existing technologies, public cloud resource management platforms cannot effectively prevent projects from requesting excessive resources, leading to low resource utilization.
By receiving the resource allocation task of the project, obtaining the resource application quota, calculating the proportion of allocated resources, calling the evaluation model to evaluate the required resource quota, and determining the target quota for resource allocation based on the smaller value between the evaluation result and the application quota, setting resource usage and recycling tasks, and configuring resource usage ratio thresholds to avoid resource waste.
It has improved the rational utilization rate of resources, avoided resource waste, optimized the resource allocation process, and enhanced resource utilization efficiency.
Smart Images

Figure CN115617511B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for processing resource data. Background Technology
[0002] In the public cloud domain, cloud resources typically provide the necessary resources for multiple projects simultaneously. For example, when a project needs to conduct testing, it can request resources from a resource management platform. The platform then allocates public cloud resources to the requesting projects to execute the tests. Therefore, how to allocate public resources to ensure their rational utilization becomes a crucial issue. Currently, resource management platforms can only manage the total amount of public cloud resources, usually allocating resources based on the amount requested by each project. This can lead to some projects requesting excessive resources, resulting in low resource utilization. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for resource data processing, which can solve the problem that allocating resources based on the amount of resources applied for by each project results in some projects applying for excessive resources, leading to low resource utilization.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for processing resource data is provided.
[0005] An embodiment of the present invention provides a method for processing resource data, comprising: receiving a resource allocation task for a project and obtaining the corresponding resource application quota; querying the allocated resources of the project group to which the project belongs and calculating the proportion of the allocated resources to the total resources; in response to the proportion satisfying a preset admission condition, obtaining the attribute information of the project, calling a preset evaluation model, evaluating the required resource quota of the project based on the attribute information, and determining the smaller value between the required resource quota and the resource application quota as the target quota of the project; and calling a resource allocation program to allocate the target quota of resources to the project.
[0006] In one embodiment, assessing the required resource amount for the project based on the attribute information includes:
[0007] Obtain the project type of the project, query the corresponding historical projects, and calculate the similarity between the attribute information and the attribute information of each historical project;
[0008] Based on the similarity, target historical projects are filtered, and the resource allocation quota of the target historical projects is queried to determine the required resource quota of the project.
[0009] In another embodiment, filtering target historical projects based on the similarity and querying the resource allocation quota of the target historical projects to determine the required resource quota of the projects includes:
[0010] In response to the maximum value of the similarity being greater than a preset threshold, the historical project corresponding to the maximum value of the similarity is identified as the target historical project, and the resource allocation quota of the target historical project is queried to determine the required resource quota of the project;
[0011] In response to the maximum value of the similarity not being greater than a preset threshold, the difference ratio between the attribute information of the historical project corresponding to the maximum value of the similarity and the attribute information of the project is calculated, the resource allocation quota of the target historical project is queried, and the resource allocation quota is adjusted based on the difference ratio to determine the required resource quota of the project.
[0012] In yet another embodiment, after allocating the target amount of resources to the project, the method further includes:
[0013] Obtain the resource usage time corresponding to the project in order to set up resource recycling tasks;
[0014] In response to the resource recycling task being triggered, the target amount of the project is queried to determine the recycling amount, the resource allocation program is invoked, and the resource recycling task is executed.
[0015] In yet another embodiment, after invoking the resource allocation procedure to reclaim the target amount of resources, the method further includes:
[0016] Receive failure messages from resource recycling tasks, adjust the corresponding recycling amount, generate a new resource recycling task, and trigger it.
[0017] In yet another embodiment, querying the allocated resources of the project group to which the project belongs includes:
[0018] Obtain the remaining resource quota. If the resource application quota is less than the remaining resource quota, query the allocated resources of the project group to which the project belongs.
[0019] In yet another embodiment, after allocating the target amount of resources to the project, the method further includes:
[0020] Store the allocation time of the target amount to update the allocated resources of the project group;
[0021] Obtain the allocated resource information of each project group, and then call the preset visualization model to visualize and display the allocated resource information of each project group.
[0022] To achieve the above objectives, according to another aspect of the present invention, an apparatus for processing resource data is provided.
[0023] An apparatus for processing resource data according to an embodiment of the present invention includes: a receiving unit, configured to receive a resource allocation task for a project and obtain a corresponding resource application quota; a calculation unit, configured to query the allocated resources of the project group to which the project belongs and calculate the proportion of the allocated resources to the total resources; a determining unit, configured to, in response to the proportion meeting a preset admission condition, obtain the attribute information of the project, call a preset evaluation model, evaluate the required resource quota of the project based on the attribute information, and determine the smaller value between the required resource quota and the resource application quota as the target quota of the project; and an allocation unit, configured to call a resource allocation program to allocate the target quota of resources to the project.
[0024] In one embodiment, the determining unit is specifically used for:
[0025] Obtain the project type of the project, query the corresponding historical projects, and calculate the similarity between the attribute information and the attribute information of each historical project;
[0026] Based on the similarity, target historical projects are filtered, and the resource allocation quota of the target historical projects is queried to determine the required resource quota of the project.
[0027] In yet another embodiment, the determining unit is specifically used for:
[0028] In response to the maximum value of the similarity being greater than a preset threshold, the historical project corresponding to the maximum value of the similarity is identified as the target historical project, and the resource allocation quota of the target historical project is queried to determine the required resource quota of the project;
[0029] In response to the maximum value of the similarity not being greater than a preset threshold, the difference ratio between the attribute information of the historical project corresponding to the maximum value of the similarity and the attribute information of the project is calculated, the resource allocation quota of the target historical project is queried, and the resource allocation quota is adjusted based on the difference ratio to determine the required resource quota of the project.
[0030] In yet another embodiment, the apparatus further includes:
[0031] The setting unit is used to obtain the resource usage time corresponding to the project in order to set resource recycling tasks;
[0032] The recycling unit is used to respond to the resource recycling task being triggered by querying the target amount of the project to determine the recycling amount, calling the resource allocation program, and executing the resource recycling task.
[0033] In yet another embodiment, the apparatus further includes:
[0034] The generation unit is used to receive failure messages from resource recycling tasks, adjust the corresponding recycling amount, generate new resource recycling tasks, and trigger them.
[0035] In yet another embodiment, the computing unit is specifically used for:
[0036] Obtain the remaining resource quota. If the resource application quota is less than the remaining resource quota, query the allocated resources of the project group to which the project belongs.
[0037] In yet another embodiment, the apparatus further includes:
[0038] An update unit is used to store the allocation time of the target amount in order to update the allocated resources of the project group;
[0039] The visualization unit is used to obtain the allocated resource information of each project group, and to call the preset visualization model to visualize and display the allocated resource information of each project group.
[0040] To achieve the above objectives, according to another aspect of the present invention, an electronic device is provided.
[0041] An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the resource data processing method provided in the embodiment of the present invention.
[0042] To achieve the above objectives, according to another aspect of the present invention, a computer-readable medium is provided.
[0043] An embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the resource data processing method provided in the embodiment of the present invention.
[0044] To achieve the above objectives, according to another aspect of the present invention, a computer program product is provided.
[0045] A computer program product according to an embodiment of the present invention includes a computer program that, when executed by a processor, implements the resource data processing method provided in the embodiment of the present invention.
[0046] One embodiment of the above invention has the following advantages or beneficial effects: In this embodiment of the invention, since multiple projects share resources, a threshold for the resource usage ratio is configured for each project, i.e., a preset threshold. Then, when a project applies for resource allocation, if the proportion of resources already allocated to the project group is greater than the preset threshold, it means that the project group has already been allocated enough resources. Therefore, the resources required for the project can be reassessed, and resources can be allocated according to the smaller value between the assessed required resource amount and the applied amount, so as to avoid allocating too many resources to a project group, resulting in resource waste, and thereby improving the resource allocation and resource utilization rate of other project groups.
[0047] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0048] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0049] Figure 1 This is a schematic diagram of a main flow of a resource data processing method according to an embodiment of the present invention;
[0050] Figure 2 This is a schematic diagram of another main process of a resource data processing method according to an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of another main process of a resource data processing method according to an embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram of the main units of a resource data processing apparatus according to an embodiment of the present invention;
[0053] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0054] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present invention. Detailed Implementation
[0055] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0056] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.
[0057] This invention provides a resource data processing system that can be used to allocate resources to various projects, specifically for allocating public cloud resources in project testing scenarios.
[0058] In this invention, the allocation of public cloud resources in a test scenario is used as an example for illustration. During project development, testing is a process that typically requires resources from the public cloud. The resource data processing system can manage and process public cloud resources, such as allocating and reclaiming them. To facilitate the management and processing of public cloud resources, in this embodiment of the invention, projects can be grouped to allocate and process resources based on project groups. Specifically, in this embodiment of the invention, project groups can be divided based on the region of the project, the group to which the project belongs, etc.
[0059] In this embodiment of the invention, the resource data processing system can obtain the allocated resource quota of each project group in real time, and then determine the remaining quota based on the total resource quota, so as to facilitate the management and allocation of keyword data.
[0060] This invention provides a method for processing resource data, which can be executed by a resource data processing system, such as... Figure 1 As shown, the method includes:
[0061] S101: Receive the resource allocation task for the project and obtain the corresponding resource application quota.
[0062] When a project needs to use resources, it can send a resource allocation task to the resource data processing system. For example, when a project needs to conduct tests or use public cloud resources, users can send a resource allocation task to the resource data processing system through their terminal devices, or users can input a resource allocation task through the display interface of the resource data processing system.
[0063] A resource allocation task represents the task of allocating resources to projects that have requested resources. This task may include project information and the resource allocation quota requested. After receiving a resource allocation task, the resource data processing system can retrieve the corresponding resource allocation quota from it.
[0064] S102: Query the allocated resources of the project group to which the project belongs, and calculate the proportion of allocated resources to the total resources.
[0065] In this embodiment of the invention, resources are managed and processed through project teams. To avoid excessive resource allocation to a single project team and insufficient allocation to other project teams, which would lead to inefficient resource utilization, the proportion of resources that each project team can allocate can be pre-configured, i.e., the proportion of allocable resources to the total resources. Therefore, after receiving a project's resource allocation task, this embodiment of the invention can calculate the allocated resources of the project team to which the project belongs, and then calculate the proportion of allocated resources of the project team to the total resources in the current state, so as to allocate resources according to this proportion.
[0066] It should be noted that in this embodiment of the invention, before obtaining the resource application quota, it is also possible to determine whether the remaining resource quota can meet the demand. Therefore, before executing this step, the remaining resource quota can be obtained first, and it can be determined whether it is greater than the resource application quota. In response to the resource application quota being less than the remaining resource quota, this step is executed, that is, querying the allocated resources of the project group to which the project belongs. In response to the resource application quota being not less than the remaining resource quota, resource allocation can be rejected.
[0067] S103: In response to the proportion meeting the preset admission conditions, obtain the project's attribute information, call the preset evaluation model, evaluate the required resource amount of the project based on the attribute information, and determine the smaller value between the required resource amount and the resource application amount as the project's target amount.
[0068] The admission criteria represent the conditions under which resources can be allocated to a project. In this embodiment of the invention, a proportion threshold can be set. For example, if the proportion of allocated resources to the project group to which the project belongs is less than the proportion threshold, resource allocation to the project is allowed; if the proportion of allocated resources to the project group to which the project belongs is not less than the proportion threshold, resource allocation to the project is rejected. Therefore, after determining that the proportion meets the preset admission criteria, the resource allocation process can be executed.
[0069] To avoid resource waste caused by excessive resource requests, this embodiment of the invention pre-defines an evaluation model to assess the required resource amount for a project based on its attribute information. Therefore, during resource allocation, the attribute information of the project can be obtained, input into the evaluation model, and the required resource amount for that project can be determined. Specifically, the evaluation model can be a neural network model, a machine learning model, etc. The attribute information can be determined based on different projects, such as the amount of test data required for the project, the number of test cases required for the project, the testing time required, etc.
[0070] Since resource management and allocation in this embodiment of the invention are carried out in project groups, if there are unused resources already allocated in the project group, the resource request amount can be reduced when applying for resources through the resource allocation task, thereby reducing resource waste. Therefore, in this step, after determining the required resource amount for the project, the smaller value between the required resource amount and the resource request amount can be selected as the target amount for the project, so that resources can be allocated according to the target amount, thereby avoiding resource waste caused by allocating too many resources to the project.
[0071] In some embodiments, since some projects perform the same testing functions or testing services, this embodiment of the invention can, after determining that the proportion meets the preset admission conditions, first obtain the project type of the project, then query the corresponding historical projects to calculate the similarity between the attribute information and the attribute information of each historical project; then, filter the target historical projects based on the similarity, query the resource allocation quota of the target historical projects, and determine the required resource quota of the project. The greater the similarity between the attribute information of the historical projects and the attribute information of the project, the closer the required resource quotas of the two are. Therefore, the resource allocation quota of the historical project corresponding to the maximum similarity can be determined as the required resource quota of the project.
[0072] However, to avoid a small maximum similarity score, which could lead to a large error in determining the required resource amount for the project, a preset threshold can be set in this step. Only when the maximum similarity score is greater than the preset threshold can the historical project corresponding to the maximum similarity score be identified as the target historical project. The resource allocation amount of the target historical project is then queried to determine the required resource amount for the project. If the maximum similarity score calculated in this step is not greater than the preset threshold, the difference ratio between the attribute information of the historical project corresponding to the maximum similarity score and the attribute information of the project can be calculated. The resource allocation amount of the target historical project is then queried, and the resource allocation amount is adjusted based on the difference ratio to determine the required resource amount for the project.
[0073] S104: Invoke the resource allocation procedure to allocate the target amount of resources to the project.
[0074] In this embodiment of the invention, a resource allocation procedure can be preset to execute the process of allocating resources for a target amount. Specifically, in this embodiment of the invention, a resource allocation platform can be preset, in which a resource allocation procedure is set, and then the interface provided by the resource allocation platform can be called to perform resource allocation based on the target amount.
[0075] It should be noted that when the resource data processing system receives a large number of resource allocation tasks, this step can also call the resource allocation program in batches to execute the resource allocation process in batches.
[0076] In some other embodiments, after this step, the resource usage time corresponding to the project can be obtained to set a resource recycling task; in response to the resource recycling task being triggered, the target amount of the project is queried to determine the recycling amount, and the resource allocation program is invoked to execute the resource recycling task. The resource usage time can be carried in the resource allocation task, indicating the time during which the project uses the allocated resources, thereby determining the time when the resource usage is completed. After setting the resource recycling task in this way, the resource recycling task can be triggered in a timely manner, thereby timely recycling of these allocated resources.
[0077] It should be noted that in this embodiment of the invention, when executing a resource recycling task, if a user has not yet finished using the allocated resources and refuses to recycle them, a failure message for the resource recycling task will be received. At this time, the resource data processing system can further adjust the corresponding recycling amount, such as reducing the recycling amount, to generate a new resource recycling task and trigger it, thereby recycling the resources in a timely manner.
[0078] In some other embodiments, after this step, the allocation time of the target amount can be stored to update the allocated resources of the project group, thereby achieving timely updates and management of resource data. Furthermore, the allocated resource information of each project group can be obtained, and a preset visualization model can be invoked to visualize the allocated resource information of each project group, thereby showing the changes in the allocated resource amount of each project group, and thus allowing for adjustments to the transfer conditions of each envy group.
[0079] In this embodiment of the invention, since multiple projects share resources, a threshold for the resource usage ratio is configured for each project, i.e., a preset threshold. When a project applies for resource allocation, if the proportion of resources already allocated to its project group is greater than the preset threshold, it means that the project group has already been allocated enough resources. Therefore, the resources required for the project can be reassessed, and resources can be allocated according to the smaller value between the assessed required resource amount and the applied amount, so as to avoid allocating too many resources to a project group, resulting in resource waste, and thereby improving the resource allocation and resource utilization rate of other project groups.
[0080] The following is combined with Figure 1 The illustrated embodiments provide a detailed description of the resource data processing method in this invention, such as... Figure 2 As shown, the method includes:
[0081] S201: Receive the resource allocation task for the project and obtain the corresponding resource application quota.
[0082] S202: Obtain the remaining resource quota. In response to the resource application quota being less than the remaining resource quota, query the allocated resources of the project group to which the project belongs, and calculate the proportion of allocated resources to the total resources.
[0083] S203: In response to the proportion meeting the preset admission conditions, obtain the project's attribute information, call the preset evaluation model, evaluate the required resource amount of the project based on the attribute information, and determine the smaller value between the required resource amount and the resource application amount as the project's target amount.
[0084] S204: Invoke the resource allocation procedure to allocate the target amount of resources to the project.
[0085] S205: Obtain the resource usage time corresponding to the project in order to set up a resource recycling task.
[0086] S206: In response to the resource recycling task being triggered, query the target amount of the project to determine the recycling amount, call the resource allocation program, and execute the resource recycling task.
[0087] It should be noted that the data processing principle in the embodiments of the present invention is the same as... Figure 1 The data processing principle is the same in the embodiments shown, and will not be repeated here.
[0088] The following is combined with Figure 1 The illustrated embodiments provide a detailed description of the resource data processing method in this invention, such as... Figure 3 As shown, the method includes:
[0089] S301: Receive the resource allocation task for the project and obtain the corresponding resource application quota.
[0090] S302: Obtain the remaining resource quota. In response to the resource application quota being less than the remaining resource quota, query the allocated resources of the project group to which the project belongs, and calculate the proportion of allocated resources to the total resources.
[0091] S303: In response to the proportion meeting the preset admission conditions, obtain the attribute information of the project, obtain the project type of the project, query the corresponding historical projects, and calculate the similarity between the attribute information and the attribute information of each historical project.
[0092] S304: In response to the maximum similarity value being greater than a preset threshold, the historical project corresponding to the maximum similarity value is identified as the target historical project, and the resource allocation amount of the target historical project is queried to determine the required resource amount for the project; in response to the maximum similarity value not being greater than a preset threshold, a preset evaluation model is invoked to evaluate the required resource amount for the project based on attribute information, so that the smaller value between the required resource amount and the resource application amount is determined as the target amount for the project.
[0093] S305: Invoke the resource allocation procedure to allocate the target amount of resources to the project.
[0094] S306: Obtain the resource usage time corresponding to the project in order to set up resource recycling tasks.
[0095] S307: In response to the resource recycling task being triggered, query the target amount of the project to determine the recycling amount, call the resource allocation program, and execute the resource recycling task.
[0096] S308: Store the allocation time of the target quota to update the allocated resources of the project group; obtain the allocated resource information of each project group to call the preset visualization model and visualize the allocated resource information of each project group.
[0097] It should be noted that the data processing principle in the embodiments of the present invention is the same as... Figure 1 The data processing principle is the same in the embodiments shown, and will not be repeated here.
[0098] To address the problems existing in the prior art, embodiments of the present invention provide a resource data processing apparatus 400, such as... Figure 4 As shown, the device 400 includes:
[0099] The receiving unit 401 is used to receive the resource allocation task of the project and obtain the corresponding resource application quota.
[0100] The calculation unit 402 is used to query the allocated resources of the project group to which the project belongs, and calculate the proportion of the allocated resources to the total resources;
[0101] The determining unit 403 is used to, in response to the ratio meeting the preset admission conditions, obtain the attribute information of the project, call the preset evaluation model, evaluate the required resource amount of the project based on the attribute information, and determine the smaller value between the required resource amount and the resource application amount as the target amount of the project.
[0102] The allocation unit 404 is used to invoke the resource allocation program to allocate the target amount of resources to the project.
[0103] It should be understood that the manner in which the embodiments of the present invention are implemented is different from the implementation method. Figure 1 The methods used in the illustrated embodiments are the same and will not be repeated here.
[0104] In one embodiment, the determining unit 403 is specifically used for:
[0105] Obtain the project type of the project, query the corresponding historical projects, and calculate the similarity between the attribute information and the attribute information of each historical project;
[0106] Based on the similarity, target historical projects are filtered, and the resource allocation quota of the target historical projects is queried to determine the required resource quota of the project.
[0107] In yet another embodiment, the determining unit 403 is specifically used for:
[0108] In response to the maximum value of the similarity being greater than a preset threshold, the historical project corresponding to the maximum value of the similarity is identified as the target historical project, and the resource allocation quota of the target historical project is queried to determine the required resource quota of the project;
[0109] In response to the maximum value of the similarity not being greater than a preset threshold, the difference ratio between the attribute information of the historical project corresponding to the maximum value of the similarity and the attribute information of the project is calculated, the resource allocation quota of the target historical project is queried, and the resource allocation quota is adjusted based on the difference ratio to determine the required resource quota of the project.
[0110] In yet another embodiment, the device 400 further includes:
[0111] The setting unit is used to obtain the resource usage time corresponding to the project in order to set resource recycling tasks;
[0112] The recycling unit is used to respond to the resource recycling task being triggered by querying the target amount of the project to determine the recycling amount, calling the resource allocation program, and executing the resource recycling task.
[0113] In yet another embodiment, the device 400 further includes:
[0114] The generation unit is used to receive failure messages from resource recycling tasks, adjust the corresponding recycling amount, generate new resource recycling tasks, and trigger them.
[0115] In yet another embodiment, the computing unit 402 is specifically used for:
[0116] Obtain the remaining resource quota. If the resource application quota is less than the remaining resource quota, query the allocated resources of the project group to which the project belongs.
[0117] In yet another embodiment, the device 400 further includes:
[0118] An update unit is used to store the allocation time of the target amount in order to update the allocated resources of the project group;
[0119] The visualization unit is used to obtain the allocated resource information of each project group, and to call the preset visualization model to visualize and display the allocated resource information of each project group.
[0120] It should be understood that the implementation methods and embodiments of the present invention are different. Figure 1 , 2 The method is the same as that shown in embodiment 3, and will not be repeated here.
[0121] In this embodiment of the invention, since multiple projects share resources, a threshold for the resource usage ratio is configured for each project, i.e., a preset threshold. When a project applies for resource allocation, if the proportion of resources already allocated to its project group is greater than the preset threshold, it means that the project group has already been allocated enough resources. Therefore, the resources required for the project can be reassessed, and resources can be allocated according to the smaller value between the assessed required resource amount and the applied amount, so as to avoid allocating too many resources to a project group, resulting in resource waste, and thereby improving the resource allocation and resource utilization rate of other project groups.
[0122] According to embodiments of the present invention, an electronic device and a readable storage medium are also provided.
[0123] An electronic device according to an embodiment of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the resource data processing method provided in the embodiment of the present invention.
[0124] Figure 5 An exemplary system architecture 500 is shown that can be applied to the resource data processing method or resource data processing apparatus of the present invention.
[0125] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0126] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, and 503.
[0127] Terminal devices 501, 502, and 503 can be, but are not limited to, smartphones, tablets, laptops, and desktop computers, etc.
[0128] Server 505 can be a server that provides various services. The server can analyze and process data such as received product information query requests, and feed back the processing results (such as product information - just an example) to the terminal device.
[0129] It should be noted that the resource data processing method provided in this embodiment of the invention is generally executed by server 505, and correspondingly, the resource data processing device is generally located in server 505.
[0130] It should be understood that Figure 5 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0131] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing embodiments of the present invention. Figure 6 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0132] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0133] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0134] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.
[0135] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a unit, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0137] The units described in the embodiments of the present invention can be implemented in software or hardware. The described units can also be located in a processor; for example, a processor can be described as including a receiving unit, a calculation unit, a determining unit, and an allocation unit. The names of these units do not necessarily limit the specific unit; for example, a receiving unit can also be described as "a unit that performs the functions of a receiving unit."
[0138] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the resource data processing method provided by the present invention.
[0139] In another aspect, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the resource data processing method provided in the embodiments of the present invention.
[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for processing resource data, characterized in that, include: Receive resource allocation tasks for the project and obtain the corresponding resource application quota; Query the allocated resources of the project group to which the project belongs, and calculate the proportion of the allocated resources to the total resources; In response to the ratio meeting the preset admission conditions, the attribute information of the project is obtained, a preset evaluation model is invoked, and the required resource amount of the project is evaluated based on the attribute information, so that the smaller value between the required resource amount and the resource application amount is determined as the target amount of the project. Invoke the resource allocation procedure to allocate the target amount of resources to the project; Based on the attribute information, assess the required resource amount for the project, including: Obtain the project type of the project, query the corresponding historical projects, and calculate the similarity between the attribute information and the attribute information of each historical project; Based on the similarity, target historical projects are filtered, and the resource allocation quota of the target historical projects is queried to determine the required resource quota of the project; Based on the similarity, target historical projects are filtered, and the resource allocation quota of the target historical projects is queried to determine the required resource quota of the project, including: In response to the maximum value of the similarity being greater than a preset threshold, the historical project corresponding to the maximum value of the similarity is identified as the target historical project, and the resource allocation quota of the target historical project is queried to determine the required resource quota of the project; In response to the maximum value of the similarity not being greater than a preset threshold, the difference ratio between the attribute information of the historical project corresponding to the maximum value of the similarity and the attribute information of the project is calculated, the resource allocation quota of the target historical project is queried, and the resource allocation quota is adjusted based on the difference ratio to determine the required resource quota of the project.
2. The resource data processing method according to claim 1, characterized in that, After allocating the target amount of resources to the project, the process also includes: Obtain the resource usage time corresponding to the project in order to set up resource recycling tasks; In response to the resource recycling task being triggered, the target amount of the project is queried to determine the recycling amount, the resource allocation program is invoked, and the resource recycling task is executed.
3. The resource data processing method according to claim 2, characterized in that, After invoking the resource allocation procedure to reclaim the target amount of resources, the process also includes: Receive failure messages from resource recycling tasks, adjust the corresponding recycling amount, generate a new resource recycling task, and trigger it.
4. The resource data processing method according to claim 1, characterized in that, Query the allocated resources of the project group to which the project belongs, including: Obtain the remaining resource quota. If the resource application quota is less than the remaining resource quota, query the allocated resources of the project group to which the project belongs.
5. The resource data processing method according to claim 1, characterized in that, After allocating the target amount of resources to the project, the process also includes: Store the allocation time of the target amount to update the allocated resources of the project group; Obtain the allocated resource information of each project group, and then call the preset visualization model to visualize and display the allocated resource information of each project group.
6. A resource data processing apparatus, characterized in that, include: The receiving unit is used to receive the resource allocation task of the project and obtain the corresponding resource application quota. The calculation unit is used to query the allocated resources of the project group to which the project belongs, and calculate the proportion of the allocated resources to the total resources; The determining unit is configured to, in response to the proportion meeting the preset admission conditions, obtain the attribute information of the project, call the preset evaluation model, evaluate the required resource amount of the project based on the attribute information, and determine the smaller value between the required resource amount and the resource application amount as the target amount of the project. An allocation unit is used to invoke a resource allocation procedure to allocate the target amount of resources to the project; The determining unit is specifically used for: Obtain the project type of the project, query the corresponding historical projects, and calculate the similarity between the attribute information and the attribute information of each historical project; Based on the similarity, target historical projects are filtered, and the resource allocation quota of the target historical projects is queried to determine the required resource quota of the project; The determining unit is specifically used for: In response to the maximum value of the similarity being greater than a preset threshold, the historical project corresponding to the maximum value of the similarity is identified as the target historical project, and the resource allocation quota of the target historical project is queried to determine the required resource quota of the project; In response to the maximum value of the similarity not being greater than a preset threshold, the difference ratio between the attribute information of the historical project corresponding to the maximum value of the similarity and the attribute information of the project is calculated, the resource allocation quota of the target historical project is queried, and the resource allocation quota is adjusted based on the difference ratio to determine the required resource quota of the project.
7. The apparatus according to claim 6, characterized in that, The device further includes: The setting unit is used to obtain the resource usage time corresponding to the project in order to set resource recycling tasks; The recycling unit is used to respond to the resource recycling task being triggered by querying the target amount of the project to determine the recycling amount, calling the resource allocation program, and executing the resource recycling task.
8. The apparatus according to claim 7, characterized in that, The device further includes: The generation unit is used to receive failure messages from resource recycling tasks, adjust the corresponding recycling amount, generate new resource recycling tasks, and trigger them.
9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.
11. A computer program product, comprising a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Resource quota management method and device of cloud platform, equipment and storage medium
CN112884382A
Optimizing resource usage in distributed computing environments by dynamically adjusting resource unit size
US20180365072A1