CN116109102A - Resource allocation method and system based on genetic algorithm - Google Patents

Resource allocation method and system based on genetic algorithm Download PDF

Info

Publication number
CN116109102A
CN116109102A CN202310158589.7A CN202310158589A CN116109102A CN 116109102 A CN116109102 A CN 116109102A CN 202310158589 A CN202310158589 A CN 202310158589A CN 116109102 A CN116109102 A CN 116109102A
Authority
CN
China
Prior art keywords
resource
resource allocation
resources
genetic algorithm
tag
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
CN202310158589.7A
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.)
Information Technology Center Of 92493 Unit Of Chinese Pla
Diankeyun Beijing Technology Co ltd
Original Assignee
Information Technology Center Of 92493 Unit Of Chinese Pla
Diankeyun Beijing Technology 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 Information Technology Center Of 92493 Unit Of Chinese Pla, Diankeyun Beijing Technology Co ltd filed Critical Information Technology Center Of 92493 Unit Of Chinese Pla
Priority to CN202310158589.7A priority Critical patent/CN116109102A/en
Publication of CN116109102A publication Critical patent/CN116109102A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06313Resource planning in a project environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a resource allocation method and a system based on a genetic algorithm, comprising the following steps: acquiring resource information and a resource allocation plan, establishing a resource allocation plan as a population of a chromosome for each resource, constructing an fitness function of the chromosome according to the resource information, and carrying out iterative genetic evolution continuously through the constraint of the task use time and the number of resources required by the task to finally obtain the chromosome with optimal fitness, namely an initial resource allocation plan; and performing conflict detection analysis on the initial resource allocation scheme, and generating a resource allocation alternative scheme by using a resource tag library constructed by the resource information so as to obtain a final resource allocation scheme. The invention can formulate the optimal resource allocation scheme according to the resource information and the actual resource quantity under the condition of meeting the requirements on the use time and the demand quantity of the resources in the resource allocation plan.

Description

