CN117094694A - Course arrangement method and device based on genetic algorithm - Google Patents

Course arrangement method and device based on genetic algorithm Download PDF

Info

Publication number
CN117094694A
CN117094694A CN202310980206.4A CN202310980206A CN117094694A CN 117094694 A CN117094694 A CN 117094694A CN 202310980206 A CN202310980206 A CN 202310980206A CN 117094694 A CN117094694 A CN 117094694A
Authority
CN
China
Prior art keywords
course
course arrangement
result
arrangement
strategy
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
CN202310980206.4A
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.)
BMW Brilliance Automotive Ltd
Original Assignee
BMW Brilliance Automotive 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 BMW Brilliance Automotive Ltd filed Critical BMW Brilliance Automotive Ltd
Priority to CN202310980206.4A priority Critical patent/CN117094694A/en
Publication of CN117094694A publication Critical patent/CN117094694A/en
Pending legal-status Critical Current

Links

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/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q10/1093Calendar-based scheduling for persons or groups
    • 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

Abstract

The specification provides a course arranging method and device based on a genetic algorithm, wherein the course arranging method based on the genetic algorithm comprises the following steps: acquiring course information to be arranged, carrying out resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generating an initial course arrangement result according to a resource allocation processing result; performing course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result into a middle course arrangement result according to the verification result; selecting a course arrangement optimizing parameter corresponding to the intermediate course arrangement result, and updating the course arrangement distributing strategy based on the course arrangement optimizing parameter; and optimizing the intermediate course arrangement result by using the updated course arrangement distribution strategy until a target course arrangement result meeting the course arrangement iteration condition is obtained.

Description

