Intelligent course arrangement method and device based on MIP and large language model

Through the intelligent class scheduling method based on MIP and large language model, the problem of insufficient algorithm efficiency and adaptability of the class scheduling system in the current technology in higher education scenarios is solved, and the intelligent processing of teachers' personalized needs and the improvement of classroom utilization is achieved.

CN120373753APending Publication Date: 2025-07-25ZHEJIANG VOCATIONAL COLLEGE OF COMMERCE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510452554.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing course scheduling system has insufficient algorithm efficiency and adaptability in higher education scenarios, making it difficult to generate global optimal strategies, ignore the correlation between courses and classes, fail to fully integrate teachers' personalized needs, and lack an intelligent bottom-up mechanism, which leads to the disconnection of the course scheduling results from the actual teaching scenarios.

Method used

An intelligent class scheduling method based on MIP and large language model is adopted to obtain teachers' time preferences and teaching course lists through large language models, establish a class scheduling planning model, set up a variety of constraints, including course uniqueness, teacher allocation consistency, classroom allocation consistency, etc., and set up continuous block uniqueness and teacher interval rest time constraints for continuous courses, and use the objective function to maximize the satisfaction of teachers' personalized needs and reduce classroom idle rate.

Benefits of technology

It is realized that teachers can directly describe the teaching scope and time tendencies in text form, generate the optimal class schedule results, meet teachers' personalized needs and improve classroom utilization, and provide an intelligent bottom-up mechanism to deal with unsolvable situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373753A_ABST
    Figure CN120373753A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent course arrangement method and device based on an MIP and a big language model, and the method comprises the steps: obtaining teacher time preference and a course list which can be taught from teacher input based on the big language model, and extracting a teacher time preference weight and a course qualification parameter from the teacher time preference weight; establishing a course arrangement planning model which comprises decision variables, constraint conditions and a target function; the decision variables comprise courses, teachers and teachers; wherein continuous course arrangement constraints are set for the continuous courses and comprise uniqueness of continuous blocks, distribution consistency of teachers and classrooms in the continuous blocks and time period occupation guarantee of the continuous blocks; and based on the teacher time preference weight and the course qualification parameter, solving the course arrangement planning model to obtain an optimal course arrangement result. According to the method, teachers are allowed to directly describe the range and time tendency of courses which can be taught by the teachers in a character form, and the optimal course arrangement result is obtained through automatic solving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent course scheduling, and in particular, to an intelligent course scheduling method and device based on MIP and large language models. Background Art

[0002] Currently, the existing course scheduling systems generally have problems of insufficient algorithm efficiency and adaptability. Traditional solutions mainly rely on manual input or automated processing based on fixed rules. Although they can solve basic conflict problems, they rely on manual experience and it is difficult to generate a globally optimal strategy. Some systems attempt to adopt optimization methods such as evolutionary algorithms, but they are limited by poor algorithm convergence and high computational complexity, and are prone to falling into local optimal solutions, with limited stability and practicality. In terms of constraint condition modeling, existing systems mostly focus on the matching of basic resources such as time and classrooms, ignoring the relevance between courses and classes (such as the collaborative arrangement of cross-class courses and the connection requirements between experimental courses and theoretical courses), resulting in the disconnection between the course scheduling results and the actual teaching scenarios. At the same time, the compatibility of the system with teachers' personalized needs is insufficient. For example, it does not fully integrate constraints such as teachers' time preferences (such as no scheduling during specific time periods) and teaching scope restrictions (such as cross-disciplinary course qualification requirements), resulting in a deviation between the course scheduling plan and the true demands of users.

[0003] In view of the particularity of higher education, existing systems lack the ability of scenario adaptation: for example, experimental courses need to be bound to dedicated laboratories, courses with training links need to be scheduled continuously (such as the indivisibility of "2 theoretical + 1 practical"), and complex rules such as the time isolation requirements between elective courses and compulsory courses. It is difficult for existing technologies to flexibly support through parametric configuration. In addition, when the system cannot generate a feasible solution due to constraint conflicts, it lacks an intelligent fallback mechanism (such as dynamically relaxing secondary constraints and providing multiple alternative solutions), resulting in users having to manually adjust the rules and recalculate, greatly reducing the course scheduling efficiency. The above defects seriously restrict the application effect of the course scheduling system in high-complexity scenarios such as universities. Summary of the Invention

[0004] The purpose of the present invention is to provide an intelligent course scheduling method and device based on MIP and large language models in view of the deficiencies of the prior art.

[0005] The purpose of the present invention is achieved through the following technical solutions: An intelligent course scheduling method based on MIP and large language models, comprising:

[0006] Obtaining teachers' time preferences and list of teachable courses from teachers' inputs based on a large language model, and extracting teachers' time preference weights w l,j and teaching qualification parameters

[0007] Establishing a course scheduling planning model, including decision variables, constraint conditions, and objective functions; the decision variables include courses, teachers, and teachers;

[0008] The constraint conditions include one or more of the course uniqueness constraint, teacher assignment consistency constraint, classroom assignment consistency constraint, class time period conflict constraint, classroom conflict constraint, teacher conflict constraint, teacher qualification constraint, course attribute differentiation constraint, classroom applicability constraint, teacher interval rest time constraint, and classroom idle penalty constraint;

[0009] For continuous courses, there is a continuous course arrangement constraint, including continuous block uniqueness, teacher and classroom assignment consistency within the continuous block, and continuous block time period occupancy guarantee;

[0010] Based on the teacher time preference weight and teaching qualification parameter, the course scheduling planning model is solved to obtain the optimal course scheduling result.

[0011] Furthermore, the decision variables include courses, teachers, and teachers, including:

[0012] For courses with non - continuous teaching, i.e., p ic = 0:

[0013] Course arrangement variable and p ic = 0, j ∈ J

[0014] Teacher assignment variable and p ic = 0, j ∈ J, l ∈ L

[0015] Classroom assignment variable and p ic = 0, j ∈ J, k ∈ K

[0016] When and only when the course c of class i is taught in time period j, x icj = 1; when and only when the course c of class i is taught by teacher l in time period j, y icjl = 1; when and only when the course c of class i uses classroom k in time period j, z icjl = 1;

[0017] For courses with continuous teaching, i.e., p ic = 1:

[0018] Continuous block start variable and

[0019] When x icj = 1, it means that the continuous teaching block of course c in class i starts from time period j and occupies time periods j, j + 1,..., j + r ic - 1

[0020] Continuous block teacher assignment variable and

[0021] And introduce a link relationship to ensure the consistency of teacher allocation in each time period within the continuous block:

[0022]

[0023] Continuous block teacher allocation variable And

[0024] And introduce a link relationship to ensure the consistency of classroom allocation in each time period within the continuous block:

[0025]

[0026] Teacher idle indication variable

[0027] Among them, I, J, L, and K respectively represent the class set, time period set, teacher set, and classroom set; for each class i, the set of courses it needs to take is C i , and it is divided into compulsory courses and elective courses b c,k represents the course and classroom applicability parameter; r ic represents the number of time periods for which course c needs to be taught continuously; represents the set of time periods when course c starts as a continuous block in class i; q means that a teacher can teach at most q in any consecutive q + 1 time periods.

[0028] Furthermore, the constraint conditions include:

[0029] Course uniqueness constraint When p ic = 0

[0030] When p ic = 1

[0031] Teacher allocation consistency constraint When p ic = 0

[0032] When p ic = 1

[0033]

[0034] Classroom allocation consistency constraint When p ic = 0

[0035] When p ic = 1

[0036]

[0037] Class - period conflict constraint

[0038] Classroom conflict constraint

[0039] Teacher conflict constraint

[0040] Teacher qualification constraint

[0041] Course - attribute differentiation constraint for compulsory courses

[0042] For elective courses

[0043] Classroom applicability constraint

[0044] Continuous - course arrangement constraint, that is, for p ic = 1:

[0045] Uniqueness of continuous blocks:

[0046] Consistency of teacher and classroom allocation within continuous blocks:

[0047] Guarantee of time - period occupancy in continuous blocks:

[0048] Teacher interval rest - time constraint Within consecutive q + 1 time - periods

[0049] Classroom idle - penalty constraint

[0050] Wherein, I, J, L, K respectively represent the sets of classes, time - periods, teachers, and classrooms; for each class i, the set of courses it needs to take is C i , and is divided into compulsory courses and elective courses b c,k represents the course - classroom applicability parameter; r ic represents the number of time - periods for which course c needs to be continuously taught; represents the set of time - periods when course c starts as a continuous block in class i; q means that a teacher can teach at most q times within any consecutive q + 1 time - periods.

