Cpu parallel acceleration method and system suitable for intelligent scheduling system

The CPU parallel acceleration method using multi-threaded computing units and chromosome version number checking solves the problem of limited parallel resources in existing technologies, realizes efficient computation and balanced resource allocation of scheduling algorithms, and improves the quality of scheduling solutions.

CN115756792BActive Publication Date: 2026-07-10SHANGHAI BAOSIGHT SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI BAOSIGHT SOFTWARE CO LTD
Filing Date
2022-11-16
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively increase the number of parallel resources on multiprocessor computers, resulting in limited scheduling operation speed.

Method used

It adopts a multi-threaded computing unit structure, and achieves CPU parallel computing by using a pattern of competition for computing tasks through mutation submission units, public queues and independent computing units, combined with chromosome version number checking and elimination mechanisms.

Benefits of technology

It improves the computational efficiency of the scheduling algorithm, solves the problems of redundant calculation and uneven resource allocation, controls the computational load of the algorithm, retains more possible solutions, and avoids getting trapped in local optima.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756792B_ABST
    Figure CN115756792B_ABST
Patent Text Reader

Abstract

The application provides a CPU parallel acceleration method and system suitable for an intelligent scheduling system, and the calculation of a large number of scheduling schemes generated based on a heuristic algorithm is quickly completed through a CPU parallel calculation mode, is not limited by the problem size, and can obtain higher calculation efficiency on a computer with sufficient calculation power through configuration of the number of parallel threads, and has better expansibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of scheduling technology, and more specifically, to a CPU parallel acceleration method and system suitable for intelligent scheduling systems. Background Technology

[0002] Patent document CN103530742A discloses a method and apparatus for improving the speed of scheduling calculation, comprising: allocating corresponding execution resources to each process task, arranging each process task according to execution priority, and obtaining a process task list corresponding to each execution resource; and performing scheduling calculation on the process tasks in parallel by the corresponding execution resources according to the process task list.

[0003] Patent document CN103530742A narrows the search range of scheduling schemes by pre-limiting the execution resources of the process tasks and decomposing the scheduling tasks into multiple sub-tasks for separate processing. However, the number of parallel resources in patent document CN103530742A is limited by the number of execution resources of the scheduling problem, and cannot increase the number of parallel processes on computers with more processors. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the purpose of this invention is to provide a CPU parallel acceleration method and system suitable for intelligent scheduling systems.

[0005] According to the present invention, a CPU parallel acceleration method for intelligent scheduling systems is provided, in which the fitness function of the scheduling scheme is calculated by CPU parallelization to obtain the scheduling solution.

[0006] Preferably, it includes:

[0007] Step S1: Create t threads as computing units; where t represents the number of parallel computing units;

[0008] Step S2: Create Θ threads as mutation submission units 8, and allocate parent chromosome memory in each mutation submission unit 8; where Θ represents the number of chromosomes in the population;

[0009] Step S3: The parent chromosomes in the mutation submission unit 8 are initialized respectively;

[0010] Step S4: The parent chromosome in the mutation submission unit 8 generates a batch of child chromosomes 2 through mutation or crossover, and the version number of the parent chromosome at this time is recorded in the child chromosome 2;

[0011] Step S5: Place the sub-chromosomes 2 into fitness calculation queue 3 according to the generation order. If the number of sub-chromosomes to be calculated in fitness calculation queue 3 has reached λ, then wait; where λ represents the maximum number of sub-chromosomes.

[0012] Step S6: Idle computing unit 4 retrieves the sub-chromosome to be computed from the queue, confirms that the version number of its parent chromosome is consistent with the version number recorded for the sub-chromosome, and calculates its fitness, denoted as x. i If the version numbers are inconsistent, it means that the parent chromosome has been updated and replaced. Abandon this calculation and return to step S3.

[0013] Step S7: When the number of sub-chromosomes 5 that have completed the calculation reaches λ, or when there are no more chromosomes in the fitness calculation queue 3, the population is transferred to the culler 6.

[0014] Step S8: Eliminator 6 sorts the chromosomes in the current population from high to low fitness, retaining the top chromosomes. The number of chromosomes in the current population includes parent chromosomes and child chromosomes, the total number of chromosomes is N≤Θ+λ, and α represents the elimination competition coefficient, 0≤α≤1;

[0015] Let the remaining chromosomes be denoted as C. The fitness of the remaining chromosome C is used to calculate its adoption probability using the softmax function:

[0016]

[0017] The remaining ones are selected using a roulette wheel algorithm. One chromosome is selected, and the rest are eliminated.

[0018] Step S9: The new generation chromosome becomes the new parent chromosome, version number is incremented by 1, and the process returns to step S3 until the highest fitness of the population no longer increases or the preset maximum number of iterations is reached.

[0019] Step S10: Interrupt all mutation submission units 8 and calculation units 4, and select the chromosome with the highest fitness from the last generation population as the scheduling solution.

[0020] Preferably, the multi-threaded computing units are independent of each other, and the computing units compete to acquire computing tasks.

[0021] According to a scheduling method provided by the present invention, a scheduling solution is obtained by means of a CPU parallel acceleration method suitable for intelligent scheduling systems, and scheduling is performed according to the scheduling solution.

[0022] According to the present invention, a CPU parallel acceleration system suitable for intelligent scheduling systems is provided, which calculates the fitness function of the scheduling scheme through CPU parallelization to obtain the scheduling solution.

[0023] Preferably, it includes:

[0024] Module M1: Creates t threads as computing units; where t represents the number of parallel computing units;

[0025] Module M2: Creates Θ threads as mutation submission units 8, and allocates parent chromosome memory in each mutation submission unit 8; where Θ represents the number of chromosomes in the population;

[0026] Module M3: The parent chromosomes in the mutation submission unit 8 are initialized respectively;

[0027] Module M4: The parent chromosome in the mutation submission unit 8 generates a batch of child chromosomes 2 through mutation or crossover, and the version number of the parent chromosome at this time is recorded in the child chromosome 2;

[0028] Module M5: Sub-chromosomes 2 are placed into fitness calculation queue 3 according to their generation order. If the number of sub-chromosomes to be calculated in fitness calculation queue 3 has reached λ, then wait; where λ represents the maximum number of sub-chromosomes.

[0029] Module M6: Idle computation unit 4 retrieves the sub-chromosome to be computed from the queue, confirms that the version number of its parent chromosome matches the version recorded for the sub-chromosome, and calculates its fitness, denoted as x. i If the version numbers are inconsistent, it means that the parent chromosome has been updated and replaced. In this case, abandon the calculation and return to module M3.

[0030] Module M7: When the number of sub-chromosomes 5 that have completed calculations reaches λ, or when there are no more chromosomes in the fitness calculation queue 3, the population is transferred to the culler 6.

[0031] Module M8: Eliminator 6 sorts the chromosomes in the current population according to their fitness from high to low, retaining the top chromosomes. The number of chromosomes in the current population includes parent chromosomes and child chromosomes, the total number of chromosomes is N≤Θ+λ, and α represents the elimination competition coefficient, 0≤α≤1;

[0032] Let the remaining chromosomes be denoted as C. The fitness of the remaining chromosome C is used to calculate its adoption probability using the softmax function:

[0033]

[0034] The remaining ones are selected using a roulette wheel algorithm. One chromosome is selected, and the rest are eliminated.

[0035] Module M9: The new generation chromosome becomes the new parent chromosome, version number +1, and returns to module M3 for execution until the highest fitness of the population no longer increases or the preset maximum number of iterations is reached;

[0036] Module M10: Interrupts all mutation submission units 8 and computation units 4, and selects the chromosome with the highest fitness from the last generation population as the scheduling solution.

[0037] Preferably, the multi-threaded computing units are independent of each other, and the computing units compete to acquire computing tasks.

[0038] According to a scheduling system provided by the present invention, a scheduling solution is obtained through a CPU parallel acceleration system suitable for intelligent scheduling systems, and scheduling is performed according to the scheduling solution.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] 1. This invention solves the time-consuming problem of calculating fitness for a large number of subchromosomes by using a multi-threaded computing unit structure, thereby improving the computational efficiency of the scheduling algorithm;

[0041] 2. This invention solves the problem of the inability to effectively and evenly allocate computing resources by adopting a mode of competition among independent computing units to obtain computing tasks, which involves mutation submission units, public queues, and competition among independent computing units. This enables faster computing units to complete more computing tasks and further improves the computing efficiency of the scheduling algorithm.

[0042] 3. This invention solves the problem of repeatedly calculating obsolete chromosomes by adopting a chromosome version number checking mechanism, saving computational load and further improving computational efficiency;

[0043] 4. This invention solves the problem of exponential expansion of chromosome number by employing an elimination mechanism, thereby controlling the computational load of the algorithm;

[0044] 5. This invention retains more possibilities for solutions by using an elimination coefficient competition mechanism, thus solving the problem that the algorithm is prone to getting trapped in local optima. Attached Figure Description

[0045] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0046] Figure 1 This is a schematic diagram illustrating the working principle of the present invention.

[0047] The diagram shows:

[0048] Initial scheduling scheme 1 (corresponding to the parent chromosome in the genetic algorithm)

[0049] Adjusted Scheme 2 (corresponding to sub-chromosomes in the genetic algorithm)

[0050] Fitness calculation queue 3

[0051] Computing Unit 4 (Thread)

[0052] Chromosome 5 that completed fitness calculation

[0053] Eliminator 6

[0054] Population 7

[0055] Mutation Submission Unit 8 (Thread) Detailed Implementation

[0056] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0057] This invention rapidly calculates the fitness function of a large number of scheduling schemes generated based on heuristic algorithms using CPU parallel computing. It is not limited by the problem size and can achieve higher computational efficiency on computers with sufficient computing power by configuring the number of parallel threads, thus having better scalability.

[0058] This invention is applicable to genetic algorithms or other heuristic methods for scheduling problems. The workflow of this invention is described here using a genetic algorithm as an example.

[0059] The hyperparameters used in this invention include:

[0060] • Number of parallel computing units, t;

[0061] • Population chromosome number Θ;

[0062] • Maximum number of sub-chromosomes λ;

[0063] • The elimination competition coefficient α, 0≤α≤1.

[0064] The workflow of this invention includes:

[0065] Step S1: Create t threads as computing units;

[0066] Step S2: Create Θ threads as mutation submission units 8, and allocate parent chromosome memory in each mutation submission unit 8;

[0067] Step S3: The parent chromosomes in the mutation submission unit 8 are initialized respectively;

[0068] Step S4: The parent chromosome in the mutation submission unit 8 generates a batch of child chromosomes 2 through mutation or crossover. The version number of the parent chromosome at this time is recorded in the child chromosome 2. Note that in this step, each mutation submission unit 8 is executed in parallel and independently.

[0069] Step S5: Place the sub-chromosomes 2 into fitness calculation queue 3 according to the generation order. If the number of sub-chromosomes to be calculated in fitness calculation queue 3 has reached λ, then wait.

[0070] Step S6: Idle computing unit 4 retrieves the sub-chromosome to be computed from the queue, confirms that the version number of its parent chromosome is consistent with the version number recorded for the sub-chromosome, and calculates its fitness, denoted as x. i If the version numbers are inconsistent, it means that the parent chromosome has been updated and replaced. Abandon this calculation and return to step S3.

[0071] Step S7: When the number of sub-chromosomes 5 that have completed the calculation reaches λ, or when there are no more chromosomes in the fitness calculation queue 3, the population is transferred to the culler 6.

[0072] Step S8: Eliminator 6 sorts the chromosomes in the current population (including parent chromosomes and child chromosomes, with a total number N ≤ Θ + λ) according to their fitness from high to low, retaining the top [number of chromosomes]. Given 3 chromosomes, calculate the adoption probability of the remaining chromosomes (denoted as C) using the softmax function:

[0073]

[0074] The remaining ones are selected using a roulette wheel algorithm. One chromosome is selected, and the remaining chromosomes are eliminated.

[0075] Step S9: The new generation chromosome becomes the new parent chromosome, version number is incremented by 1, and the process returns to step S3 until the highest fitness of the population no longer increases or the preset maximum number of iterations is reached.

[0076] Step S10: Interrupt all mutation submission units 8 and calculation units 4, and select the chromosome with the highest fitness from the last generation population as the scheduling solution.

[0077] The present invention also provides a CPU parallel acceleration system suitable for intelligent scheduling systems. Those skilled in the art can implement the CPU parallel acceleration system suitable for intelligent scheduling systems by executing the steps of the CPU parallel acceleration method suitable for intelligent scheduling systems. That is, the CPU parallel acceleration method suitable for intelligent scheduling systems can be understood as a preferred embodiment of the CPU parallel acceleration system suitable for intelligent scheduling systems.

[0078] According to the present invention, a CPU parallel acceleration system suitable for intelligent scheduling systems is provided, which calculates the fitness function of the scheduling scheme through CPU parallelization to obtain the scheduling solution.

[0079] Preferably, it includes:

[0080] Module M1: Creates t threads as computing units; where t represents the number of parallel computing units;

[0081] Module M2: Creates Θ threads as mutation submission units 8, and allocates parent chromosome memory in each mutation submission unit 8; where Θ represents the number of chromosomes in the population;

[0082] Module M3: The parent chromosomes in the mutation submission unit 8 are initialized respectively;

[0083] Module M4: The parent chromosome in the mutation submission unit 8 generates a batch of child chromosomes 2 through mutation or crossover, and the version number of the parent chromosome at this time is recorded in the child chromosome 2;

[0084] Module M5: Sub-chromosomes are placed into fitness calculation queue 3 according to the generation order of sub-chromosomes 2. If the number of sub-chromosomes to be calculated in fitness calculation queue 3 has reached λ, then wait; where λ represents the maximum number of sub-chromosomes.

[0085] Module M6: Idle computation unit 4 retrieves the sub-chromosome to be computed from the queue, confirms that the version number of its parent chromosome matches the version recorded for the sub-chromosome, and calculates its fitness, denoted as x. i If the version numbers are inconsistent, it means that the parent chromosome has been updated and replaced. In this case, abandon the calculation and return to module M3.

[0086] Module M7: When the number of sub-chromosomes 5 that have completed calculations reaches λ, or when there are no more chromosomes in the fitness calculation queue 3, the population is transferred to the culler 6.

[0087] Module M8: Eliminator 6 sorts the chromosomes in the current population according to their fitness from high to low, retaining the top chromosomes. The number of chromosomes in the current population includes parent chromosomes and child chromosomes, the total number of chromosomes is N≤Θ+λ, and α represents the elimination competition coefficient, 0≤α≤1;

[0088] Let the remaining chromosomes be denoted as C. The fitness of the remaining chromosome C is used to calculate its adoption probability using the softmax function:

[0089]

[0090] The remaining ones are selected using a roulette wheel algorithm. One chromosome is selected, and the rest are eliminated.

[0091] Module M9: The new generation chromosome becomes the new parent chromosome, version number +1, and returns to module M3 for execution until the highest fitness of the population no longer increases or the preset maximum number of iterations is reached;

[0092] Module M10: Interrupts all mutation submission units 8 and computation units 4, and selects the chromosome with the highest fitness from the last generation population as the scheduling solution.

[0093] The multi-threaded computing units are independent of each other, and the computing units compete for computing tasks.

[0094] According to a scheduling system provided by the present invention, a scheduling solution is obtained through a CPU parallel acceleration system suitable for intelligent scheduling systems, and scheduling is performed according to the scheduling solution.

[0095] Those skilled in the art will understand that, in addition to implementing the system, apparatus, and their modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system, apparatus, and their modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.

[0096] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A CPU parallel acceleration method suitable for intelligent scheduling systems, characterized in that, The fitness function of the scheduling scheme is calculated using CPU parallelization to obtain the scheduling solution; include: Step S1: Create t threads as computing units; where t represents the number of parallel computing units; Step S2: Create Θ threads as mutation submission units (8), and allocate parent chromosome memory in each mutation submission unit (8); where Θ represents the number of chromosomes in the population; Step S3: The parent chromosomes in the mutation submission unit (8) are initialized respectively; Step S4: The parent chromosome in the mutation submission unit (8) generates a batch of child chromosomes (2) through mutation or crossover, and the version number of the parent chromosome at this time is recorded in the child chromosomes (2); Step S5: Place the sub-chromosomes (2) into the fitness calculation queue (3) according to the generation order. If the number of sub-chromosomes to be calculated in the fitness calculation queue (3) has reached λ, then wait; where λ represents the maximum number of sub-chromosomes. Step S6: Idle computing unit (4) retrieves the sub-chromosome to be computed from the queue, confirms that the version number of its parent chromosome is consistent with the version number of the sub-chromosome, and calculates its fitness, denoted as x. i If the version numbers are inconsistent, it means that the parent chromosome has been updated and replaced. Abandon this calculation and return to step S3. Step S7: When the number of sub-chromosomes (5) that have completed the calculation reaches λ, or when there are no more chromosomes in the fitness calculation queue (3), the population is transferred to the culler (6). Step S8: Eliminator (6) sorts the chromosomes in the current population from high to low fitness, retaining the first few chromosomes. Θ*(1-α) The current population contains chromosomes, including parent chromosomes and child chromosomes, with a total number of chromosomes N ≤ Θ + λ, where α represents the elimination competition coefficient, 0 ≤ α ≤ 1. Let the remaining chromosomes be denoted as C. The fitness of the remaining chromosome C is used to calculate its adoption probability using the softmax function: The remaining Θ- is selected using the roulette wheel algorithm. Θ*(1-α) One chromosome is selected, and the rest are eliminated. Step S9: The new generation chromosome becomes the new parent chromosome, version number is incremented by 1, and the process returns to step S3 until the highest fitness of the population no longer increases or the preset maximum number of iterations is reached. Step S10: Interrupt all mutation submission units (8) and calculation units (4), and select the chromosome with the highest fitness from the last generation population as the scheduling solution.

2. The CPU parallel acceleration method for intelligent scheduling systems according to claim 1, characterized in that, The multi-threaded computing units are independent of each other, and the computing units compete for computing tasks.

3. A scheduling method, characterized in that, The scheduling solution is obtained by the CPU parallel acceleration method applicable to the intelligent scheduling system according to any one of claims 1 to 2, and the scheduling is performed according to the scheduling solution.

4. A CPU parallel acceleration system suitable for intelligent scheduling systems, characterized in that, The fitness function of the scheduling scheme is calculated using CPU parallelization to obtain the scheduling solution; include: Module M1: Creates t threads as computing units; where t represents the number of parallel computing units; Module M2: Creates Θ threads as mutation submission units (8), and allocates parent chromosome memory in each mutation submission unit (8); where Θ represents the number of chromosomes in the population; Module M3: The parent chromosomes in the mutation submission unit (8) are initialized respectively; Module M4: The parent chromosome in the mutation submission unit (8) generates a batch of child chromosomes (2) through mutation or crossover, and the version number of the parent chromosome at this time is recorded in the child chromosomes (2); Module M5: Sub-chromosomes (2) are placed into fitness calculation queue (3) according to the generation order. If the number of sub-chromosomes to be calculated in fitness calculation queue (3) has reached λ, then wait; where λ represents the maximum number of sub-chromosomes. Module M6: Idle computation unit (4) retrieves the sub-chromosome to be computed from the queue, confirms that the version number of its parent chromosome is consistent with that of the sub-chromosome, and calculates its fitness, denoted as x. i If the version numbers are inconsistent, it means that the parent chromosome has been updated and replaced. In this case, abandon the calculation and return to module M3. Module M7: When the number of sub-chromosomes (5) that have completed the calculation reaches λ, or when there are no more chromosomes in the fitness calculation queue (3), the population is transferred to the culler (6). Module M8: Eliminator (6) sorts the chromosomes in the current population from high to low fitness, retaining the first few chromosomes. Θ*(1-α) The current population contains chromosomes, including parent chromosomes and child chromosomes, with a total number of chromosomes N ≤ Θ + λ, where α represents the elimination competition coefficient, 0 ≤ α ≤ 1. Let the remaining chromosomes be denoted as C. The fitness of the remaining chromosome C is used to calculate its adoption probability using the softmax function: The remaining Θ- is selected using the roulette wheel algorithm. Θ*(1-α) One chromosome is selected, and the rest are eliminated. Module M9: The new generation chromosome becomes the new parent chromosome, version number +1, and returns to module M3 for execution until the highest fitness of the population no longer increases or the preset maximum number of iterations is reached; Module M10: Disrupts all mutation submission units (8) and computation units (4), and selects the chromosome with the highest fitness from the last generation population as the scheduling solution.

5. The CPU parallel acceleration system for intelligent scheduling systems according to claim 4, characterized in that, The multi-threaded computing units are independent of each other, and the computing units compete for computing tasks.

6. A scheduling system, characterized in that, The scheduling solution is obtained by the CPU parallel acceleration system suitable for intelligent scheduling system according to any one of claims 4 to 5, and scheduling is performed according to the scheduling solution.