CN115617511A - Resource data processing method and device, electronic equipment and storage medium - Google Patents

Resource data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115617511A
CN115617511A CN202211192598.XA CN202211192598A CN115617511A CN 115617511 A CN115617511 A CN 115617511A CN 202211192598 A CN202211192598 A CN 202211192598A CN 115617511 A CN115617511 A CN 115617511A
Authority
CN
China
Prior art keywords
resource
project
limit
item
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211192598.XA
Other languages
Chinese (zh)
Inventor
郑春元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211192598.XA priority Critical patent/CN115617511A/en
Publication of CN115617511A publication Critical patent/CN115617511A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a resource data processing method, a resource data processing device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises: receiving a resource allocation task of a project, and acquiring a corresponding resource application limit; inquiring the distributed resources of the project group to which the project belongs, and calculating the proportion of the distributed resources in the total resources; responding to the condition that the proportion meets the preset admission condition, acquiring the attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project; and calling a resource allocation program to allocate the resources of the target quota to the project. The method and the system can solve the problem that resource utilization rate is low due to the fact that resource amount applied by some projects is distributed based on the resource amount applied by the projects, and the resources applied by the projects are excessive.

Description

Resource data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing resource data, an electronic device, and a storage medium.
Background
In the public cloud field, cloud resources generally provide required resources for a plurality of projects at the same time, for example, when a project needs to be tested, resources can be applied to a resource management platform, and the resource management platform allocates the resources in the public cloud to the project applying the resources to execute the project test, so how to allocate the shared resources and the resources becomes an important problem for reasonable utilization of the resources. In the prior art, a resource management platform can only manage the total amount of resources of a public cloud, and is generally configured based on the amount of resources applied for each project, so that the resource utilization rate is low due to excessive resource application for some projects.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for processing resource data, which can solve the problem of low resource utilization rate caused by excessive resource application in some projects due to allocation of resource amount applied on the basis of each project.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for resource data processing is provided.
The resource data processing method of the embodiment of the invention comprises the following steps: receiving a resource allocation task of a project, and acquiring a corresponding resource application limit; inquiring the allocated resources of the project group to which the project belongs, and calculating the proportion of the allocated resources to the total resources; responding to the condition that the proportion meets the preset admission condition, acquiring attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project; and calling a resource allocation program to allocate the resources of the target quota to the project.
In one embodiment, evaluating the required resource quota for the project based on the attribute information comprises:
acquiring the item type of the item to inquire corresponding historical items so as to calculate the similarity between the attribute information and the attribute information of the historical items;
and screening target historical items based on the similarity, and inquiring resource allocation limits of the target historical items to determine required resource limits of the items.
In another embodiment, screening a target historical item based on the similarity, and querying the resource allocation quota of the target historical item to determine the required resource quota of the item comprises:
in response to the fact that the maximum value of the similarity is larger than a preset threshold value, determining a historical item corresponding to the maximum value of the similarity as a target historical item, and inquiring a resource allocation limit of the target historical item to determine a required resource limit of the item;
and in response to the fact that the maximum value of the similarity is not larger than a preset threshold value, calculating a difference proportion between the attribute information of the historical item corresponding to the maximum value of the similarity and the attribute information of the item, inquiring the resource allocation limit of the target historical item, and adjusting the resource allocation limit based on the difference proportion to determine the resource limit required by the item.
In another embodiment, after allocating the resource of the target quota to the project, the method further comprises:
acquiring the resource use time corresponding to the project to set a resource recovery task;
and responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as a recovery limit, calling a resource allocation program, and executing the resource recovery task.
In another embodiment, after invoking the resource allocation program and recycling the resources of the target quota, the method further includes:
and receiving the failure message of the resource recovery task, and adjusting the corresponding recovery limit to generate a new resource recovery task and trigger.
In yet another embodiment, querying the allocated resources of the project group to which the project belongs comprises:
and acquiring a surplus resource limit, and inquiring the allocated resources of the project group to which the project belongs in response to the fact that the resource application limit is smaller than the surplus resource limit.
In another embodiment, after allocating the resource of the target quota to the project, the method further comprises:
storing the distribution time of the target quota so as to update the distributed resources of the project group;
and acquiring the allocated resource information of each project group to call a preset visualization model, and visually displaying the allocated resource information of each project group.
To achieve the above object, according to another aspect of the embodiments of the present invention, an apparatus for resource data processing is provided.
The resource data processing device of the embodiment of the invention comprises: the receiving unit is used for receiving the resource allocation task of the project and acquiring the corresponding resource application limit; the computing unit is used for inquiring the allocated resources of the project group to which the project belongs and computing the proportion of the allocated resources to the total resources; the determining unit is used for responding to the condition that the proportion meets the preset admission condition, acquiring the attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project; and the allocation unit is used for calling a resource allocation program so as to allocate the resources of the target quota to the project.
In an embodiment, the determining unit is specifically configured to:
acquiring the item type of the item to inquire corresponding historical items so as to calculate the similarity between the attribute information and the attribute information of the historical items;
and screening target historical items based on the similarity, and inquiring resource allocation limits of the target historical items to determine required resource limits of the items.
In another embodiment, the determining unit is specifically configured to:
in response to the fact that the maximum value of the similarity is larger than a preset threshold value, determining a historical item corresponding to the maximum value of the similarity as a target historical item, and inquiring a resource allocation limit of the target historical item to determine a required resource limit of the item;
and in response to the fact that the maximum value of the similarity is not larger than a preset threshold value, calculating a difference proportion between the attribute information of the historical item corresponding to the maximum value of the similarity and the attribute information of the item, inquiring the resource allocation limit of the target historical item, and adjusting the resource allocation limit based on the difference proportion to determine the resource limit required by the item.
In yet another embodiment, the apparatus further comprises:
the setting unit is used for acquiring the resource use time corresponding to the project so as to set a resource recovery task;
and the recovery unit is used for responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as the recovery limit, calling a resource allocation program and executing the resource recovery task.
In yet another embodiment, the apparatus further comprises:
and the generating unit is used for receiving the failure message of the resource recovery task and adjusting the corresponding recovery limit so as to generate a new resource recovery task and trigger the new resource recovery task.
In another embodiment, the computing unit is specifically configured to:
and acquiring a surplus resource limit, and inquiring the allocated resources of the project group to which the project belongs in response to the fact that the resource application limit is smaller than the surplus resource limit.
In yet another embodiment, the apparatus further comprises:
the updating unit is used for storing the distribution time of the target quota so as to update the distributed resources of the project group;
and the visualization unit is used for acquiring the allocated resource information of each project group so as to call a preset visualization model and visually display the allocated resource information of each project group.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing the resource data provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which, when executed by a processor, implements the method for resource data processing provided by an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
A computer program product according to an embodiment of the present invention includes a computer program, and when the computer program is executed by a processor, the computer program implements the method for processing resource data according to an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, because a plurality of projects share resources, a threshold value of the resource utilization ratio, namely a preset threshold value, is configured for each project, and when the project applies for resource allocation, if the ratio of the allocated resources of the project group is greater than the preset threshold value, the allocated resources of the project group are enough, so that the resources required by the project can be evaluated again, and resource allocation is performed according to the smaller value of the evaluated required resource limit and the application limit, so that the excessive resource allocated to one project group is avoided, the resource waste is caused, and the resource allocation amount and the resource utilization ratio of other project groups are improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of one principal flow of a method of resource data processing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of yet another major flow of a method of resource data processing according to an embodiment of the invention;
FIG. 3 is a schematic diagram of yet another major flow of a method of resource data processing according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main elements of an apparatus for resource data processing according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
The embodiment of the invention provides a resource data processing system which can be used for resource allocation of various projects, and particularly can be used for allocation of public cloud resources in a project test scene.
In the example of the present invention, public cloud resource allocation in a test scenario is taken as an example for explanation, and in project development, a process is usually required to be executed during project testing, so that resources need to be applied from a public cloud to perform project testing. The resource data processing system can manage and process public cloud resources, such as allocation and recovery of the resources. In order to facilitate management and processing of public cloud resources, in the embodiment of the present invention, projects may be grouped, so as to allocate and process resources based on a project group. Specifically, in the embodiment of the present invention, the project groups may be divided in a manner such as a region described in the project, a group to which the project belongs, and the like.
In the embodiment of the invention, the resource data processing system can acquire the allocated resource limit of each project group in real time, and further can determine the remaining limit based on the total limit of the resource so as to facilitate the management and allocation of the word-eye data.
An embodiment of the present invention provides a method for processing resource data, where the method may be executed by a resource data processing system, and as shown in fig. 1, the method includes:
s101: and receiving the resource allocation task of the project and acquiring the corresponding resource application limit.
The project can send the resource allocation task to the resource data processing system when the resource needs to be used, for example, when the project needs to be tested and uses public cloud resources, a user can send the resource allocation task to the resource data processing system through terminal equipment, or the user can input the resource allocation task through a display interface of the resource data processing system.
The resource allocation task refers to a task of allocating resources to a project applying for resources, and may include project information and resource application quota for resource allocation of the current application. After receiving the resource allocation task, the resource data processing system can obtain the corresponding resource application limit.
S102: and inquiring the allocated resources of the project group to which the project belongs, and calculating the proportion of the allocated resources in the total resources.
In the embodiment of the invention, the resources are managed and processed through the project groups, so that the proportion of the resources which can be allocated to each project group, namely the proportion of the allocated resources in the total resources, can be configured in advance to avoid that the resources cannot be reasonably utilized due to the fact that the resource limit allocated to a single project group is too large and the resources allocated to other project groups are insufficient. Therefore, in the embodiment of the present invention, after receiving the resource allocation task of the project, the allocated resources of the project group to which the project belongs may be calculated, and further, the proportion of the allocated resources of the project group to which the project belongs to the total resources in the current state may be calculated, so as to perform resource allocation according to the proportion.
It should be noted that, in the embodiment of the present invention, when the resource application amount is obtained, it may be determined whether the remaining resource amount can meet the requirement, so that before executing the step, it may also be determined whether the remaining resource amount is greater than the resource application amount; responding to the resource application limit smaller than the remaining resource limit, executing the step, namely inquiring the distributed resources of the project group to which the project belongs; in response to the resource application quota not being less than the remaining resource quota, the resource allocation may be denied.
S103: and responding to the condition that the proportion meets the preset access condition, acquiring the attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project.
Wherein an admission condition indicates a condition under which a resource allocation can be made to an item. In the embodiment of the present invention, a proportion threshold may be set, for example, if the proportion of the allocated resources of the project group to which the project belongs to the total resources is smaller than the proportion threshold, the project is allowed to be allocated with resources, and if the proportion of the allocated resources of the project group to which the project belongs to the total resources is not smaller than the proportion threshold, the project is denied to be allocated with resources. So after the determined proportion meets the preset admission condition, the flow of resource allocation can be executed.
In order to avoid resource waste caused by too high resource application amount, the embodiment of the present invention presets an evaluation model for evaluating the resource amount required by the project based on the attribute information of the project, so that during resource allocation, the attribute information of admirability can be obtained to input the evaluation model and evaluate the required resource amount. In particular, the evaluation model may be embodied as a neural network model, a machine learning model, or the like. The attribute information may be determined based on various variables, and may include, for example, the amount of test data required, the number of test cases required for the test required for the project, the time required for the test, and so forth.
Since the embodiment of the invention manages and allocates resources by the project group, if an unused resource of the allocated list exists in the project group, the resource application quota can be reduced when applying for resources by the resource allocation task for the project, thereby reducing the resource waste. Therefore, after the required resource limit of the project is obtained in the step, the smaller value of the required resource limit and the resource application limit can be selected to be determined as the target limit of the project, so that the resource allocation is carried out according to the target limit, and the situation that the resource is allocated to be excessive to cause resource waste can be avoided.
In some embodiments, since the test functions or test services executed by some items are the same, in the embodiments of the present invention, after the determined proportion satisfies the preset admission condition, the item type of the item may be obtained first, so as to query the corresponding history items, so as to calculate the similarity between the attribute information and the attribute information of each history item; and then screening the target historical items based on the similarity, and inquiring the resource allocation limit of the target historical items to determine the required resource limit of the items. The greater the similarity between the attribute information of the history item and the attribute information of the item, the closer the required resource limit corresponding to the both are, so that the resource allocation limit corresponding to the history item more than the maximum value of the similarity can be determined as the required resource limit of the item.
However, in order to avoid that the maximum value of the similarity is also small, which results in a large error of determining the resource quota needed by the item, a preset threshold may be set in this step, that is, only when the maximum value of the similarity is greater than the preset threshold, the history item corresponding to the maximum value of the similarity may be determined as the target history item, and the resource allocation quota of the target history item may be queried to determine the resource quota needed by the item. If the maximum value of the similarity calculated in the step is not larger than the preset threshold value, the difference proportion between the attribute information of the historical item corresponding to the maximum value of the similarity and the attribute information of the item can be calculated, the resource allocation limit of the target historical item is inquired, and the resource allocation limit is adjusted based on the difference proportion to determine the resource limit required by the item.
S104: and calling a resource allocation program to allocate the resources of the target quota to the project.
In the embodiment of the present invention, a resource allocation procedure may be preset to execute a process of allocating resources. Specifically, in the embodiment of the present invention, a resource allocation platform may be preset, and a resource allocation program is set in the resource allocation platform, so that an interface provided by the resource allocation platform may be called to perform resource allocation based on a target amount.
It should be noted that, when the resource data processing system receives many resource allocation tasks, the resource allocation program may also be called in batch in this step to execute the flow of resource allocation in batch.
In still other embodiments, after this step, the resource usage time corresponding to the project may also be obtained to set the resource recovery task; and responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as the recovery limit, calling a resource allocation program, and executing the resource recovery task. The resource use time can be carried in the resource allocation task, the time of using the allocated resource by the project is shown, and the time of completing the resource use can be further determined.
It should be noted that, in the embodiment of the present invention, when executing the resource recovery task, an admirable can refuse to use the allocated resource and refuse to recover, so that a failure message of the resource recovery task is received, and at this time, the resource data processing system may further adjust the corresponding recovery limit, such as reduce the recovery limit, to generate a new resource recovery task and trigger, so as to recover the resource in time.
In still other embodiments, after this step, the allocated time of the target amount may be further stored to update the allocated resources of the project group, so as to achieve timely update and management of the resource data. Further, the allocated resource information of each project group can be obtained to call a preset visualization model, and the allocated resource information of each project group is visually displayed, so that the change of the allocated resource limit of each project group is displayed, and the porting condition of each admirable group can be adjusted.
In the embodiment of the invention, as a plurality of projects share resources, a threshold value of the resource utilization ratio, namely a preset threshold value, is configured for each project, and when the project applies for resource allocation, if the ratio of the allocated resources of the project group is greater than the preset threshold value, the allocated resources of the project group are enough, so that the resources required by the project can be evaluated again, and resource allocation is performed according to the smaller value of the evaluated required resource limit and the application limit, so that the excessive resource allocation of one project group is avoided, resource waste is caused, and the resource allocation amount and the resource utilization ratio of other project groups are improved.
The following specifically describes, with reference to the embodiment shown in fig. 1, a method for processing resource data in the embodiment of the present invention, and as shown in fig. 2, the method includes:
s201: and receiving the resource allocation task of the project and acquiring the corresponding resource application limit.
S202: and acquiring the surplus resource limit, inquiring the allocated resources of the project group to which the project belongs in response to the fact that the resource application limit is smaller than the surplus resource limit, and calculating the proportion of the allocated resources to the total resources.
S203: and responding to the condition that the proportion meets the preset access condition, acquiring the attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project.
S204: and calling a resource allocation program to allocate the resources of the target quota to the project.
S205: and acquiring the resource use time corresponding to the project to set a resource recovery task.
S206: and responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as the recovery limit, calling a resource allocation program, and executing the resource recovery task.
It should be noted that the principle of data processing in the embodiment of the present invention is the same as that in the embodiment shown in fig. 1, and is not described herein again.
The following describes, in detail, a method for processing resource data in the embodiment of the present invention with reference to the embodiment shown in fig. 1, and as shown in fig. 3, the method includes:
s301: and receiving the resource allocation task of the project and acquiring the corresponding resource application limit.
S302: and acquiring the surplus resource limit, responding to the condition that the resource application limit is smaller than the surplus resource limit, inquiring the allocated resources of the project group to which the project belongs, and calculating the proportion of the allocated resources to the total resources.
S303: and responding to the condition that the proportion meets the preset admission condition, acquiring the attribute information of the items, acquiring the item types of the items, inquiring corresponding historical items, and calculating the similarity between the attribute information and the attribute information of the historical items.
S304: in response to the fact that the maximum value of the similarity is larger than a preset threshold value, determining a historical item corresponding to the maximum value of the similarity as a target historical item, and inquiring a resource allocation limit of the target historical item to determine a resource limit required by the item; and in response to the fact that the maximum value of the similarity is not larger than a preset threshold value, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project.
S305: and calling a resource allocation program to allocate the resources of the target quota to the project.
S306: and acquiring the resource use time corresponding to the project to set a resource recovery task.
S307: and responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as the recovery limit, calling a resource allocation program, and executing the resource recovery task.
S308: storing the distribution time of the target quota so as to update the distributed resources of the project group; and acquiring the allocated resource information of each project group to call a preset visual model, and visually displaying the allocated resource information of each project group.
It should be noted that the principle of data processing in the embodiment of the present invention is the same as that in the embodiment shown in fig. 1, and is not described herein again.
In order to solve the problems in the prior art, an embodiment of the present invention provides an apparatus 400 for processing resource data, as shown in fig. 4, where the apparatus 400 includes:
a receiving unit 401, configured to receive a resource allocation task of a project, and obtain a corresponding resource application limit;
a calculating unit 402, configured to query allocated resources of a project group to which the project belongs, and calculate a ratio of the allocated resources to total resources;
a determining unit 403, configured to obtain attribute information of the project in response to that the ratio meets a preset admission condition, call a preset evaluation model, and evaluate a required resource amount of the project based on the attribute information, so as to determine a smaller value of the required resource amount and the resource application amount as a target amount of the project;
an allocating unit 404, configured to invoke a resource allocating program to allocate the resource of the target quota to the project.
It should be understood that the manner of implementing the embodiment of the present invention is the same as that of implementing the embodiment shown in fig. 1, and is not described herein again.
In an embodiment, the determining unit 403 is specifically configured to:
acquiring the item type of the item to inquire corresponding historical items so as to calculate the similarity between the attribute information and the attribute information of the historical items;
and screening target historical items based on the similarity, and inquiring the resource allocation quota of the target historical items to determine the required resource quota of the items.
In another embodiment, the determining unit 403 is specifically configured to:
in response to the fact that the maximum value of the similarity is larger than a preset threshold value, determining a historical item corresponding to the maximum value of the similarity as a target historical item, and inquiring a resource allocation limit of the target historical item to determine a required resource limit of the item;
and in response to the fact that the maximum value of the similarity is not larger than a preset threshold value, calculating a difference proportion between the attribute information of the historical item corresponding to the maximum value of the similarity and the attribute information of the item, inquiring the resource allocation limit of the target historical item, and adjusting the resource allocation limit based on the difference proportion to determine the resource limit required by the item.
In yet another embodiment, the apparatus 400 further comprises:
the setting unit is used for acquiring the resource use time corresponding to the project so as to set a resource recovery task;
and the recovery unit is used for responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as the recovery limit, calling a resource allocation program and executing the resource recovery task.
In yet another embodiment, the apparatus 400 further comprises:
and the generating unit is used for receiving the failure message of the resource recovery task and adjusting the corresponding recovery limit so as to generate a new resource recovery task and trigger the new resource recovery task.
In another embodiment, the calculating unit 402 is specifically configured to:
and acquiring a surplus resource limit, and inquiring the allocated resources of the project group to which the project belongs in response to the fact that the resource application limit is smaller than the surplus resource limit.
In yet another embodiment, the apparatus 400 further comprises:
the updating unit is used for storing the distribution time of the target quota so as to update the distributed resources of the project group;
and the visualization unit is used for acquiring the allocated resource information of each project group so as to call a preset visualization model and visually display the allocated resource information of each project group.
It should be understood that the manner of implementing the embodiment of the present invention is the same as that of implementing the embodiment shown in fig. 1, 2 or 3, and is not described herein again.
In the embodiment of the invention, because a plurality of projects share resources, a threshold value of the resource utilization ratio, namely a preset threshold value, is configured for each project, and when the project applies for resource allocation, if the ratio of the allocated resources of the project group is greater than the preset threshold value, the allocated resources of the project group are enough, so that the resources required by the project can be evaluated again, and resource allocation is performed according to the smaller value of the evaluated required resource limit and the application limit, so that the excessive resource allocated to one project group is avoided, the resource waste is caused, and the resource allocation amount and the resource utilization ratio of other project groups are improved.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic device of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the resource data processing method provided by the embodiment of the invention.
Fig. 5 shows an exemplary system architecture 500 of a resource data processing method or resource data processing apparatus to which embodiments of the invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages, etc. Various client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, and may analyze and process data such as a received product information query request, and feed back a processing result (for example, product information — just an example) to the terminal device.
It should be noted that the resource data processing method provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the resource data processing apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 are merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 6 is only an example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures 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 the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes a receiving unit, a computing unit, a determining unit, and an assigning unit. Where the names of these elements do not in some cases constitute a limitation of the element itself, for example, a receiving element may also be described as "an element of the function of the receiving element".
As another aspect, the present invention also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not assembled into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the method for resource data processing provided by the present invention.
As another aspect, the present invention further provides a computer program product including a computer program, where the computer program is executed by a processor to implement the method for processing resource data provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method of resource data processing, comprising:
receiving a resource allocation task of a project, and acquiring a corresponding resource application limit;
inquiring the distributed resources of the project group to which the project belongs, and calculating the proportion of the distributed resources in the total resources;
responding to the condition that the proportion meets the preset admission condition, acquiring attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project;
and calling a resource allocation program to allocate the resources of the target quota to the project.
2. The apparatus of claim 1, wherein evaluating a required resource quota for the project based on the attribute information comprises:
acquiring the item type of the item to inquire corresponding historical items so as to calculate the similarity between the attribute information and the attribute information of the historical items;
and screening target historical items based on the similarity, and inquiring resource allocation limits of the target historical items to determine required resource limits of the items.
3. The apparatus of claim 2, wherein screening a target historical item based on the similarity, and querying a resource allocation quota of the target historical item to determine a required resource quota of the item comprises:
in response to the fact that the maximum value of the similarity is larger than a preset threshold value, determining a historical item corresponding to the maximum value of the similarity as a target historical item, and inquiring a resource allocation limit of the target historical item to determine a required resource limit of the item;
and in response to the fact that the maximum value of the similarity is not larger than a preset threshold value, calculating a difference proportion between the attribute information of the historical item corresponding to the maximum value of the similarity and the attribute information of the item, inquiring a resource allocation limit of the target historical item, and adjusting the resource allocation limit based on the difference proportion to determine the resource allocation limit required by the item.
4. The apparatus of claim 1, wherein after allocating the resource of the target amount to the project, further comprising:
acquiring the resource use time corresponding to the project to set a resource recovery task;
and responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as a recovery limit, calling a resource allocation program, and executing the resource recovery task.
5. The apparatus of claim 4, wherein invoking the resource allocation procedure to reclaim the resources of the target amount further comprises:
and receiving the failure message of the resource recovery task, and adjusting the corresponding recovery limit to generate a new resource recovery task and trigger.
6. The apparatus of claim 1, wherein querying allocated resources of an item group to which the item belongs comprises:
and acquiring a surplus resource limit, and inquiring the allocated resources of the project group to which the project belongs in response to the fact that the resource application limit is smaller than the surplus resource limit.
7. The apparatus of claim 1, wherein after allocating the resource of the target amount to the project, further comprising:
storing the distribution time of the target quota so as to update the distributed resources of the project group;
and acquiring the allocated resource information of each project group to call a preset visualization model, and visually displaying the allocated resource information of each project group.
8. An apparatus for resource data processing, comprising:
the receiving unit is used for receiving the resource allocation task of the project and acquiring the corresponding resource application limit;
the computing unit is used for inquiring the allocated resources of the project group to which the project belongs and computing the proportion of the allocated resources to the total resources;
the determining unit is used for responding to the condition that the proportion meets the preset access condition, acquiring the attribute information of the project, calling a preset evaluation model, evaluating the required resource limit of the project based on the attribute information, and determining the smaller value of the required resource limit and the resource application limit as the target limit of the project;
and the allocation unit is used for calling a resource allocation program so as to allocate the resources of the target quota to the project.
9. The apparatus according to claim 6, wherein the determining unit is specifically configured to:
acquiring the item type of the item to inquire corresponding historical items so as to calculate the similarity between the attribute information and the attribute information of the historical items;
and screening target historical items based on the similarity, and inquiring resource allocation limits of the target historical items to determine required resource limits of the items.
10. The apparatus according to claim 9, wherein the determining unit is specifically configured to:
in response to the fact that the maximum value of the similarity is larger than a preset threshold value, determining a historical item corresponding to the maximum value of the similarity as a target historical item, and inquiring a resource allocation limit of the target historical item to determine a required resource limit of the item;
and in response to the fact that the maximum value of the similarity is not larger than a preset threshold value, calculating a difference proportion between the attribute information of the historical item corresponding to the maximum value of the similarity and the attribute information of the item, inquiring the resource allocation limit of the target historical item, and adjusting the resource allocation limit based on the difference proportion to determine the resource limit required by the item.
11. The apparatus of claim 8, further comprising:
the setting unit is used for acquiring the resource use time corresponding to the project so as to set a resource recovery task;
and the recovery unit is used for responding to the triggering of the resource recovery task, inquiring the target limit of the project to determine the target limit as the recovery limit, calling a resource allocation program and executing the resource recovery task.
12. The apparatus of claim 11, further comprising:
and the generating unit is used for receiving the failure message of the resource recovery task and adjusting the corresponding recovery limit so as to generate a new resource recovery task and trigger the new resource recovery task.
13. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-7.
14. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
15. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-7.
CN202211192598.XA 2022-09-28 2022-09-28 Resource data processing method and device, electronic equipment and storage medium Pending CN115617511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211192598.XA CN115617511A (en) 2022-09-28 2022-09-28 Resource data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211192598.XA CN115617511A (en) 2022-09-28 2022-09-28 Resource data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115617511A true CN115617511A (en) 2023-01-17