[0051] Furthermore, for non - continuously taught courses, the objective function is:

[0052]

[0053] For a continuously taught course, the objective function is:

[0054]

[0055] Or

[0056] For a non - continuously taught course, the objective function is:

[0057]

[0058] For a continuously taught course, the objective function is:

[0059]

[0060] Wherein, I, J, L, K respectively represent the set of classes, the set of time slots, the set of teachers, and the set of classrooms; y icjl Is the teacher assignment variable, and y icjl = 1 if and only if the course c of class i is taught by teacher l at time slot j; α is the penalty weight for classroom idle; g kj Is the classroom idle variable.

[0061] Furthermore, the large language model is fine - tuned as follows:

[0062] Obtain teacher input data and perform manual annotation. The teacher input includes the range of courses that the teacher can teach and time preferences;

[0063] Use the annotated teacher input data to fine - tune the large language model.

[0064] Furthermore, it also includes converting the teacher input into a standard expression using regular expressions and custom rules.

[0065] Furthermore, the large language model is the DeepSeek LLM 7B Base base model; fine - tune the DeepSeek LLM 7B Base base model in the LORA manner based on the openmind framework, including the following steps:

[0066] a. Configure parameters, including model training parameters and LORA parameters;

[0067] b. Only train the low - rank matrix r and freeze the remaining weights in the base model;

[0068] c. Use the Teacher Forcing method to perform supervised fine - tuning on the annotated teacher input data.

[0069] Furthermore, it also includes building an online course scheduling service system, specifically:

[0070] The online course scheduling service system includes a backend service and a frontend interface;

[0071] The backend service includes an LLM text processing module, an optimization solving module, and a data storage module; specifically:

[0072] When the system is initialized, the administrator inputs the course schedules of each class and the information of all classrooms in the school;

[0073] The LLM text processing module receives the teacher input text transmitted from the frontend, outputs the teacher's time preferences and the list of courses that can be taught, and extracts the preference weight w l,j and the teaching qualification parameters

[0074] The optimization solving module uses the extracted preference weight w l,j and the teaching qualification parameters to calculate the optimal global course scheduling plan under the current constraints in real time;

[0075] The frontend interface includes:

[0076] The frontend adopts a responsive design and displays the optimal solution of the current course scheduling plan in real time;

[0077] When the teacher submits the text input, the backend triggers the solving process; the frontend interface obtains the latest solving result in real time and refreshes the display in a timely manner.

[0078] Furthermore, if no solution is output, the relaxation variable method is used to find all the conflicting constraints and the corresponding teachers, modify the teacher inputs involved, extract the parameters from the modified teacher inputs, and execute re-solving until the optimal course scheduling result is obtained.

[0079] The present invention also provides an intelligent course scheduling device based on MIP and large language models, including:

[0080] An LLM text processing module, which is used to obtain the teacher's time preferences and the list of courses that can be taught from the teacher input based on the large language model, and extract the teacher's time preference weight w l,j and the teaching qualification parameters

[0081] A model establishment module, which is used to establish a course scheduling planning model, including decision variables, constraint conditions, and objective functions; the decision variables include courses, teachers, and teachers;

[0082] The constraint conditions include one or more of course uniqueness constraint, teacher assignment consistency constraint, classroom assignment consistency constraint, class period conflict constraint, classroom conflict constraint, teacher conflict constraint, teacher qualification constraint, course attribute differentiation constraint, classroom applicability constraint, teacher interval rest time constraint, and classroom idle penalty constraint;

[0083] There are consecutive course arrangement constraints for consecutive courses, including the uniqueness of consecutive blocks, the consistency of teacher and classroom allocation within consecutive blocks, and the guarantee of occupied time periods for consecutive blocks.

[0084] A solving module is used to solve the course scheduling planning model based on the teacher's time preference weights and teaching qualification parameters to obtain the optimal course scheduling result.

[0085] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0086] 1. Teachers can directly describe the scope of courses they can teach and their time preferences in text form. The present invention uses a large language model (LLM) to convert the teacher's input into structured JSON format data, thereby extracting the preference weights of teachers for each time period and the list of courses they can teach.

[0087] 2. When modeling, set classroom applicability constraints to ensure that each course will only be arranged in eligible classrooms, such as separating classrooms for experimental courses and theoretical courses; for courses with consecutive teaching, such as "2 theoretical courses + 1 practical training course", set consecutive course arrangement constraints to ensure consecutive course scheduling; set course attribute differentiation constraints to ensure that compulsory courses are arranged in compulsory time periods and elective courses are arranged in elective time periods; set teacher interval rest time constraints to ensure the rest time of teachers.

[0088] 3. The present invention also designs an objective function to maximize the satisfaction of teachers' personalized needs; or maximize the satisfaction of teachers' personalized needs and at the same time reduce the idle rate of classrooms.

[0089] 4. For the case of no solution, the present invention uses the slack variable method to find the teachers who cause conflicts and notify them to modify their requirements, and then re-solve after submission. Description of the Drawings

[0090] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0091] Figure 1 It is a schematic flowchart of an intelligent course scheduling method based on MIP and large language model provided by an embodiment of the present invention. Detailed Embodiments

[0092] The following will describe the present invention in detail with reference to the drawings. Without conflict, the features in the following embodiments and implementation manners can be combined with each other.

[0093] Glossary: A continuous block means that certain courses must be scheduled in consecutive time periods during course scheduling and cannot be split into multiple non - adjacent time periods.

[0094] An intelligent course scheduling method based on MIP and large language models according to the present invention, see Figure 1 , including the following steps:

[0095] (1) Obtain the teacher's time preference and list of teachable courses from the teacher input, and extract the teacher time preference weight w l,j and teaching qualification parameters (used to represent the subjects that the teacher can teach);

[0096] In one embodiment, the step (1) is specifically:

[0097] (1.1) The teacher directly enters the range of teachable courses and time preferences through the system interface (for example: "I hope to teach on Monday morning and Wednesday afternoon, and only teach mathematics and physics courses").

[0098] (1.2) The system collects a large amount of teacher text input data, and uses regular expressions and custom rules to convert the natural language description into a standard expression, for example, mapping "morning" to a specific time period identifier.

[0099] (1.3) Manually annotate the data to convert the natural language into a quantified weight. For example, annotate the weight of "I strongly hope to teach on Monday morning" as 0.9, and form a supervised data set of the teacher's teachable course range and time preference. The annotation content includes the teacher's specific teaching subjects, time preferences and corresponding weights. The data annotation format is as follows:

[0100] {

[0101] ″teacher_id″:″α″,

[0102] ″Iteaching_range″:[″Math″,″Physics″,″Chemistry″],

[0103] ″time_preferences″:{

[0104] ″Monday_AM″:0.9,

[0105] ″Mondayy_PM″:0.3,

[0106] ″Tuesday_AM″:0.8,

[0107] …

[0108] }

[0109] }

[0110] (2) Preprocess the supervised dataset;

[0111] In one embodiment, step (2) is specifically as follows:

[0112] (2.1) Remove HTML tags and special symbols, correct garbled or incorrect characters, and ensure unified text encoding.

[0113] (2.2) Unify the symbols in the text, uniformly use Chinese punctuation, use half-width for text, full-width for punctuation, and convert traditional Chinese to simplified Chinese.

[0114] (2.3) Load the tokenizer from the DeepSeek LLM 7B Base model to obtain the vocabulary corresponding to the model.

[0115] (2.4) Use the above vocabulary to map the text in the dataset to input_ids and generate the attention mask matrix.

[0116] (2.5) Concatenate the data, and use each pair of the text information input by the teacher + the JSON-formatted data after annotation as a training sample.

[0117] (3) Fine-tune the LLM model, and the fine-tuned LLM model is used to obtain the teacher's time preference and the list of teachable courses from the teacher's input, and extract the teacher's time preference weight w l,j and the teaching qualification parameter

[0118] In one embodiment, step (3) is specifically as follows:

[0119] Fine-tune the DeepSeek LLM 7BBase base model using the LORA (Low Rank Adaptation) method based on the openmind framework, including the following steps:

[0120] (3.1) Configure parameters, including model training parameters and LORA parameters

[0121] (3.2) Freeze most of the weights in the base model and only train the low-rank matrix r.

[0122] (3.3) Use the Teacher Forcing method to perform supervised fine-tuning on the dataset in step two.

[0123] (4) Establish a course scheduling planning model and solve it

[0124] In one embodiment, step (4) is specifically as follows:

[0125] Input all the course information and all the classroom information of each class, and based on the teacher teaching qualification information and time preference information output by the above LLM model, solve and model according to the following sub-steps:

[0126] (4.1) Parameter and set definition

[0127] Set definition:

[0128] Let the class set be \(i\in I\).

[0129] Let the time period set be \(j\in J\), and at the same time divide the time period set into required time periods \(J^r\) R and elective time periods \(J^e\) E , satisfying:

[0130]

[0131] Let the teacher set be \(l\in L\).

[0132] Let the classroom set be \(k\in K\).

[0133] For each class \(i\), the set of courses it needs to take is \(C_i\) i , and it is further divided into required courses and elective courses

[0134] Parameter definition:

[0135] Teacher teaching qualification parameter (obtained from teaching_range in the JSON data of step (1)):

[0136]

[0137] Teacher time preference weight \(w_{lj}\) l,j (obtained from time_preferences in the JSON data of step (1)).

[0138] Course and classroom applicability parameter: For course \(c\) and classroom \(k\),

[0139] \(b_{ck}\) c,k \(\in\{0,1\}\)

[0140] When and only when course \(c\) is applicable to classroom \(k\), \(b_{ck}\) c,k = 1.

[0141] Continuous teaching flag and required number of continuous time periods: For the courses in class i \(i\) c ,

[0142]

[0143] When \(p\) icWhen \(p = 1\), let the number of consecutive teaching periods required for this course be \(r\). ic .

[0144] At the same time, define the set of periods when course \(c\) can start as a continuous block in class \(i\) as:

[0145]

[0146] Teacher rest parameter: Let \(q\) represent that in any consecutive \(q + 1\) periods, the teacher teaches at most \(q\) (that is, at least one period is vacant).

[0147] Teacher idle penalty weight: Let \(\alpha>0\).

[0148] (4.2) Definition of decision variables

[0149] For regular courses (courses that are not taught continuously, i.e., \(p\) ic = 0):

[0150] Course arrangement variable and \(p\) ic = 0, \(j\in J\)

[0151] Teacher assignment variable and \(p\) ic = 0, \(j\in J\), \(l\in L\)

[0152] Classroom assignment variable and \(p\) ic = 0, \(j\in J\), \(k\in K\)

[0153] If and only if course \(c\) in class \(i\) is taught in period \(j\), \(x\) icj = 1; if and only if course \(c\) in class \(i\) is taught by teacher \(l\) in period \(j\), \(y\) icjl = 1; if and only if course \(c\) in class \(i\) uses classroom \(k\) in period \(j\), \(z\) icjl = 1.

[0154] For courses with continuous teaching, i.e., \(p\) ic = 1:

[0155] Continuous block start variable and

[0156] When \(x\) icj = 1, it means that the continuous teaching block of course \(c\) in class \(i\) starts from period \(j\) and occupies periods \(j, j + 1,\cdots, j + r\) ic - 1

[0157] Continuous block teacher assignment variable and

[0158] And introduce a link relationship to ensure that the teacher assignments in each period within the continuous block are consistent:

[0159]

[0160] Continuous block teacher assignment variable And

[0161] And introduce a link relationship to ensure the consistency of classroom assignments in each period within a continuous block:

[0162]

[0163] Teacher availability indicator variable

[0164] (4.3) Constraint construction

[0165] (4.3.1) Course uniqueness constraint

[0166]

[0167] (4.3.2) Teacher assignment consistency constraint When p ic = 0

[0168] When p ic = 1

[0169]

[0170] (4.3.3) Classroom assignment consistency constraint When p ic = 0

[0171]

[0172] (4.3.4) Class period conflict constraint

[0173] (4.3.5) Classroom conflict constraint

[0174] (4.3.6) Teacher conflict constraint

[0175] (4.3.7) Teacher qualification constraint

[0176] (4.3.8) Course attribute differentiation constraint for compulsory courses

[0177] For elective courses

[0178] (4.3.9) Classroom applicability constraint

[0179] (4.3.10) Successive course arrangement constraint, i.e., for p ic = 1:

[0180] (4.3.10.1) Successive block uniqueness:

[0181] (4.3.10.2) Consistency of teacher and classroom allocation within successive blocks:

[0182]

[0183] (4.3.10.3) Guarantee of time period occupancy for successive blocks:

[0184] (4.3.11) Teacher break time constraint Within successive q + 1 time periods

[0185] (4.3.12) Classroom idle penalty constraint

[0186] Among them, constraint (4.3.1) ensures that each course (regular or successive teaching) is only arranged once; for successive courses, only one starting point is selected within the feasible starting time periods.

[0187] Constraints (4.3.2) and (4.3.3) respectively ensure that if a course is arranged in a certain time period, a unique teacher and classroom must be allocated to it; for successive courses, by introducing Y icjl and Z icjl ensure consistent allocation within successive blocks.

[0188] Constraint (4.3.4) ensures that at most one course can be arranged for each class in the same time period; for successive courses, the occupied time periods within successive blocks are all regarded as occupied.

[0189] Constraints (4.3.5) and (4.3.6) respectively prevent a classroom and a teacher from having multiple courses arranged in the same time period.

[0190] Constraint (4.3.7) ensures that a teacher can only teach the courses for which he / she is qualified.

[0191] Constraint (4.3.8) realizes the distinction between compulsory courses and elective courses in terms of time periods, avoiding their mixed arrangement.

[0192] Constraint (4.3.9) ensures that a course is only arranged in a classroom that meets its facility requirements.

[0193] Constraint (4.3.10) details the arrangement of successive courses, including:

[0194] (4.3.10.1) Ensure that only one feasible starting period is selected for each consecutive course;

[0195] (4.3.10.2) Ensure that the teacher and classroom assignments within a consecutive block are consistent, and bind the assignments of each period to the starting block variable through a link relationship;

[0196] (4.3.10.3) Ensure that the consecutive block continuously occupies r ic periods starting from the starting moment.

[0197] Constraint (4.3.11) ensures that teachers have enough free periods to rest after consecutive teaching.

[0198] Constraint (4.3.12) maximizes the classroom utilization rate by introducing an idle indication variable g kj and imposing a penalty on it in an objective function.

[0199] (4.4) Construction of the objective function

[0200] In one embodiment, for non-consecutive teaching courses, the objective function is:

[0201]

[0202] For consecutive teaching courses, the objective function is:

[0203]

[0204] On the basis of satisfying any one or more of the above constraints, by maximizing the objective function, the satisfaction rate of teachers' personalized needs is maximized, and at the same time, the classroom idle rate is reduced.

[0205] In another embodiment, for non-consecutive teaching courses, the objective function is:

[0206]

[0207] For consecutive teaching courses, the objective function is:

[0208]

[0209] On the basis of satisfying any one or more of the above constraints, the satisfaction degree of teachers' time preferences is maximized.

[0210] In one embodiment, it further includes building an online course scheduling service system, specifically:

[0211] The system includes a backend service and a front-end interface;

[0212] 1. Backend service

[0213] This part is divided into an LLM text processing module, a solution module, and a data storage module.

[0214] When the system is initialized, the administrator inputs the class schedules of each class and the information of all classrooms in the school.

[0215] The LLM text processing module receives the teacher input text transmitted from the front end, outputs a JSON-formatted list of the teacher's time preferences and teachable courses, and extracts the preference weight w from it. l,j , and the teaching qualification parameters

[0216] The solution module uses the above-extracted parameters to calculate the optimal global class scheduling plan under the current constraints in real time.

[0217] The data storage module records all teacher inputs, solution histories, and the current optimal solutions.

[0218] 2. Front-end interface. This part includes the following functions:

[0219] The front end adopts a responsive design and displays the optimal solution of the current class scheduling plan in real time.

[0220] When the teacher submits the text input, the back end triggers the solution process; the front-end interface obtains the latest solution result in real time and refreshes the display immediately.

[0221] In one embodiment, a degradation system is further included, specifically: if the above algorithm outputs no solution, all conflicting constraints and the corresponding teachers are found through the slack variable method, and the system pushes to prompt their modification requirements. After the teacher modifies and resubmits the system, the system performs a re-solution.

[0222] The present invention also provides an intelligent class scheduling device based on MIP and large language models, including:

[0223] An LLM text processing module, configured to obtain a list of the teacher's time preferences and teachable courses from the teacher input based on the large language model, and extract the teacher time preference weight w l,j and the teaching qualification parameters

