Code search embedding method and device based on global information and local information

A technology of global information and local information, applied in the field of data search, can solve the problems of only considering the information in the final stage, failing to use local information and global information, etc., to achieve the effect of strengthening the utilization

Active Publication Date: 2021-09-28
WUHAN UNIV
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] HECS extracts the code segment and the structural information of the query in sequence, and uses the interactive attention mechanism to emphasize the interactive information, but fails to make full use of the information in different stages of the model, that is, local information and global information, and only considers the information in the final stage

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
  • Code search embedding method and device based on global information and local information
  • Code search embedding method and device based on global information and local information
  • Code search embedding method and device based on global information and local information

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0118] It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0119] In the first aspect, the embodiment of the present invention provides a method for code search and embedding based on global information and local information.

[0120] In one embodiment, refer to figure 1 , figure 1 It is a schematic flowchart of an embodiment of the code search and embedding method based on global information and local information in the present invention. like figure 1 as shown,

[0121] Code search embedding methods based on global information and local information include:

[0122] Step S10, building a local information extraction module for obtaining sequence information vectors, structure vectors and interaction vectors of codes and queries;

[0123] In this embodiment, the local information extraction module includes a sequential information extraction sub-module, a construction st...

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 provides a code searching and embedding method and device based on global information and local information. According to the method, a shared linear layer and a convolutional layer are designed to be connected behind ON-LSTM, sequence information output by a double-tower ON-LSTM model can be fused and enhanced by using shared network parameters, and utilization of global information is enhanced; structural characteristics of ON-LSTM are ingeniously applied, structural information in the ON-LSTM is selected, CNN enhancement is used, and utilization of local information is enhanced through calculation of a Manhattan distance; interaction vectors, structure vectors and global information vectors output by all the modules are spliced into feature vectors, then similarity is calculated, and global information and local information are balanced.

Description

technical field [0001] The invention relates to the technical field of data search, in particular to a code search embedding method and device based on global information and local information. Background technique [0002] In the information age, the demand for software development has increased, and developers have a strong demand for technical discussions. Studies have shown that more than 60% of developers search source code every day. The online question-and-answer community can search codes by entering descriptions. Compared with open source projects, developers can find codes that meet the requirements more conveniently and quickly, and can obtain solutions to specific problems encountered in the program, improving the efficiency of software development. Therefore, the matching between natural language query and target code, that is, code search, has attracted more and more researchers' attention. [0003] Due to the semantic differences between code snippets and na...

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): G06F16/33G06F40/289G06K9/62G06N3/04
CPCG06F16/3344G06F40/289G06N3/044G06N3/045G06F18/22
Inventor 彭敏罗娟黎芮彤胡刚
Owner WUHAN UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products