Course arrangement method and device based on genetic algorithm
Technical Field
The specification relates to the technical field of data processing, in particular to a course arrangement method and device based on a genetic algorithm.
Background
With the development of computer technology, various intelligent algorithms are applied to the course scheduling problem scene, such as greedy algorithm, simulated annealing algorithm and the like, and course scheduling processing can be completed based on specified parameters. Although the class algorithm can realize course arrangement processing to a certain extent, as the class algorithm belongs to the type solved by heuristic search, the class algorithm can only be solved in the direction of a local problem, so that the obtained course arrangement result does not reach the optimal solution. Moreover, the algorithm has single calculation logic, the obtained course arrangement result can be adjusted only by manually setting rules, and the manually set rules have great time cost and labor capacity requirements, so that an effective scheme is needed to solve the problems.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a course ranking method based on a genetic algorithm. The present specification also relates to a course arrangement device, a computing device, and a computer-readable storage medium based on a genetic algorithm, so as to solve the technical defects existing in the prior art.
According to a first aspect of embodiments of the present specification, there is provided a course ranking method based on a genetic algorithm, including:
acquiring course information to be arranged, carrying out resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generating an initial course arrangement result according to a resource allocation processing result;
performing course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result into a middle course arrangement result according to the verification result;
selecting a course arrangement optimizing parameter corresponding to the intermediate course arrangement result, and updating the course arrangement distributing strategy based on the course arrangement optimizing parameter;
and optimizing the intermediate course arrangement result by using the updated course arrangement distribution strategy until a target course arrangement result meeting the course arrangement iteration condition is obtained.
Optionally, before the course arrangement optimizing parameter corresponding to the intermediate course arrangement result is selected and the course arrangement distributing strategy updating step is executed based on the course arrangement optimizing parameter, the method further includes:
Scoring the intermediate course arrangement result to obtain a course arrangement score corresponding to the intermediate course arrangement result;
acquiring a history class-arranging score corresponding to the class information to be arranged, and detecting whether the class-arranging score is larger than the history class-arranging score;
if yes, executing the steps of selecting the course arrangement optimizing parameters corresponding to the intermediate course arrangement result and updating the course arrangement distributing strategy based on the course arrangement optimizing parameters;
and if not, taking the course arrangement result corresponding to the history course arrangement score as the intermediate course arrangement result, executing the steps of selecting course arrangement optimization parameters corresponding to the intermediate course arrangement result, and updating the course arrangement allocation strategy based on the course arrangement optimization parameters.
Optionally, the performing resource allocation processing on the to-be-scheduled course information according to a preset course allocation policy, and generating an initial course allocation result according to a resource allocation processing result, including:
loading a preset course arrangement allocation strategy, and extracting a date allocation strategy and a resource allocation strategy from the course arrangement allocation strategy;
performing date distribution processing on the course information to be scheduled according to the date distribution strategy to obtain a date course scheduling result;
and carrying out resource allocation processing on the date course arrangement result according to the resource allocation strategy to obtain the initial course arrangement result.
Optionally, the course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result to an intermediate course arrangement result according to the verification result, includes:
acquiring a preset course arrangement verification strategy, and carrying out course arrangement verification on the initial course arrangement result by utilizing the course arrangement verification strategy;
under the condition that the course arrangement verification result does not pass the verification detection, extracting a secondary course arrangement optimization strategy from the course arrangement verification strategy;
and updating the initial course arrangement result according to the secondary course arrangement optimization strategy to obtain the intermediate course arrangement result.
Optionally, the updating the course allocation policy based on the course optimization parameter includes:
updating the date allocation strategy in the course allocation strategy based on the date optimization parameter under the condition that the course allocation optimization parameter is the date optimization parameter;
and updating the resource allocation strategy in the course allocation strategy based on the resource optimization parameters under the condition that the course allocation optimization parameters are resource optimization parameters.
Optionally, the optimizing the intermediate course arrangement result by using the updated course arrangement allocation policy until the target course arrangement result meeting the course arrangement iteration condition is obtained includes:
Taking the updated course arrangement allocation strategy as the course arrangement allocation strategy, and taking the intermediate course arrangement result as the course information to be arranged;
executing the resource allocation processing to the to-be-scheduled course information according to a preset course allocation policy, and generating an initial course allocation result according to the resource allocation processing result;
and taking the intermediate course arrangement result corresponding to the target course arrangement period as the target course arrangement result until the intermediate course arrangement result corresponding to the target course arrangement period meets the course arrangement iteration condition.
Optionally, the selecting a course optimization parameter corresponding to the intermediate course ranking result includes:
determining the current course arrangement period corresponding to the intermediate course arrangement result;
selecting a target optimization parameter from a preset optimization parameter set according to the period information corresponding to the current course arrangement period as the course arrangement optimization parameter;
wherein, each class period corresponds to different optimization parameters respectively.
Optionally, scoring the intermediate course ranking result to obtain a course ranking score corresponding to the intermediate course ranking result, including:
determining a plurality of scoring dimensions, and scoring each scoring dimension for the intermediate course arrangement result to obtain a sub course arrangement score corresponding to each scoring dimension of the intermediate course arrangement result;
And determining the scoring weight corresponding to each scoring dimension, and calculating the class-arrangement score corresponding to the intermediate class-arrangement result based on the scoring weight and the sub class-arrangement score corresponding to each scoring dimension.
Optionally, the method further comprises:
determining a target course arrangement rule hit by the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result under the condition that the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result do not meet a preset course arrangement rule;
and generating and displaying the course arrangement failure information according to the target course arrangement rule.
According to a second aspect of embodiments of the present specification, there is provided a course arrangement apparatus based on a genetic algorithm, including:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is configured to acquire course information to be arranged, perform resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generate an initial course arrangement result according to a resource allocation processing result;
the verification module is configured to carry out course arrangement verification on the initial course arrangement result and update the initial course arrangement result into an intermediate course arrangement result according to the verification result;
a selection module configured to select a course arrangement optimization parameter corresponding to the intermediate course arrangement result and update the course arrangement allocation policy based on the course arrangement optimization parameter;
And the optimization module is configured to optimize the intermediate course arrangement result by utilizing the updated course arrangement allocation strategy until the target course arrangement result meeting the course arrangement iteration condition is obtained.
According to a third aspect of embodiments of the present specification, there is provided a computing device comprising:
a memory and a processor;
the memory is used for storing computer executable instructions, and the processor is used for implementing the steps of the course arrangement method based on genetic algorithm when executing the computer executable instructions.
According to a fourth aspect of embodiments of the present specification, there is provided a computer readable storage medium storing computer executable instructions which, when executed by a processor, implement the steps of the genetic algorithm based course ranking method.
In order to improve the course arranging success rate, the course arranging method based on the genetic algorithm provided in this embodiment may first obtain the information of the courses to be arranged, and perform resource allocation processing based on the information of the courses to be arranged, so as to generate an initial course arranging result according to the resource allocation processing result, and may not be used in consideration of the problem that the obtained initial course arranging result may have date distribution or resource use conflict. Therefore, the initial course arrangement result can be subjected to course arrangement verification, the course arrangement result is updated into the middle course arrangement result according to the verification result, and the course arrangement result which preliminarily meets the use requirement is obtained. In order to ensure that the course arrangement result can be directly used in an actual application scene, course arrangement optimization parameters corresponding to the middle course arrangement result can be selected, course arrangement allocation strategies are updated by using the course arrangement optimization parameters, and then the updated course arrangement allocation strategies are utilized to optimize the middle course arrangement result so as to realize the course arrangement result with higher optimization success rate, and the course arrangement result is used as a target course arrangement result meeting the course arrangement iteration condition. Therefore, the course can be directly processed by using the target course arranging result in the application process, so that the course arranging process with high success rate can be completed under the condition of saving manpower resources.
Drawings
FIG. 1 is a schematic diagram of a course arrangement method based on a genetic algorithm according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a course arrangement method based on a genetic algorithm according to an embodiment of the present disclosure;
FIG. 3 is a process flow diagram of a course arrangement method based on a genetic algorithm according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a course arrangement device based on a genetic algorithm according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In the present specification, a course arrangement method based on a genetic algorithm is provided, and the present specification relates to a course arrangement apparatus based on a genetic algorithm, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Referring to the schematic diagram shown in fig. 1, in order to improve the course scheduling success rate, the course scheduling method based on the genetic algorithm provided in this embodiment may first obtain the information of the courses to be scheduled, and perform resource allocation processing based on the information of the courses to be scheduled, so as to generate an initial course scheduling result according to the resource allocation processing result, and considering that the obtained initial course scheduling result may have problems such as date distribution or resource usage conflicts, it may not be used. Therefore, the initial course arrangement result can be subjected to course arrangement verification, the course arrangement result is updated into the middle course arrangement result according to the verification result, and the course arrangement result which preliminarily meets the use requirement is obtained. In order to ensure that the course arrangement result can be directly used in an actual application scene, course arrangement optimization parameters corresponding to the middle course arrangement result can be selected, course arrangement allocation strategies are updated by using the course arrangement optimization parameters, and then the updated course arrangement allocation strategies are utilized to optimize the middle course arrangement result so as to realize the course arrangement result with higher optimization success rate, and the course arrangement result is used as a target course arrangement result meeting the course arrangement iteration condition. Therefore, the course can be directly processed by using the target course arranging result in the application process, so that the course arranging process with high success rate can be completed under the condition of saving manpower resources.
Fig. 2 shows a flowchart of a course arrangement method based on a genetic algorithm according to an embodiment of the present disclosure, which specifically includes the following steps:
step S202, obtaining course information to be arranged, carrying out resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generating an initial course arrangement result according to a resource allocation processing result.
The course arranging method based on the genetic algorithm provided in this embodiment is applied to course arranging processing scenes in any scene, including, but not limited to, school course arranging scenes, in-enterprise course teaching scenes, etc., where the course arranging method based on the genetic algorithm is described by taking the in-enterprise course teaching scenes as an example, and other scenes are the same or corresponding to each other, and all the descriptions can be referred to the same or corresponding descriptions in this embodiment, and this embodiment will not be repeated here.
Specifically, the to-be-arranged course information specifically refers to information of related courses related to course arrangement processing required to be performed in a course arrangement scene, including, but not limited to, a course name, a course type, and the like, where the course type may include a single course, a combined course, and/or a split course; the course arrangement is to arrange courses adjacent to the relevant courses when the courses are arranged. Correspondingly, the course arrangement allocation strategy is specifically a strategy of allocating classroom resources, date resources and teacher resources to courses by pointers, so that the courses are allocated to specific dates, and teachers and classrooms required to be used by the courses are realized, and an initial course arrangement result obtained after the course arrangement processing is finished preliminarily is obtained. The initial course arrangement result specifically refers to a course arrangement result obtained after the courses in the course information to be arranged are ordered, and the course arrangement result is not optimized yet, and may have a course arrangement failure.
It should be noted that, if in some of the in-enterprise course teaching scenarios, the resources may also include resources that need to be used in the in-enterprise teaching, for example, in a vehicle enterprise, the resources may also include vehicles and the like. Correspondingly, the dates can be divided into three types of weekends, holidays and workdays (including holidays), so that lessons can be arranged by focusing on the conditions of different types of dates when the lessons are arranged. Accordingly, the classroom may include a virtual place for a virtual course, etc. in addition to the classroom in which the lesson is required.
Based on this, in order to improve the course scheduling success rate, the to-be-scheduled course information may be acquired first, and the resource allocation processing may be performed based on the to-be-scheduled course information, so as to generate an initial course scheduling result according to the resource allocation processing result, where the obtained initial course scheduling result may have problems such as date distribution or resource usage conflict, and may not be used. Therefore, the initial course arrangement result can be subjected to course arrangement verification, the course arrangement result is updated into the middle course arrangement result according to the verification result, and the course arrangement result which preliminarily meets the use requirement is obtained. In order to ensure that the course arrangement result can be directly used in an actual application scene, course arrangement optimization parameters corresponding to the middle course arrangement result can be selected, course arrangement allocation strategies are updated by using the course arrangement optimization parameters, and then the updated course arrangement allocation strategies are utilized to optimize the middle course arrangement result so as to realize the course arrangement result with higher optimization success rate, and the course arrangement result is used as a target course arrangement result meeting the course arrangement iteration condition. Therefore, the course can be directly processed by using the target course arranging result in the application process, so that the course arranging process with high success rate can be completed under the condition of saving manpower resources.
In one or more embodiments of the present disclosure, the performing resource allocation processing on the course information to be scheduled according to a preset course scheduling allocation policy, and generating an initial course scheduling result according to a resource allocation processing result, includes:
loading a preset course arrangement allocation strategy, and extracting a date allocation strategy and a resource allocation strategy from the course arrangement allocation strategy; performing date distribution processing on the course information to be scheduled according to the date distribution strategy to obtain a date course scheduling result; and carrying out resource allocation processing on the date course arrangement result according to the resource allocation strategy to obtain the initial course arrangement result.
Specifically, when the pointer carries out course arrangement processing on courses, the date distribution processing is required to be carried out according to the date setting logic, for example, setting that the courses do not occupy holidays, the courses are required to be completed within n days and the like, the date distribution policy can be used for standardizing, and therefore course distribution requirements are met from the date dimension. Accordingly, the date course arrangement result specifically refers to a result obtained after courses are arranged according to dates, and the course arrangement result is not influenced by other dimensions, and only course arrangement is performed from the date dimension. Correspondingly, the resource allocation strategy is specifically a strategy for allocating resources to the date course arrangement result by a pointer, is used for allocating teachers, classrooms, teaching resources and the like for each course, and is convenient for subsequent use by integrating resource allocation logic on the basis of the date course arrangement result and arranging the date course arrangement result into an initial course arrangement result.
Based on the above, after obtaining the information of the courses to be arranged, in order to reasonably arrange the courses to be arranged and improve the success rate of arranging the courses, a preset course arranging and distributing strategy can be loaded first, and a date distributing strategy and a resource distributing strategy can be extracted from the course arranging and distributing strategy; then, the course information to be arranged can be subjected to date distribution treatment according to a date distribution strategy, so that a date course arranging result is obtained from a date dimension; furthermore, the date course arrangement result is subjected to resource allocation treatment according to a resource allocation strategy, so that teaching resources are allocated on the basis of the date course arrangement result, the initial course arrangement result is obtained, and subsequent use is realized.
In practical applications, considering that the courses to be arranged may include single courses, combined courses and split courses, when performing the date allocation processing for different courses, different processes need to be performed according to a date allocation policy, for example, a rule may be set for the single course in the date allocation policy: the holidays cannot be crossed; if the weekend course arrangement is set, the course arrangement is carried out on the weekend without fixing the starting time; if the weekend is set to be unable to arrange courses, the courses of 1-5 days need to be forcefully arranged within a week, the courses of 1 day and more are forcefully arranged to start at the morning, and the courses of 0.5 day are forcefully arranged to make the morning and afternoon free resources; setting that the weekends can not arrange courses, and forcibly arranging courses to monday to friday in 6 days; for courses equal to or greater than 7 days, the forced friday end is required to avoid spanning multiple weekends.
For another example, the date allocation policy may set rules for split courses: the holidays can not be crossed between the sections of course splitting; the split section of course can not cross holidays; if the weekend can be set for course arrangement, the weekend can be occupied for course arrangement; if the weekend is set to be unable to arrange lessons, the weekend time is not occupied, but the section itself and the section can possibly span the weekend (the lessons less than 5 days cannot span the weekend); if the weekends are set and courses cannot be arranged, course splitting in 6 days can force monday to Saturday.
For another example, the date allocation policy may set rules for inline courses: the holidays can be crossed among the sub-lessons of the course row; the lessons of the course row cannot cross holidays; the holidays cannot be crossed among the split sections in the course arrangement; split sections in the course arrangement may not themselves span holidays; if the weekend can be set for course arrangement, any sub-courses and included split can occupy the weekend course arrangement; if the weekend is set to be unable to arrange lessons, the weekend time is not occupied, but the sub lessons, the split sections included and the sub lessons can possibly span the weekend (the split of the lessons less than 5 days cannot span the weekend); the interval set by course combination is calculated separately when meeting holidays, namely the actual maximum interval can be changed into the interval number of the setting and the interval number of the holidays, for example, the interval of 3 days set by the course combination consisting of AB courses, if meeting the legal 7-day holidays and the AB courses are respectively arranged before and after the holidays, the possible range of the interval is 7-10 days, if setting the weekend and not arranging courses, the interval can be remarked by using the same treatment mode when meeting the weekend (the interval is calculated from the last lesson to the front); setting that the weekends can not arrange courses, and arranging course links in 6 days can force monday to Saturday; and (5) the total duration of the combined courses is 5, the last course is forced to end in the morning, and if the duration is an integer, the first course is ended in the afternoon.
Further, after course arrangement processing is performed by using the rule in the above-mentioned date allocation policy, a date course arrangement result is obtained. On this basis, considering that the course scheduling processing needs to consider not only the time of the lessons but also teaching resources, the resource allocation policy is also needed to be used for the resource allocation processing. And the resource allocation policy may record a rule for allocating resources for the date lesson arrangement result. For example, resources include teachers, classrooms, and vehicles, and rules may be: each course has a corresponding resource pool (a teacher pool, a classroom pool and the like), one resource is selected from all the resource pools, and the selected resource is not repeatable; only one course is arranged in the same classroom at the same time, and only one course is arranged in the same teacher at the same time; the same course/course combination requires the same classroom to be located at the same place, except for the virtual courses; firstly distributing resources for courses/course combinations with high priority according to the priority of the courses; the teacher used for the first time of splitting courses needs to be all the time to the last, as long as the later courses have a resource pool containing the teacher; splitting the classroom used for the first time until the end, and only if the subsequent lessons have resource pools containing the classroom; the unavailable time period of classrooms and teachers cannot be scheduled for lessons; and selecting vehicles on the same site, wherein the site is not provided with a viewing area, and the area is not provided with a random selection.
In this process, considering that the use of the teacher affects the final result of course allocation, the teacher use logic may also be set in the course arrangement policy to limit the allocation of teacher resources. The corresponding rules may be: different courses, the teacher has different maximum teaching times, and the teacher cannot give lessons more than the maximum teaching times; different courses, the teacher has different qualification dates, and the teacher can participate in course arrangement of the courses after exceeding the qualification date (the qualification date can be understood as a teacher checking period); the maximum continuous lessons of a teacher are not more than the set x working days (not including weekends and holidays), if the number of the working days is exceeded, at least the set y working days (not including weekends and holidays) are needed to rest, and if the duration of the lessons exceeds the maximum continuous lesson days of the teacher, the lessons can be continuously finished and the lessons can be put off again; whether a course development teacher is forced to use in the first period of a certain course can be set; when a teacher goes on business, an interval of 1 day is required, but if two adjacent classes go on business in the same city, the interval of 1 day is not required. The specific logic is as follows: if the teacher has no course arrangement in the previous day of the lesson, comparing the current course place with the teacher Base place, if the current course place and the teacher Base place are the same, calculating the difference, and if the current course place and the teacher Base place are different, calculating the difference; if the teacher lays course on the previous day, comparing the current course place with the place on the previous day, if the current course place and the place on the previous day are the same, calculating the difference, and if the current course place and the place on the previous day are different, calculating the difference, wherein a 1-day interval is needed between the two courses to be effective.
Further, considering that the date allocation policy and the resource allocation policy are policies for teaching resource and date allocation in the course arrangement stage, it is set according to what rules the course should be arranged according to, but the starting and adjustment of course arrangement cannot be achieved without the course arrangement target driving force. Therefore, the course arrangement target logic can be set in the preset course arrangement strategy, and the course arrangement is required to reach the site target and/or the month target, so that the course arrangement is performed again, and the initial course arrangement result can be obtained, thereby facilitating the subsequent use.
In practical application, the course arrangement targets may be set as follows: course ranking is carried out according to the site targets (for example, site ranking is carried out 3 times in site A), and course ranking is carried out according to the required number of course ranks in the required site; the site targets comprise refined month targets (for example, 3 times of 2 month row of A site), course arrangement is carried out according to the month targets, and course arrangement is carried out according to the required number of the courses in the required month; without month targets, course scheduling is distributed as evenly as possible in the starting and ending time of course scheduling; the criterion for meeting the goal of course month is that the last day of the course falls within the month.
For example, when teaching courses in a certain train enterprise need to be arranged, input course data can be received first and converted into a set data structure, and then date distribution is performed according to a date distribution strategy, wherein the date distribution strategy comprises: determining the month in which the ending day of the course falls according to the month requirement of the course; exclusion of holidays or weekends; according to the required schedule number, pre-distributing a date range of each period, and according to the duration of the course, distributing reasonable dates (such as beginning only in the morning, ending only in the friday without crossing the weekend, and the like) which can be used by the course; among the final dates left, course dates are randomly selected for course arrangement. After the date allocation is completed according to the date allocation policy. Furthermore, the resource allocation strategy can be utilized to allocate teaching resources. The resource allocation strategy comprises the following steps: randomly selecting classrooms contained in a field according to the field requirements of courses; selecting a development teacher in the first period according to requirements; selecting a teacher according to the service emphasis point; under the condition that the resources are occupied by multiple classes, the resources are reserved for the classes with high priority, and other classes are invalid due to the fact that the resources are read again. Based on the initial course arrangement result, the target course arrangement result can be obtained after course arrangement treatment is carried out, and then subsequent optimization is carried out.
In sum, setting a date allocation strategy and a resource allocation strategy based on the initial course arrangement result, and combining course arrangement target logic can realize primary course arrangement processing, so that an initial course arrangement result is obtained, the subsequent iterative course arrangement processing based on the initial course arrangement result is convenient, and a target course arrangement result with higher final success rate is obtained, so that the course is ensured to be reasonably arranged in the using stage.
And step S204, performing course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result into an intermediate course arrangement result according to the verification result.
Specifically, after the initial course arrangement result is obtained, further, in order to ensure that the course arrangement result can be used and avoid the problems of collision between a certain course and other courses, ineffective course arrangement or incorrect course places, the initial course arrangement result can be subjected to course arrangement verification, whether the current course arrangement result meets the expected target or not is verified according to the set rule, and the intermediate course arrangement result is generated after the verification is completed. That is, after the course arrangement verification is completed, if the verification is passed, the initial course arrangement result is directly used as the intermediate course arrangement result to continue to be used; if the verification is not passed, course arrangement adjustment can be performed on the basis of the initial course arrangement result, so that the course arrangement result meets the verification rule, and further subsequent use is facilitated. The intermediate course arrangement result specifically refers to a course arrangement result obtained by checking the initial course arrangement result according to a set checking rule and then adjusting the initial course arrangement result according to the checking result.
In one or more embodiments of the present disclosure, the course arrangement verification on the initial course arrangement result, and update the initial course arrangement result to an intermediate course arrangement result according to the verification result, includes:
acquiring a preset course arrangement verification strategy, and carrying out course arrangement verification on the initial course arrangement result by utilizing the course arrangement verification strategy; under the condition that the course arrangement verification result does not pass the verification detection, extracting a secondary course arrangement optimization strategy from the course arrangement verification strategy; and updating the initial course arrangement result according to the secondary course arrangement optimization strategy to obtain the intermediate course arrangement result.
Specifically, the course arrangement verification policy is a policy that a pointer detects an initial course arrangement result, and arranges detection logic according to a set requirement, so as to detect the initial course arrangement result after the initial course arrangement process is completed, determine whether an unreasonable or invalid course arrangement result exists in the course arrangement result, and optimize based on the unreasonable or invalid course arrangement result. Accordingly, the secondary course arrangement optimizing strategy specifically refers to a course arrangement strategy with a lower priority than the course arrangement distributing strategy, and is used for rearranging based on a part of tolerable course arrangement results, so as to obtain intermediate course arrangement results.
Based on the above, in order to ensure accurate optimization of the subsequent course arrangement result and improve the course arrangement success rate, a preset course arrangement verification strategy can be acquired first, and the course arrangement verification is performed on the initial course arrangement result by using the course arrangement verification strategy; under the condition that the course arrangement verification result does not pass the verification detection, the problem that the course arrangement is invalid exists in the current course arrangement result is described, and then a secondary course arrangement optimization strategy can be extracted from the course arrangement verification strategy; at the moment, the initial course arrangement result is updated according to the secondary course arrangement optimization strategy, so that part of tolerable course arrangement is confirmed, invalid course arrangement is adjusted, and the intermediate course arrangement result is obtained according to the updated result. In the case that the course arrangement verification result passes the verification detection, the initial course arrangement result can be directly used as an intermediate course arrangement result.
Along the above example, after the initial course arrangement result is obtained, in order to obtain the course arrangement result with higher course arrangement success rate later, the initial course arrangement result can be updated according to the course arrangement verification strategy. The course arrangement verification policy may set the following rules: checking whether the arranged courses have holidays crossing the festival or not; checking whether the selected teacher exceeds the maximum number of lessons; checking whether the selected teacher has not arrived at the qualifying date; checking whether the teacher leaves enough time for more than 1 day to leave a business trip; checking whether the teacher has exceeded the continuous maximum course-arranging days; checking whether other sub-lessons are not discharged in the course-discharging bag; and the courses failing to be checked are regarded as not being arranged, the iteration enters a course pool which is not arranged, corresponding resources are released, and the next course arrangement optimization can continue to add the part of courses to finish course optimization processing. On the basis, after the initial course arrangement result is optimized according to the course arrangement verification rule, an intermediate course arrangement result is obtained, so that the course arrangement processing can be conveniently continued on the basis.
In combination, the initial course arrangement result is updated by selecting a course arrangement verification strategy, so that the initial verification can be completed before iterative optimization, and therefore, the course arrangement result which is partially invalid is optimized, the course arrangement result which initially meets the condition is obtained, the subsequent iterative optimization stage is entered, and the optimization processing of the course arrangement result is realized.
Step S206, selecting course arrangement optimizing parameters corresponding to the intermediate course arrangement result, and updating the course arrangement distributing strategy based on the course arrangement optimizing parameters.
Specifically, after the intermediate course arrangement result is obtained, further, in order to determine the course arrangement optimal solution by using a genetic algorithm, a course arrangement optimization parameter corresponding to the intermediate course arrangement result may be selected, and the course arrangement optimization parameter may be used as an influence of the next course arrangement period, so that course arrangement optimization may be performed by receiving the influence in a new course arrangement period. Based on the method, after the course arrangement optimizing parameters are selected, the course arrangement distributing strategy can be updated by utilizing the course arrangement optimizing parameters, and the updated course arrangement distributing strategy is used as a new course arrangement distributing strategy for the course arrangement period so as to carry out further course arrangement optimizing use.
The course arrangement optimizing parameter is specifically a parameter capable of updating a course arrangement distributing strategy, and can be understood as a newly added course arrangement rule, and the new course arrangement period is required to arrange courses according to the existing rule and also to arrange courses with reference to the course arrangement optimizing parameter, so that the aim of optimizing is achieved.
In one or more embodiments of the present disclosure, the selecting a course optimization parameter corresponding to the intermediate course result includes:
determining the current course arrangement period corresponding to the intermediate course arrangement result; selecting a target optimization parameter from a preset optimization parameter set according to the period information corresponding to the current course arrangement period as the course arrangement optimization parameter; wherein, each class period corresponds to different optimization parameters respectively.
Specifically, the current course arrangement period is a period corresponding to a course arrangement processing stage of the round, in order to achieve a course arrangement success rate, a genetic algorithm is required to be utilized to carry out iterative optimization of a plurality of course arrangement periods when course arrangement processing is carried out, so that a target course arrangement result can be obtained, and each optimization stage corresponds to one course arrangement period; correspondingly, the period information specifically refers to a period number corresponding to the current course arrangement period, and is used for selecting an optimization parameter required to be used in the current course arrangement period from a preset optimization parameter set according to the period information, and taking the optimization parameter as the course arrangement optimization parameter.
Based on this, considering that the course arrangement processing can obtain the course arrangement result meeting the use condition after a plurality of course arrangement periods, and each course arrangement period can be preset with a plurality of course arrangement optimization parameters in order to achieve the purpose of course arrangement optimization, so that the course arrangement optimization parameters corresponding to the period can be selected for use in each course arrangement period. That is, the current course arrangement period corresponding to the intermediate course arrangement result can be determined first; selecting target optimization parameters from a preset optimization parameter set according to the period information corresponding to the current course arrangement period to serve as course arrangement optimization parameters; and each course arrangement period corresponds to different optimization parameters.
In practical applications, when setting the course arrangement optimization parameters corresponding to each course arrangement period, the course arrangement optimization parameters can be set according to the setting requirements, for example, according to the cycle number. For example, period 1 sets the optimization parameters as: resource variation, such as randomly selecting dates/teachers, when varying teachers, uses the following teacher selection rules: local priority 1 > remote priority 1 teacher > other teacher; setting optimization parameters in period 2 as follows: priority variation is not carried out on the classes, if the priority variation is not carried out on the classes, the classes are randomly selected to carry out resource variation; period n (where n is a multiple of 10, such as period 10, period 20, period 30, etc.), the following optimization parameters may be used: randomly selecting classes to perform variation no matter whether the classes without row exist or not; period m (where m is a multiple of 50, such as period 50, period 100, period 150, etc.), the following optimization parameters may be used: the teacher is chosen purely randomly, whether locally or remotely.
In specific implementation, the setting of the optimization parameters may be set according to actual requirements, for example, the optimization parameters may be set for each period, or the same optimization parameters may be set for a part of non-adjacent periods according to a setting policy, so long as optimization of the course arrangement result can be performed in each course arrangement period, which is not limited in this embodiment.
In sum, by setting different optimization parameters for each course arranging period, the course arranging device can be used selectively as required before iterative optimization, and can achieve the aim of optimizing course arranging results for each course arranging period, so that course arranging results with higher success rate can be obtained quickly and accurately, and downstream service is convenient to use.
In one or more embodiments of the present disclosure, the updating the course allocation policy based on the course allocation parameters includes:
updating the date allocation strategy in the course allocation strategy based on the date optimization parameter under the condition that the course allocation optimization parameter is the date optimization parameter; and updating the resource allocation strategy in the course allocation strategy based on the resource optimization parameters under the condition that the course allocation optimization parameters are resource optimization parameters.
Specifically, the date optimization parameter specifically refers to a parameter for updating a date allocation policy in a course allocation policy, and is used for setting a new course allocation rule for date allocation in a new course allocation period; correspondingly, the resource optimization parameter specifically refers to a parameter for updating the resource allocation policy in the course allocation policy, and is used for setting new course allocation rules for teaching resource allocation in a new course allocation period.
Based on this, in the case where the course arrangement optimization parameter is a date optimization parameter, the date allocation policy in the course arrangement allocation policy may be updated based on the date optimization parameter; in the case that the course arrangement optimization parameter is a resource optimization parameter, the resource allocation policy in the course arrangement allocation policy may be updated based on the resource optimization parameter. Based on the method, the new course arrangement period is realized, the updated strategy can be utilized for course arrangement, so that a new course arrangement result is obtained, and the iteration is performed, so that the target course arrangement result meeting the condition can be finally obtained.
In one or more embodiments of the present disclosure, before the step of selecting a course scheduling optimization parameter corresponding to the intermediate course scheduling result and updating the course scheduling allocation policy based on the course scheduling optimization parameter is performed, the method further includes:
scoring the intermediate course arrangement result to obtain a course arrangement score corresponding to the intermediate course arrangement result; acquiring a history class-arranging score corresponding to the class information to be arranged, and detecting whether the class-arranging score is larger than the history class-arranging score; if yes, executing the steps of selecting the course arrangement optimizing parameters corresponding to the intermediate course arrangement result and updating the course arrangement distributing strategy based on the course arrangement optimizing parameters; and if not, taking the course arrangement result corresponding to the history course arrangement score as the intermediate course arrangement result, executing the steps of selecting course arrangement optimization parameters corresponding to the intermediate course arrangement result, and updating the course arrangement allocation strategy based on the course arrangement optimization parameters.
Specifically, the course ranking score specifically refers to a comprehensive course ranking score obtained by integrating scores corresponding to the middle course ranking result in each dimension, and is used for representing the success rate of the middle course ranking result. Accordingly, the history course-arranging score specifically refers to a course-arranging score corresponding to a course-arranging period adjacent to the current course-arranging period, and is used for showing whether the course-arranging score of the current period is in an increasing state, if not, the course-arranging result of the current period is lower than the success rate of the previous period, and if not, the course-arranging result of the current period cannot be used, and the course-arranging result of the previous period can be selected to replace the course-arranging result of the current period, so that optimization is performed. If so, the course arrangement result of the current period is higher than the success rate of the previous period, and the course arrangement result can be directly used for continuous optimization.
Based on the method, after the intermediate course arrangement result is obtained, in order to achieve the aim of realizing optimization in each course arrangement period, the course arrangement success rate is improved, scoring can be carried out on the intermediate course arrangement result, and the course arrangement score corresponding to the intermediate course arrangement result is obtained; at this time, the history class-ranking score corresponding to the class-ranking information can be obtained again, and whether the class-ranking score is larger than the history class-ranking score is detected; if so, the course arrangement period optimization is in an increasing state, the course arrangement optimization parameters corresponding to the intermediate course arrangement result can be continuously selected, and the course arrangement allocation strategy is updated based on the course arrangement optimization parameters; if not, the optimization of the course arrangement period is in a descending state, and in order to ensure more accurate course arrangement results, the course arrangement result corresponding to the history course arrangement score is taken as the intermediate course arrangement result, so that the steps of selecting course arrangement optimization parameters corresponding to the intermediate course arrangement result and updating the course arrangement allocation strategy based on the course arrangement optimization parameters are continuously executed. So as to finish course arrangement treatment in an increasing state as much as possible in the optimizing process.
In one or more embodiments of the present disclosure, scoring the intermediate course ranking result to obtain a course ranking score corresponding to the intermediate course ranking result includes:
determining a plurality of scoring dimensions, and scoring each scoring dimension for the intermediate course arrangement result to obtain a sub course arrangement score corresponding to each scoring dimension of the intermediate course arrangement result; and determining the scoring weight corresponding to each scoring dimension, and calculating the class-arrangement score corresponding to the intermediate class-arrangement result based on the scoring weight and the sub class-arrangement score corresponding to each scoring dimension.
Specifically, the scoring dimension specifically refers to a dimension capable of scoring the course arrangement result, such as a teaching resource allocation dimension, a date dimension, and the like, and each dimension can independently score the course arrangement result. Correspondingly, the sub-class score is the score obtained after scoring in each scoring dimension. Accordingly, the scoring weight specifically refers to a preset weight of each scoring dimension, which may be set according to actual requirements, and the embodiment is not limited in any way.
Based on the above, when scoring is performed on the intermediate course arrangement result, a plurality of scoring dimensions can be determined first, and scoring is performed on each scoring dimension on the intermediate course arrangement result, so that a sub course arrangement score corresponding to each scoring dimension of the intermediate course arrangement result is obtained; and then, calculating in a weighted summation mode, namely determining the scoring weight corresponding to each scoring dimension, and calculating the course arrangement score corresponding to the intermediate course arrangement result based on the scoring weight and the sub course arrangement score corresponding to each scoring dimension so as to facilitate the subsequent determination of whether the intermediate course arrangement result is available according to the course arrangement score, thereby entering a new course arrangement period and optimizing the course arrangement result.
In practical application, when the scoring dimension and the scoring rule are set, the fact that the weights occupied by different dimensions are different is considered, so that an independent scoring rule can be set for each dimension; for example, for scoring the course ranking rate, the more courses/course combinations that are set to be successful in ranking, the more prone to save the result on the result, the weight can be set to 100, the value range to [0,1], and the scoring value range to [0,100]. For courses with few teachers in priority arrangement, the courses with few teachers in a resource pool are ordered in reverse order, the more the courses with few teachers are discharged, the more the weighted scores are, the more the result tends to be stored, the weight can be set to be 0.1, the value range is [0,1], and the scoring value range is [0,0.1]. Based on the method, different scoring rules and corresponding weights can be set for different dimensions according to actual demands, so that the obtained class-ranking score is more accurate after weighted summation is realized.
Along the use case, after the intermediate course arrangement result is obtained, in order to ensure that the target course arrangement result meeting the use requirement is obtained, the total score of the current course arrangement result can be calculated first, wherein the score can be realized by combining rules of course arrangement rate, examination priority, annual target and the like. And after the total score is obtained, the score is compared with the historical total score of the previous period. And comparing and determining that the total score of the current period is larger than the historical total score, and continuing to carry out course arrangement on the basis of the intermediate course arrangement result. In order to ensure that the new course arrangement period can realize the optimization of the course arrangement result, the period number corresponding to the current period can be determined, course arrangement optimization parameters are selected according to the period number, and the course arrangement optimization parameters are blended into the course arrangement allocation strategy corresponding to the current period to obtain the new course arrangement allocation strategy, and the new course arrangement allocation strategy is used as the strategy required to be used in the next period, so that the continuous optimization on the basis of the intermediate course arrangement result in the next period is realized.
In summary, the course arrangement optimization parameters are selected to optimize the course arrangement distribution strategy, so that the aim of course arrangement optimization can be achieved in each course arrangement period, and a target course arrangement result is generated through multiple rounds of optimization, thereby facilitating downstream business use.
And step S208, optimizing the intermediate course arrangement result by using the updated course arrangement allocation strategy until the target course arrangement result meeting the course arrangement iteration condition is obtained.
Specifically, after the course arrangement allocation policy is updated by using the course arrangement optimization parameter, further, in order to achieve the objective course arrangement result satisfying the condition by means of the iterative solution, the intermediate course arrangement result may be optimized by using the updated course arrangement allocation policy, that is, course arrangement is continuously performed on the basis of the intermediate course arrangement result, so as to perform iterative processing until the objective course arrangement result satisfying the course arrangement iterative condition is obtained.
The class-ranking iteration condition specifically refers to a condition for stopping optimization processing on a class-ranking result, such as an iteration number condition, an iteration score comparison condition, etc., which may be set according to actual requirements, and the embodiment is not limited in any way. Correspondingly, the target course arrangement result is the course arrangement result obtained after the course arrangement is carried out aiming at the courses in the current business scene.
In one or more embodiments of the present disclosure, the optimizing the intermediate course arrangement result by using the updated course arrangement allocation policy until obtaining a target course arrangement result that meets the course arrangement iteration condition includes:
taking the updated course arrangement allocation strategy as the course arrangement allocation strategy, and taking the intermediate course arrangement result as the course information to be arranged; executing the resource allocation processing to the to-be-scheduled course information according to a preset course allocation policy, and generating an initial course allocation result according to the resource allocation processing result; and taking the intermediate course arrangement result corresponding to the target course arrangement period as the target course arrangement result until the intermediate course arrangement result corresponding to the target course arrangement period meets the course arrangement iteration condition.
Based on the above, after the intermediate course arrangement result and the updated course arrangement allocation policy are obtained, in order to ensure that the obtained course arrangement result can be used for downstream services, or stored in a course arrangement success set, so that subsequent analysis and use are convenient, the updated course arrangement allocation policy can be used as the course arrangement allocation policy, and the intermediate course arrangement result can be used as the course information to be arranged; and returning to execute step S202, so as to enter a new course arranging period processing process, and the like, until the intermediate course arranging result corresponding to the target course arranging period meets the course arranging iteration condition, wherein the intermediate course arranging result corresponding to the target course arranging period can be used as the target course arranging result if the intermediate course arranging result corresponding to the target course arranging period does not need to be arranged for course arranging optimization.
According to the method, after the updated course arrangement distribution strategy is obtained, the intermediate course arrangement result can be optimized again by utilizing the updated course arrangement distribution strategy, and the algorithm iterates continuously, the course arrangement result with the highest total score is reserved until the iteration number reaches the configured iteration number, for example, 5000 times, at the moment, the iteration can be terminated, and the course arrangement result on the course arrangement can be fed back, so that the downstream business can be used conveniently.
In conclusion, by adopting an iterative course arrangement mode to carry out course arrangement optimization, the course arrangement result can be ensured to be more accurate, and therefore, the downstream business is convenient to use.
In one or more embodiments of the present specification, the method further comprises:
determining a target course arrangement rule hit by the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result under the condition that the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result do not meet a preset course arrangement rule; and generating and displaying the course arrangement failure information according to the target course arrangement rule.
Specifically, the target course arrangement rule refers to a rule that the selected course arrangement result does not meet the preset course arrangement rule when the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result does not meet the preset course arrangement rule, and course arrangement failure information can be generated according to the rule. The course failure information specifically refers to information describing the reason of course failure, and is used for informing an operator in a course scheduling optimization stage, so that course scheduling optimization or manual intervention and other operations are realized.
Based on the above, in the case that the course information to be discharged, the intermediate course discharge result or the initial course discharge result does not meet the preset course discharge rule, the course discharge result is described to have a problem, and in order to be able to quickly solve the problem, the target course discharge rule on which the course information to be discharged, the intermediate course discharge result or the initial course discharge result hits can be determined; the method and the device can generate and display the course arrangement failure information according to the target course arrangement rule, so that the follow-up fault release operation is convenient.
In practical application, different feedback results can be set for different course arrangement failure reasons, for example, if resources are not configured (for example, a teacher or classroom resources are not configured in the system), a failure code 9 can be fed back; for another example, if the date and course starting and ending time is not long enough and the course starting and ending time needs to be increased, the failure code 7 can be fed back. Different failure codes can be set for different feedback information, and it is required to be noted that the failure codes fed back are not allowed to be repeated, so that after feedback, the quick positioning problem of operators can be assisted, and operations such as fault removal processing and the like can be performed.
In order to improve the course arranging success rate, the course arranging method based on the genetic algorithm provided in this embodiment may first obtain the information of the courses to be arranged, and perform resource allocation processing based on the information of the courses to be arranged, so as to generate an initial course arranging result according to the resource allocation processing result, and may not be used in consideration of the problem that the obtained initial course arranging result may have date distribution or resource use conflict. Therefore, the initial course arrangement result can be subjected to course arrangement verification, the course arrangement result is updated into the middle course arrangement result according to the verification result, and the course arrangement result which preliminarily meets the use requirement is obtained. In order to ensure that the course arrangement result can be directly used in an actual application scene, course arrangement optimization parameters corresponding to the middle course arrangement result can be selected, course arrangement allocation strategies are updated by using the course arrangement optimization parameters, and then the updated course arrangement allocation strategies are utilized to optimize the middle course arrangement result so as to realize the course arrangement result with higher optimization success rate, and the course arrangement result is used as a target course arrangement result meeting the course arrangement iteration condition. Therefore, the course can be directly processed by using the target course arranging result in the application process, so that the course arranging process with high success rate can be completed under the condition of saving manpower resources.
The following describes, with reference to fig. 3, an application of the course scheduling method based on the genetic algorithm in the in-enterprise course teaching scenario provided in the present specification as an example. Fig. 3 shows a process flow chart of a course arrangement method based on a genetic algorithm according to an embodiment of the present disclosure, which specifically includes the following steps:
step S302, obtaining to-be-scheduled course information, loading a preset course scheduling allocation strategy, and extracting a date allocation strategy and a resource allocation strategy from the course scheduling allocation strategy.
And step S304, performing date distribution processing on the course information to be arranged according to the date distribution strategy to obtain a date course arrangement result.
And step S306, carrying out resource allocation processing on the date course arrangement result according to the resource allocation strategy to obtain the initial course arrangement result.
Step S308, a preset course arrangement verification strategy is obtained, and the course arrangement verification strategy is utilized to carry out course arrangement verification on the initial course arrangement result.
And step S310, extracting a secondary course arrangement optimizing strategy from the course arrangement checking strategy in the case that the course arrangement checking result does not pass the checking detection.
And step S312, updating the initial course arrangement result according to the secondary course arrangement optimization strategy to obtain the intermediate course arrangement result.
And step S314, scoring is carried out on the intermediate course arrangement result, and the course arrangement score corresponding to the intermediate course arrangement result is obtained.
Step S316, obtaining the history class-ranking score corresponding to the class information to be ranked, and detecting whether the class-ranking score is greater than the history class-ranking score. If not, go to step S318; if yes, go to step S320.
And step S318, taking the course arrangement result corresponding to the history course arrangement score as the intermediate course arrangement result.
Step S320, determining a current course arrangement period corresponding to the intermediate course arrangement result, and selecting a target optimization parameter from a preset optimization parameter set as the course arrangement optimization parameter according to period information corresponding to the current course arrangement period.
Step S322, updating the course allocation policy based on the course allocation parameters.
Specifically, when the course arrangement optimization parameter is a date optimization parameter, updating the date allocation strategy in the course arrangement allocation strategy based on the date optimization parameter; and updating the resource allocation strategy in the course allocation strategy based on the resource optimization parameters under the condition that the course allocation optimization parameters are resource optimization parameters.
Step S324, taking the updated course arrangement allocation strategy as the course arrangement allocation strategy, taking the intermediate course arrangement result as the course information to be arranged, and executing step S302.
And step S326, taking the intermediate course arrangement result corresponding to the target course arrangement period as the target course arrangement result until the intermediate course arrangement result corresponding to the target course arrangement period meets the course arrangement iteration condition.
In order to improve the course arranging success rate, the course arranging method based on the genetic algorithm provided in this embodiment may first obtain the information of the courses to be arranged, and perform resource allocation processing based on the information of the courses to be arranged, so as to generate an initial course arranging result according to the resource allocation processing result, and may not be used in consideration of the problem that the obtained initial course arranging result may have date distribution or resource use conflict. Therefore, the initial course arrangement result can be subjected to course arrangement verification, the course arrangement result is updated into the middle course arrangement result according to the verification result, and the course arrangement result which preliminarily meets the use requirement is obtained. In order to ensure that the course arrangement result can be directly used in an actual application scene, course arrangement optimization parameters corresponding to the middle course arrangement result can be selected, course arrangement allocation strategies are updated by using the course arrangement optimization parameters, and then the updated course arrangement allocation strategies are utilized to optimize the middle course arrangement result so as to realize the course arrangement result with higher optimization success rate, and the course arrangement result is used as a target course arrangement result meeting the course arrangement iteration condition. Therefore, the course can be directly processed by using the target course arranging result in the application process, so that the course arranging process with high success rate can be completed under the condition of saving manpower resources.
Corresponding to the method embodiment, the present disclosure further provides an embodiment of a course arrangement device based on a genetic algorithm, and fig. 4 shows a schematic structural diagram of the course arrangement device based on the genetic algorithm according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
the acquisition module 402 is configured to acquire course information to be arranged, perform resource allocation processing on the course information to be arranged according to a preset course arrangement allocation policy, and generate an initial course arrangement result according to a resource allocation processing result;
a verification module 404 configured to verify the initial course arrangement result and update the initial course arrangement result to an intermediate course arrangement result according to the verification result;
a selection module 406 configured to select a course arrangement optimization parameter corresponding to the intermediate course arrangement result and update the course arrangement allocation policy based on the course arrangement optimization parameter;
and an optimization module 408 configured to optimize the intermediate course arrangement result by using the updated course arrangement allocation strategy until a target course arrangement result satisfying the course arrangement iteration condition is obtained.
In an alternative embodiment, the apparatus further comprises:
the scoring module is configured to score the intermediate course arrangement result and obtain a course arrangement score corresponding to the intermediate course arrangement result; acquiring a history class-arranging score corresponding to the class information to be arranged, and detecting whether the class-arranging score is larger than the history class-arranging score; if yes, executing the steps of selecting the course arrangement optimizing parameters corresponding to the intermediate course arrangement result and updating the course arrangement distributing strategy based on the course arrangement optimizing parameters; and if not, taking the course arrangement result corresponding to the history course arrangement score as the intermediate course arrangement result, executing the steps of selecting course arrangement optimization parameters corresponding to the intermediate course arrangement result, and updating the course arrangement allocation strategy based on the course arrangement optimization parameters.
In an alternative embodiment, the acquisition module 402 is further configured to:
loading a preset course arrangement allocation strategy, and extracting a date allocation strategy and a resource allocation strategy from the course arrangement allocation strategy; performing date distribution processing on the course information to be scheduled according to the date distribution strategy to obtain a date course scheduling result; and carrying out resource allocation processing on the date course arrangement result according to the resource allocation strategy to obtain the initial course arrangement result.
In an alternative embodiment, the verification module 404 is further configured to:
acquiring a preset course arrangement verification strategy, and carrying out course arrangement verification on the initial course arrangement result by utilizing the course arrangement verification strategy; under the condition that the course arrangement verification result does not pass the verification detection, extracting a secondary course arrangement optimization strategy from the course arrangement verification strategy; and updating the initial course arrangement result according to the secondary course arrangement optimization strategy to obtain the intermediate course arrangement result.
In an alternative embodiment, the selection module 406 is further configured to:
updating the date allocation strategy in the course allocation strategy based on the date optimization parameter under the condition that the course allocation optimization parameter is the date optimization parameter; and updating the resource allocation strategy in the course allocation strategy based on the resource optimization parameters under the condition that the course allocation optimization parameters are resource optimization parameters.
In an alternative embodiment, the optimization module 408 is further configured to:
taking the updated course arrangement allocation strategy as the course arrangement allocation strategy, and taking the intermediate course arrangement result as the course information to be arranged; executing the resource allocation processing to the to-be-scheduled course information according to a preset course allocation policy, and generating an initial course allocation result according to the resource allocation processing result; and taking the intermediate course arrangement result corresponding to the target course arrangement period as the target course arrangement result until the intermediate course arrangement result corresponding to the target course arrangement period meets the course arrangement iteration condition.
In an alternative embodiment, the selection module 406 is further configured to:
determining the current course arrangement period corresponding to the intermediate course arrangement result; selecting a target optimization parameter from a preset optimization parameter set according to the period information corresponding to the current course arrangement period as the course arrangement optimization parameter; wherein, each class period corresponds to different optimization parameters respectively.
In an alternative embodiment, the scoring module is further configured to:
determining a plurality of scoring dimensions, and scoring each scoring dimension for the intermediate course arrangement result to obtain a sub course arrangement score corresponding to each scoring dimension of the intermediate course arrangement result; and determining the scoring weight corresponding to each scoring dimension, and calculating the class-arrangement score corresponding to the intermediate class-arrangement result based on the scoring weight and the sub class-arrangement score corresponding to each scoring dimension.
In an alternative embodiment, the apparatus further comprises:
the display module is configured to determine a target course arrangement rule hit by the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result under the condition that the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result do not meet a preset course arrangement rule; and generating and displaying the course arrangement failure information according to the target course arrangement rule.
In order to improve the course arranging success rate, the course arranging device based on the genetic algorithm provided in this embodiment may first obtain the information of the courses to be arranged, and perform resource allocation processing based on the information of the courses to be arranged, so as to generate an initial course arranging result according to the resource allocation processing result, and may not be used in consideration of the problem that the obtained initial course arranging result may have date distribution or resource use conflict. Therefore, the initial course arrangement result can be subjected to course arrangement verification, the course arrangement result is updated into the middle course arrangement result according to the verification result, and the course arrangement result which preliminarily meets the use requirement is obtained. In order to ensure that the course arrangement result can be directly used in an actual application scene, course arrangement optimization parameters corresponding to the middle course arrangement result can be selected, course arrangement allocation strategies are updated by using the course arrangement optimization parameters, and then the updated course arrangement allocation strategies are utilized to optimize the middle course arrangement result so as to realize the course arrangement result with higher optimization success rate, and the course arrangement result is used as a target course arrangement result meeting the course arrangement iteration condition. Therefore, the course can be directly processed by using the target course arranging result in the application process, so that the course arranging process with high success rate can be completed under the condition of saving manpower resources.
The above is a schematic scheme of a course arrangement device based on a genetic algorithm of this embodiment. It should be noted that, the technical solution of the course arrangement device based on the genetic algorithm and the technical solution of the course arrangement method based on the genetic algorithm belong to the same concept, and details of the technical solution of the course arrangement device based on the genetic algorithm, which are not described in detail, can be referred to the description of the technical solution of the course arrangement method based on the genetic algorithm.
Fig. 5 illustrates a block diagram of a computing device 500 provided in accordance with an embodiment of the present specification. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. Processor 520 is coupled to memory 510 via bus 530 and database 550 is used to hold data.
Computing device 500 also includes access device 540, access device 540 enabling computing device 500 to communicate via one or more networks 560. Examples of such networks include public switched telephone networks (PSTN, public Switched Telephone Network), local area networks (LAN, local Area Network), wide area networks (WAN, wide Area Network), personal area networks (PAN, personal Area Network), or combinations of communication networks such as the internet. The access device 540 may include one or more of any type of network interface, wired or wireless (e.g., network interface card (NIC, network interface controller)), such as an IEEE802.11 wireless local area network (WLAN, wireless Local Area Network) wireless interface, a worldwide interoperability for microwave access (Wi-MAX, worldwide Interoperability for Microwave Access) interface, an ethernet interface, a universal serial bus (USB, universal Serial Bus) interface, a cellular network interface, a bluetooth interface, a near field communication (NFC, near Field Communication) interface, and so forth.
In one embodiment of the application, the above-described components of computing device 500, as well as other components not shown in FIG. 5, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 5 is for exemplary purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or personal computer (PC, personal Computer). Computing device 500 may also be a mobile or stationary server.
Wherein the processor 520 is configured to execute the following computer-executable instructions:
acquiring course information to be arranged, carrying out resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generating an initial course arrangement result according to a resource allocation processing result;
Performing course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result into a middle course arrangement result according to the verification result;
selecting a course arrangement optimizing parameter corresponding to the intermediate course arrangement result, and updating the course arrangement distributing strategy based on the course arrangement optimizing parameter;
and optimizing the intermediate course arrangement result by using the updated course arrangement distribution strategy until a target course arrangement result meeting the course arrangement iteration condition is obtained.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the course arrangement method based on the genetic algorithm belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the course arrangement method based on the genetic algorithm.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are configured to:
acquiring course information to be arranged, carrying out resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generating an initial course arrangement result according to a resource allocation processing result;
Performing course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result into a middle course arrangement result according to the verification result;
selecting a course arrangement optimizing parameter corresponding to the intermediate course arrangement result, and updating the course arrangement distributing strategy based on the course arrangement optimizing parameter;
and optimizing the intermediate course arrangement result by using the updated course arrangement distribution strategy until a target course arrangement result meeting the course arrangement iteration condition is obtained.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the course arrangement method based on the genetic algorithm belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the course arrangement method based on the genetic algorithm.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be increased or decreased appropriately according to the requirements of the patent practice, for example, in some areas, according to the patent practice, the computer readable medium does not include an electric carrier signal and a telecommunication signal.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present description is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present description. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all necessary in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the disclosure and the practical application, to thereby enable others skilled in the art to best understand and utilize the disclosure. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (12)