[0224] A model establishment module, configured to establish a class scheduling planning model, including decision variables, constraint conditions, and an objective function; the decision variables include courses, teachers, and teachers;

[0225] The constraint conditions include one or more of course uniqueness constraint, teacher assignment consistency constraint, classroom assignment consistency constraint, class time period conflict constraint, classroom conflict constraint, teacher conflict constraint, teacher qualification constraint, course attribute differentiation constraint, classroom applicability constraint, teacher interval rest time constraint, and classroom idle penalty constraint;

[0226] There are consecutive course arrangement constraints for consecutive courses, including the uniqueness of consecutive blocks, the consistency of teacher and classroom allocation within consecutive blocks, and the guarantee of time period occupancy of consecutive blocks;

[0227] A solving module, configured to solve the course scheduling planning model based on the teacher's time preference weight and teaching qualification parameters to obtain an optimal course scheduling result.

[0228] It should be noted that the device embodiments shown in this embodiment match the content of the above method embodiments. The content of the above method embodiments can be referred to and will not be elaborated here.

[0229] The above embodiments are only used to illustrate the design concept and features of the present invention, and the purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made according to the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. An intelligent course scheduling method based on MIP and large language models, characterized in that, Including: Obtain the teacher's time preference and list of teachable courses from the teacher input based on the large language model, and extract the teacher time preference weight w l,j and the teaching qualification parameter Establish a course scheduling planning model, including decision variables, constraint conditions, and objective functions; the decision variables include courses, teachers, and classrooms; The constraint conditions include one or more of course uniqueness constraint, teacher assignment consistency constraint, classroom assignment consistency constraint, class time slot conflict constraint, classroom conflict constraint, teacher conflict constraint, teacher qualification constraint, course attribute differentiation constraint, classroom applicability constraint, teacher interval rest time constraint, and classroom idle penalty constraint; For consecutive courses, there is a consecutive course arrangement constraint, including consecutive block uniqueness, teacher and classroom assignment consistency within the consecutive block, and consecutive block time slot occupancy guarantee; Based on the teacher time preference weight and teaching qualification parameters, solve the course scheduling planning model to obtain the optimal course scheduling result.

2. The method according to claim 1, wherein The decision variables include courses, teachers, and classrooms, including: For courses with non-consecutive lectures, i.e., p ic = 0: Course arrangement variable and p ic = 0, j ∈ J Teacher allocation variable and p ic = 0, j ∈ J, l ∈ L Classroom allocation variable and p ic = 0, j ∈ J, k ∈ K x = 1 if and only if course c of class i is taught during period j; icj y = 1 if and only if course c of class i is taught by teacher l during period j; icjl z = 1 if and only if course c of class i uses classroom k during period j; icjl = 1; For courses with continuous teaching, i.e., p ic = 1: Continuous block start variable and When x icj = 1 indicates that the consecutive teaching block of course c in class i starts from period j and occupies periods j, j + 1, …, j + r ic -1 Continuous block teacher assignment variable and And introduce a link relationship to ensure consistent teacher assignment in each time slot within the consecutive block: Continuous block teacher assignment variable and And introduce a link relationship to ensure consistent classroom assignment in each time slot within the consecutive block: Teacher idle indication variable Among them, I, J, L, and K represent the set of classes, the set of time periods, the set of teachers, and the set of classrooms respectively; for each class i, the set of courses it needs to take is C i , and it is divided into compulsory courses and elective courses b c,k represents the course-classroom applicability parameter; r ic represents the number of consecutive time periods that course c needs to be taught; represents the set of time periods when course c starts as a continuous block in class i; q means that a teacher can teach at most q in any consecutive q + 1 time periods.

3. The method according to claim 1, wherein The constraint conditions include: Course uniqueness constraint When p ic = 0 When p ic = 1 Teacher Assignment Consistency Constraint When p ic = 0 When p ic = 1 Classroom allocation consistency constraint When p ic = 0 When p ic = 1 Class time period conflict constraint Classroom conflict constraint Teacher conflict constraint Teacher qualification restraint Course attribute differentiation constraints for required courses For elective courses Classroom applicability constraints Successive course arrangement constraints, i.e., for p ic = 1: Continuous block uniqueness: Consistency of teacher and classroom allocation within continuous blocks: Guaranteed Occupancy of Consecutive Block Periods: Teacher interval break time constraint Within consecutive q + 1 time periods Classroom idle penalty constraint Among them, I, J, L, and K represent the set of classes, the set of time periods, the set of teachers, and the set of classrooms respectively; for each class i, the set of courses it needs to take is C i , and it is divided into compulsory courses and elective courses b c,k represents the course-classroom applicability parameter; r ic represents the number of consecutive time periods required for course c to be taught; represents the set of time periods when course c starts as a consecutive block in class i; q means that a teacher can teach at most q in any consecutive q + 1 time periods.