Family

ID=84860701

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211192598.XA Pending CN115617511A (en) 2022-09-28 2022-09-28 Resource data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115617511A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257326A (en) * 2023-05-11 2023-06-13 安徽海马云科技股份有限公司 Method and device for managing storage space of container
CN117640541A (en) * 2024-01-26 2024-03-01 融科联创(天津)信息技术有限公司 Cloud server resource allocation method, device, equipment and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257326A (en) * 2023-05-11 2023-06-13 安徽海马云科技股份有限公司 Method and device for managing storage space of container
CN116257326B (en) * 2023-05-11 2023-08-29 安徽海马云科技股份有限公司 Method and device for managing storage space of container
CN117640541A (en) * 2024-01-26 2024-03-01 融科联创(天津)信息技术有限公司 Cloud server resource allocation method, device, equipment and medium
CN117640541B (en) * 2024-01-26 2024-04-26 融科联创(天津)信息技术有限公司 Cloud server resource allocation method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN107343045B (en) Cloud computing system and cloud computing method and device for controlling server
CN109408205B (en) Task scheduling method and device based on hadoop cluster
CN115617511A (en) Resource data processing method and device, electronic equipment and storage medium
CN114610499A (en) Task scheduling method and device, computer readable storage medium and electronic equipment
CN109766319B (en) Compression task processing method and device, storage medium and electronic equipment
CN112733206A (en) Resource allocation method, device, server and medium
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN111491015B (en) Preheating task processing method and system, proxy server and service center
CN111062572A (en) Task allocation method and device
CN109828830B (en) Method and apparatus for managing containers
CN114924745A (en) Operation method and device of deep learning compiler and electronic equipment
CN109873731B (en) Test method, device and system
CN111209060A (en) Capability development platform processing method and device
CN108696554B (en) Load balancing method and device
CN113608751A (en) Operation method, device and equipment of reasoning service platform and storage medium
CN111190719A (en) Method, device, medium and electronic equipment for optimizing cluster resource allocation
CN113342665A (en) Task allocation method and device, electronic equipment and computer readable medium
CN109343958B (en) Computing resource allocation method and device, electronic equipment and storage medium
CN109842665B (en) Task processing method and device for task allocation server
CN110837421A (en) Task allocation method and device
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN114817347A (en) Business approval method and device, electronic equipment and storage medium
CN110247802B (en) Resource configuration method and device for cloud service single-machine environment
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination