A Web API recommendation method and apparatus based on functional semantics and structural interaction

By constructing a Mashup-API bipartite graph and fusing multiple models, and utilizing convolutional neural networks and an improved LightGCN to extract the functional semantics and structural interaction features of Web APIs, the problems of insufficient accuracy and low efficiency in existing recommendation systems are solved, achieving more efficient Web API recommendations.

CN116628328BActive Publication Date: 2025-11-11ZHEJIANG UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310572045.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-03-09
Filing Date
2023-05-18
Publication Date
2025-11-11
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

Existing Web API recommendation methods fail to effectively balance functional semantics and interaction structure, resulting in insufficient accuracy of recommendation systems when facing complex and ever-changing application scenarios, and difficulty in quickly determining the candidate set of Web API services.

Method used

By collecting descriptive data of Mashup applications and their API services, a Mashup-API bipartite graph is constructed after preprocessing. Functional semantic features are extracted using convolutional neural networks, and structural interaction features are extracted using an improved LightGCN. Finally, the accuracy of recommendations is improved through multi-model fusion.

Benefits of technology

This implementation achieves Web API recommendation that balances functional semantics and structural interaction, improving the accuracy and efficiency of the recommendation system, reducing the impact of data sparsity on recommendation results, and optimizing the cold start problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116628328B_ABST
    Figure CN116628328B_ABST
Patent Text Reader

Abstract

This invention provides a Web API recommendation method based on functional semantics and structural interaction, belonging to the field of Web API recommendation technology in the Web environment. It solves the problem of excessively short descriptions of existing Mashup service requirements. This Web API recommendation method based on functional semantics and structural interaction includes the following steps: Step S1: Collect description data from existing Mashup applications and their related API services, and extract textual description information of the Mashup applications and API services; Step S2: Preprocess the textual description information of the Mashup applications and API services; Step S3: Construct a Mashup-API bipartite graph based on the collaborative relationships between API services used in the Mashup application; Step S4: Construct functional semantic components and extract functional semantic features from the textual description information; Step S5: Construct structural interaction components and extract potential implicit correlations in sparse interactions; Step S6: Integrate multi-model training and integrate different types of feature descriptions. This invention has advantages such as reducing the impact of data sparsity on recommendation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Web API recommendation technology in the Web environment, and specifically relates to a Web API recommendation method and apparatus based on functional semantics and structural interaction. Background Technology

[0002] In recent years, with the emergence of new software technologies such as cloud computing, mobile computing, and blockchain, more and more companies and organizations have begun to adjust their development strategies, publishing data, resources, or related businesses on the Internet in the form of Web services. By realizing their value proposition through Web APIs, they can improve the utilization of information and their own competitiveness. However, most traditional services follow simple object access protocols and usually provide single-function services for the business needs of a specific field. In addition, they also have problems such as complex technical systems and poor scalability, making them increasingly difficult to adapt to the complex and ever-changing application scenarios in real life.

[0003] To overcome the problems of traditional services, Mashup services, based on mashup technology, have emerged and gained popularity among many enterprises and developers. Mashup services can integrate and combine single-function services with multiple data resources, allowing users to integrate existing web service resources and create composite web applications that respond to complex business needs. However, existing web API recommendation methods, such as traditional API keyword search methods, only consider the list of candidate APIs individually, ignoring the functional compatibility of APIs selected from different lists. Content-based recommendation methods focus on mining the relationship between needs and web APIs and utilize various technologies, such as topic modeling, link analysis, deep learning, and various features (documents, tags, topics, and popularity), to improve the accuracy of recommendations. However, the functional document descriptions often vary in length and cannot provide sufficiently complete information. Collaborative filtering methods aim to rank candidate web APIs by aggregating the relevance scores between candidate web APIs and selected mashups, but they do not pay enough attention to the matching between web APIs and mashup needs. Currently, there is a lack of web API recommendation technologies that take into account both functional semantics and interaction structure.

[0004] Furthermore, with the increasing number of Web APIs on the Internet, the heterogeneous relationships between different functional Web services have worsened. Recommendation systems face two challenges: First, Mashup service description documents are usually short, feature-sparse, and information-poor. How to effectively extract potential information about Mashup service description requirements based on these brief descriptions? Second, the number of Web API service sets is large and the relationships are complex. These relationships mainly manifest as implicit adaptation relationships between different functional Web APIs and explicit mutual exclusion relationships between Web APIs with the same function. This greatly increases the workload of the recommendation system in searching for related Web API services. How to quickly and effectively determine the candidate set of Web API services is a key challenge. Summary of the Invention

