Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for detecting similarity of string matching codes

A detection method and similarity technology, which is applied in the field of string matching code similarity detection, to achieve the effect of improving accuracy and improving accuracy

Active Publication Date: 2018-11-30
NANJING UNIV OF POSTS & TELECOMM
View PDF3 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0019] Using the above method, the eigenvectors and the weights of the eigenvectors calculated by the two codes are the same, so it will be mistaken for the two codes to be the same

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
  • Method for detecting similarity of string matching codes
  • Method for detecting similarity of string matching codes
  • Method for detecting similarity of string matching codes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0050] Objects, advantages and features of the present invention will be illustrated and explained by the following non-limiting description of preferred embodiments. These embodiments are only typical examples of applying the technical solutions of the present invention, and all technical solutions formed by adopting equivalent replacements or equivalent transformations fall within the protection scope of the present invention.

[0051] The invention discloses a string matching code similarity detection method, the algorithm flow chart of the method is as follows figure 1 As shown, the method includes the following steps:

[0052] S1: Program code preprocessing

[0053] Standardize the original code, remove comments, header files, spaces or line breaks in the submitted code that affect the extraction of code feature values, and standardize the variable names and function names in the program;

[0054] S2: Extract feature vector

[0055] Extracting feature vectors from 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 invention discloses a method for detecting the similarity of string matching codes. The method includes steps of preprocessing program codes and carrying out standardized processing on source codes; comparing obtained feature vectors to to-be-compared codes according to rows and generating feature values formed by binary systems; dynamically generating code structure fingerprints; extracting identical feature vectors from the to-be-compared codes, searching generated corresponding structure fingerprints according to the identical feature vectors and forming structure fingerprints of code features. The feature values 0 represent the fact that local rows do not contain feature vector values, and the feature values 1 represent the fact that the local rows contain the feature vector values. The similarity can be compared; the structure similarity of the codes can be obtained from structure feature fingerprints of the to-be-compared codes by the aid of processes for matching the longestcommon substrings. The method has the advantages that the structure similarity of the codes can be detected on the basis of detection by the aid of the original methods for the similarity of the string matching codes, and the code similarity detection accuracy can be improved.

Description

technical field [0001] The invention relates to a string matching code similarity detection method and relates to the technical field of code similarity detection. Background technique [0002] Code similarity detection technology is currently mainly used in code plagiarism detection. It is an important part of the online programming test platform. It can not only help teachers detect students' plagiarism in programming assignments, but also has a good effect on automatic scoring of programming questions. practical significance. [0003] For programming courses currently offered by colleges and universities, the source code submitted by students is generally small in scale and relatively simple in structure. String matching algorithm is widely used in online testing system as a similarity calculation method for such small-scale source codes. [0004] The string matching code similarity algorithm calculates the similarity by comparing the feature vectors produced by the sta...

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): G06F11/36
CPCG06F11/3616
Inventor 薛景胥超俊袁博曹周祥
Owner NANJING UNIV OF POSTS & TELECOMM
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products