Abstract: The collaborative interaction between power systems and the Internet of Things (IoT) is strengthening, with IoT devices facilitating real-time monitoring and governance of the power grid, pushing power systems to the next frontier: the smart grid. Nevertheless, the reliance of power systems on a vast array of IoT devices, each with its unique API, makes the development of a unified smart grid software solution extremely complex. Most existing research focuses on accuracy in recommendations, thus neglecting users’ needs for functional diversity. To address this issue, we propose a diversified API recommendation approach that suggests a variety of functional APIs from power system sensors to users. We start by converting API labels into feature vectors based on a pre-trained language model and calculate the similarity between APIs through clustering. Subsequently, we construct an API graph to model the functional similarity relationships between APIs. Finally, we generate a minimum weighted tree to obtain a combination of APIs that meets the requirements and ensures diversity. We demonstrate the advantages of our proposed method in terms of diversity through a case study.
Loading