[0005] The purpose of this invention is to address the aforementioned problems in the prior art by providing a Web API recommendation method and system based on functional semantics and structural interaction.

[0006] The first objective of this invention can be achieved through the following technical solution: a Web API recommendation method based on functional semantics and structural interaction, characterized by comprising the following steps:

[0007] Step S1: Collect description data from existing Mashup applications and their related API services, and extract text description information of Mashup applications and API services;

[0008] Step S2: Preprocess the text description information of the Mashup application and API service to obtain the text set vector matrix represented by the word index;

[0009] Step S3: Construct a Mashup-API bipartite graph to define the collaboration relationships between API services used in the Mashup application;

[0010] Step S4: Construct functional semantic components and extract functional semantic features from the text description information;

[0011] Step S5: Construct structured interactive components and extract potential implicit correlations in sparse interactions;

[0012] Step S6: Integrate multi-model training and combine different types of feature descriptions.

[0013] In the above-mentioned Web API recommendation method based on functional semantics and structural interaction, in step S1, descriptive data containing API services and Mashup applications is first obtained from the Mashup application. The descriptive data includes API service name, API service text description information, API service category, API service provider, Mashup application name, Mashup application text description information, Mashup application category, and the calling relationship between the Mashup application and the API service. The Mashup application text description information and API service text description information include functional information related to the introduction goal.

[0014] In the above-mentioned Web API recommendation method based on functional semantics and structural interaction, in step S2, a data preprocessing method is used to parse the text description information of Mashup applications and the text description information of candidate API services, respectively, to establish vocabularies for Mashup applications and API services, and to perform word index vectorization to obtain a text set vector matrix represented by word indexes.

[0015] In the aforementioned Web API recommendation method based on functional semantics and structural interaction, the preprocessing methods mainly include: text filtering, abbreviation replacement, part-of-speech tagging, and word vectorization.

[0016] In the text filtering method described above, regular expressions are used to filter invalid words, which include tags, punctuation marks, non-characters, and stop words.

[0017] In the abbreviation replacement method, abbreviated words are replaced with words spelled out in full.

[0018] In the proposed part-of-speech tagging method, the StandardAnalyzer and PosterStemFilter tools from the Lucene package are used to convert all terms into a lexical format with prefixes and suffixes removed.

[0019] In the word vectorization method, a vocabulary of existing words is constructed, and word vectors of the Glove.6B.300d pre-trained model are used to initialize the embedding of existing words. Vectors of cold-start words are randomly initialized. All words in the vocabulary are independent and have a one-to-one index. Cold-start words refer to words not covered in the existing vocabulary.

[0020] In the Web API recommendation method based on functional semantics and structural interaction described above, in step S3, a Mashup-API bipartite graph is constructed based on the Mashup-API call interaction relationship obtained in step S1, and categories and providers are selected as supplementary information for the bipartite graph.

[0021] In the aforementioned Web API recommendation method based on functional semantics and structural interaction, in step S4, based on the vocabulary of the Mashup application and the text set vector matrix represented by word indexes obtained in step S2, a functional semantic component is constructed, text description information is extracted, and a semantic feature vector U is obtained. FSC The functional semantic components are composed of convolutional neural network models.

[0022] In the Web API recommendation method based on functional semantics and structural interaction described above, the convolutional neural network model consists of four layers: embedding layer, convolutional layer, pooling layer, and fully connected layer.

[0023] The embedding layer takes the text set vector matrix represented by word indexes as input and outputs a Mashup application text word vector representation of fixed size, wherein the Mashup application text vector representation is Q = {q1,q2,......,q}. |r|}, where q i ∈Q represents a keyword, and the text vector is a sequence of keywords that expresses the functionality of the target Mashup application.

[0024] The convolution operation of the convolution kernel in the convolutional layer is performed on a kernel of size ws. j Word window Slide upwards to obtain several feature mapping vectors g i The convolution operation is as follows:

[0025] g i =relu(G i E m +b i )

[0026] Among them, b i E represents the bias term. m It is the word embedding matrix corresponding to the text description of the Mashup application, and ReLU represents the activation function of the convolutional layer.

[0027] The pooling layer will perform max pooling on the feature mapping vector. The purpose of max pooling is to simplify redundant details in the output features of the convolutional layer and to merge the vectors obtained by max pooling by concatenation.

[0028] e j =[MaxPooling(g i );...;MaxPooling(g I )]

[0029] Where I represents the number of convolutional kernels of different sizes, and the different sizes of convolutional kernels are used because different sizes of convolutional windows are needed to enhance the extraction of output features of the convolutional layer.

[0030] In this example, the output obtained after passing through multiple convolution windows of different sizes is as follows:

[0031] e = [e1; ...; e j ;...;e J ]

[0032] Among them, e j Corresponding to a convolution window size of ws j The output.

[0033] The fully connected layer maps the learned feature representations to the label space of the samples, resulting in semantic embedding vectors:

[0034] U FSC =sigmoid(W 0e +b0)

[0035] Where W0 represents the weight matrix, b0 represents the bias term, and sigmoid represents the activation function.

[0036] In the aforementioned Web API recommendation method based on functional semantics and structural interaction, in step S5, the Mashup-API sparse bipartite graph obtained in step S3 and the semantic feature vector U obtained in step S4 are used as the basis for further steps. FSC We construct structural interactive components, extract functional interactivity and latent implicit correlations from the sparse matrix, and obtain the interactive feature vector U. SIC The structured interaction component comprises a feature interaction extraction unit, a structure correlation extraction unit, and an output unit.

[0037] The feature interactivity extraction unit uses the API to generate interaction vectors for the Mashup application:

[0038] U MM =U FSC ·V T

[0039] in, It is the embedding vector for all APIs, initialized by processing various metadata of the API, such as the API's functional semantics and tags / categories.

[0040] The structure relevance extraction unit is used to perform graph convolution operations on the input Mashup-API sparse bipartite graph to extract structural representations. Specifically, the feature transformation and nonlinear activation operations in the GCN are removed from the LightGCN to form an improved LightGCN. The improved LightGCN is then used to perform convolution operations on the input Mashup-API sparse bipartite graph to extract structural representations. By removing the feature transformation and nonlinear activation operations, the representation obtained by two-layer LightGCN convolution is used as the structural representation.

[0041] The output unit fuses the feature interaction vector and the structural relevance vector to obtain the final output of the structural interaction component.

[0042] U SIC ={U MM ;U gcn}

[0043] In the aforementioned Web API recommendation method based on functional semantics and structural interaction, in step S6, based on the feature vectors obtained in steps S4 and S5, different types of features are integrated, and the heterogeneity of different models is compensated for. A multi-model fusion approach is used to aggregate the obtained features, as follows:

[0044]

[0045] Among them, U MMF =[U FSC U SIC ], W TL and b TL These are the weight matrix and bias vector in a specific task layer, respectively.

[0046] The second objective of the present invention can be achieved by the following technical solution: a Web API recommendation method apparatus based on functional semantics and structural interaction, comprising an input end, an output end, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs include methods for performing the above-described Web API recommendation method based on functional semantics and structural interaction.

[0047] Compared with existing technologies, this invention features compatibility with functional semantic representation and structural interaction, automatic learning, end-to-end training and accurate representation, functional semantic feature embedding learning, automatic feature combination and filtering to obtain semantic information at different levels of abstraction, structural interaction feature embedding learning to reduce the impact of data sparsity on recommendation results and optimize the cold start problem, and multi-model fusion to integrate different types of features and make up for the heterogeneity between different models. Attached Figure Description

[0048] Figure 1 This is a flowchart of a Web API recommendation method based on functional semantics and structural interaction according to the present invention.

[0049] Figure 2 This is a flowchart illustrating the present invention. Detailed Implementation

[0050] The following are specific embodiments of the present invention, which are described in conjunction with the accompanying drawings. However, the present invention is not limited to these embodiments.

[0051] like Figures 1-2 As shown,

[0052] The first objective of this invention can be achieved through the following technical solution: a Web API recommendation method based on functional semantics and structural interaction, comprising the following steps:

[0053] Step S1: Collect description data from existing Mashup applications and their related API services, and extract text description information of Mashup applications and API services;

[0054] Step S2: Preprocess the text description information of the Mashup application and API service to obtain the text set vector matrix represented by the word index;

[0055] Step S3: Construct a Mashup-API bipartite graph to define the collaboration relationships between API services used in the Mashup application;

[0056] Step S4: Construct functional semantic components and extract functional semantic features from the text description information;

[0057] Step S5: Construct structured interactive components and extract potential implicit correlations in sparse interactions;

[0058] Step S6: Integrate multi-model training and combine different types of feature descriptions.

[0059] To elaborate further, in step S1, the first step is to obtain description data containing the API service and the Mashup application from the Mashup application. The description data includes the API service name, API service text description information, API service category, API service provider, Mashup application name, Mashup application text description information, Mashup application category, and the calling relationship between the Mashup application and the API service. The Mashup application text description information and the API service text description information include functional information related to the introduction goal.

[0060] To elaborate further, in step S2, a data preprocessing method is used to parse the text description information of the Mashup application and the text description information of the candidate API service, and to build vocabularies for the Mashup application and API service respectively. The word index is then vectorized to obtain a text set vector matrix represented by the word index.

[0061] To elaborate further, the preprocessing methods mainly include: text filtering, abbreviation replacement, part-of-speech tagging, and word vectorization.

[0062] In text filtering methods, regular expressions are used to filter invalid words, which include tags, punctuation marks, non-characters, and stop words.

[0063] In the abbreviation replacement method, abbreviated words are replaced with the full spelling of the words.

[0064] In the part-of-speech tagging method, the StandardAnalyzer and Poster StemFilter tools from the Lucene package are used to convert all terms into a lexical format with prefixes and suffixes removed.

[0065] In the word vectorization method, a vocabulary of existing words is constructed, and word vectors of the Glove.6B.300d pre-trained model are used to initialize the embeddings of existing words. Vectors of cold-start words are randomly initialized. All words in the vocabulary are independent and have a one-to-one index. Cold-start words refer to words not covered in the existing vocabulary.

[0066] To elaborate further, in step S3, based on the Mashup and API call interaction relationship obtained in step S1, a Mashup-API bipartite graph is constructed, and categories and providers are selected as supplementary information for the bipartite graph.

[0067] To elaborate further, in the embodiment of the Mashup-API bipartite graph, the Mashup application-related code and the API service code are constructed as nodes, placed on both sides respectively. When a related API service is used in a Mashup application, an edge is established between the Mashup application code and the API service code to construct a sparse bipartite graph of the Mashup-API.

[0068] To elaborate further, in step S4, based on the vocabulary of the Mashup application and the text set vector matrix represented by word indexes obtained in step S2, functional semantic components are constructed, text description information is extracted, and semantic feature vector U is obtained. FSC The functional semantic components are composed of convolutional neural network models.

[0069] Specifically, the core idea of ​​the convolutional neural network model is to capture local features from a sliding window composed of multiple words. By performing convolution operations and non-linear activation operations on the words within the sliding window, features can be effectively and automatically combined and filtered to obtain semantic information at different levels of abstraction.

[0070] To elaborate further, the convolutional neural network model consists of four layers: embedding layer, convolutional layer, pooling layer, and fully connected layer.

[0071] The embedding layer takes a text set vector matrix represented by word indices as input and outputs a fixed-size Mashup application text word vector representation, which is Q = {q1, q2, ..., q...} r}, where q i ∈Q represents a keyword, and the text vector is a sequence of keywords that expresses the functionality of the target Mashup application.

[0072] The convolution operation of the convolution kernel in the convolutional layer is performed on a kernel of size ws. j Word window Slide upwards to obtain several feature mapping vectors g i The convolution operation is as follows:

[0073] g i =relu(G i E m +b i )

[0074] Among them, b i E represents the bias term. m It is the word embedding matrix corresponding to the text description of the Mashup application, and ReLU represents the activation function of the convolutional layer.

[0075] To effectively filter out important semantic features from the text features, the pooling layer will perform max pooling on the feature mapping vector. The purpose of max pooling is to simplify redundant details in the output features of the convolutional layer and merge the several vectors obtained after max pooling by concatenation.

[0076] e j =[MaxPooling(g i );...;MaxPooling(g I )]

[0077] Where I represents the number of convolutional kernels of different sizes. Different sizes of convolutional kernels are used because different sizes of convolutional windows are needed to enhance the extraction of output features from the convolutional layer.

[0078] In this example, the output obtained after passing through multiple convolution windows of different sizes is as follows:

[0079] e = [e1; ...; e j ;...;e J ]

[0080] Among them, e j Corresponding to a convolution window size of ws j The output.

[0081] The fully connected layer maps the learned feature representations to the label space of the samples, resulting in semantic embedding vectors:

[0082] U FSC =sigmoid(W 0e +b0)

