RESTful API Service Discovery via Comprehensive Feature Mining, Deep Neural Networks, and Contrastive Learning
摘要
The extensive utilization of RESTful APIs has led to the proliferation of RESTful API services, which have gradually became the dominant type of the current Web services, and meanwhile also pose brand-new challenges for service discovery. Most previous studies predominately focus on SOAP-based Web services, and research efforts targeting service discovery for RESTful API services remain scarce. In this paper, we propose a novel service discovery framework tailored for RESTful API services, in which we comprehensively explore and harness multiple features from both API interfaces and user requirements. One prominent challenge is the diversity of the involved components such as the pattern of service endpoints, the lengths of functional descriptions, and parameter structures. We propose to fully learn deep features of all related information of an endpoint, and use a feature fusion mechanism harnessing all deep features. The other key challenge is that there is lack of high-quality labeled data and it may seriously compromise model performance. We develop a robust model training paradigm by firstly introducing contrastive learning for service discovery task. We crawled a real-world dataset containing 49 domains of RESTful API services. It contains rich information such as functional descriptions, input/output parameters, and service endpoints. We performed comprehensive experiments and the results verify the excellent performance of our approach. For example, our approach outperforms the second best result by 14.32% in MRR@10.