CN114663075A - Time conflict detection method and device, storage medium and electronic equipment - Google Patents

Time conflict detection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114663075A
CN114663075A CN202210572851.8A CN202210572851A CN114663075A CN 114663075 A CN114663075 A CN 114663075A CN 202210572851 A CN202210572851 A CN 202210572851A CN 114663075 A CN114663075 A CN 114663075A
Authority
CN
China
Prior art keywords
data
information
week
binary
decimal
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.)
Granted
Application number
CN202210572851.8A
Other languages
Chinese (zh)
Other versions
CN114663075B (en
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.)
Zhengfang Software Co ltd
Original Assignee
Zhengfang Software 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 Zhengfang Software Co ltd filed Critical Zhengfang Software Co ltd
Priority to CN202210572851.8A priority Critical patent/CN114663075B/en
Publication of CN114663075A publication Critical patent/CN114663075A/en
Application granted granted Critical
Publication of CN114663075B publication Critical patent/CN114663075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q10/1093Calendar-based scheduling for persons or groups
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Abstract

The invention provides a time conflict detection method, a time conflict detection device, a storage medium and electronic equipment, and relates to the technical field of smart campuses. The week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged is merged; for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information into binary week data and binary section data respectively; respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data; the amount of stored data can be reduced. And the function digit operation is used for judging the conflict of the internal sub-query in week and node by week, so that the calculation efficiency can be improved.

Description