[0083] Where W0 represents the weight matrix, b0 represents the bias term, and sigmoid represents the activation function.

[0084] To elaborate further, in step S5, based on the Mashup-API sparse bipartite graph obtained in step S3 and the semantic feature vector U obtained in step S4... FSC We construct structural interactive components, extract functional interactivity and latent implicit correlations from the sparse matrix, and obtain the interactive feature vector U. SIC The structured interaction component consists of a feature interaction extraction unit, a structure correlation extraction unit, and an output unit.

[0085] The feature interactivity extraction unit uses the API to generate interaction vectors for the Mashup application:

[0086] U MM =U FSC ·V T

[0087] Linear operations are used to extract common and frequently occurring interaction patterns from historical data. It is the embedding vector for all APIs, initialized by processing various metadata of the API, such as the API's functional semantics and tags / categories.

[0088] The structural relevance extraction unit performs graph convolution operations on the input Mashup-API sparse bipartite graph to extract structural representations. Specifically, it removes feature transformations and nonlinear activation operations from LightGCN to form an improved LightGCN. This improved LightGCN is then used to perform convolution operations on the input Mashup-API sparse bipartite graph to extract structural representations. By removing feature transformations and nonlinear activation operations, computational complexity is reduced, computational efficiency is greatly improved, and training time is shortened. Specifically, the representation obtained through two layers of LightGCN convolution is used as the structural representation. LightGCN is one of the most widely used graph neural networks in the recommendation field today, capable of conveniently and efficiently processing high-order feature embedding relationships U within a graph. gcn .

[0089] The output unit fuses the feature interaction vector and the structural relevance vector to obtain the final output of the structural interaction component.

[0090] U SIC ={U MM ;U gcn}

[0091] To elaborate further, in step S6, based on the feature vectors obtained in steps S4 and S5, different types of features are integrated, and the heterogeneity of different models is compensated for. A multi-model fusion approach is used to aggregate the obtained features, as follows:

[0092]

[0093] Among them, U MMF =[U FSC U SIC ], W TL and b TL These are the weight matrix and bias vector in a specific task layer, respectively.

[0094] The second objective of the present invention can be achieved by the following technical solution: a Web API recommendation method apparatus based on functional semantics and structural interaction, comprising an input end, an output end, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs include methods for performing the above-described Web API recommendation method based on functional semantics and structural interaction.

[0095] To normalize different feature vectors, this embodiment employs a dropout layer to avoid overfitting of the model. The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art can make various modifications or additions to the described specific embodiments or use similar methods to replace them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.

[0096] Although this document uses a large number of technical terms, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of the invention; interpreting them as any additional limitation would be contrary to the spirit of the invention.

Claims

1. A Web API recommendation method based on functional semantics and structural interaction, characterized in that, Includes the following steps: Step S1: Collect description data from existing Mashup applications and their related API services, and extract text description information of Mashup applications and API services; Step S2: Preprocess the text description information of the Mashup application and API service to obtain the text set vector matrix represented by the word index; Step S3: Construct a Mashup-API bipartite graph to define the collaboration relationships between API services used in the Mashup application; Step S4: Construct functional semantic components and extract functional semantic features from the text description information; Step S5: Construct structured interactive components and extract potential implicit correlations in sparse interactions; Step S6: Integrate multi-model training and combine different types of feature descriptions; In step S1, firstly, description data containing API services and the Mashup application is obtained from the Mashup application. The description data includes API service name, API service text description information, API service category, API service provider, Mashup application name, Mashup application text description information, Mashup application category, and the calling relationship between the Mashup application and the API service. The Mashup application text description information and API service text description information include functional information related to the introduction target.

2. The WEB API recommendation method based on functional semantics and structural interaction according to claim 1, characterized in that, In step S2, a data preprocessing method is used to parse the text description information of the Mashup application and the text description information of the candidate API service, and a vocabulary of the Mashup application and API service are established respectively. The word index is vectorized to obtain a text set vector matrix represented by the word index.

3. The WEB API recommendation method based on functional semantics and structural interaction according to claim 2, characterized in that, The preprocessing methods include: text filtering, abbreviation replacement, part-of-speech tagging, and word vectorization; In the text filtering method described above, regular expressions are used to filter invalid words, which include tags, punctuation marks, non-characters, and stop words. In the abbreviation replacement method, abbreviated words are replaced with words spelled out in full; In the part-of-speech tagging method, the StandardAnalyzer and Poster StemFilter tools in the Lucene package are used to convert all terms into a lexical format with prefixes and suffixes removed. In the word vectorization method, a vocabulary of existing words is constructed, and word vectors of the Glove.6B.300d pre-trained model are used to initialize the embedding of existing words. Vectors of cold-start words are randomly initialized. All words in the vocabulary are independent and have a one-to-one index. Cold-start words refer to words not covered in the existing vocabulary.