Resource allocation method and system based on genetic algorithm
Technical Field
The invention relates to the technical field of information management systems, in particular to a resource allocation method and system based on a genetic algorithm.
Background
The reasonable allocation of the resources is an effective means for ensuring the effective utilization of the resources, and is also an important guarantee for the normal progress of the mission plan. At present, the problem of single resource sharing conflict and resource transitional allocation mainly exists in resource allocation, and only the constraint of the use time or the number of resources is considered, so that the total time of executing all tasks is reduced or the number of successfully executed tasks is increased to be an optimization target of resource allocation. Most resource allocation schemes allocate resources according to the priorities of tasks, so that tasks with high priorities are guaranteed to obtain resources, and tasks with low priorities are often delayed to execute. In the resource allocation, the condition that a plurality of resources are allocated simultaneously is not considered, and the time constraint of the task is ignored.
In resource allocation based on a plan, a resource management unit maintains resource information, including resource types, storage positions, quantity and the like, and the same resource can have a plurality of positions, and the quantity of the resource changes along with time due to the reasons of resource consumption, supplementation, maintenance and the like; the task management unit receives resource allocation applications of a plurality of task implementation plans, including resource types, use positions, required quantity, use time and the like. The task management unit can simply count the resource storage condition and the resource allocation application, and ensure that the resources stored in a plurality of positions meet the requirements of a task implementation plan in total number through the forms of advance purchase and the like. Then, the problem of resource allocation from a plurality of resource storage positions to a plurality of resource utilization positions needs to be processed, and on the premise of guaranteeing the resource demand of a task implementation plan in a designated time, the practical resource quantity constraint of each resource storage position is considered, so that the implementation is very complex.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method and a system for allocating resources based on a genetic algorithm, so as to eliminate or improve one or more drawbacks existing in the prior art, and solve the problems of single resource sharing conflict and resource transitional allocation existing in the existing resource allocation.
In one aspect, the invention provides a resource allocation method based on a genetic algorithm, which is characterized by comprising the following steps:
acquiring resource information, wherein the resource information comprises the types of resources, the states of the resources, the storage positions of the resources and the time-varying situations of the quantity of the resources; the resource state comprises two states of executing and not executing; marking resource labels for all resources according to the resource information, and constructing a resource label library;
acquiring a resource allocation plan, wherein the resource allocation plan comprises the types of resources required by executing corresponding tasks, the use positions, the required quantity and the use time;
encoding each resource allocation plan into a chromosome, constructing an fitness function of the chromosome according to the resource information, randomly generating a preset number of individuals, and constructing a primary population of the chromosome;
in one iteration, calculating the fitness of each individual in the primary population, and carrying out selection operation, crossover operation and/or mutation operation on each individual in the primary population to generate a next generation population of the chromosome; performing the next iteration on the next generation population;
stopping iteration when a preset termination condition is met, obtaining a chromosome with highest fitness, and decoding to obtain an initial resource allocation scheme;
performing conflict detection analysis on the initial resource allocation scheme by utilizing a genetic algorithm according to the corresponding resource labels in the resource label library, wherein when resources do not conflict, the initial resource allocation scheme is a final resource allocation scheme; when the resources conflict, other resources are related according to the classified inquiry of the corresponding resource labels by combining the initial resource allocation scheme, and a resource allocation alternative scheme is generated and is used as a final resource allocation scheme.
In some embodiments of the invention, each resource allocation plan is encoded as a chromosome, further comprising:
and converting each resource allocation plan into a character string form according to a preset rule, and constructing a chromosome corresponding to the two-dimensional array representation.
In some embodiments of the present invention, the selecting, crossing and/or mutating each individual in the first generation population to generate the next generation population of chromosomes further comprises:
when the selection operation is carried out on each individual in the primary population, copying the individuals with the fitness larger than a first preset value, adding the individuals into the primary population, deleting the individuals with the fitness smaller than the first preset value, and obtaining the next-generation population when the total number of the individuals reaches a second preset value;
when each individual in the primary population is subjected to the cross operation, two individual groups are randomly selected to form an individual pair, the segments of the two individual groups are subjected to cross transposition to generate a new individual pair, the new individual pair is added into the primary population, and when the total number of the individuals reaches a second preset value, a next-generation population is obtained;
when the mutation operation is carried out on each individual in the primary population, any character of any individual in the primary population is randomly changed to generate a new individual, and when the total number of the individuals reaches a second preset value, the next-generation population is obtained.
In some embodiments of the present invention, performing conflict detection analysis on the resource allocation scheme according to the corresponding resource tag in the resource tag library by using a genetic algorithm, further includes:
when a resource allocation scheme is formulated and conflict detection analysis is carried out, resources in the resource allocation scheme in an unexecuted state and other resources which are not allocated are only analyzed and allocated without considering the resources in the executing state.
In some embodiments of the present invention, iteration is stopped when the generated latest population meets a preset condition, wherein the preset condition is calculated according to the number of demands and the use time in the resource allocation plan.
In some embodiments of the present invention, a resource tag library is constructed for each resource tag according to the resource information, and the method further includes:
establishing a resource tag library, wherein the resource tag library comprises a resource tag standard library and a resource tag initial library;
acquiring the resource information and marking each resource with a resource label; storing the resource tag into the resource tag initial library;
and after the resource labels in the resource label initial library are confirmed to be correct, storing the resource labels in the resource label standard library, and using the resource labels for conflict detection analysis.
In some embodiments of the present invention, before storing the resource tag in the resource tag initial library, the method further includes: and establishing a resource tag classification system, and summarizing each resource tag into a corresponding tag class.
In some embodiments of the present invention, the storage conditions of the resources and the resource allocation plans are summarized in a preset time interval, and a result report of dynamic change of the total demand of the resources of each resource number and each resource allocation plan with time is generated.
The invention also provides a resource allocation system based on a genetic algorithm, which is characterized in that the system is used for executing the resource allocation method based on the genetic algorithm, and the system comprises the following steps:
the source management module is used for managing resource information, wherein the resource information comprises resource types, resource states, resource storage positions and the condition that the number of resources changes along with time;
the scheme management module is used for managing resource allocation requirements, wherein the resource allocation requirements comprise types of resources required by executing corresponding tasks, use positions, required quantity and use time; the scheme management module integrates a genetic algorithm module, and the genetic algorithm module is used for generating an initial resource allocation scheme;
and the conflict detection module is used for carrying out conflict detection analysis on the initial resource allocation scheme and generating a resource allocation alternative scheme.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method as claimed in any one of the preceding claims.
The invention has the advantages that:
the invention provides a resource allocation method and a system based on a genetic algorithm, which are characterized in that resource information and a resource allocation plan are acquired, the resource allocation plan is established for each resource to form a population of chromosomes, an fitness function of the chromosomes is constructed according to the resource information, and the chromosomes with optimal fitness, namely an initial resource allocation plan, are finally obtained through continuous iterative genetic evolution under the constraint of task use time and the number of resources required by the task; and performing conflict detection analysis on the initial resource allocation scheme, and generating a resource allocation alternative scheme by using a resource tag library constructed by the resource information so as to obtain a final resource allocation scheme. The invention can formulate the optimal resource allocation scheme according to the resource information and the actual resource quantity under the condition of meeting the requirements on the use time and the demand quantity of the resources in the resource allocation plan.
Furthermore, before the resource tag library is constructed, a resource tag classification system is also established, which comprises different angles of categories, characteristics, purposes and the like of resources, and each resource tag is summarized to a corresponding tag category, so that the search and the call are facilitated, and the resource tags of the same category and associated resources can be searched according to the resource tag category in the resource conflict detection analysis.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and drawings.
It will be appreciated by those skilled in the art that the objects and advantages that can be achieved with the present invention are not limited to the above-described specific ones, and that the above and other objects that can be achieved with the present invention will be more clearly understood from the following detailed description.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram illustrating steps of a resource allocation method based on a genetic algorithm according to an embodiment of the present invention.
FIG. 2 is a schematic diagram of a resource allocation system based on a genetic algorithm according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following embodiments and the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent. The exemplary embodiments of the present invention and the descriptions thereof are used herein to explain the present invention, but are not intended to limit the invention.
It should be noted here that, in order to avoid obscuring the present invention due to unnecessary details, only structures and/or processing steps closely related to the solution according to the present invention are shown in the drawings, while other details not greatly related to the present invention are omitted.
It should be emphasized that the term "comprises/comprising" when used herein is taken to specify the presence of stated features, elements, steps or components, but does not preclude the presence or addition of one or more other features, elements, steps or components.
It is also noted herein that the term "coupled" may refer to not only a direct connection, but also an indirect connection in which an intermediate is present, unless otherwise specified.
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
It should also be emphasized that the references to steps below are not intended to limit the order of the steps, but rather should be understood to mean that the steps may be performed in a different order than in the embodiments, or that several steps may be performed simultaneously.
In order to solve the problems of single resource sharing conflict and resource transitional allocation in the existing resource allocation, the invention provides a resource allocation method based on a genetic algorithm, as shown in fig. 1, the method comprises the following steps S101 to S106:
step S101: acquiring resource information, wherein the resource information comprises the condition that the resource type, the resource state, the resource storage position and the number of resources change along with time; the resource state comprises two states of executing and not executing; and marking resource labels for the resources according to the resource information, and constructing a resource label library.
Step S102: a resource allocation plan is obtained, wherein the resource allocation plan comprises the types of resources required for executing corresponding tasks, the use positions, the required quantity and the use time.
Step S103: encoding each resource allocation plan into a chromosome, constructing an fitness function of the chromosome according to the resource information, randomly generating a preset number of individuals, and constructing a first generation population of the chromosome.
Step S104: in one iteration, calculating the fitness of each individual in the primary population, and carrying out selection operation, cross operation and/or mutation operation on each individual in the primary population to generate a next generation population of chromosomes; the next iteration is performed on the next generation population.
Step S105: stopping iteration when the preset termination condition is met, obtaining a chromosome with highest fitness, and decoding to obtain an initial resource allocation scheme.
Step S106: performing conflict detection analysis on the initial resource allocation scheme by utilizing a genetic algorithm according to the corresponding resource labels in the resource label library, and when the resources do not conflict, the initial resource allocation scheme is a final resource allocation scheme; when the resources conflict, the initial resource allocation scheme is combined to inquire other resources according to the classification of the corresponding resource label, and a resource allocation alternative scheme is generated and is used as a final resource allocation scheme.
In step S101, information of each resource is obtained first, including the condition that the resource type, the resource state, the resource storage position and the number of resources change with time, where the resource state includes two states of executing and not executing, when the resource is formulated into a deployment scheme, the executing state is displayed, at this time, the executing resource is not deployed or otherwise processed, when the resource is in the state to be deployed, the non-executing state is displayed, and the prompt system can deploy the resource, so that personnel can intuitively understand the current state of the resource, and avoid deploying the resource in execution. Meanwhile, the number of resources may dynamically change with time due to resource consumption, replenishment, maintenance, and the like.
In step S102, a resource allocation plan is obtained, and information such as execution time of a corresponding task, types and numbers of required resources are clarified, so as to construct constraint conditions for the chromosome in the following, and obtain an optimal chromosome.
In some embodiments, the required resource information and resource allocation plan are stored by adopting corresponding data structures so as to be referred and called at any time.
In step S103, because the genetic algorithm cannot directly handle parameters of the problem space, it is necessary to represent the problem to be solved as a chromosome or an individual of the genetic space by encoding. Therefore, each resource allocation plan is converted into a character string form according to a preset rule, and a chromosome corresponding to the two-dimensional array representation is constructed.
Meanwhile, the requirements of the use time and the resource demand quantity in the resource allocation plan are constrained on the chromosome, the constraint conditions of the use time and the resource demand quantity are converted into quantity constraints, corresponding constraint inequality is obtained, and finally constraint conditions which the chromosome should meet are obtained. And obtaining the chromosome with the highest fitness based on the constraint condition to obtain an initial resource allocation scheme.
According to the resource information obtained in step S101, a fitness function of the chromosome is constructed. Randomly generating a preset number of individuals, constructing a first generation population of the chromosome, and initializing the iteration number to be 0. The individuals in the primary population are all chromosomes, and are called individuals only for distinguishing from chromosomes encoded by the resource allocation plan, and are identical in format.
And judging whether the individuals which reach the preset requirements exist or not by calculating the fitness of each individual in the population, namely, whether the fitness of the individuals in the population reaches the preset requirements or not, and if not, carrying out iterative operation.
In step S104, fitness of each individual in the primary population is calculated, and a parent chromosome is obtained. And (3) performing selection operation, crossover operation and/or mutation operation on each body in the first generation population to generate a next generation population of the chromosome, and adding 1 to the iteration times.
In some embodiments, selecting each individual in the primary population, copying the individuals with fitness greater than a first preset value, adding the copied individuals to the primary population, deleting the individuals with fitness less than the first preset value, and obtaining the next-generation population when the total number of individuals in the primary population reaches a second preset value.
And performing cross operation on each individual in the primary population, randomly selecting two individuals to form an individual pair, performing cross transposition on fragments of the two individuals to generate a new individual pair, adding the new individual pair into the primary population, and obtaining the next-generation population when the total number of the individuals in the primary population reaches a second preset value.
And carrying out mutation operation on each individual in the primary population, randomly changing any character of any individual in the primary population, generating new individuals, and obtaining the next-generation population when the total number of individuals in the original primary population reaches a second preset value.
The selection operation, the crossover operation and the mutation operation can be adopted simultaneously or in a selective combination mode, and when the number of individuals in the original initial population is equal to a second preset value, the next generation population of the chromosome is obtained.
And calculating the fitness of each individual in the generated next generation population again, judging whether the individuals reach the preset requirement or not, and if not, continuing the iterative operation. And calculating the fitness of each individual in the next generation population, and obtaining the parent chromosome. And (3) performing selection operation, crossover operation and/or mutation operation on each body in the next generation population to generate the next generation population of the chromosome, and adding 1 to the iteration number, namely repeatedly executing the step S104 until the preset termination condition is met.
In step S105, after stopping iteration, outputting the chromosome with the highest fitness in the current population, and decoding to obtain the optimal initial resource allocation scheme corresponding to the chromosome.
In some embodiments, a chromosome model based on a genetic algorithm is constructed, and the model is used to perform steps S103 to S105, i.e., the resource information and the resource allocation plan are input into the chromosome model, and the chromosome model can output the corresponding initial resource allocation scheme.
In consideration of the possible resource utilization conflict, the initial resource allocation scheme obtained in step S105 cannot be directly used as the final scheme, and conflict detection analysis is required.
In step S106, the initial resource allocation scheme obtained in step 105 is analyzed by using a genetic algorithm according to the corresponding resource tag in the resource tag library.
In both the conflict detection analysis and the initial resource allocation scheme formulation in step 105, the resources in the executing state are not considered, and only the resources in the resource allocation plan in the non-executing state and other resources which are not configured are analyzed and allocated.
When the resources do not conflict, the initial resource allocation scheme can be directly used as a final resource allocation scheme; when the resources conflict, the initial resource allocation scheme is combined to inquire other resources according to the classification of the corresponding resource label, and a resource allocation alternative scheme is generated and is used as a final resource allocation scheme.
When the resources do not conflict, other resources can be related according to the classification inquiry of the corresponding resource label, and a resource allocation and allocation option scheme can be generated.
In some embodiments, when the final resource allocation scheme is prepared, a genetic algorithm is adopted, and analysis can be performed according to the attribute parameters of each resource and the resource labels thereof to generate a corresponding resource allocation alternative scheme.
In some embodiments, the resource tag library includes a resource tag standard library and a resource tag initial library.
When the system is initialized, no data exists in the standard library and the initial library of the resource labels. And marking the resource label for the resource information according to the resource information, and automatically storing the resource information and the resource label into a resource label initial library. The labels can be manual labels or automatic labels of the system, and the labels describe the resource attributes and/or the content by using keywords with strong correlation, so that the users and the system can be assisted in classification, and the retrieval and the calling are facilitated. At the same time, labels also have dimensions and classifications.
Before the resource labels are stored in the resource label initial library, a resource label classification system needs to be established, and the resource labels are summarized into corresponding label categories according to different angles of categories, characteristics, purposes and the like of the resources and then stored in the resource label initial library.
And the data manager confirms the data in the resource tag initial library, confirms the correct part and adds the corresponding resource tag to the resource standard library.
When conflict detection analysis is carried out, only the data analysis is carried out on the resource labels in the resource standard library, and the data in the resource label initial library cannot be analyzed.
After the resource information and the resource tag standard library are established, the system can manage the information of the resource, including the type of the resource, the storage position of the resource, the time-varying condition of the number of the resource caused by the reasons of resource consumption, retirement, maintenance and the like, and can also maintain the resource tag.
In some embodiments, the storage condition and the resource allocation plan of each resource are summarized within a preset time interval, a result report of the dynamic change of the total demand of each resource amount and each resource allocation plan along with time is generated, and the dynamic change condition of the resource can be timely displayed to personnel involved in task execution, so that the personnel can adjust corresponding task implementation modes according to tasks and real-time information of the resources.
The present invention also provides a genetic algorithm-based resource allocation system for performing the genetic algorithm-based resource allocation method as described above, comprising:
the source management module is used for managing resource information, wherein the resource information comprises the resource types, the resource states, the resource storage positions and the condition that the number of resources changes along with time.
The scheme management module is used for managing resource allocation requirements, wherein the resource allocation requirements comprise types of resources required by executing corresponding tasks, use positions, required quantity and use time. The scheme management module integrates a genetic algorithm module, and the genetic algorithm module is used for generating an initial resource allocation scheme.
And the conflict detection module is used for carrying out conflict detection analysis on the initial resource allocation scheme and generating a resource allocation alternative scheme.
Accordingly, the present invention also provides an apparatus comprising a computer apparatus including a processor and a memory, the memory having stored therein computer instructions for executing the computer instructions stored in the memory, the apparatus implementing the steps of the method as described above when the computer instructions are executed by the processor.
The embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the edge computing server deployment method described above. The computer readable storage medium may be a tangible storage medium such as Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disk, a removable memory disk, a CD-ROM, or any other form of storage medium known in the art.
In summary, the invention provides a resource allocation method and a system based on a genetic algorithm, which are characterized in that resource information and a resource allocation plan are acquired, a population of which the resource allocation plan is a chromosome is established for each resource, a fitness function of the chromosome is constructed according to the resource information, and the chromosome with optimal fitness, namely an initial resource allocation plan, is finally obtained through continuous iterative genetic evolution under the constraint of task use time and the number of resources required by the task; and performing conflict detection analysis on the initial resource allocation scheme, and generating a resource allocation alternative scheme by using a resource tag library constructed by the resource information so as to obtain a final resource allocation scheme. The invention can formulate the optimal resource allocation scheme according to the resource information and the actual resource quantity under the condition of meeting the requirements on the use time and the demand quantity of the resources in the resource allocation plan.
Furthermore, before the resource tag library is constructed, a resource tag classification system is also established, which comprises different angles of categories, characteristics, purposes and the like of resources, and each resource tag is summarized to a corresponding tag category, so that the search and the call are facilitated, and the resource tags of the same category and associated resources can be searched according to the resource tag category in the resource conflict detection analysis.
Those of ordinary skill in the art will appreciate that the various illustrative components, systems, and methods described in connection with the embodiments disclosed herein can be implemented as hardware, software, or a combination of both. The particular implementation is hardware or software dependent on the specific application of the solution and the design constraints. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave.
It should be understood that the invention is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present invention.
In this disclosure, features that are described and/or illustrated with respect to one embodiment may be used in the same way or in a similar way in one or more other embodiments and/or in combination with or instead of the features of the other embodiments.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for allocating resources based on a genetic algorithm, the method comprising the steps of:
acquiring resource information, wherein the resource information comprises the types of resources, the states of the resources, the storage positions of the resources and the time-varying situations of the quantity of the resources; the resource state comprises two states of executing and not executing; marking resource labels for all resources according to the resource information, and constructing a resource label library;
acquiring a resource allocation plan, wherein the resource allocation plan comprises the types of resources required by executing corresponding tasks, the use positions, the required quantity and the use time;
encoding each resource allocation plan into a chromosome, constructing an fitness function of the chromosome according to the resource information, randomly generating a preset number of individuals, and constructing a primary population of the chromosome;
in one iteration, calculating the fitness of each individual in the primary population, and carrying out selection operation, crossover operation and/or mutation operation on each individual in the primary population to generate a next generation population of the chromosome; performing the next iteration on the next generation population;
stopping iteration when a preset termination condition is met, obtaining a chromosome with highest fitness, and decoding to obtain an initial resource allocation scheme;
performing conflict detection analysis on the initial resource allocation scheme by utilizing a genetic algorithm according to the corresponding resource labels in the resource label library, wherein when resources do not conflict, the initial resource allocation scheme is a final resource allocation scheme; when the resources conflict, other resources are related according to the classified inquiry of the corresponding resource labels by combining the initial resource allocation scheme, and a resource allocation alternative scheme is generated and is used as a final resource allocation scheme.
2. The genetic algorithm-based resource allocation method according to claim 1, wherein each resource allocation plan is encoded as a chromosome, further comprising:
and converting each resource allocation plan into a character string form according to a preset rule, and constructing a chromosome corresponding to the two-dimensional array representation.
3. The genetic algorithm-based resource allocation method according to claim 1, wherein the selection, crossover and/or mutation operations are performed on each individual in the primary population to generate the next generation population of the chromosome, further comprising:
when the selection operation is carried out on each individual in the primary population, copying the individuals with the fitness larger than a first preset value, adding the individuals into the primary population, deleting the individuals with the fitness smaller than the first preset value, and obtaining the next-generation population when the total number of the individuals reaches a second preset value;
when each individual in the primary population is subjected to the cross operation, two individual groups are randomly selected to form an individual pair, the segments of the two individual groups are subjected to cross transposition to generate a new individual pair, the new individual pair is added into the primary population, and when the total number of the individuals reaches a second preset value, a next-generation population is obtained;
when the mutation operation is carried out on each individual in the primary population, any character of any individual in the primary population is randomly changed to generate a new individual, and when the total number of the individuals reaches a second preset value, the next-generation population is obtained.
4. The genetic algorithm-based resource allocation method according to claim 1, wherein the performing conflict detection analysis on the resource allocation scheme according to the corresponding resource tag in the resource tag library by using a genetic algorithm, further comprises:
when a resource allocation scheme is formulated and conflict detection analysis is carried out, resources in the resource allocation scheme in an unexecuted state and other resources which are not allocated are only analyzed and allocated without considering the resources in the executing state.
5. The genetic algorithm-based resource allocation method according to claim 1, wherein the iteration is stopped when the generated latest population meets a preset condition calculated according to the number of demands and the use time in the resource allocation plan.
6. The genetic algorithm-based resource allocation method according to claim 1, wherein the resource information is used to label each resource with a resource tag, and constructing a resource tag library, further comprises:
establishing a resource tag library, wherein the resource tag library comprises a resource tag standard library and a resource tag initial library;
acquiring the resource information and marking each resource with a resource label; storing the resource tag into the resource tag initial library;
and after the resource labels in the resource label initial library are confirmed to be correct, storing the resource labels in the resource label standard library, and using the resource labels for conflict detection analysis.
7. The method for allocating resources based on genetic algorithm according to claim 6, wherein before storing the resource tag in the resource tag initial library, further comprising: and establishing a resource tag classification system, and summarizing each resource tag into a corresponding tag class.
8. The genetic algorithm-based resource allocation method according to claim 1, wherein the storage conditions of the resources and the resource allocation plans are summarized within a preset time interval, and a result report of dynamic changes of the number of the resources and the total demand of the resources of the resource allocation plans with time is generated.
9. A genetic algorithm-based resource allocation system for performing the genetic algorithm-based resource allocation method according to any one of claims 1 to 8, the system comprising:
the source management module is used for managing resource information, wherein the resource information comprises resource types, resource states, resource storage positions and the condition that the number of resources changes along with time;
the scheme management module is used for managing resource allocation requirements, wherein the resource allocation requirements comprise types of resources required by executing corresponding tasks, use positions, required quantity and use time; the scheme management module integrates a genetic algorithm module, and the genetic algorithm module is used for generating an initial resource allocation scheme;
and the conflict detection module is used for carrying out conflict detection analysis on the initial resource allocation scheme and generating a resource allocation alternative scheme.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
CN202310158589.7A 2023-02-13 2023-02-13 Resource allocation method and system based on genetic algorithm Pending CN116109102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310158589.7A CN116109102A (en) 2023-02-13 2023-02-13 Resource allocation method and system based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310158589.7A CN116109102A (en) 2023-02-13 2023-02-13 Resource allocation method and system based on genetic algorithm

