CN117196561A - Classroom course selection conflict checking method, system, equipment and storage medium - Google Patents

Classroom course selection conflict checking method, system, equipment and storage medium Download PDF

Info

Publication number
CN117196561A
CN117196561A CN202311048101.1A CN202311048101A CN117196561A CN 117196561 A CN117196561 A CN 117196561A CN 202311048101 A CN202311048101 A CN 202311048101A CN 117196561 A CN117196561 A CN 117196561A
Authority
CN
China
Prior art keywords
matrix
class
matrix set
sets
occupation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311048101.1A
Other languages
Chinese (zh)
Inventor
郭尚志
李科
吴佳蒂
彭勃
曹媛萍
廖海波
徐时红
谢羲和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Qiangzhi Technology Development Co ltd
Original Assignee
Hunan Qiangzhi Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Qiangzhi Technology Development Co ltd filed Critical Hunan Qiangzhi Technology Development Co ltd
Priority to CN202311048101.1A priority Critical patent/CN117196561A/en
Publication of CN117196561A publication Critical patent/CN117196561A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a class selection conflict checking method, a system, equipment and a storage medium, wherein the method constructs a plurality of first matrix sets according to the occupation condition of each class, and constructs a plurality of second matrix sets according to the occupation condition of all classes of each day according to the plurality of first matrix sets; in a first preset time, constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used; constructing a plurality of fourth matrix sets according to the occupation conditions of all classes of each day according to the plurality of third matrix sets; priority ordering is carried out on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set, and ordered matrix sets are obtained; and performing class selection conflict check according to the ordered matrix set. The invention can improve the class selection conflict checking efficiency under the high concurrency scene.

Description