Time conflict detection method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of smart campuses, in particular to a time conflict detection method, a time conflict detection device, a storage medium and electronic equipment.
Background
When the colleges and universities are teaching and schooling, time conflicts need to be detected to avoid the time conflicts in resource use, such as: a teacher teaching conflict, a classroom occupation conflict, a student class conflict, etc. For example, when there are two classes in the same time period (i.e., 2022-01-088: 00-9: 35) on the same day, the teacher cannot give lessons at the same time, the classrooms cannot be used at the same time, and the students cannot be in lessons at the same time.
The existing time conflict detection method is based on an oracle database, and through single-row association sub-query of each section every day, intersection records existing in each section every day are extracted and regarded as time conflicts.
However, the existing method needs to store data for each section every day, so that the storage capacity is large and the execution efficiency of the association of the conflict detection sub-query is low; for example: the college class-one teaching class information is 5000 pieces of corresponding class-taking time of 1-16 weeks, 4 lessons are saved every week, and then the storage amount is 5000 × 16 × 4=320000, namely 32 ten thousand time records are stored. And further, when the internal sub-query conflict judgment is carried out, a retrieval mechanism of 32 ten thousand by 32 ten thousand times is triggered.
Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides a time conflict detection method, a time conflict detection device, a storage medium and electronic equipment, and solves the problems of large data storage capacity and multiple detection times in the time conflict detection of the conventional method.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme:
in a first aspect, a method for detecting a time conflict includes:
acquiring initial information of a scheduled course and initial information of a to-be-scheduled course;
acquiring week information and week information based on the class scheduling initial information and the class dates of the class scheduling initial information to be scheduled; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged respectively;
for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information into binary week data and binary section data respectively;
respectively converting the binary system week number data and the binary system section number data into decimal system week number data and decimal system section number data and then storing the decimal system week number data and the decimal system section number data;
taking data with the same attribute information and the same week information in the to-be-scheduled courses stored in decimal system and the scheduled courses stored in decimal system as a detection data pair; respectively converting the decimal cycle data and the decimal node data in the detection data pair into binary cycle data and binary node data, and performing bitwise AND operation; and if the calculation results of the binary system weekly data and the binary system section data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
Further, the course arrangement initial information and the course arrangement initial information to be arranged both include: attribute information and initial time information; wherein the attribute information includes: course, give lessons teacher, occupy classroom, the student who takes a lesson, initial time information includes: date of class, period of class.
Further, for the merged arranged course and the merged to-be-arranged course, the weekly information and the section information are converted into binary weekly data and binary section data respectively, including:
for the week information, the total week is taken as the number of bits of the binary week data, the value of the week information in each row is converted into the number of bits from right to left in the binary week data, and the value of the bit is set to 1, and the values of the other bits are set to 0.
For the section information, the total section of each day is taken as the number of bits of the sum binary section data, the value of the section information in each row is converted into the number of bits from right to left in the sum binary section data, the value of the bit is set to 1, and the values of the other bits are set to 0.
Further, the converting the binary system week number data and the binary system section number data into the decimal system week number data and the decimal system section number data respectively and then storing the decimal system week number data and the decimal system section number data comprises: the decimal week data and the decimal section data are stored in an SQL database.
In a second aspect, a time collision detection apparatus, the apparatus comprising:
the course information acquisition module is used for acquiring the initial information of the arranged course and the initial information of the course to be arranged;
the system comprises a week-order conversion module, a date-of-class acquisition module and a date-of-class acquisition module, wherein the week-order conversion module is used for acquiring week-order information and week information based on the scheduled course initial information and the to-be-scheduled course initial information; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
the data merging module is used for respectively merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged;
the binary system conversion module is used for respectively converting the week information and the section information of the merged arranged course and the merged to-be-arranged course into binary system week data and binary system section data;
the decimal conversion and storage module is used for respectively converting the binary system week number data and the binary system section number data into decimal system week number data and decimal system section number data and then storing the decimal system week number data and the decimal system section number data;
the time conflict detection module is used for taking data with the same attribute information and the same week information in the courses to be arranged stored in a decimal mode and the arranged courses stored in a decimal mode as a detection data pair; respectively converting the decimal week data and the decimal section data in the detection data pair into binary week data and binary section data, and respectively carrying out bitwise AND operation; and if the calculation results of the binary system weekly data and the binary system section data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
Further, the course arrangement initial information and the course arrangement initial information to be arranged both include: attribute information and initial time information; wherein the attribute information includes: course, give lessons teacher, occupy classroom, the student who takes a lesson, initial time information includes: date of class, period of class.
Further, the binary conversion module comprises:
the system comprises a week information binary conversion unit, a data processing unit and a data processing unit, wherein the week information binary conversion unit is used for taking the total week as the digit of binary week data, converting the value of the week information in each row into the digit from right to left in the binary week data, setting the value of the digit as 1, and setting the values of other digits as 0;
and the binary conversion unit of the rank information is used for taking the total rank of each day as the bit number of the binary rank data, converting the value of the rank information in each row into the bit number from right to left in the binary rank data, setting the value of the bit to be 1, and setting the values of other bits to be 0.
Further, the decimal week data and the decimal section data are stored in an SQL database.
In a third aspect, a computer-readable storage medium stores a computer program for time collision detection, wherein the computer program causes a computer to execute the time collision detection method described above.
In a fourth aspect, an electronic device comprises:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising instructions for performing the above-described time collision detection method.
(III) advantageous effects
The invention provides a time conflict detection method, a time conflict detection device, a storage medium and electronic equipment. Compared with the prior art, the method has the following beneficial effects:
the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged is merged; for the combined arranged courses and the combined courses to be arranged, converting the week information and the section information into binary week data and binary section data respectively; respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data; the amount of stored data can be reduced. And the function digit operation is used for judging the conflict of the internal sub-query in week and node by week, so that the calculation efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described, and it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
By providing the time conflict detection method, the time conflict detection device, the storage medium and the electronic equipment, the problems of large data storage capacity and more detection times exist in the conventional method when the time conflict is detected.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
the time conflict situation is generally understood as that the same resource can not be split and used at the same time in the same time period on the same day, and is regarded as time conflict. Therefore, the problem of time conflict needs to be avoided in the course of course arrangement in colleges and universities, and the method specifically includes: the time conflict of teaching by teachers, the time conflict of classroom occupation and the time conflict of students in class.
The week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged is merged; for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information into binary week data and binary section data respectively; respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data; the amount of stored data can be reduced. And the function digit operation is used for judging the conflict of the internal sub-query in week and node by week, so that the calculation efficiency can be improved.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example 1:
as shown in fig. 1, the present invention provides a time conflict detection method, which is executed by a computer, and includes:
acquiring initial information of a scheduled course and initial information of a to-be-scheduled course;
acquiring week information and week information based on the class scheduling initial information and the class dates of the class scheduling initial information to be scheduled; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged respectively;
for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information into binary week data and binary section data respectively;
respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data;
taking data with the same attribute information and the same week information in the to-be-scheduled courses stored in decimal system and the scheduled courses stored in decimal system as a detection data pair; respectively converting the decimal week data and the decimal section data in the detection data pair into binary week data and binary section data, and respectively carrying out bitwise AND operation; and if the calculation results of the binary system weekly data and the binary system section data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
The beneficial effect of this embodiment does:
1) in the embodiment, the week information in the data with the same attribute information, the same section information and the same week information in the arranged course and the course to be arranged is respectively merged; for the combined arranged courses and the combined courses to be arranged, converting the week information and the section information into binary week data and binary section data respectively; respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data; the amount of stored data can be reduced. And the function digit operation is used for judging the conflict of the internal sub-query in week and node by week, so that the calculation efficiency can be improved.
The following describes the implementation process of the embodiment of the present invention in detail:
and S1, acquiring the initial information of the scheduled course and the initial information of the to-be-scheduled course.
Specifically, taking the initial information of the course arrangement as an example, as shown in table 1, the initial information of the course arrangement and the initial information of the course to be arranged both include: attribute information and initial time information. Considering that each teacher may teach different classes to different students in different classrooms, the attribute information further includes: corresponding courses, teaching teachers, students occupying classrooms and having class; the initial time information includes: date of class, period of class.
And the data type of the initial information of the course to be scheduled is the same as that of the initial information of the scheduled course.
TABLE 1
Figure 295727DEST_PATH_IMAGE001
S2, acquiring week information and week information based on the lesson-scheduled initial information and the lesson-waiting date; and acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled.
In the teaching process, colleges and universities are divided by teaching weeks, and a school calendar is made in a schooling season. Such as: the school calendar can determine the range from the teaching start date to the teaching end date of the school date, and the corresponding week information and week information can be determined by the number of weeks in the range.
Similarly, for example, colleges and universities decide time intervals of a few classes and lessons in a day, and can determine corresponding class information.
Colleges and universities assume that 1 month, 3 days and 9 days of 2022 are defined as 1 week, 4 lessons are provided in the morning and afternoon every day, the 1 st lesson is started at 8 am, each lesson is 45 minutes, and a rest is provided for 5 minutes between two lessons. Specifically, taking the scheduled initial information as an example, table 1 is transformed to obtain table 2.
TABLE 2
Figure 9605DEST_PATH_IMAGE002
In addition, the initial information of the courses to be scheduled is converted in the same processing mode.
And S3, merging the week information in the data with the same attribute information, the same section information and the same week information in the arranged course and the course to be arranged respectively.
Specifically, taking the scheduled course initial information as an example, in table 2, the attribute information (teacher, classroom, student, course) in the 1 st to 4 th rows are the same, and meanwhile, the section information and the week information are also the same and need to be merged according to the rule; the data in other rows are different and are not merged, so the merged results in table 2 are shown in table 3.
TABLE 3
Figure 586080DEST_PATH_IMAGE003
In addition, the courses to be ranked are merged in the same processing manner.
And S4, for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information in each row into binary week data and binary section data respectively.
Specifically, for the week information, the total week is taken as the number of bits of the binary week data, the value of the week information in each row is converted into the number of bits from right to left in the binary week data, the value of the bit is set to 1, and the values of the other bits are set to 0.
For the section information, the total section of each day is taken as the number of bits of the sum binary section data, the value of the section information in each row is converted into the number of bits from right to left in the sum binary section data, the value of the bit is set to 1, and the values of the other bits are set to 0.
Taking the scheduled courses as an example, assuming that the total number of weeks is 5, i.e. the binary week data has 5 bits in total, for the 1 st row in table 3, the value of the week information includes: 1. 2, 3 and 4, the converted binary system week data are: 01111.
assuming that the total number of bars in a day is 8, i.e. the binary bar data has 8 bits, likewise, for row 1 in table 3, the value of the bar information is: 1. 2, the converted binary level data is: 00000011.
and S5, converting the binary system week number data and the binary system section number data into decimal system week number data and decimal system section number data respectively, and storing the decimal system week number data and the decimal system section number data.
In specific implementation, based on the oracle database, when the subsequent time conflict judgment is made, the function bitand (x, y) is operated by using the bits in the oracle database, and the x and y values in the function require decimal values.
For example, where the binary week number data is 01111, the converted decimal week number data is 15.
S6, taking data with the same attribute information and the same week information in the to-be-arranged lessons stored in decimal system and the arranged lessons stored in decimal system as a detection data pair; respectively converting the decimal cycle data and the decimal node data in the detection data pair into binary cycle data and binary node data, and performing bitwise AND operation; and if the calculation results of the binary system weekly data and the binary system section data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
Specifically, the bitwise and operation refers to two numbers participating in the operation, and is performed by binary bits. Implemented with the bit arithmetic function bitand (x, y). And (3) operation rules: only two numbers of the same bit have a binary value of 1 at the same time, resulting in a 1, otherwise a 0.
As shown in tables 4 and 5, the teacher, the class, the classroom, the student and the week of the two groups of data in the to-be-scheduled course and the scheduled course are the same, and therefore, the two groups of data are used as a group of detection data pairs;
the decimal week data stored in the course arrangement is 15, the decimal node data is 3, the converted binary week data is 01111, and the binary node data is 00000011; similarly, the decimal week number data stored in the course to be scheduled is 16 and the decimal bar number data is 6, and the converted binary week number data is 10000 and the binary bar number data is 00000110.
Therefore, the result of bitwise and operation of the binary system weekly data of the courses to be arranged and the arranged courses is 00000, namely 0; meanwhile, the bitwise and operation result of the binary data of the courses to be arranged and the arranged courses is 00000010, namely the result is not 0, and therefore, it is recognized that a time conflict exists.
TABLE 4
Figure 778027DEST_PATH_IMAGE005
TABLE 5
Figure 389137DEST_PATH_IMAGE007
Compared with the prior art, the method has the advantages that the function digit operation is used for carrying out internal sub-query conflict judgment on the week number and the node number in week, the data storage amount is small, and the execution efficiency is high. For example: the college first-class teaching class information is 5000 corresponding to class 1-16 weeks, 4 lessons per week, and the storage amount is 5000, namely 5000 time records. The internal sub-query conflict judgment triggers a 5 thousand by 5 thousand retrieval mechanism. In addition, the field length of the database is limited, for example, the field length is limited to 10, so that only 10-bit-length characters can be stored, and the characters can be accumulated by adopting 2-system.
Example 2:
a time conflict detection apparatus, the apparatus comprising:
the course information acquisition module is used for acquiring the initial information of the arranged course and the initial information of the course to be arranged;
the system comprises a week-order conversion module, a date-of-class acquisition module and a date-of-class acquisition module, wherein the week-order conversion module is used for acquiring week-order information and week information based on the scheduled course initial information and the to-be-scheduled course initial information; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
the data merging module is used for respectively merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged;
the binary system conversion module is used for respectively converting the week information and the section information of the merged arranged course and the merged to-be-arranged course into binary system week data and binary system section data;
the decimal conversion and storage module is used for respectively converting the binary system week number data and the binary system section number data into decimal system week number data and decimal system section number data and then storing the decimal system week number data and the decimal system section number data;
the time conflict detection module is used for taking data which are stored in a decimal manner and have the same attribute information and the same week information in the arranged courses stored in the decimal manner as a detection data pair; respectively converting the decimal cycle data and the decimal node data in the detection data pair into binary cycle data and binary node data, and performing bitwise AND operation; if the calculation results of the binary system week data and the binary system rank data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
Further, the course arrangement initial information and the course arrangement initial information to be arranged both include: attribute information and initial time information; wherein the attribute information includes: course, give lessons teacher, occupy classroom, the student who takes a lesson, initial time information includes: date of class, period of class.
Further, the binary conversion module comprises:
the system comprises a week information binary conversion unit, a week information binary conversion unit and a data processing unit, wherein the week information binary conversion unit is used for taking the total week as the number of bits of binary week data, converting the value of the week information in each row into the number of bits from right to left in the binary week data, setting the value of the bit to be 1, and setting the values of other bits to be 0;
and the binary conversion unit of the rank information is used for taking the total rank of each day as the bit number of the binary rank data, converting the value of the rank information in each row into the bit number from right to left in the binary rank data, setting the value of the bit to be 1, and setting the values of other bits to be 0.
Further, the decimal week data and the decimal section data are stored in an SQL database.
Example 3:
a computer-readable storage medium storing a computer program for time collision detection, wherein the computer program causes a computer to execute the steps of:
acquiring initial information of a scheduled course and initial information of a to-be-scheduled course;
acquiring week information and week information based on the lesson-going dates of the scheduled course initial information and the lesson-waiting course initial information; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged respectively;
for the combined arranged courses and the combined courses to be arranged, converting the week information and the section information into binary week data and binary section data respectively;
respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data;
taking data with the same attribute information and the same week information in the to-be-scheduled courses stored in decimal system and the scheduled courses stored in decimal system as a detection data pair; respectively converting the decimal cycle data and the decimal node data in the detection data pair into binary cycle data and binary node data, and performing bitwise AND operation; if the calculation results of the binary system week data and the binary system rank data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
Example 4:
an electronic device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising instructions for performing the steps of:
acquiring initial information of a scheduled course and initial information of a course to be scheduled;
acquiring week information and week information based on the lesson-going dates of the scheduled course initial information and the lesson-waiting course initial information; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged respectively;
for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information into binary week data and binary section data respectively;
respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data;
taking data with the same attribute information and the same week information in the decimal-stored courses to be arranged and the decimal-stored arranged courses as a detection data pair; respectively converting the decimal week data and the decimal section data in the detection data pair into binary week data and binary section data, and respectively carrying out bitwise AND operation; if the calculation results of the binary system week data and the binary system rank data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
It can be understood that the time conflict detection apparatus, the readable storage medium, and the electronic device provided in the embodiment of the present invention correspond to the time conflict detection method, and the explanation, the example, the beneficial effects, and the like of the relevant contents thereof may refer to the corresponding contents in the time conflict detection method, which is not described herein again.
In summary, compared with the prior art, the invention has the following beneficial effects:
1) saving memory table space.
2) The bit calculation rate is more efficient.
3) The row or column storage for teaching weeks and festivals is not limited.
It should be noted that, through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments. In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for time collision detection, the method comprising:
acquiring initial information of a scheduled course and initial information of a to-be-scheduled course;
acquiring week information and week information based on the class scheduling initial information and the class dates of the class scheduling initial information to be scheduled; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged respectively;
for the combined arranged course and the combined to-be-arranged course, converting the week information and the section information into binary week data and binary section data respectively;
respectively converting the binary system week data and the binary system section data into decimal system week data and decimal system section data, and storing the decimal system week data and the decimal system section data;
taking data with the same attribute information and the same week information in the decimal-stored courses to be arranged and the decimal-stored arranged courses as a detection data pair; respectively converting the decimal week data and the decimal section data in the detection data pair into binary week data and binary section data, and respectively carrying out bitwise AND operation; if the calculation results of the binary system week data and the binary system rank data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
2. The method as claimed in claim 1, wherein the scheduled session initial information and the to-be-scheduled session initial information each comprise: attribute information and initial time information; wherein the attribute information includes: course, give lessons teacher, occupy classroom, the student who takes a lesson, initial time information includes: date in class, period in class.
3. The method as claimed in claim 1, wherein for the merged arranged lessons and the merged pending lessons, the step of converting the week information and the step information thereof into binary week data and binary step data respectively comprises:
regarding the week information, taking the total week as the digit of the binary week data, converting the value of the week information in each row into the digit from right to left in the binary week data, setting the value of the digit as 1, and setting the values of other digits as 0;
regarding the node information, the total node of each day is taken as the number of bits of the sum binary node data, the value of the node information in each row is converted into the number of bits from right to left in the sum binary node data, and the value of this bit is set to 1, and the values of the other bits are set to 0.
4. The method of claim 1, wherein the converting the binary week number data and the binary section number data into the decimal week number data and the decimal section number data, respectively, and storing the decimal week number data and the decimal section number data comprises: the decimal week data and the decimal section data are stored in an SQL database.
5. A time collision detection apparatus, comprising:
the course information acquisition module is used for acquiring the initial information of the arranged course and the initial information of the course to be arranged;
the system comprises a week-order conversion module, a date-of-class acquisition module and a date-of-class acquisition module, wherein the week-order conversion module is used for acquiring week-order information and week information based on the scheduled course initial information and the to-be-scheduled course initial information; acquiring the class information based on the class scheduling initial information and the class period of the class scheduling initial information to be scheduled;
the data merging module is used for respectively merging the week information in the data with the same attribute information, the same level information and the same week information in the arranged course and the course to be arranged;
the binary system conversion module is used for respectively converting the week information and the section information of the merged arranged course and the merged to-be-arranged course into binary system week data and binary system section data;
the decimal conversion and storage module is used for respectively converting the binary system week number data and the binary system section number data into decimal system week number data and decimal system section number data and then storing the decimal system week number data and the decimal system section number data;
the time conflict detection module is used for taking data with the same attribute information and the same week information in the courses to be arranged stored in a decimal mode and the arranged courses stored in a decimal mode as a detection data pair; respectively converting the decimal cycle data and the decimal node data in the detection data pair into binary cycle data and binary node data, and performing bitwise AND operation; and if the calculation results of the binary system weekly data and the binary system section data are both 0, identifying that no time conflict exists, otherwise identifying that the time conflict exists.
6. The apparatus for detecting time conflict as claimed in claim 5, wherein the scheduled session initiation information and the pending session initiation information each comprise: attribute information and initial time information; wherein the attribute information includes: course, give lessons teacher, occupy classroom, the student who takes a lesson, initial time information includes: date of class, period of class.
7. The apparatus of claim 5, wherein the binary translation module comprises:
the system comprises a week information binary conversion unit, a week information binary conversion unit and a data processing unit, wherein the week information binary conversion unit is used for taking the total week as the number of bits of binary week data, converting the value of the week information in each row into the number of bits from right to left in the binary week data, setting the value of the bit to be 1, and setting the values of other bits to be 0;
and the binary conversion unit of the rank information is used for taking the total rank of each day as the bit number of the binary rank data, converting the value of the rank information in each row into the bit number from right to left in the binary rank data, setting the value of the bit to be 1, and setting the values of other bits to be 0.
8. A time conflict detection apparatus according to claim 5, wherein the decimal week number data and the decimal section number data are stored in a SQL database.
9. A computer-readable storage medium storing a computer program for time collision detection, wherein the computer program causes a computer to execute the time collision detection method according to any one of claims 1 to 4.
10. An electronic device, comprising:
one or more processors;
a memory; and
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising instructions for performing the time collision detection method of any of claims 1-4.
CN202210572851.8A 2022-05-25 2022-05-25 Time conflict detection method and device, storage medium and electronic equipment Active CN114663075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210572851.8A CN114663075B (en) 2022-05-25 2022-05-25 Time conflict detection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210572851.8A CN114663075B (en) 2022-05-25 2022-05-25 Time conflict detection method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114663075A true CN114663075A (en) 2022-06-24
CN114663075B CN114663075B (en) 2022-09-06