4. The WEB API recommendation method based on functional semantics and structural interaction according to claim 1, characterized in that, In step S3, based on the Mashup and API call interaction relationship obtained in step S1, a Mashup-API bipartite graph is constructed, and categories and providers are selected as supplementary information for the bipartite graph.

5. The WEB API recommendation method based on functional semantics and structural interaction according to claim 2, characterized in that, In step S4, based on the vocabulary of the Mashup application and the text set vector moments represented by word indexes obtained in step S2, a functional semantic component is constructed, text description information is extracted, and semantic feature vectors are obtained. The functional semantic component is composed of a convolutional neural network model.

6. The WEB API recommendation method based on functional semantics and structural interaction according to claim 5, characterized in that, The convolutional neural network model consists of four layers: embedding layer, convolutional layer, pooling layer, and fully connected layer. The embedding layer takes the text set vector matrix represented by word indexes as input and outputs a Mashup application text word vector representation of fixed size. The Mashup application text vector representation is... ,in The text vector, representing keywords, expresses the functionality of the target Mashup application in the form of a keyword sequence. The convolution operation of the convolution kernel in the convolutional layer is performed on a kernel of size 1. Word window Slide upwards to obtain several feature mapping vectors. The convolution operation is as follows: in, Indicates the bias term. It is the word embedding matrix corresponding to the text description of the Mashup application, and ReLU represents the activation function of the convolutional layer; The pooling layer will apply a max pooling operation to the feature mapping vector. The purpose of the max pooling operation is to simplify redundant details in the output features of the convolutional layer and to merge the several vectors obtained after the max pooling operation by concatenation. in, This indicates the number of convolutional kernels of different sizes. The different sizes of convolutional kernels are used because different sizes of convolutional windows are needed to enhance the extraction of output features from the convolutional layer. The output obtained after passing through multiple convolution windows of different sizes is: Wherein, the size corresponding to the convolution window is The output; The fully connected layer maps the learned feature representations to the label space of the samples, resulting in semantic embedding vectors: Wherein represents Weight matrix, represents the bias term, and sigmoid represents the activation function.

7. The WEB API recommendation method based on functional semantics and structural interaction according to claim 1, characterized in that, In step S5, based on the Mashup-API sparse bipartite graph obtained in step S3 and the semantic feature vector obtained in step S4, a structural interaction component is constructed to extract the functional interactivity and latent implicit correlations in the sparse matrix and obtain the interaction feature vector; the structural interaction component consists of a feature interactivity extraction unit, a structural correlation extraction unit, and an output unit. The feature interactivity extraction unit uses the API to generate interaction vectors for the Mashup application: in, It is the embedding vector of all APIs, initialized by processing various metadata of the API, including the API's functional semantics and tags / categories; The structure relevance extraction unit is used to perform graph convolution operations on the input Mashup-API sparse bipartite graph to extract structural representations. Specifically, the feature transformation and nonlinear activation operations in the GCN are removed from the LightGCN to form an improved LightGCN. The improved LightGCN is then used to perform convolution operations on the input Mashup-API sparse bipartite graph to extract structural representations. By removing the feature transformation and nonlinear activation operations, the representation obtained by two-layer LightGCN convolution is used as the structural representation. The output unit fuses the feature interaction vector and the structural relevance vector to obtain the final output of the structural interaction component. 。 8. The WEB API recommendation method based on functional semantics and structural interaction according to claim 1, characterized in that, In step S6, based on the several feature vectors obtained in steps S4 and S5, in order to integrate different types of features and compensate for the heterogeneity of different models, a multi-model fusion approach is adopted to aggregate the obtained features. The multi-model fusion is as follows: in, , and These are the weight matrix and bias vector in a specific task layer, respectively.

9. A WEB API recommendation apparatus based on functional semantics and structural interaction, comprising an input terminal, an output terminal, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs comprising methods for performing a WEB API recommendation method based on functional semantics and structural interaction as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Web service recommendation method based on CNN and LSTM

    CN112084416A

  • Interest point recommendation method and system based on deep reinforcement learning

    CN114662015A