Classroom course selection conflict checking method, system, equipment and storage medium
Technical Field
The invention relates to the technical field of class selection conflict checking, in particular to a class selection conflict checking method, system and equipment and a storage medium.
Background
At present, the course selection is an important link in the teaching activities of colleges and universities, especially comprehensive colleges and universities, and the course selection module of the educational administration software is a key module for supporting course selection business. The challenges of course selection business generally come from two aspects: on one hand, the course selecting module cannot support course selecting under the condition of large number of users in performance, and on the other hand, the processing of course selecting data in a high-flow high-concurrency scene cannot meet the requirement of consistency of business. These two factors result in a poor student user experience when selecting lessons. In class selection, especially in the class business scene is robbed in public class selection of whole school, the student is in conflict judgement real-time requirement height of optional class and selected class time, place, class classroom, and data interaction volume is big, and judgement time is concentrated. And judging the key position of the smoothness of the course selection of the students in the high concurrency scene by solving the course selection class collision.
The traditional checking algorithm for the collision between the class selection of students and the class selection of selected classes mainly adopts a mode of continuously polling a database, and the database needs to be connected once for each checking, so that huge resource waste is caused; and other methods adopting a cache mode have no obvious lifting effect.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the invention provides a method, a system, equipment and a storage medium for checking class selection conflicts, which can improve the class selection conflict checking efficiency under a high concurrency scene.
In a first aspect, an embodiment of the present invention provides a method for checking a class selection conflict, where the method includes:
constructing a plurality of first matrix sets according to the occupation situation of each class, and constructing a plurality of second matrix sets according to the occupation situation of all classes of each day according to the plurality of first matrix sets;
in a first preset time, constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used; constructing a plurality of fourth matrix sets according to all class occupation conditions of each day according to the plurality of third matrix sets;
the first matrix set, the second matrix set, the third matrix set and the fourth matrix set are subjected to priority ranking to obtain a ranked matrix set;
and performing class selection conflict check according to the ordered matrix set.
Compared with the prior art, the first aspect of the invention has the following beneficial effects:
according to the method, the matrix is constructed through the number of times each element is used, the frequently used elements can be stored in one matrix, the frequently used elements are stored in one matrix, the hit probability is high and the query time is short when the matrix is queried, then priority ordering is carried out on all the constructed matrix sets to obtain ordered matrix sets, and finally class-selecting conflict checking is carried out according to the ordered matrix sets.
According to some embodiments of the invention, the constructing a plurality of first matrix sets according to each class occupation situation includes:
constructing a plurality of first matrixes according to the occupation situation of each class every day in one week; the daily class occupation situation comprises daily class occupation situation, daily class teacher occupation situation and daily class classroom occupation situation;
And constructing a plurality of first matrix sets by the plurality of first matrixes corresponding to the class occupation situation of each class every day, the plurality of first matrixes corresponding to the class occupation situation of each class every day and the plurality of first matrixes corresponding to the class occupation situation of each class every day.
According to some embodiments of the invention, the constructing a plurality of second matrix sets according to all class occupation situations of each day according to the plurality of first matrix sets includes:
constructing a plurality of second matrixes according to the plurality of first matrix sets and all class occupation conditions every day in one week; the daily all-class occupation situation comprises daily all-class occupation situations, daily all-class teacher occupation situations and daily all-class classroom occupation situations;
and constructing a plurality of second matrix sets by using the plurality of second matrixes corresponding to the class occupation situations of all classes every day, the plurality of second matrixes corresponding to the teacher occupation situations of all classes every day and the plurality of second matrixes corresponding to the classroom occupation situations of all classes every day.
According to some embodiments of the invention, in the first preset time, a plurality of third matrix sets are constructed according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used, including:
Calculating the ratio of the number of times each element in each first matrix in the plurality of first matrix sets is used to the number of times all elements in each first matrix are used in a first preset time to obtain a plurality of first ratio results;
and if each first ratio result is larger than a first preset value, storing the corresponding elements in the first matrix into a third matrix to obtain a plurality of third matrix sets.
According to some embodiments of the invention, the prioritizing the first set of matrices, the second set of matrices, the third set of matrices, and the fourth set of matrices to obtain an ordered set of matrices includes:
and carrying out priority ordering on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set according to the query time to obtain matrix sets which are ordered according to the order of the fourth matrix set, the third matrix set, the second matrix set and the first matrix set.
According to some embodiments of the invention, the performing class selection collision check according to the ordered matrix set includes:
initializing hit times of each element in the fourth matrix set and the third matrix set;
Preferentially searching the fourth matrix set according to the ordered matrix set in a second preset time, if class selection conflicts are searched in the fourth matrix set, updating hit times of corresponding elements in the fourth matrix set, and searching the next element according to the ordered matrix set;
if no class selection conflict is found in the fourth matrix set, searching the third matrix set;
if class selection conflicts are found in the third matrix set, updating hit times of corresponding elements in the third matrix set, and searching for the next element according to the ordered matrix set;
if no class selection conflict is found in the third matrix set, searching the second matrix set; if class selection conflicts are found in the second matrix set, searching for the next element according to the ordered matrix set;
if no class selection conflict is found in the second matrix set, searching the first matrix set;
if class selection conflicts are found in the first matrix set, searching for the next element according to the ordered matrix set; if no class selection conflict is found in the first matrix set, searching for the next element according to the ordered matrix set until all elements are found.
According to some embodiments of the present invention, the hit number of the corresponding element is updated by:
H(x,k)=Time(M x (k+2))
wherein H (x, k) represents the number of hits of the corresponding element, x represents the corresponding element, k represents the number of hits of the corresponding element, M x Representing the matrix in which the corresponding element is located, and Time represents the second preset Time.
In a second aspect, an embodiment of the present invention further provides a classroom lecture selection conflict checking system, where the classroom lecture selection conflict checking system includes:
the first construction unit is used for constructing a plurality of first matrix sets according to the occupation situation of each class and constructing a plurality of second matrix sets according to the occupation situation of all classes of each day according to the plurality of first matrix sets;
the second construction unit is used for constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used in a first preset time; constructing a plurality of fourth matrix sets according to all class occupation conditions of each day according to the plurality of third matrix sets;
the set ordering unit is used for carrying out priority ordering on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set to obtain ordered matrix sets;
And the conflict checking unit is used for performing class selection conflict checking according to the ordered matrix set.
In a third aspect, an embodiment of the present invention further provides a class selection collision checking apparatus, including at least one control processor and a memory for communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform a class selection collision check method as described above.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform a class selection collision checking method as described above.
It is to be understood that the advantages of the second to fourth aspects compared with the related art are the same as those of the first aspect compared with the related art, and reference may be made to the related description in the first aspect, which is not repeated herein.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of a class selection conflict check method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of constructing a classroom matrix collection CMSn and a classroom matrix collection CMn in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of constructing a classroom matrix set CMSStackn and a classroom matrix set CMStackn in accordance with an embodiment of the invention;
FIG. 4 is a schematic diagram of a classroom conflict query in accordance with an embodiment of the present invention;
FIG. 5 is a block diagram of a class selection conflict check system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the description of the present invention, the description of first, second, etc. is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, it should be understood that the direction or positional relationship indicated with respect to the description of the orientation, such as up, down, etc., is based on the direction or positional relationship shown in the drawings, is merely for convenience of describing the present invention and simplifying the description, and does not indicate or imply that the apparatus or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
In the description of the present invention, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present invention can be determined reasonably by a person skilled in the art in combination with the specific content of the technical solution.
The challenges of course selection business generally come from two aspects: on one hand, the course selecting module cannot support course selecting under the condition of large number of users in performance, and on the other hand, the processing of course selecting data in a high-flow high-concurrency scene cannot meet the requirement of consistency of business. These two factors result in a poor student user experience when selecting lessons. In class selection, especially in the class business scene is robbed in public class selection of whole school, the student is in conflict judgement real-time requirement height of optional class and selected class time, place, class classroom, and data interaction volume is big, and judgement time is concentrated. And judging the key position of the smoothness of the course selection of the students in the high concurrency scene by solving the course selection class collision.
However, as the traditional checking algorithm of the collision between the optional class selection of the students and the selected class selection of the students mainly uses a mode of continuously polling the database, the database needs to be connected once for each checking, and huge resource waste is caused; and other methods adopting a cache mode have no obvious lifting effect.
In order to solve the problems, the invention constructs the matrix through the number of times each element is used, can store the frequently used element in a matrix, the hit probability is high and the query time is short when querying the matrix, then carries out priority ordering on all the constructed matrix sets to obtain ordered matrix sets, finally carries out class-selecting conflict check according to the ordered matrix sets, and because the query time of each matrix set is different, carries out priority ordering on all the matrix sets, can preferentially query the matrix with high hit probability and short query time, thus improving class-selecting conflict check efficiency under a high concurrency scene.
Before proceeding to further detailed description of the disclosed embodiments, the terms and terms involved in the disclosed embodiments are described, which are applicable to the following explanation:
Stacks (stacks), which are also known as stacks, are a type of linear table that is operation constrained. A linear table is defined in which insert and delete operations are performed only at the end of the table. This end is called the top of the stack, and the other end is called the bottom of the stack. Inserting a new element into a stack, also called pushing, stacking or pressing, by placing the new element on top of the top element to make it a new top element; the deletion of an element from a stack, also known as popping or popping, is the deletion of a top element, making its neighbors the new top element.
Referring to fig. 1, an embodiment of the present invention provides a class selection conflict checking method, including but not limited to steps S100 to S400, wherein:
step S100, constructing a plurality of first matrix sets according to the occupation situation of each class, and constructing a plurality of second matrix sets according to the occupation situation of all classes of each day according to the plurality of first matrix sets;
step 200, constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used in a first preset time; constructing a plurality of fourth matrix sets according to the occupation conditions of all classes of each day according to the plurality of third matrix sets;
Step S300, priority ordering is carried out on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set, and ordered matrix sets are obtained;
and step 400, performing class selection conflict check according to the ordered matrix set.
In the embodiment, by constructing a plurality of first matrix sets according to the class occupation situation of each section and constructing a plurality of second matrix sets according to the class occupation situation of each day according to the first matrix sets, in a first preset time, constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used, and constructing a matrix through the number of times each element is used, the frequently used elements can be stored in one matrix, the frequently used elements are stored in one matrix, the hit probability when querying the matrix is large, and the query time is short; according to the method, a plurality of fourth matrix sets are constructed according to all classes occupied condition of each day, priority ordering is conducted on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set, a well-ordered matrix set is obtained, class-selecting conflict checking is conducted according to the well-ordered matrix set, and due to the fact that query time of each matrix set is different, priority ordering is conducted on all matrix sets, the matrix with high hit probability and short query time can be preferentially queried, and therefore class-selecting conflict checking efficiency can be improved in a high concurrency scene.
In some embodiments, constructing a plurality of first matrix sets per class occupancy includes:
constructing a plurality of first matrixes according to the occupation situation of each class every day in one week; the daily class occupation conditions comprise daily class occupation conditions, daily class teacher occupation conditions and daily class classroom occupation conditions;
and constructing a plurality of first matrix sets by using a plurality of first matrixes corresponding to each class occupation condition, a plurality of first matrixes corresponding to each class occupation condition and each teacher occupation condition and a plurality of first matrixes corresponding to each class occupation condition.
In this embodiment, since the same class cannot be used for lecturing at two places at the same time in the class selection, the same teacher cannot be used for lecturing at two places at the same time, and the same classroom cannot be used for simultaneously carrying out two different classes and other conflicts, the class occupation condition, the teacher occupation condition and the classroom occupation condition of each class each day are respectively constructed into the matrix, and the class selection conflict can be better and more accurately found.
In some embodiments, constructing a plurality of second matrix sets according to all class occupancy conditions per day from the plurality of first matrix sets includes:
Constructing a plurality of second matrixes according to the plurality of first matrix sets and all class occupation conditions every day in one week; the daily all-class occupation situation comprises daily all-class occupation situations, daily all-class teacher occupation situations and daily all-class classroom occupation situations;
and constructing a plurality of second matrix sets by using a plurality of second matrixes corresponding to all class occupation conditions of each day, a plurality of second matrixes corresponding to all class and teacher occupation conditions of each day and a plurality of second matrixes corresponding to all class and classroom occupation conditions of each day.
In this embodiment, by constructing a plurality of second matrices according to the plurality of first matrix sets, all classes occupied every day in a week, when the second matrix sets are preferentially searched, if conflicts can be found in the second matrix sets, the method is much faster than directly searching the first matrices, and thus the query time is saved.
In some embodiments, during a first preset time, constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used, including:
calculating the ratio of the number of times each element in each first matrix in the first matrix sets is used to the number of times all elements in each first matrix in the first matrix sets in a first preset time to obtain a plurality of first ratio results;
And if each first ratio result is larger than a first preset value, storing corresponding elements in the first matrix into a third matrix to obtain a plurality of third matrix sets.
In this embodiment, by calculating the ratio between the number of times each element is used and the number of times all elements are used and then constructing a matrix based on the result of the ratio, it is possible to store frequently used elements in one matrix, and the probability of being hit when preferentially querying the matrix is large and the query time is short.
In some embodiments, prioritizing the first set of matrices, the second set of matrices, the third set of matrices, and the fourth set of matrices to obtain an ordered set of matrices, comprising:
and carrying out priority ordering on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set according to the query time to obtain matrix sets which are ordered according to the order of the fourth matrix set, the third matrix set, the second matrix set and the first matrix set.
In this embodiment, because the query time of each matrix set is different, and all matrix sets are prioritized, the matrix with high hit probability and short query time is preferentially queried, so that the class selection conflict checking efficiency can be improved in a high concurrency scene.
In some embodiments, the class selection collision check is performed according to a ranked set of matrices, including:
initializing hit times of each element in the fourth matrix set and the third matrix set;
preferentially searching a fourth matrix set according to the ordered matrix set in a second preset time, updating the hit times of corresponding elements in the fourth matrix set if class selection conflicts are found in the fourth matrix set, and searching the next element according to the ordered matrix set;
if no class selection conflict is found in the fourth matrix set, searching the third matrix set;
if class selection conflicts are found in the third matrix set, updating the hit times of corresponding elements in the third matrix set, and searching for the next element according to the ordered matrix set;
if no class selection conflict is found in the third matrix set, searching the second matrix set; if class selection conflicts are found in the second matrix set, searching for the next element according to the ordered matrix set;
if no class selection conflict is found in the second matrix set, searching the first matrix set;
if class selection conflicts are found in the first matrix set, searching for the next element according to the ordered matrix set; if no class selection conflict is found in the first matrix set, searching for the next element according to the ordered matrix set until all elements are searched.
In this embodiment, the matrix with high hit probability and short query time is preferentially searched, so that the data query range and the calculation range can be greatly reduced, and meanwhile, the requirement on network bandwidth is also greatly reduced, and the number of class selection servers and the hardware requirement are reduced.
In some embodiments, the hit times for the corresponding element are updated by:
H(x,k)=Time(M x (k+2))
wherein H (x, k) represents the number of hits of the corresponding element, x represents the corresponding element, k represents the number of hits of the corresponding element, M x Representing the matrix in which the corresponding element is located, and Time represents a second preset Time.
In this embodiment, a class selection conflict is found in the fourth matrix set or the third matrix set, and the hit times of the corresponding elements are updated, so that the elements which are frequently hit can be always kept in the fourth matrix set or the third matrix set, the hit rate of the elements is improved, the query time is reduced, and the query efficiency is improved.
For ease of understanding by those skilled in the art, a set of preferred embodiments are provided below:
1. a plurality of matrix sets is initialized.
Two types of matrix sets are constructed according to a class set, a teacher set and a classroom set and a week/section (i.e. class-by-class) set respectively. One is a plurality of first matrix sets for constructing the occupation condition of each class every day in the week and the week, including a class matrix set SMSn, a teacher matrix set TMSn and a classroom matrix set CMSn, and the other is a plurality of second matrix sets for constructing the occupation condition of all classes every day in the week and the week, including a class matrix set SMn, a teacher matrix set TMn and a classroom matrix set CMn, and 6 matrix sets in total; each matrix set consists of n [ 1..n ] matrices of x y, where x represents all class occupancy during the day or each class occupancy during the day and y represents one week (i.e. monday to sunday). The value of each matrix in the matrix set is [ -1,0,1]; where 1 denotes fully available (i.e., fully occupied), -1 denotes partially available (when taking-1, take the range of values [1,..22 ] for a specific set of weeks Wi, i, denote 22 total weeks, e.g., take the value of-1 if there is a portion of the corresponding element of the first lesson on monday in 22 weeks) and 0 denotes unavailable (not fully occupied or not occupied). Referring to fig. 2, taking a classroom as an example, a classroom matrix set CMSn and a classroom matrix set CMn are constructed. In fig. 2, n represents n classrooms (i.e., c1, c2,..cn), w1, w2,..w 7 represents monday to sunday, s1, s2,..s 12 represents 12 lessons, sign represents w1, w2,..w 7 corresponds to 12 lessons, for example, w1 and sign in CMn correspond to 1, indicating that 12 lessons in w1 in CMSn are occupied. Thus, it can be seen that the query time of CMn will be much shorter than that of CMSn.
2. And constructing a plurality of matrix sets by adopting a matrix and probability hit method.
A high-level cache stack is built for each class, teacher and classroom, 6 high-level cache stacks are built (stored in a matrix mode), one is a plurality of third matrix sets for building the occupation condition of each class every day in the week and the week, including a class matrix set SMStackn, a teacher matrix set TMStackn and a classroom matrix set CMStackn, and the other is a plurality of fourth matrix sets for building the occupation condition of all classes every day in the week and the week, including a class matrix set SMSSStackn, a teacher matrix set TMSSStackn and a classroom matrix set CMSSStackn. Each stack is ordered according to the last access time, moved to the top of the stack, and when the stack is full, the last data is popped up.
The push element is calculated by:
wherein Time represents the Time in which the calculation is performed, and the general set value is 200ms; x represents matrix M in the initial 6 matrix sets x C 1 Represents the number of times a single element x is used per unit time, p represents the matrix M p The total number of elements, c 2 Representing matrix M within unit time p The number of times each element is used.
Referring to fig. 3, taking CMSStackn and cmstabn as an example, time represents a unit Time, class represents a class number, week represents a day of the week, section represents a class, and ocpy represents whether or not occupied, 1 represents occupied, 0 represents unoccupied, and hit represents the number of hits. And sequencing the calculated F, and pressing the highest priority into a cache stack CacheStack (namely CMSStackn and CMStackn). The entry number is typically 1/10 of the stack length, and the hit number hit initial value is 1.
The calculation function of the cache stack CacheStack hit number hit is:
H(x,k)=Time(M x (k+2))
wherein Time represents the Time in which the calculation is performed, and the general set value is 150ms; in order to save the data in the direct hit high-level cache stack CacheStack, when the class selection conflict query is performed, if the direct hit high-level cache stack CacheStack, the hit number is directly increased by 2 on the original hit number k, and the latest time is updated.
3. And (5) inquiring class selection conflicts.
Referring to fig. 4, fig. 4 is an example of checking whether the classroom currently selected for class conflicts with the classroom of the selected class at the same time when the students select class according to the matrix set obtained in the above steps 1 and 2. The class selection conflict query performed in this embodiment finds the first-queried high-level cache, and then queries the classroom matrix set CM n in the first matrix set and the classroom matrix set CMSn in the second matrix set in the initial matrix set.
It should be noted that, in the embodiment, the conflict query of the class and the teacher is the same as the conflict query manner of the classroom, and the detailed description of the embodiment is not described.
According to the embodiment, by means of the matrix and probability hit method, hot zone data in an initial class, classroom and teacher matrix set can be quickly brought into a faster high-level cache stack, low-heat data can be popped up in unit time, high-speed support is provided for querying of three dimensions (namely class, classroom and teacher) query data, and therefore the key point of class selection smoothness of students in a high-concurrency scene is solved on the whole.
According to experimental verification, under the condition that class selection data of students are on the same scale, the average time of class selection conflict check is reduced to 1/2 of the original time by adopting the matrix and probability hit method of the embodiment. Because the probability hit method is adopted, the method greatly reduces the data query range and the calculation range, simultaneously greatly reduces the requirement on network bandwidth, and reduces the number of course selection servers and the hardware requirement.
Referring to fig. 5, the embodiment of the present invention further provides a class selection conflict check system, which includes a first construction unit 100, a second construction unit 200, a set ordering unit 300, and a conflict check unit 400, wherein:
a first construction unit 100, configured to construct a plurality of first matrix sets according to each class occupation situation, and construct a plurality of second matrix sets according to all class occupation situations every day according to the plurality of first matrix sets;
a second construction unit 200, configured to construct a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used in a first preset time; constructing a plurality of fourth matrix sets according to the occupation conditions of all classes of each day according to the plurality of third matrix sets;
The set ordering unit 300 is configured to prioritize the first matrix set, the second matrix set, the third matrix set, and the fourth matrix set to obtain ordered matrix sets;
and the conflict checking unit 400 is used for performing class selection conflict checking according to the ordered matrix set.
It should be noted that, since a class selection conflict check system in this embodiment and a class selection conflict check method in the above embodiment are based on the same inventive concept, the corresponding content in the method embodiment is also applicable to the system embodiment, and will not be described in detail herein.
Referring to fig. 6, the embodiment of the present application further provides a class selection conflict checking apparatus, including:
at least one memory;
at least one processor;
at least one program;
the program is stored in the memory, and the processor executes at least one program to implement the present disclosure to implement the above-described class selection collision checking method.
The electronic device can be any intelligent terminal including a mobile phone, a tablet personal computer, a personal digital assistant (Personal Digital Assistant, PDA), a vehicle-mounted computer and the like.
The electronic device according to the embodiment of the application is described in detail below.
Processor 1600, which may be implemented by a general-purpose central processing unit (Central Processing Unit, CPU), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., is configured to execute related programs to implement the technical solutions provided by the embodiments of the present disclosure;
the Memory 1700 may be implemented in the form of Read Only Memory (ROM), static storage, dynamic storage, or random access Memory (Random Access Memory, RAM). Memory 1700 may store an operating system and other application programs, related program code is stored in memory 1700 when the technical solutions provided by the embodiments of the present disclosure are implemented in software or firmware, and the processor 1600 invokes a class selection conflict check method to perform the embodiments of the present disclosure.
An input/output interface 1800 for implementing information input and output;
the communication interface 1900 is used for realizing communication interaction between the device and other devices, and can realize communication in a wired manner (such as USB, network cable, etc.), or can realize communication in a wireless manner (such as mobile network, WIFI, bluetooth, etc.);
Bus 2000, which transfers information between the various components of the device (e.g., processor 1600, memory 1700, input/output interface 1800, and communication interface 1900);
wherein processor 1600, memory 1700, input/output interface 1800, and communication interface 1900 enable communication connections within the device between each other via bus 2000.
The embodiment of the disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the above-described class selection conflict check method.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present disclosure are for more clearly describing the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure, and as those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are equally applicable to similar technical problems.
It will be appreciated by those skilled in the art that the technical solutions shown in the figures do not limit the embodiments of the present disclosure, and may include more or fewer steps than shown, or may combine certain steps, or different steps.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the application and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including multiple instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing a program. The embodiments of the present application have been described in detail with reference to the accompanying drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present application.

