Method and device for realizing matching of different student management systems based on greedy algorithm
By applying greedy algorithms in the student management system, calculating the number of matched students between classes and determining the matching pairs, the problem of low efficiency and accuracy in cross-system student information matching is solved, and efficient and accurate automated matching is achieved.
Patent Information
- Application Number
- CN202510287095.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-12
AI Technical Summary
The prior art has low efficiency and accuracy in cross-system student information matching, and relies on manual intervention or fuzzy matching technology, which fails to provide efficient and accurate automated matching methods.
Using a method based on greedy algorithm, by obtaining and preprocessing student data, using student name information to calculate the number of matched students between classes, determining the class matching pair, and adding it to the preset matching relationship set.
It realizes efficient and accurate cross-system student information matching, avoids manual intervention, reduces labor costs, and ensures the accuracy and reliability of matching results.
Smart Images

Figure CN119809890A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent education technology, and in particular to a matching method and device for implementing different student management systems based on a greedy algorithm. Background Art
[0002] With the development of information technology in education management, a large amount of student, school and class information is recorded in different student management systems. However, due to different data entry sources, student transfers or class changes, system A and system B may record different class or school information for the same student. For example, the class recorded in system A is C1, while system B records it as C101. This data inconsistency hinders the effective integration and management of student information.
[0003] In cross-system data matching, student names are usually the only common data that can be provided between the two systems, while other data (such as class ID, school ID, grade, etc.) often cannot be directly used for matching due to different naming rules, data formats or data security requirements, which further increases the difficulty of student information matching.
[0004] In the prior art, although there are some methods that attempt to match student information across systems, most of these methods rely on manual intervention or use fuzzy matching technology, and fail to provide an efficient and accurate automated matching method. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a matching method and device for different student management systems based on a greedy algorithm, aiming to solve the problem of low efficiency and accuracy in the prior art when matching student information across systems.
[0006] On the one hand, the present invention proposes a matching method for different student management systems based on a greedy algorithm, the method comprising: Obtaining student data from different student management systems that need to be matched, and preprocessing the student data, wherein the preprocessing includes unifying the data format and cleaning invalid data; Get the class collection in one of the student management systems respectively and its student collection And another class collection in the student management system and its student collection ; Determine the class set using a greedy algorithm based on each student's name information Each class Gather with class Each class The number of matching students is determined to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set.
[0007] Furthermore, the above-mentioned matching method for implementing different student management systems based on the greedy algorithm, wherein the class set is determined using the greedy algorithm according to the name information of each student. Each class Gather with class Each class The steps of determining the number of matching students for each class to determine the matching pairs include: Calculate the class set based on each student's name information Each class Gather with class Each class The number of matching students; According to the number of matching students, use the preset conditions to find the class set The class Corresponding class set The target class Form class matching pairs.
[0008] Furthermore, in the above-mentioned matching method for implementing different student management systems based on the greedy algorithm, the number of matching students is calculated as follows: ; in, Represents a collection of students Gather with students The number of intersection elements, that is, the class determined based on the student's name information With class The number of common students.
[0009] Furthermore, in the above-mentioned matching method for implementing different student management systems based on the greedy algorithm, the expression of the preset condition is: ; The preset condition is expressed as Find the class Match the target class with the largest number of students .
[0010] Furthermore, in the above-mentioned matching method for implementing different student management systems based on the greedy algorithm, after the step of adding the class matching pairs to the preset matching relationship set, the following steps are further included: The class matching pairs that have been added to the preset matching relationship set are marked as paired and will no longer participate in subsequent class matching.
[0011] Furthermore, the above-mentioned matching method for implementing different student management systems based on the greedy algorithm, wherein the class set is determined using the greedy algorithm according to the name information of each student. Each class Gather with class Each class The steps of determining the respective class matching pairs based on the number of matching students and adding the class matching pairs to the preset matching relationship set include: Select the class matching pair with the largest number of matching students from all classes and add them to the preset matching relationship set, and then continue to select the class matching pair with the largest number of matching students from the remaining classes and add them to the preset matching relationship set until the matching is completed.
[0012] Another object of the present invention is to provide a matching device for implementing different student management systems based on a greedy algorithm, which is used to implement the above-mentioned matching method for implementing different student management systems based on a greedy algorithm, and the device comprises: A preprocessing module, used to obtain student data from different student management systems that need to be matched, and preprocess the student data, wherein the preprocessing includes unifying the data format and cleaning invalid data; The acquisition module is used to obtain the class collection in one of the student management systems. and its student collection And another class collection in the student management system and its student collection ; The matching module is used to determine the class set based on the name information of each student using a greedy algorithm Each class Gather with class Each class The number of matching students is determined to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set.
[0013] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, wherein the program implements the steps of the above method when executed by a processor.
[0014] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above method when executing the program.
[0015] The present invention makes full use of student name information as the only common data between two different student management systems and uses a greedy algorithm to determine the class set. Each class Gather with class Each class The number of matching students is used to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set. Each time, the class with the largest number of matching students is selected from all possible classes for matching. This local optimal selection can achieve the best matching result at each step as much as possible, and based on the unique matching of student names, ensure the accuracy of the results and avoid fuzzy matching errors. This solves the problem of low efficiency and accuracy in the existing technology when matching student information across systems.
[0016] In addition, the embodiments of the present invention have at least the following beneficial effects: 1. Even if there are students with the same name, the algorithm can still make the best choice based on the overall number of matching students in the class, ensuring that the final matching result is accurate and reliable; 2. Automatically complete cross-system class matching without manual intervention, reducing labor costs; 3. The algorithm structure is simple, easy to deploy and expand, and suitable for a variety of system environments; 4. The matching process is clear and transparent, and the matching basis is intuitively displayed through the number of matched students; 5. Each time, the class pair with the largest number of matching students is selected to reduce unnecessary calculations and speed up execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a matching method for implementing different student management systems based on a greedy algorithm in the first embodiment of the present invention; Figure 2 It is a structural block diagram of a matching device for implementing different student management systems based on a greedy algorithm in the third embodiment of the present invention.
[0018] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0019] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0020] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0022] Embodiment 1 See also Figure 1 , shown is a matching method for implementing different student management systems based on a greedy algorithm in a first embodiment of the present invention, the method comprising steps S10 to S12.
[0023] Step S10, obtaining student data from different student management systems that need to be matched, and preprocessing the student data, wherein the preprocessing includes unifying the data format and cleaning invalid data.
[0024] Specifically, before matching, the student data in two different student management systems are uniformly preprocessed, including but not limited to unifying the data format, cleaning invalid data, etc., to ensure the accuracy of subsequent matching.
[0025] Step S11, respectively obtain a class set in one of the student management systems and its student collection And another class collection in the student management system and its student collection ; The embodiment of the present invention simplifies the complexity by breaking down the entire matching problem into a student matching problem between classes. The matching of each class is performed by comparing the student information within the class. Therefore, it is necessary to obtain the student set that corresponds to the class set. Specifically, the class set A is the set of all classes in one of the student management systems. It can be expressed as ;in, It is a class collection A The i classes. Similarly, class set B is the set of all classes in another student management system, which can be expressed as ;in, is the first A class.
[0026] Step S12, determine the class set using a greedy algorithm based on the name information of each student Each class Gather with class Each class The number of matching students is determined to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set.
[0027] Among them, the greedy algorithm is an algorithm that takes the best or optimal (i.e., most favorable) choice in the current state in each step of selection, hoping to lead to the best or optimal result in the world. In the embodiment of the present invention, each time, the class with the largest number of matching students is selected from all possible class pairs for matching. The greedy algorithm selects the local optimal solution at each step and gradually builds the global optimal solution.
[0028] For class collections Each class , the system will collect Each class The system will compare the names of students in each pair of classes and count the number of identical students in each pair of classes. The class with the most matching students will be selected for matching. The two will form a class matching pair and the class matching pair will be stored in the preset matching relationship set.
[0029] In addition, in some optional embodiments of the present invention, in order to ensure the optimal global class matching effect, when matching, the class matching pairs with the largest number of matching students will be selected from all classes and added to the preset matching relationship set. Then, the class matching pairs with the largest number of matching students will be selected from the remaining classes and added to the preset matching relationship set until the matching is completed.
[0030] In summary, the matching method for different student management systems based on the greedy algorithm in the above embodiment of the present invention makes full use of the student name information as the only common data between two different student management systems, uses the greedy algorithm to determine the number of matching students between each class in the class set and each class in the class set to determine the respective class matching pairs, and adds the class matching pairs to the preset matching relationship set, and each time selects the class with the largest number of matching students from all possible classes for matching. This local optimal selection can achieve the best matching result at each step as much as possible, and based on the unique matching of student names, ensures accurate results and avoids fuzzy matching errors. It solves the problem of low efficiency and accuracy in the prior art when matching student information across systems.
[0031] Embodiment 2 This embodiment also proposes a matching method for implementing different student management systems based on a greedy algorithm. The difference between the matching method for implementing different student management systems based on a greedy algorithm in this embodiment and the matching method for implementing different student management systems based on a greedy algorithm in the first embodiment is that: The class set is determined by using a greedy algorithm based on the name information of each student. Each class Gather with class Each class The steps of determining the number of matching students for each class to determine the matching pairs include: Calculate the class set based on each student's name information Each class Gather with class Each class The number of matching students; According to the number of matching students, use the preset conditions to find the class set The class Corresponding class set The target class Form class matching pairs.
[0032] Among them, in the matching process, the class set is first calculated based on the name information of each student Each class Gather with class Each class The number of matching students, specifically, the number of matching students can be expressed as; ; in, Represents a collection of students Gather with students The number of intersection elements, that is, the class determined based on the student's name information With class The number of common students.
[0033] After obtaining the number of directly matching students for each pair of classes, you can filter and determine the final class matching pairs according to the conditions. Specifically, use the preset conditions to find the class set according to the number of matching students. The class Corresponding class set The target class Form a class matching pair. The expression of the preset condition is: ; The precondition is expressed as Find the class Match the target class with the largest number of students , that is, select the class set Each class The largest number of matching students Class matching pairs are formed and then added to the preset matching relationship set. The number of matching students can also be accumulated to indicate the final overall matching effect.
[0034] In addition, in order to improve the matching effect, during the actual matching, the class matching pairs that have been added to the preset matching relationship set are marked as paired and will no longer participate in subsequent class matching.
[0035] In order to describe the specific implementation process of the embodiment of the present invention in more detail, for example, there are currently two student management systems: System 1 and System 2, which have multiple classes. Each class contains a number of students, and the names of the students are the same in the two systems, but the classes and schools may be different. The goal is to match the classes in System 1 and System 2 to ensure that students with the same names can be correctly mapped to the corresponding classes.
[0036] Assume that the class and student information in System 1 and System 2 are as follows: System 1 includes classes A1, A2, and A3; class A1 includes students: Zhang San, Li Si, Wang Wu, and Zhao Liu; class A2 includes students: Sun Qi, Li Si, Liu Jiu, and Zhou Shi; class A3 includes students: Qian Ba, Wang Wu, Li Si, and Wu Shiyi.
[0037] System 2 includes classes B1, B2, and B3; class B1 includes students: Zhang San, Li Si, Wang Wu, and Sun Qi; class B2 includes students: Li Si, Zhao Liu, Liu Jiu, and Qian Ba; class B3 includes students: Wang Wu, Li Si, Zhou Shi, and Wu Shiyi Calculate the number of student matches for each pair of classes, as shown in Table 1 below: Table 1
[0038] Start greedy selection step by step (select the class matching pair with the largest number of matches each time): Step 1: From the matching results of all classes, select the class matching pair with the largest number of matching people. For example, A1→B1 (matching 3 people: Zhang San, Li Si, Wang Wu); Matched: A1 and B1; Exclusion: A1 and B1 will no longer participate in subsequent matching.
[0039] Step 2: Continue to select the class matching pair with the largest number of matching people from the remaining class pairs, for example, A3→B3 (matching 3 people: Wang Wu, Li Si, Wu Shiyi); Matched: A3 and B3; Exclusion: A3 and B3 will not participate in subsequent matching.
[0040] Step 3: Select the class matching pair with the largest number of matching persons from the remaining class pairs, for example, A2→ B2 (matching 2 persons: Li Si and Liu Jiu); Matched: A2 and B2; Exclusion: A2 and B2 will not participate in subsequent matching.
[0041] The final matching results are shown in Table 2 below: Table 2
[0042] It should be noted that in this example, the student "Li Si" appears in multiple classes, which is a duplicate name. When the greedy algorithm is processed, each time it selects according to the "number of matching students" of the current class pair. Although "Li Si" appears repeatedly, the greedy algorithm only focuses on the number of matching students in the current class pair, ultimately ensuring the best global class matching effect.
[0043] In summary, the matching method for different student management systems based on the greedy algorithm in the above embodiment of the present invention makes full use of the student name information as the only common data between two different student management systems, uses the greedy algorithm to determine the number of matching students between each class in the class set and each class in the class set to determine the respective class matching pairs, and adds the class matching pairs to the preset matching relationship set, and each time selects the class with the largest number of matching students from all possible classes for matching. This local optimal selection can achieve the best matching result at each step as much as possible, and based on the unique matching of student names, ensures accurate results and avoids fuzzy matching errors. It solves the problem of low efficiency and accuracy in the prior art when matching student information across systems.
[0044] Embodiment 3 See also Figure 2 , shown is a matching device for implementing different student management systems based on a greedy algorithm proposed in the third embodiment of the present invention, the device comprising: A preprocessing module 100 is used to obtain student data from different student management systems that need to be matched, and preprocess the student data, wherein the preprocessing includes unifying the data format and cleaning invalid data; The acquisition module 200 is used to obtain a class set in one of the student management systems. and its student collection And another class collection in the student management system and its student collection ; Matching module 300, used to determine the class set using a greedy algorithm based on the name information of each student Each class Gather with class Each class The number of matching students is determined to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set.
[0045] Furthermore, the above-mentioned matching device for implementing different student management systems based on the greedy algorithm, wherein the class set is determined by using the greedy algorithm according to the name information of each student. Each class Gather with class Each class The steps of determining the number of matching students for each class to determine the matching pairs include: Calculate the class set based on each student's name information Each class Gather with class Each class The number of matching students; According to the number of matching students, use the preset conditions to find the class set The class Corresponding class set The target class Form class matching pairs.
[0046] Furthermore, in the above-mentioned matching device for implementing different student management systems based on the greedy algorithm, the number of matching students is calculated as follows: ; in, Represents a collection of students Gather with students The number of intersection elements, that is, the class determined based on the student's name information With class The number of common students.
[0047] Furthermore, in the above-mentioned matching device for implementing different student management systems based on the greedy algorithm, the expression of the preset condition is: ; The preset condition is expressed as Find the class Match the target class with the largest number of students .
[0048] Furthermore, in the above-mentioned matching device for implementing different student management systems based on the greedy algorithm, the step of adding the class matching pairs to the preset matching relationship set further includes: The class matching pairs that have been added to the preset matching relationship set are marked as paired and will no longer participate in subsequent class matching.
[0049] Furthermore, the above-mentioned matching device for implementing different student management systems based on the greedy algorithm, wherein the class set is determined by using the greedy algorithm according to the name information of each student. Each class Gather with class Each class The steps of determining the respective class matching pairs based on the number of matching students and adding the class matching pairs to the preset matching relationship set include: Select the class matching pair with the largest number of matching students from all classes and add them to the preset matching relationship set, and then continue to select the class matching pair with the largest number of matching students from the remaining classes and add them to the preset matching relationship set until the matching is completed.
[0050] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.
[0051] Embodiment 4 Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.
[0052] Embodiment 5 Another aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the program, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.
[0053] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0054] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0055] More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0056] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0057] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0058] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A matching method for different student management systems based on a greedy algorithm, characterized in that: The method comprises: Obtaining student data from different student management systems that need to be matched, and preprocessing the student data, wherein the preprocessing includes unifying the data format and cleaning invalid data; Get the class collection in one of the student management systems respectively and its student collection And another class collection in the student management system and its student collection ; Determine the class set using a greedy algorithm based on each student's name information Each class Gather with class Each class The number of matching students is determined to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set.
2. According to claim 1, the matching method for implementing different student management systems based on a greedy algorithm is characterized in that: The class set is determined by using a greedy algorithm based on the name information of each student. Each class Gather with class Each class The steps of determining the number of matching students for each class to determine the matching pairs include: Calculate the class set based on each student's name information Each class Gather with class Each class The number of matching students; According to the number of matching students, use the preset conditions to find the class set The class Corresponding class set The target class Form class matching pairs.
3. The matching method for implementing different student management systems based on a greedy algorithm according to claim 2 is characterized in that: The calculation method of the number of matching students is: ; in, Represents a collection of students Gather with students The number of intersection elements, that is, the class determined based on the student's name information With class The number of common students.
4. The matching method for implementing different student management systems based on a greedy algorithm according to claim 3 is characterized in that: The expression of the preset condition is: ; The preset condition is expressed as Find the class Match the target class with the largest number of students .
5. The matching method for implementing different student management systems based on a greedy algorithm according to claim 1 is characterized in that: After the step of adding the class matching pair to the preset matching relationship set, the method further includes: The class matching pairs that have been added to the preset matching relationship set are marked as paired and will no longer participate in subsequent class matching.
6. The method for matching different student management systems based on a greedy algorithm according to claim 1, characterized in that: The class set is determined by using a greedy algorithm based on the name information of each student. Each class Gather with class Each class The steps of determining the respective class matching pairs based on the number of matching students and adding the class matching pairs to the preset matching relationship set include: Select the class matching pair with the largest number of matching students from all classes and add them to the preset matching relationship set, and then continue to select the class matching pair with the largest number of matching students from the remaining classes and add them to the preset matching relationship set until the matching is completed.
7. A matching device for implementing different student management systems based on a greedy algorithm, characterized in that: The device is used to implement the matching method of different student management systems based on the greedy algorithm as described in any one of claims 1 to 6, and the device comprises: A preprocessing module, used to obtain student data from different student management systems that need to be matched, and preprocess the student data, wherein the preprocessing includes unifying the data format and cleaning invalid data; The acquisition module is used to obtain the class collection in one of the student management systems. and its student collection And another class collection in the student management system and its student collection ; The matching module is used to determine the class set based on the name information of each student using a greedy algorithm Each class Gather with class Each class The number of matching students is determined to determine the respective class matching pairs, and the class matching pairs are added to the preset matching relationship set.
8. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program.
Citation Information
Patent Citations
Method and device for generating information
CN110264005A
Cross-platform data synchronization method for epidemic prevention and control device
CN111460032A
Intelligent education big data management platform and method
CN115099788A
Student dormitory and class distribution method and system based on greedy algorithm
CN116957864A
Batch class upgrading method and system based on class management of educational administration system
CN117217959A