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
CN113449076AActive Publication Date: 2021-09-28WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
WUHAN UNIV
Publication Date
2021-09-28

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

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.
Need to check novelty before this filing date? Find Prior Art

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