Claims (10)

1. The classroom course selection conflict checking method is characterized by comprising the following steps of:
Constructing a plurality of first matrix sets according to the occupation situation of each class, and constructing a plurality of second matrix sets according to the occupation situation of all classes of each day according to the plurality of first matrix sets;
in a first preset time, constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used; constructing a plurality of fourth matrix sets according to all class occupation conditions of each day according to the plurality of third matrix sets;
the first matrix set, the second matrix set, the third matrix set and the fourth matrix set are subjected to priority ranking to obtain a ranked matrix set;
and performing class selection conflict check according to the ordered matrix set.
2. The method for checking class selection conflicts according to claim 1, wherein the constructing a plurality of first matrix sets according to each class occupation comprises:
constructing a plurality of first matrixes according to the occupation situation of each class every day in one week; the daily class occupation situation comprises daily class occupation situation, daily class teacher occupation situation and daily class classroom occupation situation;
And constructing a plurality of first matrix sets by the plurality of first matrixes corresponding to the class occupation situation of each class every day, the plurality of first matrixes corresponding to the class occupation situation of each class every day and the plurality of first matrixes corresponding to the class occupation situation of each class every day.
3. The classroom course selection conflict check method according to claim 1, wherein said constructing a plurality of second matrix sets according to all course occupancy per day from said plurality of first matrix sets includes:
constructing a plurality of second matrixes according to the plurality of first matrix sets and all class occupation conditions every day in one week; the daily all-class occupation situation comprises daily all-class occupation situations, daily all-class teacher occupation situations and daily all-class classroom occupation situations;
and constructing a plurality of second matrix sets by using the plurality of second matrixes corresponding to the class occupation situations of all classes every day, the plurality of second matrixes corresponding to the teacher occupation situations of all classes every day and the plurality of second matrixes corresponding to the classroom occupation situations of all classes every day.
4. The classroom course selection conflict check method according to claim 1, wherein said constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used within a first preset time, comprises:
Calculating the ratio of the number of times each element in each first matrix in the plurality of first matrix sets is used to the number of times all elements in each first matrix are used in a first preset time to obtain a plurality of first ratio results;
and if each first ratio result is larger than a first preset value, storing the corresponding elements in the first matrix into a third matrix to obtain a plurality of third matrix sets.
5. The classroom course selection collision checking method according to claim 1, wherein said prioritizing the first, second, third, and fourth sets of matrices to obtain an ordered set of matrices, comprises:
and carrying out priority ordering on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set according to the query time to obtain matrix sets which are ordered according to the order of the fourth matrix set, the third matrix set, the second matrix set and the first matrix set.
6. The method for checking for class selection conflicts according to claim 5, wherein the checking for class selection conflicts according to the ordered set of matrices comprises:
Initializing hit times of each element in the fourth matrix set and the third matrix set;
preferentially searching the fourth matrix set according to the ordered matrix set in a second preset time, if class selection conflicts are searched in the fourth matrix set, updating hit times of corresponding elements in the fourth matrix set, and searching the next element according to the ordered matrix set;
if no class selection conflict is found in the fourth matrix set, searching the third matrix set;
if class selection conflicts are found in the third matrix set, updating hit times of corresponding elements in the third matrix set, and searching for the next element according to the ordered matrix set;
if no class selection conflict is found in the third matrix set, searching the second matrix set; if class selection conflicts are found in the second matrix set, searching for the next element according to the ordered matrix set;
if no class selection conflict is found in the second matrix set, searching the first matrix set;
If class selection conflicts are found in the first matrix set, searching for the next element according to the ordered matrix set; if no class selection conflict is found in the first matrix set, searching for the next element according to the ordered matrix set until all elements are found.
7. The class selection collision check method according to claim 6, wherein the hit number of the corresponding element is updated by:
H(x,k)=Time(M x (k+2))
wherein H (x, k) represents the number of hits of the corresponding element, x represents the corresponding element, k represents the number of hits of the corresponding element, M x Representing the matrix in which the corresponding element is located, and Time represents the second preset Time.
8. A class selection conflict check system, the class selection conflict check system comprising:
the first construction unit is used for constructing a plurality of first matrix sets according to the occupation situation of each class and constructing a plurality of second matrix sets according to the occupation situation of all classes of each day according to the plurality of first matrix sets;
the second construction unit is used for constructing a plurality of third matrix sets according to the number of times each element in each first matrix set is used and the number of times all elements in each first matrix are used in a first preset time; constructing a plurality of fourth matrix sets according to all class occupation conditions of each day according to the plurality of third matrix sets;
The set ordering unit is used for carrying out priority ordering on the first matrix set, the second matrix set, the third matrix set and the fourth matrix set to obtain ordered matrix sets;
and the conflict checking unit is used for performing class selection conflict checking according to the ordered matrix set.
9. A class selection conflict check device comprising at least one control processor and a memory for communication with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the class selection collision check method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the class selection collision check method according to any one of claims 1 to 7.
CN202311048101.1A 2023-08-18 2023-08-18 Classroom course selection conflict checking method, system, equipment and storage medium Pending CN117196561A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311048101.1A CN117196561A (en) 2023-08-18 2023-08-18 Classroom course selection conflict checking method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311048101.1A CN117196561A (en) 2023-08-18 2023-08-18 Classroom course selection conflict checking method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117196561A true CN117196561A (en) 2023-12-08

