Unlock instant, AI-driven research and patent intelligence for your innovation.

API recommendation method and device based on information-enhanced call sequence

A technology of calling sequence and information enhancement, applied in the field of data processing, can solve the problems affecting the accuracy of recommendation, lack of information, etc., and achieve the effect of accurate new vector representation of API

Active Publication Date: 2022-07-22
HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the above problems, the present invention provides an API recommendation method and device based on information-enhanced call sequence, which is used to solve the problems of insufficient original API call sequence information and too little information carried by the user-defined API affecting the accuracy of recommendation, enabling software development API recommendation is more accurate during the process

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
  • API recommendation method and device based on information-enhanced call sequence
  • API recommendation method and device based on information-enhanced call sequence
  • API recommendation method and device based on information-enhanced call sequence

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Embodiment 1 provides an API recommendation method based on information enhancement call sequence, such as figure 1 As shown, the method includes the following steps:

[0027] Data preprocessing: parse the source code to extract the original API call sequence, obtain the corresponding relationship between user-defined API and non-custom API according to the original API call sequence, and obtain the enhanced API call sequence;

[0028] In the specific implementation process, the data preprocessing part is used to parse the source code and obtain the three inputs required by the neural network, the original API call sequence and the original API call sequence to obtain the corresponding relationship between the user-defined API and the underlying non-custom API that implements functions And enhance the API call sequence, in which the static analysis tool Eclipse JDT is used to parse the source code, identify the function body in the source code, take the API call sequenc...

Embodiment 2

[0053] This embodiment describes an apparatus corresponding to the method according to Embodiment 1 of the present disclosure, an API recommendation apparatus based on information-enhanced call sequences. The apparatus 100 includes: a data preprocessing module 101, configured to parse the source code to extract the original API call sequence, The corresponding relationship between the user-defined API and the underlying non-custom API that implements the same function is obtained according to the original API calling sequence, and the enhanced API calling sequence is obtained; the API calling sequence represents the learning module 102, and the original API calling sequence and the The enhanced API call sequences are respectively put into the neural network embedding layer to obtain the original sequence representation vector and the first enhanced sequence representation vector, and the first enhanced sequence representation vector is input into the first encoder of the neural ...

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 an API recommendation method and device based on an information-enhanced calling sequence. The method includes parsing a source code to extract an original API calling sequence, obtaining the corresponding relationship between a user-defined API and a non-custom API according to the original API calling sequence, and obtaining Enhance the API call sequence; put the original API call sequence and the enhanced API call sequence into the neural network embedding layer respectively, obtain the original sequence representation vector and the first enhanced sequence representation vector, and input the first enhanced sequence representation vector into the first encoder of the neural network , obtain the second enhanced sequence representation vector, and perform information fusion with the original sequence representation vector to obtain the API new vector representation; input the API new vector representation into the second neural network encoder, obtain the API sequence vector and input it into the similarity calculation module, get The probability of each candidate API. The invention can solve the problems that the original API calling sequence information is insufficient and the user-defined API carries too little information, which affects the recommendation accuracy.

Description

technical field [0001] The invention belongs to the technical field of data processing, and in particular relates to an API recommendation method and device based on an information-enhanced calling sequence. Background technique [0002] During software development, a common practice is to reuse application programming interfaces (APIs) provided by external libraries, rather than reimplement them from scratch. Developers often need to find out which APIs should be used in the current programming environment to achieve their purpose. However, it is not easy to become familiar with all the APIs of a large number of external libraries. In this case, developers will use the API correctly by consulting the official API documentation, querying Q&A sites, using search engines, etc. However, these approaches can be time-consuming and error-prone, as official documentation usually only reports API descriptions without providing trivial examples, Q&A examples may be incomplete and o...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/70G06N3/08
CPCG06F8/70G06N3/08
Inventor 高翠芸陈雨佳王轩廖清刘川意韩培义
Owner HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
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