Supercharge Your Innovation With Domain-Expert AI Agents!

Program code duplicate checking method based on hierarchical attention neural network

A program code and neural network technology, applied in the field of program code duplication checking based on hierarchical attention neural network, can solve the problems of low robustness, complex code plagiarism methods, and no consideration of program structure characteristics, and achieve anti-interference ability. strong effect

Inactive Publication Date: 2021-01-15
BEIJING UNIV OF POSTS & TELECOMM
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The method based on attribute feature statistics relies on the selection and extraction of keywords, and judges whether a code pair is a pair of plagiarism by calculating the similarity measure of different types of tokens. Although this method has achieved good results in some code duplication check data sets effect, but its robustness is low, it does not take into account the structural characteristics of the program, and cannot cope with plagiarism methods such as adding redundant statements, changing data types, and equivalently replacing control logic structures; the tree-based plagiarism check method takes into account the program code The grammatical features of the program code can be learned by building a natural language-like grammatical analysis tree, but the cost of building a grammatical tree is very high, and it cannot deal with the reordering of statements in the code block and the reordering of operands.
[0004] At present, the methods of code plagiarism are becoming more and more complicated, and the difficulty of students' code homework continues to increase, resulting in an increase in the length of program codes. Traditional code checking methods can no longer meet the needs, and there are only a handful of researches on programming text checking.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Program code duplicate checking method based on hierarchical attention neural network
  • Program code duplicate checking method based on hierarchical attention neural network
  • Program code duplicate checking method based on hierarchical attention neural network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] Specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0036] figure 1 It is a flowchart of the present invention, comprising the following steps:

[0037] Step S1: Steps of building a program code checking system;

[0038] Step S2: a program code preprocessing step;

[0039] Step S3: step of constructing classification model based on hierarchical attention network;

[0040] Step S4: Steps of training, evaluation and prediction of code duplication checking model based on hierarchical attention network;

[0041]Each step will be described in detail below:

[0042] Step S1 builds a system with student code homework submission, storage and teacher access management functions, figure 2 The specific flow of the method is given, and the steps are as follows:

[0043] 1) System requirements analysis: According to the different needs of the two types of users of the system for system functions, the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a program code duplicate checking method based on a hierarchical attention neural network. The method comprises the following steps: a building step of a codeduplicate checking system, a program code preprocessing step, a building step of a classification model based on a hierarchical attention network, and a program code duplicate checking model trainingevaluation and prediction step based on the hierarchical attention network. By utilizing the embodiment of the invention, a text representation technology of natural language processing can be combined with a program code duplicate checking task, and the program code duplicate checking method which is strong in anti-interference capability, capable of simultaneously extracting program code characteristics and program structure characteristics, capable of processing long program codes and suitable for various high-level languages is provided.

Description

technical field [0001] The invention relates to the field of data analysis and processing of non-natural language texts, and emphatically describes a program code checking method based on a hierarchical attention neural network. Background technique [0002] With the development of the Internet, people gradually rely on the use of search engines to search for answers and solutions to problems from the Internet. On the one hand, it makes it easier for people all over the world to share and obtain knowledge. Used for plagiarism made a breeze. In the field of computer programming, the phenomenon of program plagiarism is very widespread. When we search for a programming question on the Internet, many answers from different sources often appear. However, in these different versions of the code, many source codes are the same, and their core parts are almost identical. [0003] In the field of programming language teaching in colleges and universities, the phenomenon of code pla...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/75G06F16/2455G06Q50/20G06N3/04
CPCG06F8/75G06F16/2455G06Q50/205G06N3/045
Inventor 刘瑞芳张茜铭易芃尧
Owner BEIJING UNIV OF POSTS & TELECOMM
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More