Family

ID=82038459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210572851.8A Active CN114663075B (en) 2022-05-25 2022-05-25 Time conflict detection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114663075B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006522A (en) * 2010-11-04 2011-04-06 深圳市同洲电子股份有限公司 Advertisement scheduling method and system
US20140287397A1 (en) * 2013-03-21 2014-09-25 Neuron Fuel, Inc. Systems and methods for customized lesson creation and application
CN106846193A (en) * 2016-12-26 2017-06-13 河南工业大学 The controllable cource arrangement method of constraint granularity and system
CN106934741A (en) * 2017-02-20 2017-07-07 深圳国泰安教育技术股份有限公司 The method and device of the construction of curriculum
CN107909263A (en) * 2017-11-14 2018-04-13 江苏金智教育信息股份有限公司 A kind of colleges and universities examine business row's test method and device
CN109784721A (en) * 2019-01-15 2019-05-21 东莞市友才网络科技有限公司 A kind of plateform system of employment data analysis and data mining analysis
CN110874375A (en) * 2019-11-12 2020-03-10 上海乂学教育科技有限公司 Course arrangement method, device, equipment, medium and system based on two-dimensional plane
CN112055250A (en) * 2019-06-05 2020-12-08 海信视像科技股份有限公司 Television program recording method and device
CN113052734A (en) * 2021-04-06 2021-06-29 上海网梯数码科技有限公司 Visual, quick and intelligent course arrangement method
CN113986880A (en) * 2021-10-29 2022-01-28 平安国际智慧城市科技股份有限公司 Database adaptation method, device, equipment and storage medium of business system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006522A (en) * 2010-11-04 2011-04-06 深圳市同洲电子股份有限公司 Advertisement scheduling method and system
US20140287397A1 (en) * 2013-03-21 2014-09-25 Neuron Fuel, Inc. Systems and methods for customized lesson creation and application
CN106846193A (en) * 2016-12-26 2017-06-13 河南工业大学 The controllable cource arrangement method of constraint granularity and system
CN106934741A (en) * 2017-02-20 2017-07-07 深圳国泰安教育技术股份有限公司 The method and device of the construction of curriculum
CN107909263A (en) * 2017-11-14 2018-04-13 江苏金智教育信息股份有限公司 A kind of colleges and universities examine business row's test method and device
CN109784721A (en) * 2019-01-15 2019-05-21 东莞市友才网络科技有限公司 A kind of plateform system of employment data analysis and data mining analysis
CN112055250A (en) * 2019-06-05 2020-12-08 海信视像科技股份有限公司 Television program recording method and device
CN110874375A (en) * 2019-11-12 2020-03-10 上海乂学教育科技有限公司 Course arrangement method, device, equipment, medium and system based on two-dimensional plane
CN113052734A (en) * 2021-04-06 2021-06-29 上海网梯数码科技有限公司 Visual, quick and intelligent course arrangement method
CN113986880A (en) * 2021-10-29 2022-01-28 平安国际智慧城市科技股份有限公司 Database adaptation method, device, equipment and storage medium of business system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SHIFENG CHEN ET AL.: "Research on solution to course scheduling problems based on a hierarchical planning strategy", 《2011 INTERNATIONAL CONFERENCE OF SOFT COMPUTING AND PATTERN RECOGNITION (SOCPAR)》 *
张亮等: "基于AOP实现冲突动态检测的实验室预约系统设计", 《计算机测量与控制》 *
王国胜: "《Excel 2013公式与函数辞典 全新升级版》", 31 January 2014, 北京:中国青年出版社 *

