An automatic optimization course scheduling method based on improved neural network
By improving neural network models and optimizing algorithm processing complex curriculum arrangements, generate optimal curriculum arrangements, and realize dynamic adjustment, solve the problem of low traditional method efficiency and unable to adjust. Essence
Patent Information
- Application Number
- CN202410926061.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Traditional course arrangement methods are inefficient and error-prone, difficult to deal with complex multi-dimensional and multi-variable constraints, and cannot be dynamically adjusted to deal with emergencies.
Adopt the method of automatic optimization of curriculum arrangements based on the improvement of neural networks, to process the teacher timetable, classroom capacity, curriculum priority, and student selection needs through deep learning and optimization algorithms to generate the optimal curriculum arrangement scheme and dynamically adjust in real time.
It has significantly improved the efficiency and accuracy of the curriculum arrangement, can generate more optimized solutions in a short period of time, make full use of educational resources, and has high degree of flexibility and adaptability.
Smart Images

Figure CN118780552B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart classrooms, and in particular to an automatic optimization course scheduling method based on an improved neural network. Background Art
[0002] With the development of information technology and the increasing complexity of education management, course scheduling has become an important issue in education management. In higher education, vocational education and various training institutions, course scheduling not only needs to consider the teacher's schedule and classroom capacity, but also the students' course selection needs and the importance of the course. The complexity and variability of these factors pose great challenges to traditional course scheduling methods.
[0003] Existing course scheduling methods mainly rely on manual operation or simple rule-based algorithms. In manual operation, educational administrators usually formulate course schedules based on experience and intuition, but this method is inefficient and error-prone, especially when faced with large-scale data and complex constraints. For example, teachers' schedules may change at any time, classroom capacity needs to be updated in real time, and students' course selection needs will also be constantly adjusted. These complex factors make it difficult for manual operation to quickly and accurately generate the optimal course schedule.
[0004] In terms of rule-based algorithms, commonly used methods include linear programming, integer programming, and heuristic algorithms. However, these methods can usually only solve relatively simple course scheduling problems, and are not ideal for complex constraints with multiple dimensions and variables. Linear programming and integer programming require the problem to be converted into a mathematical model, but due to the nonlinearity and high dimensionality of the course scheduling problem, the modeling process is complex and the amount of calculation is huge. Although heuristic algorithms such as genetic algorithms and simulated annealing algorithms can improve the solution efficiency to a certain extent, they still have problems such as slow convergence and easy to fall into local optimality.
[0005] In addition, most existing course scheduling methods are static, that is, after the course schedule is generated, it cannot be dynamically adjusted according to the actual situation. Once there are emergencies such as teachers taking leave or students changing their course selection, classes need to be rescheduled, which is not only time-consuming but also easily leads to confusion in the course schedule. For large educational institutions, frequent changes in course schedules will seriously affect teaching order and the utilization rate of educational resources. Summary of the invention
[0006] One purpose of the present invention is to propose an automatic optimization course scheduling method based on an improved neural network. The present invention not only solves the shortcomings of traditional methods by introducing deep learning and optimization algorithms, but also significantly improves the efficiency and accuracy of course scheduling.
[0007] According to an embodiment of the present invention, a method for automatically optimizing course scheduling based on an improved neural network includes the following steps:
[0008] S1. Obtain input data, including teacher schedules, classroom capacity, course priorities, and student course selection needs;
[0009] S2, initializing the improved neural network model, inputting the acquired input data into the improved neural network model, making preliminary course arrangements, and preliminarily generating a course schedule;
[0010] S3. Apply the improved genetic algorithm to optimize the initially generated course schedule:
[0011] S4. Verify the feasibility of the optimized course arrangement to ensure that all constraints are met;
[0012] S5. Make adjustments based on the verification results until an optimal course schedule that satisfies all constraints is generated;
[0013] S6. Monitor the changes in the actual situation in real time during the course arrangement process, and dynamically adjust the course arrangement using improved neural network models and optimization algorithms;
[0014] S7. Generate the final course schedule and output it to the user interface for review and adjustment.
[0015] Optionally, the S1 specifically includes:
[0016] S11. Get the teacher schedule, including each teacher's available and unavailable time periods:
[0017] T={T1,T2,...,T n};
[0018] Among them, T i ={t i1 , t i2 , ..., t im} represents the available time period of the i-th teacher, n represents the total number of teachers, t ij Indicates a specific time period;
[0019] S12. Obtain classroom capacity, including the maximum number of people that can be accommodated in each classroom and the available time period of the classroom:
[0020] C={C1,C2,...,C k};
[0021] Among them, C j =(c j , {t j1 , t j2 , ..., t jp}), k represents the total number of classrooms, c j represents the maximum number of people that can be accommodated in the jth classroom, t jl Indicates the specific time period during which the classroom is available;
[0022] S13. Get the course priority, including the importance level of each course and its corresponding priority:
[0023] P = {P1, P2, ..., P m};
[0024] Among them, P q =(p q , l q ), m represents the total number of courses, p q represents the qth course, l q Indicates the importance level of the course;
[0025] S14. Obtain students’ course selection needs, including each student’s course selection intention and course conflict information:
[0026] D={D1,D2,...,D r};
[0027] Among them, D s ={(p s1 , t s1 ), (p s2 , t s2 ),...,(p su , t su )}, r represents the total number of students, p si represents the i-th course selected by student s, t si Indicates the specific time period of the course;
[0028] S15, input the teacher schedule T, classroom capacity C, course priority P and student course selection demand D into the data preprocessing module for preprocessing to obtain the preprocessed teacher schedule T′, classroom capacity C′, course priority P′ and student course selection demand D′;
[0029] S16. Construct input data set D input , including the preprocessed teacher schedule T′, classroom capacity C′, course priority P′, and student course selection demand D′:
[0030] D input ={T′, C′, P′, D′}.
[0031] Optionally, the S2 specifically includes:
[0032] S21, initializing an improved neural network model, wherein the improved neural network model includes an input layer, a relationship graph embedding module, a feature fusion module and an output layer;
[0033] S22, input data set D input Input to the input layer of the neural network model;
[0034] S23. In the input layer, the teacher schedule T′, classroom capacity C′, course priority P′ and student course selection demand D′ are respectively extracted and standardized to obtain the teacher feature matrix X T , classroom feature matrix X C , course feature matrix X P and the student feature matrix X D ;
[0035] S24, the teacher feature matrix X T , classroom feature matrix X C , course feature matrix X P and the student feature matrix X D Input to the relationship graph embedding module, construct a graph G representing the relationship between teachers, classrooms, courses and students, and embed the graph G. The embedding operation is expressed as:
[0036] H = GraphEmbed(G, X T , X C , X P , X D );
[0037] Among them, the specific graph embedding is:
[0038]
[0039] Among them, h i represents the feature vector of node i, N(v) represents the neighbor set of node v, W represents the weight matrix, b represents the bias vector, and ReLU represents the rectified linear unit activation function;
[0040] S25. The high-dimensional feature representation H output by the graph embedding module is input into the feature fusion module. The feature fusion module performs feature fusion through a multi-head attention mechanism, which is expressed as:
[0041] Z = MultiHeadAttention(H);
[0042] Among them, the specific multi-head attention mechanism is:
[0043]
[0044] MultiHead(Q,K,V)=concat(head1,head2,...,head h )W O ;
[0045]
[0046] Among them, Q, K, and V represent query, key, and value matrices respectively. and W O is the weight matrix, d k is the scaling factor;
[0047] S26. Input the fused feature matrix Z into the output layer, which is composed of several fully connected layers, and generate a preliminary course schedule A through nonlinear transformation. initial , including the time schedule, classroom allocation, and teacher assignment for each course;
[0048] S27. In the output layer, a multi-objective loss function L is applied, including maximizing resource utilization, minimizing conflicts, and satisfying priorities, expressed as:
[0049] L =α· L resource + β· L conflict + γ· L priority;
[0050] Among them, θ, β and γ are weight coefficients, L resource Indicates resource utilization loss, L conflict represents the conflict loss, L priority Indicates the priority satisfaction.
[0051] Optionally, the resource utilization loss:
[0052]
[0053] Among them, u i represents the actual resources used in the i-th course, c i represents the maximum available resources for the i-th course, and m represents the total number of courses;
[0054] The conflict loss:
[0055]
[0056] Among them, δ(t i , t j ) indicates the conflict between the i-th course and the j-th course in terms of time arrangement. If there is a conflict, it is 1, otherwise it is 0.i , r j ) indicates the conflict on classroom resources, if there is a conflict, it is 1, otherwise it is 0;
[0057] The priority satisfaction degree:
[0058]
[0059] Among them, w i represents the priority satisfaction of the i-th course, p i represents the priority of the i-th course, d i Indicates the priority difference of course arrangement, d max Indicates the maximum priority difference.
[0060] Optionally, the S3 specifically includes:
[0061] S31. Define the optimization objective function F, with the goal of maximizing resource utilization U, minimizing conflicts C and minimizing defaults V. The optimization objective function is expressed as:
[0062] F = α·U-β·Cy·V;
[0063] Among them, α, , and γ are weight coefficients;
[0064] S32, initializing initial parameters of the genetic algorithm, including population size N, crossover probability and mutation probability;
[0065] S33, the initially generated course schedule A initial As the initial population G = {A1, A2, ..., A N}, each individual A i Encoding representation;
[0066] A i =(a i1 , a i2 , ..., a im );
[0067] Among them, a ij represents the arrangement of the jth course in the i-th individual;
[0068] S34, calculate the fitness value f(A) of each individual in the initial population i ), and evaluate its quality according to the optimization objective function F;
[0069] f(A i )=α·U(A i )-β·C(A i )-γ·V(A i );
[0070] S35, use the roulette wheel selection method to select individuals with higher fitness values P(A i ) into the next generation;
[0071] S36, performing a crossover operation on the selected individuals by using a multi-point crossover to generate new individuals;
[0072] A new =crossover(A p , A q );
[0073] Among them, A p and A q is the selected parent individual, A new New individuals generated for the crossover operation;
[0074] The crossover operation process is:
[0075] a new =(a p1 , a p2 , ..., a pk , a q(k+1) , a q(k+2) , ..., a qm );
[0076] Where k is the position of the intersection;
[0077] S37, using adaptive mutation to perform mutation operation on individuals generated after crossover;
[0078] A mut = mutation(A new );
[0079] Among them, A mut For the new individual after mutation;
[0080] The mutation operation process is:
[0081] a mut =(ax, a2, ..., a j-1 , a′ j , a j+1 , ..., a m );
[0082] Among them, a′ j is the variation of the jth gene;
[0083] S38, calculate the fitness value f(A) of each individual in the new generation population mut ), and evaluate its quality according to the optimization objective function F;
[0084] S39. Compare the individuals in the new generation population with the current optimal individual Abest , select the individual with the highest fitness value as the new optimal course schedule;
[0085]
[0086] S310, repeat S35 to S39 until a preset number of iterations is reached or a termination condition is met;
[0087] S311. Output optimized course schedule A opt .
[0088] Optionally, the resource utilization U is expressed as:
[0089]
[0090] The conflict C is expressed as:
[0091]
[0092] The default V is expressed as:
[0093]
[0094] Among them, v ij Indicates the default of the i-th course and the j-th teacher in the course arrangement, if there is a default, it is 1, otherwise it is 0.
[0095] Optionally, the S4 specifically includes:
[0096] S41. Optimized course arrangement plan A opt Time constraint verification is performed to ensure that the schedule of each course does not conflict with the available time of the teacher and the classroom. The verification condition is expressed as:
[0097]
[0098] Among them, t ij represents the time schedule of the i-th course in the j-th classroom, T i represents the available time period of the i-th teacher, C j represents the available time period of the jth classroom;
[0099] S42. Optimized course arrangement plan A opt Classroom capacity verification is performed to ensure that the actual number of students enrolled in each course does not exceed the maximum number of students that can be accommodated in the classroom. The verification conditions are expressed as follows:
[0100]
[0101] Among them, d i represents the actual number of students enrolled in the i-th course, c jrepresents the maximum number of people that can be accommodated in the jth classroom;
[0102] S43. Optimized course arrangement plan A opt Conduct course priority verification to ensure that the importance level of each course meets expectations. The verification conditions are expressed as follows:
[0103]
[0104] Among them, p i represents the priority of the i-th course, l i Indicates the importance level of the i-th course;
[0105] S44. Optimized course arrangement plan A opt Verify the course selection needs of students to ensure that each student's course selection needs are met. The verification conditions are expressed as:
[0106]
[0107] Among them, p si represents the i-th course selected by student s, D s represents the set of course selection requirements of student s;
[0108] S45. Optimized course arrangement plan A opt Conflict verification is performed to ensure that no courses are scheduled in the same classroom or taught by the same teacher during the same time period. The verification condition is expressed as:
[0109]
[0110] Among them, t ij represents the time schedule of the i-th course in the j-th classroom, t ik indicates that the i-th course is taught by the k-th teacher, t kj It indicates the schedule of the kth course in the jth classroom;
[0111] S46. According to the verification results, opt Make necessary adjustments until all constraints are met and generate the final optimal course schedule A final .
[0112] The beneficial effects of the present invention are:
[0113] (1) By improving the neural network model, the present invention can effectively handle complex multi-dimensional and multi-variable constraints such as teacher schedules, classroom capacity, course priorities, and student course selection needs. Compared with traditional linear programming and integer programming methods, the present invention can generate more optimized course scheduling plans in a shorter time, significantly improving the system's computing efficiency and scheduling quality.
[0114] (2) The present invention uses an improved neural network model and genetic algorithm to optimize the initially generated course schedule. By defining the optimization objective function, with the goal of maximizing resource utilization and minimizing conflicts and breaches, it ensures that the generated course schedule reaches the optimal state in all aspects and fully utilizes educational resources.
[0115] (3) The present invention can monitor the changes in actual conditions in real time, such as teachers taking leave, changes in students' course selection, etc., and dynamically adjust the course schedule using the improved neural network model and optimization algorithm to ensure that the optimal schedule can still be maintained in emergencies. This dynamic adjustment capability is significantly better than the traditional static scheduling method, making the system highly flexible and adaptable.
[0116] (4) The present invention uses a multi-objective optimization algorithm, comprehensively considers multiple factors such as resource utilization, conflict and breach of contract, and adopts technical means such as multi-point crossover and adaptive mutation to further improve the quality of course arrangement. By verifying the feasibility of the optimized course arrangement plan, it is ensured that the final plan meets all constraints, thereby achieving the effect of multi-objective optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0118] Figure 1 A flowchart of a method for automatically optimizing course scheduling based on an improved neural network proposed by the present invention;
[0119] Figure 2 This is a schematic diagram of the structure of an improved neural network model of an automatic optimization course scheduling method based on an improved neural network proposed by the present invention. DETAILED DESCRIPTION
[0120] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0121] refer to Figure 1-2 , a method for automatically optimizing course scheduling based on improved neural network, comprising the following steps:
[0122] S1. Obtain input data, including teacher schedules, classroom capacity, course priorities, and student course selection needs;
[0123] S2, initializing the improved neural network model, inputting the acquired input data into the improved neural network model, making preliminary course arrangements, and preliminarily generating a course schedule;
[0124] S3. Apply the improved genetic algorithm to optimize the initially generated course schedule:
[0125] S4. Verify the feasibility of the optimized course arrangement to ensure that all constraints are met;
[0126] S5. Make adjustments based on the verification results until an optimal course schedule that satisfies all constraints is generated;
[0127] S6. Monitor the changes in the actual situation in real time during the course arrangement process, and dynamically adjust the course arrangement using improved neural network models and optimization algorithms;
[0128] S7. Generate the final course schedule and output it to the user interface for review and adjustment.
[0129] In this implementation, S1 specifically includes:
[0130] S11. Get the teacher schedule, including each teacher's available and unavailable time periods:
[0131] T={T1,T2,...,T n};
[0132] Among them, T i ={t i1 , t i2 , ..., t im} represents the available time period of the i-th teacher, n represents the total number of teachers, t ij Indicates a specific time period;
[0133] S12. Obtain classroom capacity, including the maximum number of people that can be accommodated in each classroom and the available time period of the classroom:
[0134] C={C1,C2,...,C k};
[0135] Among them, C j =(c j , {t j1 , t j2 , ..., t jp}), k represents the total number of classrooms, c j represents the maximum number of people that can be accommodated in the jth classroom, t jl Indicates the specific time period during which the classroom is available;
[0136] S13. Get the course priority, including the importance level of each course and its corresponding priority:
[0137] P = {P1, P2, ..., P m};
[0138] Among them, P q =(p q , l q ), m represents the total number of courses, p q represents the qth course, l q Indicates the importance level of the course;
[0139] S14. Obtain students’ course selection needs, including each student’s course selection intention and course conflict information:
[0140] D={D1,D2,...,D r};
[0141] Among them, D s ={(p s1 , t s1 ), (P s2 , t s2 ),...,(p su , t su )}, r represents the total number of students, p si represents the first course selected by student s, t si Indicates the specific time period of the course;
[0142] S15, input the teacher schedule T, classroom capacity C, course priority P and student course selection demand D into the data preprocessing module for preprocessing to obtain the preprocessed teacher schedule T′, classroom capacity C′, course priority P′ and student course selection demand D′;
[0143] S16. Construct input data set D input , including the preprocessed teacher schedule T′, classroom capacity C′, course priority P′, and student course selection demand D′:
[0144] D input ={T′,C′,P′,D′}.
[0145] In this implementation, S2 specifically includes:
[0146] S21, initializing an improved neural network model, where the improved neural network model includes an input layer, a relationship graph embedding module, a feature fusion module, and an output layer;
[0147] S22, input data set D input Input to the input layer of the neural network model;
[0148] S23. In the input layer, the teacher schedule T′, classroom capacity C′, course priority P′ and student course selection demand D′ are respectively extracted and standardized to obtain the teacher feature matrix X T, classroom feature matrix X C , course feature matrix X P and the student feature matrix X D ;
[0149] S24, the teacher feature matrix X T , classroom feature matrix X C , course feature matrix X P and the student feature matrix X D Input to the relationship graph embedding module, construct a graph G representing the relationship between teachers, classrooms, courses and students, and embed the graph G. The embedding operation is expressed as:
[0150] H = GraphEmbed(G, X T , X C ,X P ,X D );
[0151] Among them, the specific graph embedding is:
[0152]
[0153] Among them, h i represents the feature vector of node i, N(v) represents the neighbor set of node v, W represents the weight matrix, b represents the bias vector, and ReLU represents the rectified linear unit activation function;
[0154] S25. The high-dimensional feature representation H output by the graph embedding module is input into the feature fusion module. The feature fusion module performs feature fusion through a multi-head attention mechanism, which is expressed as:
[0155] Z = MultiHeadAttention(H);
[0156] Among them, the specific multi-head attention mechanism is:
[0157]
[0158] MultiHead(Q,K,V)=concat(head1,head2,...,head h )W o ;
[0159]
[0160] Among them, Q, K, and V represent query, key, and value matrices respectively. and W O is the weight matrix, d k is the scaling factor;
[0161] S26. Input the fused feature matrix Z into the output layer, which is composed of several fully connected layers, and generate a preliminary course schedule A through nonlinear transformation. initial , including the time schedule, classroom allocation, and teacher assignment for each course;
[0162] S27. In the output layer, a multi-objective loss function L is applied, including maximizing resource utilization, minimizing conflicts, and satisfying priorities, expressed as:
[0163] L =α· L resource + β· L conflict + γ· L priority;
[0164] Among them, α, β and γ are weight coefficients, L resource Indicates resource utilization loss, L conflict represents the conflict loss, L priority Indicates the priority satisfaction.
[0165] In this implementation, the resource utilization loss is:
[0166]
[0167] Among them, u i represents the actual resources used in the i-th course, c i represents the maximum available resources for the i-th course, and m represents the total number of courses;
[0168] Conflict losses:
[0169]
[0170] Among them, δ(t i , t j ) indicates the conflict between the i-th course and the j-th course in terms of time arrangement. If there is a conflict, it is 1, otherwise it is 0. i , r j ) indicates the conflict on classroom resources, if there is a conflict, it is 1, otherwise it is 0;
[0171] Priority satisfaction:
[0172]
[0173] Among them, w i represents the priority satisfaction of the i-th course, p i represents the priority of the i-th course, d i Indicates the priority difference of course arrangement, d maxIndicates the maximum priority difference.
[0174] In this implementation, S3 specifically includes:
[0175] S31. Define the optimization objective function F, with the goal of maximizing resource utilization U, minimizing conflicts C and minimizing defaults V. The optimization objective function is expressed as:
[0176] F = θ·U-β·C-γ·V;
[0177] Among them, θ, β and γ are weight coefficients;
[0178] S32, initializing initial parameters of the genetic algorithm, including population size N, crossover probability and mutation probability;
[0179] S33, the initially generated course schedule A initial As the initial population G = (A1, A2, ..., A N}, each individual A i Encoding representation;
[0180] A i =(a i1 , a i2 , ..., a im );
[0181] Among them, a ij represents the arrangement of the jth course in the i-th individual;
[0182] S34, calculate the fitness value f(A) of each individual in the initial population i ), and evaluate its quality according to the optimization objective function F;
[0183] f(A i )=α·U(A i )-β·C(A i )-γ·V(A i );
[0184] S35, use the roulette wheel selection method to select individuals with higher fitness values P(A i ) into the next generation;
[0185] S36, performing a crossover operation on the selected individuals by using a multi-point crossover to generate new individuals;
[0186] A new =crossover(A p , A q );
[0187] Among them, A p and A q is the selected parent individual, Anew New individuals generated for the crossover operation;
[0188] The crossover operation process is:
[0189] a new =(a p1 , a p2 , ..., a pk , a q(k+1) , a q(k+2) , ..., a qm );
[0190] Where k is the position of the intersection;
[0191] S37, using adaptive mutation to perform mutation operation on individuals generated after crossover;
[0192] A mut = mutation(A new );
[0193] Among them, A mut For the new individual after mutation;
[0194] The mutation operation process is:
[0195] a mut =(a1, a2, ..., a j-1 , a′ j , a j+1 , ..., a m );
[0196] Among them, a′ j is the variation of the jth gene;
[0197] S38, calculate the fitness value f(A) of each individual in the new generation population mut ), and evaluate its quality according to the optimization objective function F;
[0198] S39. Compare the individuals in the new generation population with the current optimal individual A best , select the individual with the highest fitness value as the new optimal course schedule;
[0199]
[0200] S310, repeat S35 to S39 until a preset number of iterations is reached or a termination condition is met;
[0201] S311. Output optimized course schedule A opt .
[0202] In this implementation, the resource utilization U is expressed as:
[0203]
[0204] The conflict C is expressed as:
[0205]
[0206] The default V is expressed as:
[0207]
[0208] Among them, v ij Indicates the default of the i-th course and the j-th teacher in the course arrangement, if there is a default, it is 1, otherwise it is 0.
[0209] In this implementation, S4 specifically includes:
[0210] S41. Optimized course arrangement plan A opt Time constraint verification is performed to ensure that the schedule of each course does not conflict with the available time of the teacher and the classroom. The verification condition is expressed as:
[0211]
[0212] Among them, t ij represents the time schedule of the i-th course in the j-th classroom, T i represents the available time period of the i-th teacher, C j represents the available time period of the jth classroom;
[0213] S42. Optimized course arrangement plan A opt Classroom capacity verification is performed to ensure that the actual number of students enrolled in each course does not exceed the maximum number of students that can be accommodated in the classroom. The verification conditions are expressed as follows:
[0214]
[0215] Among them, d i represents the actual number of students enrolled in the i-th course, c j represents the maximum number of people that can be accommodated in the jth classroom;
[0216] S43. Optimized course arrangement plan A opt Conduct course priority verification to ensure that the importance level of each course meets expectations. The verification conditions are expressed as follows:
[0217]
[0218] Among them, p i represents the priority of the i-th course, l i Indicates the importance level of the i-th course;
[0219] S44. Optimized course arrangement plan A opt Verify the course selection needs of students to ensure that each student's course selection needs are met. The verification conditions are expressed as:
[0220]
[0221] Among them, p si represents the i-th course selected by student s, D s represents the set of course selection requirements of student s;
[0222] S45. Optimized course arrangement plan A opt Conflict verification is performed to ensure that no courses are scheduled in the same classroom or taught by the same teacher during the same time period. The verification condition is expressed as:
[0223]
[0224] Among them, t ij represents the time schedule of the i-th course in the j-th classroom, t ik indicates that the i-th course is taught by the k-th teacher, t kj It indicates the schedule of the kth course in the jth classroom;
[0225] S46. According to the verification results, opt Make necessary adjustments until all constraints are met and generate the final optimal course schedule A final .
[0226] This implementation method can automatically generate a preliminary course schedule by inputting input data such as teacher schedule, classroom capacity, course priority and student course selection needs into the improved neural network model, and optimize it in combination with the optimization algorithm. The improved neural network model can handle complex constraints of multiple dimensions and variables, and the application of genetic algorithms can further improve the quality of the course schedule and the overall efficiency of the system.
[0227] In general, existing technologies have many defects when dealing with complex course scheduling problems, including low efficiency, prone to errors, and static scheduling methods cannot cope with dynamic changes. The automatic optimization course scheduling method based on improved neural networks, by introducing deep learning and optimization algorithms, not only solves the shortcomings of traditional methods, but also significantly improves the efficiency and accuracy of course scheduling.
[0228] Embodiment 1:
[0229] The academic administration department of a university faces the challenge of scheduling courses before the start of each semester. The university has 300 teachers, 50 classrooms, 200 courses, and 5,000 students. Each teacher has a different schedule and teaching preferences, and each classroom has different capacity and available time. In addition, students have different course selection needs, and some courses have high priority requirements, such as required courses and core courses. These complex constraints make traditional manual scheduling methods inefficient and error-prone, and it is difficult to meet all constraints and priority requirements.
[0230] In order to improve the efficiency and accuracy of class scheduling, the academic administration department decided to adopt the automatic optimization course scheduling method based on improved neural network of the present invention. Before applying this method, it is necessary to collect and organize input data, including the teacher's schedule, the capacity and available time of the classroom, the priority of the course, and the course selection needs of the students.
[0231] The data collected is as follows:
[0232] Teacher Schedule: The available and unavailable times for each teacher.
[0233] Classroom capacity: The maximum number of people per classroom and the time slots available.
[0234] Course Priority: The importance level of each course and the corresponding priority.
[0235] Student course selection needs: each student’s course selection intentions and course conflict information.
[0236] Then, these input data are input into the improved neural network model for feature extraction and standardization, and the teacher feature matrix, classroom feature matrix, course feature matrix and student feature matrix are obtained. Next, the relationship graph embedding module is used to construct a graph representing the relationship between teachers, classrooms, courses and students, and the embedding operation is performed. The high-dimensional feature representation output by the graph embedding module is input into the feature fusion module, which performs feature fusion through the multi-head attention mechanism and finally generates a preliminary course schedule.
[0237] In order to further optimize the course schedule, a genetic algorithm is applied to optimize the initially generated course schedule. By defining the optimization objective function, with the goal of maximizing resource utilization and minimizing conflicts and defaults, the course schedule is iteratively optimized by combining roulette wheel selection, multi-point crossover, and adaptive mutation. Finally, the optimized course schedule is output and its feasibility is verified to ensure that all constraints are met. Necessary adjustments are made based on the verification results to generate the final optimal course schedule.
[0238] The specific results of automatic optimization course arrangement are as follows:
[0239] Teacher A's available time periods are Monday morning, Tuesday afternoon, and Wednesday morning. The capacity of classroom 101 is 50 people, and the available time period is all day from Monday to Friday. Course 1 is a high-priority course with 200 students enrolled.
[0240] After optimization, Course 1 was scheduled to be held on Monday morning in classroom 101, and teacher A was responsible for the class. Other courses were also reasonably arranged according to the results of the optimization algorithm, and all course arrangements met the constraints of teacher schedule, classroom capacity, course priority, and student course selection needs.
[0241] In order to verify the beneficial effects of the method of the present invention, the academic administration department compared the performance of the traditional manual scheduling method and the method of the present invention on the same data set. The comparison data is shown in Table 1 below:
[0242] Table 1 Comparison data of course scheduling methods
[0243]
[0244] From the comparison data, it can be seen that the method of the present invention is significantly superior to the traditional method in terms of class scheduling time, teacher time conflict, classroom capacity overrun, course priority satisfaction and student course selection demand satisfaction. Specifically, the method of the present invention shortens the average class scheduling time from 72 hours to 24 hours, avoids all teacher time conflicts and classroom capacity overrun events, increases course priority satisfaction from 80% to 98%, and increases student course selection demand satisfaction from 75% to 95%.
[0245] In summary, the automatic optimization course scheduling method based on improved neural network of the present invention significantly improves the efficiency and accuracy of course scheduling by efficiently processing complex constraints, automatically generating optimal course scheduling plans, intelligent dynamic adjustment functions, multi-objective optimization capabilities and data analysis functions, and fully verifies its beneficial effects in practical applications.
[0246] By improving the neural network model, the present invention can effectively handle complex multi-dimensional and multi-variable constraints such as teacher schedules, classroom capacity, course priorities, and student course selection needs. Compared with traditional linear programming and integer programming methods, the present invention can generate more optimized course scheduling plans in a shorter time, significantly improving the system's computing efficiency and scheduling quality.
[0247] The present invention uses an improved neural network model and genetic algorithm to optimize the initially generated course arrangement plan. By defining the optimization objective function, with the goal of maximizing resource utilization and minimizing conflicts and breaches, it ensures that the generated course arrangement plan reaches the optimal state in all aspects and makes full use of educational resources.
[0248] The present invention can monitor the changes in the actual situation in real time, such as teachers' leave, changes in students' course selection, etc., and dynamically adjust the course schedule using the improved neural network model and optimization algorithm to ensure that the optimal schedule can still be maintained in emergencies. This dynamic adjustment capability is significantly better than the traditional static scheduling method, making the system highly flexible and adaptable.
[0249] The present invention uses a multi-objective optimization algorithm, comprehensively considers multiple factors such as resource utilization, conflict and breach of contract, and adopts technical means such as multi-point crossover and adaptive mutation to further improve the quality of course arrangement. By verifying the feasibility of the optimized course arrangement plan, it is ensured that the final plan meets all constraints, thereby achieving the effect of multi-objective optimization.
[0250] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for automatically optimizing course scheduling based on an improved neural network, characterized in that: The steps include: S1. Obtain input data, including teacher schedules, classroom capacity, course priorities, and student course selection needs; S2, initializing the improved neural network model, inputting the acquired input data into the improved neural network model, making preliminary course arrangements, and preliminarily generating a course schedule; S3, using improved genetic algorithm to optimize the initially generated course schedule; S4. Conduct feasibility verification on the optimized course schedule to ensure that all constraints are met, and make adjustments based on the verification results until an optimal course schedule that meets all constraints is generated; S5. Monitor the changes in the actual situation in real time during the course arrangement process, and dynamically adjust the course arrangement using improved neural network models and optimization algorithms; S6, generating a final course schedule and outputting it to a user interface for review and adjustment; The S2 specifically includes: S21, initializing an improved neural network model, wherein the improved neural network model includes an input layer, a relationship graph embedding module, a feature fusion module and an output layer; S22, input data set D input Input to the input layer of the neural network model; S23, in the input layer, the pre-processed teacher schedule T', classroom capacity C', course priority P' and student course selection demand D' are respectively subjected to feature extraction and standardization to obtain the teacher feature matrix X T , classroom feature matrix X C , course feature matrix X P and the student feature matrix X D ; S24, the teacher feature matrix X T , classroom feature matrix X C , course feature matrix X P and the student feature matrix X D Input to the relationship graph embedding module, construct a graph G representing the relationship between teachers, classrooms, courses and students, and embed the graph G. The embedding operation is expressed as: H=GraphEmbed(G,X T ,X C ,X P ,X D ); The specific graph embedding is as follows: Among them, h i represents the feature vector of node i, N(v) represents the neighbor set of node v, W represents the weight matrix, b represents the bias vector, and ReLU represents the rectified linear unit activation function; S25. The high-dimensional feature representation H output by the graph embedding module is input into the feature fusion module. The feature fusion module performs feature fusion through a multi-head attention mechanism, which is expressed as: Z = MultiHeadAttention(H); Among them, the specific multi-head attention mechanism is: MultiHead(Q,K,V)=concat(head1,head2,...,head h )W O ; Where Q, K, and V represent query, key, and value matrices, respectively. and W O is the weight matrix, d k is the scaling factor; S26. Input the fused feature matrix Z into the output layer, which is composed of several fully connected layers, and generate a preliminary course schedule A through nonlinear transformation. initial , including the time schedule, classroom allocation, and teacher assignment for each course; S27. In the output layer, a multi-objective loss function L is applied, including maximizing resource utilization, minimizing conflicts, and satisfying priorities, expressed as: L=α·L resource +β·L conflict +γ·L priority ; Among them, α, β and γ are weight coefficients, L resource Indicates resource utilization loss, L conflict represents the conflict loss, L priority Indicates the priority satisfaction; The resource utilization loss is: in, Indicates the actual resources used in the i1th course. represents the maximum available resources for the i1th course, and m represents the total number of courses; The conflict loss: in, Indicates the conflict in schedule between the i1th course and the j1th course. If there is a conflict, it is 1, otherwise it is 0. Indicates the conflict on classroom resources, if there is a conflict, it is 1, otherwise it is 0; The priority satisfaction degree: in, represents the priority satisfaction of the i1th course, Indicates the priority of the i1th course, Indicates the priority difference of course arrangement, d max Indicates the maximum priority difference; The S3 specifically includes: S31. Define the optimization objective function F, with the goal of maximizing resource utilization U, minimizing conflict C1 and minimizing default V1. The optimization objective function is expressed as: F = α1·U-β1·C1-γ1·V1; Among them, α1, β1 and γ1 are weight coefficients; S32, initializing initial parameters of the genetic algorithm, including population size N, crossover probability and mutation probability; S33, the initially generated course schedule A initial As the initial population G1 = {A1, A2, ..., A N }, each individual A i Encoding representation; A i =(a i1 ,a i2 ,...,a im ); in, represents the arrangement of the j1th course in the i-th individual; S34, calculate the fitness value f(A) of each individual in the initial population i ), and evaluate its quality according to the optimization objective function F; f(A i )=α1·U(A i )-β1·C1(A i )-γ1·V1(A i ); S35, use the roulette wheel selection method to select individuals with higher fitness values P(A i ) into the next generation; S36, performing a crossover operation on the selected individuals by using a multi-point crossover to generate new individuals; A new =crossover(A p ,A q ); Among them, A p and A q is the selected parent individual, A new New individuals generated for the crossover operation; The crossover operation process is: a new =(a p1 ,a p2 …,a pk ,a q(k+1) ,a q(k+2) ,…,a qm ); Where k is the position of the intersection; S37, using adaptive mutation to perform mutation operation on individuals generated after crossover; A mut =mutation(A new ); Among them, A mut For the new individual after mutation; The mutation operation process is: a mut =(a1,a2,...,a j-1 ,a' j ,a j+1 ,...,a m ); Among them, a' j is the variation of the jth gene; S38, calculate the fitness value f(A) of each individual in the new generation population mut ), and evaluate its quality according to the optimization objective function F; S39. Compare the individuals in the new generation population with the current optimal individual A best , select the individual with the highest fitness value as the new optimal course schedule; S310, repeat S35 to S39 until a preset number of iterations is reached or a termination condition is met; S311. Output optimized course schedule A opt .
2. The method for automatically optimizing course scheduling based on an improved neural network according to claim 1, characterized in that: The S1 specifically includes: S11. Get the teacher schedule, including each teacher's available and unavailable time periods: T={T1,T2,...,T n }; Among them, T i ={t i1 ,t i2 ,...,t ig } represents the available time period of the i-th teacher, n represents the total number of teachers, t ij Indicates a specific time period; S12. Obtain classroom capacity, including the maximum number of people that can be accommodated in each classroom and the available time period of the classroom: C={C1,C2,...,C k }; Among them, C j =(c j ,{t j1 ,t j2 ,...,t jk }), k represents the total number of classrooms, c j represents the maximum number of people that can be accommodated in the jth classroom, t jl Indicates the specific time period during which the classroom is available; S13. Get the course priority, including the importance level of each course and its corresponding priority: P={P1,P2,...,P m }; Among them, P q =(p q ,l q ), m represents the total number of courses, p q represents the qth course, l q Indicates the importance level of the course; S14. Obtain students’ course selection needs, including each student’s course selection intention and course conflict information: D={D1,D2,...,D r }; Among them, D s ={(p s1 ,t s1 ),(p s2 ,t s2 ),...,(p su ,t su )}, r represents the total number of students, p si represents the i-th course selected by student s, t si Indicates the specific time period of the course; S15, input the teacher schedule T, classroom capacity C, course priority P and student course selection demand D into the data preprocessing module for preprocessing to obtain the preprocessed teacher schedule T', classroom capacity C', course priority P' and student course selection demand D'; S16. Construct input data set D input , including the preprocessed teacher schedule T', classroom capacity C', course priority P' and student course selection demand D': D input ={T′,C′,P′,D′}。 3. The method for automatically optimizing course scheduling based on an improved neural network according to claim 1, characterized in that: The S4 specifically includes: S41. Optimized course arrangement plan A opt Time constraint verification is performed to ensure that the schedule of each course does not conflict with the available time of the teacher and the classroom. The verification condition is expressed as: Among them, t i1j represents the time schedule of the i1th course in the jth classroom, T i represents the available time period of the i-th teacher, C j represents the available time period of the jth classroom; S42. Optimized course arrangement plan A opt Classroom capacity verification is performed to ensure that the actual number of students enrolled in each course does not exceed the maximum number of students that can be accommodated in the classroom. The verification conditions are expressed as follows: in, represents the actual number of students enrolled in the i1th course, c j represents the maximum number of people that can be accommodated in the jth classroom; S43. Optimized course arrangement plan A opt Conduct course priority verification to ensure that the importance level of each course meets expectations. The verification conditions are expressed as follows: in, Indicates the priority of the i1th course, Indicates the importance level of the i1th course; S44. Optimized course arrangement plan A opt Verify the course selection needs of students to ensure that each student's course selection needs are met. The verification conditions are expressed as: in, represents the i1th course selected by student s, D s represents the set of course selection requirements of student s; S45. Optimized course arrangement plan A opt Conflict verification is performed to ensure that no courses are scheduled in the same classroom or taught by the same teacher during the same time period. The verification condition is expressed as: in, It indicates the time schedule of the i1th course in the jth classroom. indicates that the i1th course is taught by the kth teacher, It indicates the time schedule of the k1th course in the jth classroom; S46. According to the verification results, opt Adjust until all constraints are met and generate the final optimal course schedule A final .
Citation Information
Patent Citations
Course selection and scheduling system and method thereof
CN107610012A
Genetic algorithm-based course scheduling system design method
CN111784127A