Family

ID=88989655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311048101.1A Pending CN117196561A (en) 2023-08-18 2023-08-18 Classroom course selection conflict checking method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117196561A (en)

Similar Documents

Publication Publication Date Title
CN106126524B (en) Information pushing method and device
US11132371B2 (en) User customised search engine using machine learning, natural language processing and readability analysis
CN104126190A (en) Method and system for providing education service based on knowledge unit and computer-readable recording medium
CN116957874B (en) Intelligent automatic course arrangement method, system and equipment for universities and storage medium
CN103605706A (en) Knowledge map based resource retrieval method
CN116843525B (en) Intelligent automatic course arrangement method, system, equipment and storage medium
US20230030265A1 (en) Object processing method and apparatus, storage medium, and electronic device
CN107315753B (en) Paging method and device across multiple databases
CN101558407B (en) Method for inputting and searching information about an object in a remote database
CN110321882A (en) A kind of education resource acquisition methods, device, learning terminal and storage medium
CN117196561A (en) Classroom course selection conflict checking method, system, equipment and storage medium
CN103905512A (en) Data processing method and equipment
JP2003345908A (en) Information providing system and information providing server
JP5224499B2 (en) Storage medium for learning materials
CN116843526B (en) Method, system, equipment and storage medium for improving class selection probability of students
CN115456452A (en) Teaching evaluation system and method based on cloud platform
CN110674268B (en) Man-machine conversation method and related equipment
CN117670605A (en) Intelligent university course examination arrangement method, system, equipment and storage medium
CN111787127A (en) Classroom information transmission method and classroom information transmission system
CN117196909B (en) University course arrangement method, system, equipment and medium based on custom classification
CN113746912B (en) DCS monitoring system and method for acquiring DCS control data
CN111581421B (en) Image retrieval method, image retrieval device, and image retrieval system
CN116932488B (en) Courseware generation method, device and system based on knowledge graph and storage medium
CN117670603A (en) Automatic intelligent college examination arrangement method, system, equipment and storage medium
CN117171434A (en) Classroom pushing method, device and storage medium for students to select lessons

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Guo Shangzhi

Inventor after: Li Ke

Inventor after: Wu Jiadi

Inventor after: Peng Bo

Inventor after: Cao Yuanping

Inventor after: Liao Haibo

Inventor after: Xu Shihong

Inventor after: Xie Xihe

Inventor before: Guo Shangzhi

Inventor before: Li Ke

Inventor before: Wu Jiadi

Inventor before: Peng Bo

Inventor before: Cao Yuanping

Inventor before: Liao Haibo

Inventor before: Xu Shihong

Inventor before: Xie Xihe