Also Published As

Publication number Publication date
CN114663075B (en) 2022-09-06

Similar Documents

Publication Publication Date Title
Greeley Catholic high schools and minority students
Jones Issues in Doctoral Studies-Forty Years of Journal Discussion: Where have we been and where are we going?
Conway Facts and frameworks: an approach to studying the users of archives
Frandsen et al. What is in a name? Credit assignment practices in different disciplines
Zweizig Predicting amount of library use: an empirical study of the role of the public library in the life of the adult public.
Knapp Practical statistics for nursing using SPSS
Lutz Advanced introduction to demography
Taipalus A notation for planning SQL queries
Rogayan Jr et al. Evaluating the Research Productivity of a State University in Central Luzon, Philippines: Basis for Policy Recommendations.
CN114663075B (en) Time conflict detection method and device, storage medium and electronic equipment
Chapin The Optimum Size of Institutions a Theory of the Large Group
KOMOLAFE et al. Serials Availability and Use in Nigeria Academic Libraries By The Postgraduate Students Of Osun State University, Osogbo, Nigeria
Kartika et al. The Correlation between Tracer Study and Curriculum Relevance
Singer The criterial crisis of the academic world
Faricy Grouping departments
Lynch Research and librarianship: An uneasy connection
Bilgrien et al. PARQR: augmenting the piazza online forum to better support degree seeking online masters students
Larson Workload characteristics and computer system utilization in online library catalogs
Wronski Edgar Bruce Wesley (1891-1980): His contributions to the past, present and future of the social studies
CN116894116A (en) Shared educational resource query method and system for multi-educational system
Schweitzer et al. Interactive, Direct-Entry Approaches to Event Files: British Contentious Gatherings
Heussman THE LITERATURE CITED IN THEOLOGICAL JOURNALS AND ITS RELATION TO SEMINARYLIBRARY CIRCULATION
Robinson SUBJECT DISPERSION IN POLITICAL SCIENCE. AN ANALYSIS OF REFERENCES APPEARING IN THE JOURNAL LITERATURE: 1910-1960.
Hook Developing Data Fluent Lawyers by Teaching Litigation Analytics
MacLean Jr et al. AEJ members and their attitudes on journalism education issues

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
GR01 Patent grant
GR01 Patent grant