Publications (1)

Publication Number Publication Date
CN116109102A true CN116109102A (en) 2023-05-12

Family

ID=86263754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310158589.7A Pending CN116109102A (en) 2023-02-13 2023-02-13 Resource allocation method and system based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN116109102A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116596280A (en) * 2023-07-17 2023-08-15 青岛国源中创电气自动化工程有限公司 Cooperative scheduling method for water pump set of sewage treatment plant

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116596280A (en) * 2023-07-17 2023-08-15 青岛国源中创电气自动化工程有限公司 Cooperative scheduling method for water pump set of sewage treatment plant
CN116596280B (en) * 2023-07-17 2023-10-03 青岛国源中创电气自动化工程有限公司 Cooperative scheduling method for water pump set of sewage treatment plant

Similar Documents

Publication Publication Date Title
JP2007502484A (en) Method and system for predicting inactive customers
CN109358965B (en) Cloud computing cluster resource scheduling method, medium, device and computing equipment
EP4198771A1 (en) Data processing method and apparatus, computer readable medium, and electronic device
US9904741B2 (en) Colocation and anticolocation in colocation data centers via elastic nets
CN112015562A (en) Resource allocation method and device based on transfer learning and electronic equipment
CN116109102A (en) Resource allocation method and system based on genetic algorithm
US11422858B2 (en) Linked workload-processor-resource-schedule/processing-system—operating-parameter workload performance system
CN114490062A (en) Local disk scheduling method and device, electronic equipment and storage medium
Hu et al. Dynamic sample budget allocation in model-based optimization
US20090094174A1 (en) Method, system and program product for on demand data mining server with dynamic mining models
US7827132B2 (en) Peer based event conversion
CN110780955B (en) Method and equipment for processing expression message
US20230155958A1 (en) Method for optimal resource selection based on available gpu resource analysis in large-scale container platform
CN110555732A (en) Marketing strategy pushing method and device and marketing strategy operation platform
US10592585B2 (en) Stochastic network traffic modeling
CN112579280B (en) Cloud resource scheduling method and device and computer storage medium
CN114898184A (en) Model training method, data processing method and device and electronic equipment
CN113010288A (en) Scheduling method and device of cloud resources and computer storage medium
Al-Masri et al. Enhancing Resource Provisioning Across Edge-based Environments
CN116401418B (en) Data reading and writing method, device, equipment and storage medium
US11900047B1 (en) Systems, methods and software for improving the energy footprint of an electronic document
US20240054145A1 (en) Object Lineage Analysis For Package Transport
US20090228315A1 (en) Project Assessment Using Project Yield Determination
CN114615144B (en) Network optimization method and system
CN116882725A (en) Business process generation method and device, storage medium and electronic equipment

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