4. The method according to claim 1, characterized in that For non-consecutive teaching courses, the objective function is: For consecutive teaching courses, the objective function is: Or For non-consecutive teaching courses, the objective function is: For consecutive teaching courses, the objective function is: Among them, I, J, L, and K respectively represent the set of classes, the set of time periods, the set of teachers, and the set of classrooms; y icjl is a teacher assignment variable, and y icjl = 1 if and only if the course c of class i is taught by teacher l in time period j; α is the weight of classroom idle penalty; g kj is a classroom idle variable.

5. The method according to claim 1, wherein The large language model undergoes the following fine-tuning: Obtain teacher input data and perform manual annotation. The teacher input includes the range of courses that the teacher can teach and time preferences; Use the annotated teacher input data to fine-tune the large language model.

6. The method according to claim 5, wherein It also includes converting teacher input into a standard expression using regular expressions and custom rules.

7. The method according to claim 5, characterized in that, The large language model is the DeepSeek LLM 7B Base base model; fine-tune the DeepSeek LLM 7B Base base model using the LORA method based on the openmind framework, including the following steps: a. Configure parameters, including model training parameters and LORA parameters; b. Only train the low-rank matrix r and freeze the remaining weights in the base model; c. Use the Teacher Forcing method to perform supervised fine-tuning on the annotated teacher input data.

8. The method according to claim 1, characterized in that It also includes building an online course scheduling service system, specifically: The online course scheduling service system includes a backend service and a front-end interface; The backend service includes an LLM text processing module, an optimization solving module, and a data storage module; specifically: When the system is initialized, the administrator inputs the class schedules of each class and the information of all classrooms in the school; The LLM text processing module receives the teacher input text transmitted from the front end, outputs the teacher's time preferences and the list of courses that can be taught, and extracts the preference weight w from it. l,j and the teaching qualification parameters The optimization and solution module uses the extracted preference weights w l,j and the teaching qualification parameters to calculate the optimal global class scheduling plan under the current constraints in real time; The front-end interface includes: The front-end uses a responsive design to display the optimal solution of the current course scheduling plan in real time; When the teacher submits text input, the backend triggers the solving process; the front-end interface obtains the latest solving result in real time and refreshes the display in a timely manner.

9. The method according to claim 1, characterized in that, If no solution is output, use the slack variable method to find all conflicting constraints and the corresponding teachers, modify the teacher input involved, extract parameters from the modified teacher input, and execute re-solving until the optimal course scheduling result is obtained.

10. An intelligent course scheduling device based on MIP and large language models, characterized in that, Including: LLM text processing module, which is used to obtain the teacher's time preferences and the list of teachable courses from the teacher input based on the large language model, and extract the teacher time preference weight w l,j and teaching qualification parameters A model establishment module for establishing a course scheduling planning model, including decision variables, constraint conditions, and objective functions; the decision variables include courses, teachers, and classrooms; The above-mentioned constraint conditions include one or more of the course uniqueness constraint, teacher assignment consistency constraint, classroom assignment consistency constraint, class time slot conflict constraint, classroom conflict constraint, teacher conflict constraint, teacher qualification constraint, course attribute differentiation constraint, classroom applicability constraint, teacher interval break time constraint, and classroom idle penalty constraint; For consecutive courses, there is a consecutive course arrangement constraint, including consecutive block uniqueness, teacher and classroom assignment consistency within the consecutive block, and consecutive block time slot occupancy guarantee; A solution module is used to solve the course scheduling planning model based on the teacher time preference weight and teaching qualification parameters to obtain the optimal course scheduling result.

Citation Information

Cited By

  • Intelligent course arrangement system architecture based on multi-dimensional constraints and data snapshots and implementation method

    CN121581599A

  • A multi-dimensional constraint and data snapshot-based intelligent course scheduling system architecture and implementation method

    CN121581599B