Code plagiarism detection method and system based on programming language teaching practice platform
By combining student editing operation characteristics, historical plagiarism behavior and teacher ratings, the accuracy and efficiency of code plagiarism detection are improved, the problem of detection results in the existing technology being out of touch with reality is solved, and more accurate homework code plagiarism detection is achieved.
Patent Information
- Application Number
- CN202111043203.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-07
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-09-07
AI Technical Summary
Existing homework code plagiarism detection solutions only rely on code similarity analysis and lack the combination of students' actual behaviors and teaching scenarios, resulting in detection results that are divorced from reality, lack practical significance, and are not continuous, and cannot effectively reduce teachers' investigation burden.
By obtaining the students' editing operation characteristics, historical plagiarism behavior characteristics and teachers' plagiarism possibility scores when editing the homework code, the first parameter is generated through fusion, and the code similarity is processed to obtain the final code plagiarism detection results and improve the accuracy of the detection results. Credibility and accuracy.
It has improved the accuracy and efficiency of plagiarism detection of students' homework codes, reduced teachers' correction time, improved the quality of teaching, and ensured that the detection results are combined with the teaching scenarios, with continuity and practicality.
Smart Images

Figure CN113900654B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of programming language teaching, and in particular to a code plagiarism detection method and system based on a programming language teaching practice platform. Background Art
[0002] With the progress and development of social science and technology, intelligent teaching is also more widely used in major universities. In practical teaching scenarios, since the number of students is far greater than the number of teachers, the time for teachers to correct homework accounts for a large proportion of the entire teaching time. Although the existing teaching practice platform provides a homework correction function, teachers often need to spend a lot of time to check students' homework code plagiarism. After students submit their homework online, teachers need to review each homework, and the phenomenon of homework code plagiarism is repeatedly banned in the teaching process. Therefore, the present invention is used to compare the submitted homework code plagiarism before correcting the homework, and obtain possible homework code plagiarism samples to reduce the teacher's troubleshooting time and reduce the teacher's burden.
[0003] Most of the existing inventions are to perform semantic and feature analysis on the code or processed code, and detect the renaming, reconstruction and modification of the code format features of variables and functions. It can be roughly divided into two stages: converting the code format and determining the code similarity. First, the code is removed after irrelevant items are removed, and the code is packaged into the code to be compared with a certain algorithm. Secondly, the code to be compared is compared for similarity, and finally the code similarity comparison result is obtained.
[0004] The existing homework code plagiarism detection scheme simply performs a similarity comparison test on the homework code, without combining it with specific usage scenarios, resulting in the comparison test results being out of touch with reality, lacking practical significance, and lacking continuity. Therefore, the existing homework code plagiarism detection scheme only analyzes the code similarity, and does not combine it with students' actual behavior, such as daily performance, homework submission time, etc. The data obtained is formulaic and has little reference value for teachers. Summary of the invention
[0005] In view of the problems existing in the above-mentioned prior art, the present invention provides a code plagiarism detection method and system based on a programming language teaching practice platform, which not only completes the check of the similarity of students' homework codes, but also integrates students' homework performance and long-term performance to improve the credibility of the final plagiarism results.
[0006] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
[0007] On the one hand, the embodiment of the present application provides a code plagiarism detection method based on a programming language teaching practice platform, including:
[0008] Obtain two operation codes, perform matching and comparison based on the contents of the operation codes, and determine the similarity of the two operation codes;
[0009] The similarity is processed to obtain a final code plagiarism detection result of the two homework codes, wherein the processing of the similarity includes applying a first parameter to the similarity data, and the first parameter is generated based on an editing operation feature of the student when editing the homework code.
[0010] In an optional embodiment, the generation of the first parameter is also based on the student's historical plagiarism behavior characteristics and the teacher's plagiarism possibility score for the student.
[0011] In an optional embodiment, the obtaining of the first parameter includes:
[0012] Based on the editing operation characteristics of the students when editing the homework code, calculating the first plagiarism credibility parameter of the students' editing homework process;
[0013] Based on the historical plagiarism behavior characteristics of students, calculate the students' second plagiarism credibility parameter;
[0014] Calculate the student's third plagiarism credibility parameter based on the teacher's rating of the student's plagiarism likelihood;
[0015] The first parameter is obtained based on the fusion of the first plagiarism credibility parameter, the second plagiarism credibility parameter and the third plagiarism credibility parameter.
[0016] In an optional embodiment, the editing operation features of the student when editing the homework code include:
[0017] Keyboard input operations, copy and paste operations, code static analysis operations, job debugging operations, job running operations, job saving operations, and job submission operations;
[0018] The first plagiarism credibility parameter a3 is:
[0019] Among them, the number of times students copied and pasted codes p1, the static analysis results of the program language teaching practice platform on the homework code p2, whether online debugging and running were done p3 and the results of online debugging and running p4, and the homework submission time p5.
[0020] In an optional embodiment, the processing of the similarity to obtain a final code plagiarism detection result X(M,N) of the two operation codes includes:
[0021] X(M,N)=Y(M,N)S(A M ,A N), where M is a job code, N is another job code, Y(M,N) is the similarity between job codes M and N, A M and A N The first parameters of the job codes M and N respectively.
[0022] In an optional embodiment, the obtaining two job codes includes:
[0023] Based on the homework codes submitted by all students, the codes are tested through the test cases corresponding to the homeworks;
[0024] Get the test results, encapsulate the jobs with the same test results in the same code file, separate them with independent namespaces, and append the student information as the space name;
[0025] Get two students' submitted assignment code in the same code file.
[0026] In an optional embodiment, the matching and comparing based on the contents of the operation codes to determine the similarity of the two operation codes includes:
[0027] Encapsulate the two job codes in two independent workspaces;
[0028] Convert the job code format and clean irrelevant data;
[0029] Compile words and sentences with different texts but the same semantics in the job code into the same text to obtain an intermediate code;
[0030] The two intermediate codes are compared for similarity using the LCS function to obtain the similarity of the two job codes.
[0031] On the other hand, the embodiment of the present application provides a code plagiarism detection system based on a programming language teaching practice platform, including:
[0032] The job code text similarity analysis module is used to obtain two job codes, perform matching and comparison based on the job code contents, and determine the similarity of the two job codes;
[0033] The homework code plagiarism detection module is used to process the similarity and obtain the final code plagiarism detection result of the two homework codes. The processing of the similarity includes applying a first parameter to the similarity data, and the first parameter is generated based on the editing operation characteristics of the student when editing the homework code.
[0034] In another aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0035] processor;
[0036] a memory for storing processor-executable instructions;
[0037] The processor implements the above-mentioned code plagiarism detection method based on the programming language teaching practice platform by running the executable instructions.
[0038] On the other hand, an embodiment of the present application further provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the above-mentioned code plagiarism detection method based on the programming language teaching practice platform.
[0039] The code plagiarism detection method and system based on the programming language teaching practice platform of the present invention have the following beneficial effects:
[0040] 1. The present invention is to program the scenario of submitting homework for language teaching practice courses. The program will perform preliminary screening on the course homework submitted by students, and complete plagiarism comparison detection through the homework code plagiarism detection algorithm, which saves manual review time for teachers to correct homework, improves the efficiency of homework correction, increases the detection accuracy of homework code plagiarism, curbs bad learning habits, and improves teaching quality.
[0041] 2. Different from the prior art which only determines whether plagiarism is caused by similarity analysis of code texts, the present invention further integrates the similarity of code texts in combination with specific teaching practice usage scenarios, and the editing operation characteristics of students when editing homework codes, such as copy and paste operations, homework submission time and other factors after calculating the similarity of code texts, so that the homework code plagiarism results combined with teaching scenarios are more accurate.
[0042] 3. The present invention further integrates the similarity of code texts, and also adds teachers' judgment on the possibility of students' plagiarism behavior and students' historical plagiarism behavior characteristics, and obtains the final plagiarism result after coordination, making the homework code plagiarism result combined with the teaching scenario more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flowchart of a code plagiarism detection method based on a programming language teaching practice platform in an embodiment of the present application;
[0044] Figure 2 is a flow chart of a method for obtaining the first parameter in an embodiment of the present application;
[0045] Figure 3 It is a structural diagram of a code plagiarism detection system based on a programming language teaching practice platform in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0047] It should be noted that the terms "including" and "having" and their variations involved in the documents of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0048] Some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0049] (1) Code similarity: a measure of the degree of code similarity, usually expressed as a percentage.
[0050] (2) Code formatting: Arrange the code into an orderly style according to a certain rule.
[0051] (3) Code size: measures the amount of code, usually in lines.
[0052] (4) Invalid code: Code that has never been executed in the program.
[0053] (5) Redundant code: After the program is optimized, the amount of code is reduced, but the same purpose can be achieved and the execution efficiency is improved. In this case, the reduced code is redundant code.
[0054] (6) Intermediate code: A syntax-oriented, internal representation code equivalent to the source program that is easily translated into the target program.
[0055] (7) Online IDE: The integrated development environment for online programming provided by the present invention.
[0056] (8) Static analysis: A method of analyzing a program without running the program.
[0057] (10) Machine Learning: Machine learning is a multidisciplinary subject that covers knowledge of probability theory, statistics, approximate theory, and complex algorithms. It uses computers as tools and is committed to simulating human learning methods in real time, and divides existing content into knowledge structures to effectively improve learning efficiency.
[0058] The present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0059] In practical teaching scenarios, since the number of students far exceeds the number of teachers, the time for teachers to correct homework accounts for a large proportion of the entire teaching time. Although the existing teaching practice platform provides a homework correction function, teachers often need to spend a lot of time to check students' homework code plagiarism. The embodiment of the present application provides a code plagiarism detection method, system, electronic device, and computer-readable storage medium based on a programming language teaching practice platform, which performs a similarity comparison on the homework codes submitted by students, obtains code similarity comparison results, and further integrates the code similarity comparison results based on the characteristics of students and homework, combined with factors such as students' historical plagiarism, current homework editing behavior, and current homework submission time. At the same time, the subjective judgment of teachers on students is also added, and the final plagiarism result is obtained after overall planning, and then combined with the manual review of teachers, so that the homework code plagiarism result combined with the teaching scenario is more accurate.
[0060] The code plagiarism detection method based on the programming language teaching practice platform provided in the embodiment of the present application includes:
[0061] Step S1, obtaining two operation codes, performing matching and comparison based on the contents of the operation codes, and determining the similarity of the two operation codes;
[0062] Among them, the two homework codes refer to the homework codes submitted by two students who may have plagiarized. In the embodiment of the present application, the matching and comparison based on the homework code content can be based on the judgment of the similarity or identity of words and sentences in the text content of the two homework codes.
[0063] Step S2, processing the similarity to obtain the final code plagiarism detection result of the two homework codes, wherein the processing of the similarity includes applying a first parameter to the similarity data, and the first parameter is generated based on the editing operation characteristics of the student when editing the homework code.
[0064] Different from the prior art in which plagiarism is determined only through similarity analysis of code texts, in the embodiments of the present application, after calculating the similarity of the code texts, the similarity of the code texts is further integrated in combination with the specific usage scenarios and the editing operation features of the students when editing the homework codes, such as copy and paste operations, homework submission time and other factors, so that the homework code plagiarism results combined with the teaching scenarios are more accurate. It can be understood that the first parameter can be a parameter that characterizes the credibility of plagiarism in the homework codes submitted by the students. Based on the first parameter acting on the similarity data, the final code plagiarism detection result of the two homework codes is obtained. When the plagiarism detection result exceeds the preset threshold, it is determined that plagiarism exists in the two homework codes.
[0065] When students submit their homework, the editing behavior of the online IDE will also be recorded, including keyboard input operations, copy and paste operations, program analysis, code debugging, running and other related operations, the time of user operations, etc. Take the following points as an example:
[0066] The number of times of copying and pasting is positively correlated with the possibility of plagiarism;
[0067] The number of keyboard inputs and revisions was negatively correlated with the likelihood of plagiarism;
[0068] The closer the first submission of the assignment is to the deadline, the more likely it is to plagiarize; the later the last revision is, the lower the probability of plagiarism;
[0069] Therefore, in the embodiment of the present application, the acquisition of the first parameter integrates the editing operation characteristics of the students when editing the homework code.
[0070] The generation of the first parameter is also based on the student's historical plagiarism behavior characteristics and the teacher's plagiarism possibility score for the student.
[0071] Specifically, in some embodiments, the first parameter in step S2 also takes into account the student's historical plagiarism behavior characteristics and the teacher's score of the student's plagiarism possibility, and adds the teacher's judgment on the student. The final plagiarism result is obtained after coordination, and then combined with the teacher's manual review, so that the homework code plagiarism result combined with the teaching scenario is more accurate. The teacher's judgment on the student is the teacher's judgment on the possibility of plagiarism of the student based on the student's daily performance.
[0072] In the embodiment of the present application, the first parameter integrates the student's homework editing operation characteristics, the student's historical plagiarism behavior characteristics and the teacher's evaluation of the student. In the scenario of language teaching practice, the homework codes submitted by the students are compared for plagiarism, and comprehensive reference is made to other factors such as the student's homework editing behavior, homework execution results, homework submission time, and the student's actual performance behavior given by the teacher. Finally, it is combined with the code similarity data, and the student's final plagiarism result is obtained through algorithm calculation. Not only the student's homework code similarity check is completed, but also the student's homework performance and long-term performance are integrated to improve the credibility of the final plagiarism result, and the plagiarism detection result has continuity.
[0073] In some embodiments, obtaining the first parameter in step S2 includes:
[0074] Based on the editing operation characteristics of the students when editing the homework code, calculating the first plagiarism credibility parameter of the students' editing homework process;
[0075] Based on the historical plagiarism behavior characteristics of students, calculate the students' second plagiarism credibility parameter;
[0076] Calculate the student's third plagiarism credibility parameter based on the teacher's rating of the student's plagiarism likelihood;
[0077] The first parameter is obtained based on the fusion of the first plagiarism credibility parameter, the second plagiarism credibility parameter and the third plagiarism credibility parameter.
[0078] Exemplarily, the second plagiarism credibility parameter of a student may be obtained by the following steps:
[0079] Based on statistics of the time when the student's historical plagiarism occurred, the frequency characteristics of the plagiarism and the occurrence pattern of the plagiarism are determined, wherein the occurrence pattern of the plagiarism includes the probability of the plagiarism determined by the statistics of the plagiarism in the historical homework code and the weight of the historical plagiarism, and the weight of the historical plagiarism is determined based on the time interval between the occurrence of the last plagiarism and the last time the plagiarism occurred. In one embodiment, the longer the time interval between the occurrence of the last plagiarism and the last time the plagiarism occurred, the smaller the weight of the plagiarism occurred this time;
[0080] According to the historical frequency characteristics and the occurrence law of historical plagiarism, the probability of plagiarism in the current job code is predicted, and the predicted probability is used as the second plagiarism credibility parameter, wherein the probability prediction can be performed using a neural network model.
[0081] In the embodiment of the present application, the second plagiarism credibility parameter of the student is also dynamically changed in combination with the student's historical homework performance to improve the credibility of the final plagiarism result.
[0082] Similarly, in the embodiment of the present application, the third plagiarism credibility parameter of the student can also be dynamically changed based on the student's history course performance. For example, the teacher conducts a comprehensive evaluation of the student based on the student's history class performance, including attendance, class enthusiasm, and excellent homework evaluation results, and assesses the possibility of the student's plagiarism as the student's third plagiarism credibility parameter.
[0083] Of course, the dynamic update of the second plagiarism credibility parameter and the third plagiarism credibility parameter may be performed once based on each homework code, or may be performed once based on a period of time, such as a number of study hours.
[0084] The first parameter A is obtained by fusing the first plagiarism credibility parameter a1, the second plagiarism credibility parameter a2, and the third plagiarism credibility parameter a3, which can be: A = ∑(a1H1, a2H2, a3H3)
[0085] In some embodiments, the editing operation features of the student when editing the homework code include:
[0086] Keyboard input operations, copy and paste operations, code static analysis operations, job debugging operations, job running operations, job saving operations, and job submission operations;
[0087] The first plagiarism credibility parameter a1 is:
[0088] Among them, the number of times students copied and pasted codes p1, the static analysis results of the programming language teaching practice platform on the homework code p2, whether online debugging and running were done p3 and the results of online debugging and running p4, and the homework submission time p5.
[0089] In the embodiment of the present application, the first plagiarism credibility parameter of the student is comprehensively judged based on the editing operation characteristics of the student when editing the homework code. Of course, the acquisition of the first plagiarism credibility parameter can also be based on the following steps:
[0090] Obtain the editing operation characteristics of all students of the historical homework code when editing the homework code, including the number of keyboard inputs, the number of copy and paste operations, the number of modifications, the time of the first submission of the homework, the time of the last modification, etc. during each homework code editing process of each student;
[0091] Based on the editing operation features of each student's homework code editing process as training samples, the results of each student's homework code plagiarism are used as the labeled data of the training samples, and the prediction model between the homework code editing operation features and the occurrence of plagiarism is obtained by training the neural network;
[0092] Based on the prediction model, the editing operation features of each homework code editing process of the student are extracted and input into the prediction model to obtain the first plagiarism credibility parameter of the student when editing the homework code.
[0093] The similarity is processed as described above to obtain the final code plagiarism detection result X(M,N) of the two operation codes, including:
[0094] X(M,N)=Y(M,N)S(A M ,A N ), where M is a job code, N is another job code, Y(M,N) is the similarity between job codes M and N, A M and A N The first parameters of the job codes M and N respectively.
[0095] In the embodiment of the present application, based on the first parameter acting on the similarity data, a final code plagiarism detection result of the two operation codes is obtained. When the plagiarism detection result exceeds a preset threshold, it is determined that plagiarism exists in the two operation codes.
[0096] In the embodiment of the present application, two operation codes are obtained, including:
[0097] Based on the homework codes submitted by all students, the codes are tested through the test cases corresponding to the homeworks;
[0098] Store jobs with the same test results into the same job set;
[0099] Get the assignment codes submitted by two students in the same assignment set.
[0100] Each computer assignment will be equipped with templates, sample codes and several test cases provided by the teaching practice platform. In the embodiment of the present application, the pass status of the test cases is used as one of the reference factors for plagiarism judgment. If the pass rates of the two compared assignment codes are the same and the passed / failed test cases are the same, then the probability that the two codes are judged as plagiarized will also increase accordingly.
[0101] In an embodiment of the present application, a statistical analysis is performed on the test case pass status of each assignment code, and assignment codes with the same pass status are grouped into the same assignment set. There is a high possibility of plagiarism between any two assignment codes in the same assignment set. Specifically, the process can be that assignments with the same test results are encapsulated in the same code file, separated by independent namespaces, and student information is attached as the space name to facilitate subsequent similarity comparison operations.
[0102] In the embodiment of the present application, before performing a similarity judgment on two homework codes, the homework codes that need to be judged for similarity are first screened and classified based on whether the code test examples have passed, thereby avoiding direct similarity comparison of homework codes submitted by any two students one by one, reducing the computational complexity of similarity comparison, and improving the efficiency of plagiarism detection.
[0103] In some embodiments, the matching and comparison based on the content of the operation code to determine the similarity of two operation codes includes:
[0104] Encapsulate the two job codes in two independent workspaces;
[0105] Convert the job code format and clean irrelevant invalid data;
[0106] Compile words and sentences with different texts but the same semantics in the job code into the same text to obtain an intermediate code;
[0107] The two intermediate codes are compared for similarity using the LCS function to obtain the similarity of the two job codes.
[0108] In the prior art, when checking for plagiarism of homework codes, the similarity measurement methods used are mostly semantic and feature analysis of codes or processed codes, and detection of variable and function renaming, reconstruction, and code format modification features. This can be roughly divided into two stages: converting code formats and determining code similarity. First, the code is removed from irrelevant items, and the code is packaged into the code to be compared using a certain algorithm. Secondly, the code to be compared is compared for similarity, and finally the code similarity comparison result is obtained.
[0109] In the embodiment of the present application, for the two job codes to be similarity calculated:
[0110] The first step is to use the code formatting tool to process the text format of each code into a consistent format to facilitate subsequent plagiarism comparison;
[0111] The second step is to remove invalid lines in the code, including comment lines, blank lines, empty statement lines, etc.
[0112] The third step is to perform static analysis on the code and delete invalid and redundant code that may interfere with the code similarity comparison;
[0113] The fourth step is to compile the source code of the homework submitted by the students into intermediate code, excluding situations such as different naming and different but equivalent control statements that may interfere with the code similarity comparison;
[0114] The fifth step is to compare the character data of the two job codes one by one based on the above intermediate code to obtain the code similarity result.
[0115] Among them, before the plagiarism comparison detection of the homework code, the embodiment of the present application uses static code analysis technology to exclude invalid code and redundant code, which greatly improves the accuracy of the comparison results; the plagiarism comparison detection process of the homework code is based on the abstraction and packaging of the code, and is an analysis and comparison of the intermediate language, and a similarity comparison is made after excluding variable interference items.
[0116] Based on the same inventive concept as the above-mentioned code plagiarism detection method based on the programming language teaching practice platform, a code plagiarism detection system based on the programming language teaching practice platform is also provided in the embodiment of the present application, and the code plagiarism detection system can be deployed in a server or a terminal device. Since the code plagiarism detection system is a system corresponding to the code plagiarism detection method in the embodiment of the present application, and the principle of solving the problem by the code plagiarism detection system is similar to that of the method, the implementation of the code plagiarism detection system can refer to the implementation of the above-mentioned code plagiarism detection method, and the repeated parts will not be repeated.
[0117] The embodiment of the present application provides a code plagiarism detection system based on a programming language teaching practice platform, comprising:
[0118] The job code text similarity analysis module is used to obtain two job codes, perform matching and comparison based on the job code contents, and determine the similarity of the two job codes;
[0119] The homework code plagiarism detection module is used to process the similarity and obtain the final code plagiarism detection result of the two homework codes. The processing of the similarity includes applying a first parameter to the similarity data, and the first parameter is generated based on the editing operation characteristics of the student when editing the homework code.
[0120] In an optional embodiment, the homework code plagiarism detection module includes:
[0121] A first plagiarism credibility parameter acquisition unit, used to calculate a first plagiarism credibility parameter of a student's homework editing process based on the editing operation characteristics of the student when editing the homework code;
[0122] A second plagiarism credibility parameter acquisition unit, used to calculate the student's second plagiarism credibility parameter based on the student's historical plagiarism behavior characteristics;
[0123] A third plagiarism credibility parameter acquisition unit, used to calculate the student's third plagiarism credibility parameter based on the teacher's plagiarism possibility score of the student;
[0124] The first parameter acquisition unit is used to obtain the first parameter based on the fusion of the first plagiarism credibility parameter, the second plagiarism credibility parameter and the third plagiarism credibility parameter.
[0125] It should be noted that: when the code plagiarism detection system provided in this embodiment performs plagiarism detection, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the code plagiarism detection system is divided into different functional modules to complete all or part of the functions described above.
[0126] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0127] Corresponding to the above method embodiment, the embodiment of the present application further provides an electronic device, which may be a server, and the electronic device includes:
[0128] processor;
[0129] a memory for storing processor-executable instructions;
[0130] The processor implements the code plagiarism detection method based on the programming language teaching practice platform as described above by running the executable instructions.
[0131] Among them, for the processor used for data processing, when executing the processing, a microprocessor, CPU, DSP or FPGA can be used. For the memory, the memory can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The memory stores operation instructions, which can be computer executable codes. The operation instructions are used to implement each step in the process of the code plagiarism detection method of the embodiment of the present application.
[0132] Corresponding to the above method embodiment, the embodiment of the present application also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the code plagiarism detection method based on the programming language teaching practice platform as described above is implemented.
[0133] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage node, and the like.
[0134] The present invention is not limited to the above-mentioned specific implementation modes. Various changes made by ordinary technicians in this field based on the above-mentioned concepts without creative work are all within the protection scope of the present invention.
Claims
1. A code plagiarism detection method based on a programming language teaching practice platform, characterized in that: include: Obtain two operation codes, perform matching and comparison based on the contents of the operation codes, and determine the similarity of the two operation codes; Processing the similarity to obtain final code plagiarism detection results of the two homework codes, wherein the processing of the similarity includes applying a first parameter to the similarity data, wherein the first parameter is generated based on the editing operation characteristics of the student when editing the homework code, and the generation of the first parameter is also based on the historical plagiarism behavior characteristics of the student and the teacher's plagiarism possibility score of the student; The obtaining of the first parameter includes: Based on the editing operation features of the students when editing the homework code, a first plagiarism credibility parameter of the student's homework editing process is calculated; the editing operation features of the students when editing the homework code include: keyboard input operation, copy and paste operation, code static analysis operation, homework debugging operation, homework running operation, homework saving operation, and homework submission operation; the first plagiarism credibility parameter for: , where the number of times students copied and pasted the code , the static analysis results of the programming language teaching practice platform on the homework code , have you done online debugging? And the online debugging results , job submission time ; Based on the historical plagiarism behavior characteristics of students, calculate the students' second plagiarism credibility parameter; Calculate the student's third plagiarism credibility parameter based on the teacher's rating of the student's plagiarism likelihood; The first parameter is obtained based on the fusion of the first plagiarism credibility parameter, the second plagiarism credibility parameter and the third plagiarism credibility parameter.
2. The code plagiarism detection method based on the programming language teaching practice platform according to claim 1 is characterized in that: The similarity is processed to obtain the final code plagiarism detection results of the two operation codes. ,include: ,in, is a job code, For another job code, For the job code and The similarity of and The job codes are and The first parameter of .
3. The code plagiarism detection method based on the programming language teaching practice platform according to claim 1 is characterized in that: The two job codes are obtained, including: Based on the homework codes submitted by all students, the codes are tested through the test cases corresponding to the homeworks; Get the test results, encapsulate the jobs with the same test results in the same code file, separate them with independent namespaces, and append the student information as the space name; Get two students' submitted assignment code in the same code file.
4. The code plagiarism detection method based on the programming language teaching practice platform according to claim 1 is characterized in that: The matching and comparison based on the content of the operation code to determine the similarity of the two operation codes includes: Encapsulate the two job codes in two independent workspaces; Convert the job code format and clean irrelevant data; Compile words and sentences with different texts but the same semantics in the job code into the same text to obtain an intermediate code; The two intermediate codes are compared for similarity using the LCS function to obtain the similarity of the two job codes.
5. The code plagiarism detection system based on the programming language teaching practice platform is characterized by: include: The job code text similarity analysis module is used to obtain two job codes, perform matching and comparison based on the job code contents, and determine the similarity of the two job codes; A homework code plagiarism detection module, used for processing the similarity to obtain final code plagiarism detection results of two homework codes, wherein the processing of the similarity includes applying a first parameter to the similarity data, wherein the first parameter is generated based on the editing operation characteristics of the student when editing the homework code, and the generation of the first parameter is also based on the historical plagiarism behavior characteristics of the student and the teacher's plagiarism possibility score of the student; The obtaining of the first parameter includes: Based on the editing operation features of the students when editing the homework code, a first plagiarism credibility parameter of the student's homework editing process is calculated; the editing operation features of the students when editing the homework code include: keyboard input operation, copy and paste operation, code static analysis operation, homework debugging operation, homework running operation, homework saving operation, and homework submission operation; the first plagiarism credibility parameter for: , where the number of times students copied and pasted the code , the static analysis results of the programming language teaching practice platform on the homework code Have you ever done online debugging? And the online debugging results , job submission time ; Based on the historical plagiarism behavior characteristics of students, calculate the students' second plagiarism credibility parameter; Calculate the student's third plagiarism credibility parameter based on the teacher's rating of the student's plagiarism likelihood; The first parameter is obtained based on the fusion of the first plagiarism credibility parameter, the second plagiarism credibility parameter and the third plagiarism credibility parameter.
6. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 4 by running the executable instructions.
7. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
