Font Size: a A A

Research And Implementation Of Application Program Interface Recommendation System For Developer Community

Posted on:2022-05-02Degree:MasterType:Thesis
Country:ChinaCandidate:Q QinFull Text:PDF
GTID:2518306605470804Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
Application Programming Interface(API)refers to some pre-defined interface programs that are required in the process of software development due to the different combinations of different modules.The emergence of API solves the code redundancy phenomenon that appears in the process of programming by developers.For some highly repetitive functions,only need to call the API to achieve.In practical applications,the API simplifies the way for developers to integrate new components into the existing structure and improves development efficiency.In order to adapt to more platforms and meet more development needs,the number of APIs is increasing,and the classification of categories is becoming more and more detailed.Although this is convenient for developers,it also makes finding a suitable API an urgent solution.At present,most of the existing API recommendation algorithms focus on the relationship between APIs and users,but ignore the exploration and utilization of the relationship between users or APIs.In order to solve the above problems,this paper enhances the matrix factorization model by mining the potential relationship features between users and APIs,and builds an integrated model based on the potential relationship features to improve the accuracy of API recommendation.The main work of this paper includes the following aspects:(1)Collect API data set.The distributed crawler is used to crawl the real API data set on the Programmable Web site,and the data set is pre-processed,and the construction of the API heterogeneous information network is completed by using the characteristics of users and API.(2)Propose a recommendation model based on user relationship mining.First,the Jaccard formula is used to calculate the similarity between users and friends through the heterogeneous information network existing between users,and the user relationship is added to the loss function in the form of regularization to construct a matrix factorization model.Then train the model through the stochastic gradient descent method to obtain the user's final socialization matrix.The elements in the matrix represent the predicted value of the user's attention to the API under the influence of friends.(3)Propose a recommendation model based on API relationship mining.First,the Jaccard formula is used to calculate the similarity through the heterogeneous information network existing between the APIs,and the API relationship is added to the loss function in the form of regularization to construct the matrix factorization model.Then the model is trained through stochastic gradient descent to obtain the final feature matrix of the API.The elements in the matrix represent the predicted value of the user's attention to the API under the influence of the API that has been followed.(4)Ensemble model.Because the recommendation model based on user relationship mining and the recommendation model based on API relationship mining only consider the network relationship between users or between APIs,and for different users and APIs,the final results obtained by the two models are also different.Therefore,this paper integrates the above two models in a linear combination,and determines the model weights through parameter combination experiments,and finally obtains a complete API recommendation model.Experiments show that,in terms of API recommendation,the ensemble model proposed in this paper improves the recommendation accuracy by at least 30% compared with other recommendation algorithms.At the same time,the model also shows good generalization ability and robustness under different training set densities.
Keywords/Search Tags:API recommendation, Collaborative learning, Heterogeneous network, Implicit relation mining, Matrix factorization
PDF Full Text Request
Related items