1. A course arrangement method based on a genetic algorithm, comprising:
acquiring course information to be arranged, carrying out resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generating an initial course arrangement result according to a resource allocation processing result;
performing course arrangement verification on the initial course arrangement result, and updating the initial course arrangement result into a middle course arrangement result according to the verification result;
Selecting a course arrangement optimizing parameter corresponding to the intermediate course arrangement result, and updating the course arrangement distributing strategy based on the course arrangement optimizing parameter;
and optimizing the intermediate course arrangement result by using the updated course arrangement distribution strategy until a target course arrangement result meeting the course arrangement iteration condition is obtained.
2. The method of course placement based on genetic algorithm of claim 1, wherein the selecting course placement optimization parameters corresponding to the intermediate course placement results and updating the course placement allocation policy based on the course placement optimization parameters further comprises, prior to execution:
scoring the intermediate course arrangement result to obtain a course arrangement score corresponding to the intermediate course arrangement result;
acquiring a history class-arranging score corresponding to the class information to be arranged, and detecting whether the class-arranging score is larger than the history class-arranging score;
if yes, executing the steps of selecting the course arrangement optimizing parameters corresponding to the intermediate course arrangement result and updating the course arrangement distributing strategy based on the course arrangement optimizing parameters;
and if not, taking the course arrangement result corresponding to the history course arrangement score as the intermediate course arrangement result, executing the steps of selecting course arrangement optimization parameters corresponding to the intermediate course arrangement result, and updating the course arrangement allocation strategy based on the course arrangement optimization parameters.
3. The method of course scheduling based on genetic algorithm according to claim 1, wherein the performing resource allocation processing on the course information to be scheduled according to a preset course scheduling allocation policy, generating an initial course scheduling result according to the resource allocation processing result, includes:
loading a preset course arrangement allocation strategy, and extracting a date allocation strategy and a resource allocation strategy from the course arrangement allocation strategy;
performing date distribution processing on the course information to be scheduled according to the date distribution strategy to obtain a date course scheduling result;
and carrying out resource allocation processing on the date course arrangement result according to the resource allocation strategy to obtain the initial course arrangement result.
4. The method of course arrangement based on genetic algorithm according to claim 1, wherein the performing course arrangement verification on the initial course arrangement result and updating the initial course arrangement result to an intermediate course arrangement result according to the verification result comprises:
acquiring a preset course arrangement verification strategy, and carrying out course arrangement verification on the initial course arrangement result by utilizing the course arrangement verification strategy;
under the condition that the course arrangement verification result does not pass the verification detection, extracting a secondary course arrangement optimization strategy from the course arrangement verification strategy;
And updating the initial course arrangement result according to the secondary course arrangement optimization strategy to obtain the intermediate course arrangement result.
5. The course scheduling method based on the genetic algorithm of claim 3, wherein the updating the course scheduling allocation policy based on the course scheduling optimization parameter comprises:
updating the date allocation strategy in the course allocation strategy based on the date optimization parameter under the condition that the course allocation optimization parameter is the date optimization parameter;
and updating the resource allocation strategy in the course allocation strategy based on the resource optimization parameters under the condition that the course allocation optimization parameters are resource optimization parameters.
6. The method of course arrangement based on genetic algorithm according to claim 1, wherein optimizing the intermediate course arrangement result using the updated course arrangement allocation strategy until a target course arrangement result satisfying a course arrangement iteration condition is obtained, comprises:
taking the updated course arrangement allocation strategy as the course arrangement allocation strategy, and taking the intermediate course arrangement result as the course information to be arranged;
executing the resource allocation processing to the to-be-scheduled course information according to a preset course allocation policy, and generating an initial course allocation result according to the resource allocation processing result;
And taking the intermediate course arrangement result corresponding to the target course arrangement period as the target course arrangement result until the intermediate course arrangement result corresponding to the target course arrangement period meets the course arrangement iteration condition.
7. The method of course ranking based on genetic algorithm according to claim 1, wherein the selecting course ranking optimization parameters corresponding to the intermediate course ranking result comprises:
determining the current course arrangement period corresponding to the intermediate course arrangement result;
selecting a target optimization parameter from a preset optimization parameter set according to the period information corresponding to the current course arrangement period as the course arrangement optimization parameter;
wherein, each class period corresponds to different optimization parameters respectively.
8. The method of course ranking based on genetic algorithm according to claim 2, wherein scoring the intermediate course ranking result to obtain a course ranking score corresponding to the intermediate course ranking result comprises:
determining a plurality of scoring dimensions, and scoring each scoring dimension for the intermediate course arrangement result to obtain a sub course arrangement score corresponding to each scoring dimension of the intermediate course arrangement result;
and determining the scoring weight corresponding to each scoring dimension, and calculating the class-arrangement score corresponding to the intermediate class-arrangement result based on the scoring weight and the sub class-arrangement score corresponding to each scoring dimension.
9. The genetic algorithm-based course arrangement method according to any one of claims 1 to 8, further comprising:
determining a target course arrangement rule hit by the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result under the condition that the course information to be arranged, the intermediate course arrangement result or the initial course arrangement result do not meet a preset course arrangement rule;
and generating and displaying the course arrangement failure information according to the target course arrangement rule.
10. A course arrangement device based on a genetic algorithm, comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is configured to acquire course information to be arranged, perform resource allocation processing on the course information to be arranged according to a preset course arrangement allocation strategy, and generate an initial course arrangement result according to a resource allocation processing result;
the verification module is configured to carry out course arrangement verification on the initial course arrangement result and update the initial course arrangement result into an intermediate course arrangement result according to the verification result;
a selection module configured to select a course arrangement optimization parameter corresponding to the intermediate course arrangement result and update the course arrangement allocation policy based on the course arrangement optimization parameter;
and the optimization module is configured to optimize the intermediate course arrangement result by utilizing the updated course arrangement allocation strategy until the target course arrangement result meeting the course arrangement iteration condition is obtained.
11. A computing device comprising a memory and a processor; the memory is configured to store computer executable instructions and the processor is configured to execute the computer executable instructions to implement the steps of the genetic algorithm-based course ranking method of any one of claims 1 to 9.
12. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the genetic algorithm based course ranking method of any one of claims 1 to 9.
CN202310980206.4A 2023-08-06 2023-08-06 Course arrangement method and device based on genetic algorithm Pending CN117094694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310980206.4A CN117094694A (en) 2023-08-06 2023-08-06 Course arrangement method and device based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310980206.4A CN117094694A (en) 2023-08-06 2023-08-06 Course arrangement method and device based on genetic algorithm

Publications (1)

Publication Number Publication Date
CN117094694A true CN117094694A (en) 2023-11-21

Family

ID=88774333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310980206.4A Pending CN117094694A (en) 2023-08-06 2023-08-06 Course arrangement method and device based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN117094694A (en)

Similar Documents

Publication Publication Date Title
Müller et al. Comprehensive approach to student sectioning
US20080306805A1 (en) Method and Apparatus for Queue-Based Automated Staff Scheduling
CN110032393A (en) A kind of micro services dissemination method, device, equipment and medium
CN110648161A (en) Benefit evaluation method and device for commercial site selection and storage medium
CN107241380A (en) For the method and apparatus of the load balancing adjusted based on the time
CN104599085A (en) User motivating method under crowdsourcing mode and crowdsourcing system
Dyaberi et al. Managing cellular congestion using incentives
CN110827054A (en) Order receiving reward processing method and device, reward platform and storage medium
CN110263136B (en) Method and device for pushing object to user based on reinforcement learning model
CN101938362A (en) Charging regrant method, device and system
CN108632452A (en) A kind of schedule update method, apparatus and system
CN105956422A (en) Method and system for controlling usage of software programs on mobile computing devices
CN111046156B (en) Method, device and server for determining rewarding data
CN117094694A (en) Course arrangement method and device based on genetic algorithm
CN115423305A (en) IT service management method and device and server
CN109657853A (en) A kind of cource arrangement method and device of dual temperature control
CN105913169A (en) Work order processing method and device
CN107948681A (en) A kind of startup advertisement jettison system based on big data
US20140222480A1 (en) Test scheduling
CN110690981B (en) Data processing method and computer-readable storage medium
CN111832780A (en) Private network data prediction method, private network data prediction device, private network data prediction equipment and storage medium
CN114816172B (en) Personnel scheduling interaction processing method and device and electronic equipment
CN110363312A (en) A kind of about class method, apparatus, storage medium and server
CN116527489A (en) Gray scale control system
CN116248461B (en) Scheduling method and device for distributed tasks of mobile terminal 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