CN114817745B - Graph embedding enhanced Web API recommendation method and system - Google Patents

Graph embedding enhanced Web API recommendation method and system Download PDF

Info

Publication number
CN114817745B
CN114817745B CN202210552890.1A CN202210552890A CN114817745B CN 114817745 B CN114817745 B CN 114817745B CN 202210552890 A CN202210552890 A CN 202210552890A CN 114817745 B CN114817745 B CN 114817745B
Authority
CN
China
Prior art keywords
node
web api
embedding
mashup
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210552890.1A
Other languages
Chinese (zh)
Other versions
CN114817745A (en
Inventor
刘佳荟
谢秋菊
邓安生
岳官利
李佳龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian Maritime University
Northeast Agricultural University
Original Assignee
Dalian Maritime University
Northeast Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian Maritime University, Northeast Agricultural University filed Critical Dalian Maritime University
Priority to CN202210552890.1A priority Critical patent/CN114817745B/en
Publication of CN114817745A publication Critical patent/CN114817745A/en
Application granted granted Critical
Publication of CN114817745B publication Critical patent/CN114817745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Machine Translation (AREA)

Abstract

The invention relates to a graph embedding enhanced Web API recommendation method and a system, wherein the method comprises the following steps: acquiring ID embedding vectors and text embedding vectors of the Mashup node and the Web API node, and calculating the ID embedding vectors and the text embedding vectors of the Mashup node and the Web API node neighbor nodes; fusing the ID embedding vector and the text embedding vector as well as the ID embedding vectors and the text embedding vectors of all the neighbor nodes to obtain a fused embedding vector E M And embedding vector E A (ii) a Based on E M And E A And calculating the matching degree of the Mashup node and the Web API node to obtain the recommendation result of the Web API. The method solves the problem of poor recommendation precision caused by the problems of data sparseness and cold start when the Web API recommendation is carried out by a method for generating the ID embedded vector based on a graph embedding method in the traditional Web API recommendation method.

Description

Graph embedding enhanced Web API recommendation method and system
Technical Field
The invention relates to the technical field of automation interaction, in particular to a graph embedding enhanced Web API recommendation method and system.
Background
Web services are a service-oriented architecture technology that is often used to accomplish automated interactions or linking business processes between distributed and heterogeneous systems. However, the Web service with single function is difficult to satisfy some complicated and varied requirements. To solve this problem, a new enterprise-level application development technology Mashup different from the conventional resource integration scheme is proposed. The technology can integrate services with single functions (namely Web API services, namely REST style, HTTP protocol and JSON data format, application program interfaces which can be used through the Internet, and the technology has the advantages of easy access, expandability, easy development, combination and the like), and construct multifunctional service applications to adapt to complex requests of users. With the widespread use of Mashup technology, many Mashup service platforms (e.g., progrmmable Web, IBM Mashup Center, yahoo Pipe, etc.) have emerged to provide a wide variety of Web APIs. On the platform, a user can selectively call the Web API according to the self requirement to create Mashup application meeting the corresponding requirement. However, more and more Web API services are published on the network (for example, by 2016 and 12 months, 15500 Web API service interfaces are published by using a programmable Web platform), and in addition, a series of problems that Web API description documents are unstructured, a plurality of Web APIs have similar functions but have larger performance differences and the like make it more and more difficult to select a suitable and high-quality Web API which is interested by a developer from a Web API service library to construct Mashup applications.
At present, recommendation methods commonly used in existing recommendation systems, such as recommendation methods based on collaborative filtering and recommendation methods based on graph embedding. The recommendation method based on collaborative filtering generally constructs a calling relationship matrix by using a calling relationship between Mashup and a Web API. The recommendation method based on collaborative filtering also comprises a Mashup-based collaborative filtering method and a Web API-based collaborative filtering method. Mashup-based collaborative filtering methods, it is generally assumed that similar mashups will generally select and call the same Web API. And the collaborative filtering method based on the Web API usually assumes that similar Web APIs may be selected and called by the same Mashup.
The collaborative filtering recommendation method has the problem that when calling relationship matrix data between Mashup and the Web API are sparse, the performance of a recommendation algorithm is poor. The Web API recommendation method based on graph embedding generally also builds a calling relation graph based on the calling relation between mashups and Web APIs, and generates embedded vector representations of each Mashup and each Web API node on a graph based on the built graph, such as an embedded vector generation technology of the graph. Although the data sparseness problem of the collaborative filtering algorithm can be relieved by superposing a high-order relation, the embedded vector representation based on the graph has the same problem as that of the collaborative filtering method, namely, the embedded vectors are all generated by only depending on the ID embedded vector generated by the calling relation to calculate embedding vectors corresponding to the Mashup and the Web API, and text description information of the Mashup and the Web API is not considered.
Disclosure of Invention
The invention aims to provide a graph embedding enhanced Web API service recommendation method and system, which are used for fusing a text embedding vector and connecting the text embedding vector with an ID embedding vector on the basis of the conventional graph embedding based Web API recommendation method.
In order to achieve the purpose, the invention provides the following scheme:
a graph embedding enhanced Web API recommendation method comprises the following steps:
acquiring ID embedded vectors and text embedded vectors of a Mashup node and a Web API node, and respectively calculating the ID embedded vectors and the text embedded vectors of all neighbor nodes of the Mashup node and the Web API node;
fusing the ID embedding vector and the text embedding vector of the Mashup node and the ID embedding vector and the text embedding vector of the neighbor node of the Mashup node to obtain a fused embedding vector E M
Fusing the ID embedded vector and the text embedded vector of the Web API node and the ID embedded vector and the text embedded vector of the neighbor node of the Web API node to obtain a fused embedded vector E A
Based on the embedding vector E M And the embedding vector E A And calculating the matching degree of the Mashup node and the Web API node to obtain the recommendation result of the Web API.
Preferably, the process of obtaining the ID embedded vectors of the Mashup node and the Web API node includes:
analyzing a historical calling relationship data set between the Mashup node and the Web API node, extracting from the historical calling relationship data set and generating a calling relationship graph of the Mashup and the Web API, constructing the calling relationship graph of the Mashup and the Web API, and generating an ID embedding vector of the Mashup node and an ID embedding vector of the Web API node by utilizing a graph embedding vector generation technology based on the calling relationship graph.
Preferably, the graph embedding vector generation technology includes generating ID embedding vectors of the Mashup node and the Web API node by using a graph embedding vector generation tool provided by an open source tool TensorFlow, and the ID embedding vectors are respectively recorded as:
Figure BDA0003651326640000031
preferably, the process of obtaining the text embedding vectors of the Mashup node and the Web API node includes:
fusing text information describing the Mashup node and the Web API node with a graph embedding-based method respectively to generate a text embedding vector of the Mashup node and a text embedding vector of the Web API node, and recording the text embedding vectors as follows:
Figure BDA0003651326640000041
preferably, the process of generating the text embedding vector comprises: performing word segmentation processing on a text field of text information, extracting a keyword, performing connection operation on the extracted text field to form an integral text field, and generating a text embedding vector of the connected integral text field based on a Doc2Vec method; wherein the text information includes: name, description information, classification information.
Preferably, the process of calculating the ID embedding vectors and the text embedding vectors of all the neighboring nodes of the Mashup node and the Web API node includes:
calculating a neighbor node set of the Mashup node and the Web API node;
calculating ID embedded vectors and text embedded vectors of all the neighbor nodes based on the neighbor node set;
and selecting any Mashup node and any Web API node, and fusing the ID embedded vectors and the text embedded vectors of the neighbor nodes of any Mashup node and any Web API node respectively.
Preferably, the method of performing the text embedding vector and the ID embedding vector fusion is described as the following formula (1) and formula (2), respectively:
Figure BDA0003651326640000042
/>
Figure BDA0003651326640000051
wherein the content of the first and second substances,
Figure BDA0003651326640000052
any neighbor node M representing Mashup node M i ∈N M Is embedded in the vector, | N M The | represents the number of elements in all the neighbor node sets of the Mashup node M; />
Figure BDA0003651326640000053
Any neighbor node M representing Mashup node M i ∈N M The ID embedding vector of (1); all neighbor nodes N of any Mashup node M M ={M 1 ,M 2 ,…,M k The ID of the } is fused into an embedded vector, and is &>
Figure BDA0003651326640000054
All neighbor nodes N of any Mashup node M M ={M 1 ,M 2 ,…,M k The text of the } is embedded into a vector to be fused and is ≥ er>
Figure BDA0003651326640000055
Based on the same steps, all the neighbor nodes N of any one Web API node A are calculated A ={A 1 ,A 2 ,…,A s ID embedding vector and text embedding vector of }, respectively
Figure BDA0003651326640000056
Preferably, the embedding vector E is obtained A And the embedding vector E M The process comprises the following steps:
respectively to the
Figure BDA0003651326640000057
Performing connection operation to obtain an embedded vector E after the connection operation M
Figure BDA0003651326640000058
Wherein the symbol | | represents a join operation,
Figure BDA0003651326640000059
embedding a vector for the ID of any Mashup node M, <' >>
Figure BDA00036513266400000510
Embedding a vector for the text of any Mashup node M, <' >>
Figure BDA00036513266400000514
For all neighbor nodes N of any Mashup node M M Is embedded in the fusion of the vector, is greater than or equal to>
Figure BDA00036513266400000512
For all neighbor nodes N of any Mashup node M M Fusing the text embedding vectors;
based on the same steps, respectively aligning the
Figure BDA00036513266400000513
Performing a connection operation to obtain an embedded vector after the connection operation, namely obtaining the embedded vector E A
Figure BDA0003651326640000061
Wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003651326640000062
ID embedding for any Web API node AVector +>
Figure BDA0003651326640000066
Embedding a vector for the text of any one Web API node A, based on the location of the text in the text field, and based on the location of the text in the text field>
Figure BDA0003651326640000067
For all neighbor nodes N of any one Web API node A A Is embedded in the fusion of the vector, is greater than or equal to>
Figure BDA0003651326640000068
For all neighbor nodes N of any one Web API node A A The text embedding vector of (2).
Preferably, calculating the matching degree between the Mashup node and the Web API node includes:
based on the embedding vector E M And the embedding vector E A And executing dot product operation to obtain the matching degree of the Mashup node and the Web API node.
A graph embedding enhanced Web API recommendation system, comprising:
an embedded vector acquisition unit: the system comprises a data processing module, a data processing module and a data processing module, wherein the data processing module is used for acquiring ID embedded vectors and text embedded vectors of a Mashup node and a Web API node, and respectively calculating the ID embedded vectors and the text embedded vectors of all neighbor nodes of the Mashup node and the Web API node;
an embedded vector fusion unit: the system is used for respectively fusing the ID embedded vectors and the text embedded vectors of the Mashup node and the Web API node, and the ID embedded vectors and the text embedded vectors of the neighbor nodes of the Mashup node and the Web API node to obtain a fused embedded vector E M And embedding vector E A
An embedded vector matching unit: for based on the embedding vector E M And the embedding vector E A And calculating the matching degree of the Mashup node and the Web API node to obtain the recommendation result of the Web API.
The invention has the beneficial effects that:
1) Text embedding vector information is added in the traditional ID-based graph embedding method, so that the problem of data sparsity in the traditional Web API recommendation method based on the ID embedding method can be effectively solved, and the purpose of improving the Web API recommendation precision is achieved;
2) The method provided by the invention not only considers the ID embedded vector of the neighbor of a certain node on the graph, but also considers the text embedded vector of the neighbor node of the certain node on the graph, and solves the problems of data sparseness and poor recommendation precision caused by the influence of cold start existing in the Web API recommendation by a simple method based on the ID embedded vector generated by the graph embedding method in the traditional Web API recommendation method.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram illustrating an implementation principle of a graph embedding enhanced Web API recommendation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of Mashup and Web API call relationship according to an embodiment of the present invention;
fig. 3 is an exemplary diagram of Mashup and Web API textual description information according to an embodiment of the present invention, where (a) is an exemplary Mashup textual description information and (b) is an exemplary Web API textual description information;
FIG. 4 is a flowchart of generating a Text Embedding vector based on Mashup Text description information according to an embodiment of the present invention;
FIG. 5 is a flow chart of predictive computation of a Web API according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention more comprehensible, the present invention is described in detail with reference to the accompanying drawings and the detailed description thereof.
The scheme provides a Web API recommendation method and system based on graph embedding enhancement. The core idea is that on the basis of an ID embedding vector generated by the existing graph-based embedding method, the consideration of Mashup and the text information of a Web API is increased. Firstly, an Embedding vector representation (namely Text Embedding) is generated by the Text information, and then a fused Embedding vector representation is generated by combining an ID Embedding vector (namely ID Embedding) generated based on a graph Embedding vector in the prior art.
As shown in fig. 1, a historical calling relationship data set between Mashup and the Web API needs to be analyzed, a calling relationship diagram of Mashup and the Web API is extracted from the data set, and a building example of the calling relationship diagram is shown in fig. 2.
The Web API recommendation method based on graph embedding is characterized in that a calling relation map is constructed based on calling relations between mashups and Web APIs, and then embedded vector representations of each Mashup and each Web API node ID on the graph are generated by utilizing a graph embedding vector generation technology based on the constructed calling relation map. It should be noted that, in the graph embedding vector generation technology, the graph embedding vector generation tool provided by the open source tool TensorFlow is used in this embodiment to generate ID embedding vectors (i.e., embedding) of Mashup and Web API nodes.
Although the graph embedding vector representation generated by initialization can relieve the data sparseness problem of the collaborative filtering algorithm by superposing a high-order relation, the graph embedding vector representation generated by initialization has the same problem as that of the collaborative filtering method, namely the graph embedding vector representation is calculated only according to the embedding vector representation of the ID generated by the service calling relation between the Mashup and the Web API, and the text description information of the Mashup and the Web API is not considered. For this reason, the present embodiment proposes to enhance the existing graph embedding vector in combination with the text embedding vector to solve the recommendation problem of the Web API.
The specific description is as follows:
(1) Generating text embedding vectors of Mashup and Web API
Fig. 3 (a) and fig. 3 (b) are examples of description information of Mashup and Web API on a programmable Web site.
As can be seen from fig. 3, each Mashup and the Web API has a text field description of the corresponding name, description information, and classification information. This information characterizes Mashup and the Web API from various different perspectives of functionality and non-functionality. However, the description is performed based on natural language, and the existing Web API recommendation method based on collaborative filtering and the existing Web API recommendation method based on graph embedding do not effectively utilize the text description information. In view of the reason, the invention provides a method for fusing the text information described by the natural language into the existing graph embedding-based method, and performs enhancement optimization on the existing graph embedding method, so as to solve the problems of data sparseness, cold start and the like in Web API recommendation.
Firstly, a text embedding vector generation process of Mashup is given as shown in fig. 4, and specifically includes:
firstly, extracting text field description information corresponding to Mashup from a data set, wherein the text field description information of the Mashup comprises name, description and category, and preprocessing the text information in each text field, wherein the preprocessing process comprises word segmentation and keyword extraction; after the keywords are extracted, connecting the keywords extracted from the three text fields of name, description and category to form an integral text field. And generating a text embedding vector for the whole text field based on a Doc2Vec method. The Doc2Vec method is a popular text vector characterization model, and supports learning of vector characterization of variable-length text (such as sentences and documents). The invention realizes a Doc2Vec method based on the genim PV-DBOW2 technology.
The text embedding vector generation process of the Web API is similar to that of Mashup. Firstly, extracting text domain description information corresponding to a Web API from a data set, wherein the text domain description information of the Web API comprises a name, a description and a category, preprocessing and segmenting text information in each text domain, and extracting keywords; after the keywords are extracted, connecting the keywords extracted from the three text fields of name, description and category to form an integral text field. And generating a text embedding vector for the whole text domain based on a Doc2Vec method.
(2) Neighbor node set for computing Mashup and Web API
As shown in fig. 1, it is necessary to calculate respective neighbor node sets of Mashup (abbreviated as M) and Web API (abbreviated as a). For neighbor aggregation computation of M, assume N M Set of neighbor nodes representing M, assuming N A The set of neighbor nodes representing a. Here, for N M The calculation method comprises the following steps: when different mashups (assumed to be M) 1 ,M 2 ,…,M k ) If the same Web API is called, M is considered 1 ,M 2 ,…,M k Is a neighbor, i.e. N M ={M 1 ,M 2 ,…,M k }. Similarly, for the neighbor node set of the Web API (i.e. a), when the same Mashup calls different Web APIs (assumed as a) 1 ,A 2 ,…,A s ) Then, consider A 1 ,A 2 ,…,A s Is a neighbor, i.e. N A ={A 1 ,A 2 ,…,A s }。
(3) Computing vector characterization of Target Mashup node (Target Mashup) and Candidate API (Candidate API)
As shown in fig. 1, the Embedding vector (i.e., embedding) of Target Mashup includes two parts, i.e., ID Embedding and Text Embedding. Wherein, ID Embedding is generated based on the embedded vector representation technology of the graph. Here we default that ID Embedding is already generated. Text Embedding is realized based on the method given in fig. 5. Similarly, the ID Embedding vector and the Text Embedding vector of the Candidate API (Candidate API) can be calculated.
(4) Computing vector representations of neighbor nodes
As shown in FIG. 1, based on the above (3)The realization process of the method can calculate all neighbor nodes N of any Mashup node M M ={M 1 ,M 2 ,…,M k The ID Embedding vector and the Text Embedding vector of the electronic device are assumed to be
Figure BDA0003651326640000111
In the same way, all the neighbor nodes N of any one Web API node A can be calculated A ={A 1 ,A 2 ,…,A s ID Embedding vector and Text Embedding vector of }, assumed to be &>
Figure BDA0003651326640000121
After the embedded vectors of the neighbor nodes are calculated, all the neighbor nodes N of M need to be respectively processed M ={M 1 ,M 2 ,…,M k And fusing the ID Embedding vector and the Text Embedding vector of the electronic component. The fusion method adopted by the scheme is a weighted summation mode. The realization process is as follows:
Figure BDA0003651326640000122
Figure BDA0003651326640000123
the Text Embedding vectors Text Embedding (assumed to be) of all the neighbor nodes of any node M can be calculated through the formula (1) and the formula (2)
Figure BDA0003651326640000124
) And ID Embedding vector ID Embedding (assumed to be @)>
Figure BDA0003651326640000125
). Wherein it is present>
Figure BDA0003651326640000126
Represents any of the nodes MOne neighbor node M i Is embedded in the Text Embedding vector (Text Embedding), is>
Figure BDA0003651326640000127
Any neighbor node M representing node M i ID Embedding vector (ID Embedding), N M And | represents the number of elements in the set of all neighbor nodes of the node M. Similarly, all the neighbor nodes N of any one Web API node A can be calculated A ={A 1 ,A 2 ,…,A s The ID Embedding vector and the Text Embedding vector of } are respectively assumed to be &>
Figure BDA0003651326640000128
(5) Comprehensively considering vector representation of neighbor nodes, and calculating recommendation result of Web API
As shown in fig. 1 and 5, an implementation flow of the Web API recommendation method based on neighboring nodes and enhanced by Text Embedding vectors is provided. The "join operation" of the embedded vectors referred to in fig. 5 refers to a concatenation operation of the string vectors. For example, assume that Mashup ID Embedding and Text Embedding are respectively
Figure BDA0003651326640000131
Figure BDA0003651326640000132
Then the pair->
Figure BDA0003651326640000133
And &>
Figure BDA0003651326640000134
After performing the join operation: e M =“101110001”。
In the Web API recommending process, in the traditional ID embedding vector calculation process based on graph embedding, corresponding text embedding vector information is generated respectively by considering text information of a target Mashup and candidate Web API nodes so as to enhance the characterization calculation capacity of the ID embedding vectors of the target Mashup and the candidate Web API nodes. Meanwhile, vector information of Text Embedding vectors and ID Embedding vectors of target Mashup and neighbor nodes of the candidate Web API nodes are superposed, so that the vector representation calculation capacity of the target Mashup and the candidate Web API nodes is further enhanced.
The embodiment also provides a graph embedding enhanced Web API recommendation system, which includes:
an embedded vector acquisition unit: the system comprises a data processing module, a data processing module and a data processing module, wherein the data processing module is used for acquiring ID embedded vectors and text embedded vectors of a Mashup node and a Web API node, and respectively calculating the ID embedded vectors and the text embedded vectors of all neighbor nodes of the Mashup node and the Web API node;
an embedded vector fusion unit: the system is used for respectively fusing the ID embedded vectors and the text embedded vectors of the Mashup node and the Web API node, and the ID embedded vectors and the text embedded vectors of the neighbor nodes of the Mashup node and the Web API node to obtain a fused embedded vector E M And embedding vector E A
An embedded vector matching unit: for based on the embedding vector E M And the embedding vector E A And calculating the matching degree of the Mashup node and the Web API node to obtain the recommendation result of the Web API.
The method solves the problems of data sparseness and poor recommendation precision caused by the influence of cold start existing in the Web API recommendation by a simple method of generating the ID embedding vector based on the graph embedding method in the traditional Web API recommendation method.
The beneficial effects of the invention include:
1) Text embedding vector information is added in the traditional ID-based graph embedding method, so that the problems of data sparseness and cold start in the traditional ID-based Web API recommendation method can be effectively solved, and the purpose of improving Web API recommendation precision is achieved;
2) The method not only considers the ID embedding vector of the neighbor node of a certain node on the graph, but also considers the text embedding vector of the neighbor node of the certain node on the graph. By overlapping the ID embedded vector and the text embedded vector of the neighbor node, the representation learning capability of the node is improved, and the recommendation precision of the Web API is improved.
The above-described embodiments are only intended to describe the preferred embodiments of the present invention, and not to limit the scope of the present invention, and various modifications and improvements made to the technical solution of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims (8)

1. A graph embedding enhanced Web API recommendation method is characterized by comprising the following steps:
acquiring ID embedded vectors and text embedded vectors of a Mashup node and a Web API node, and respectively calculating the ID embedded vectors and the text embedded vectors of all neighbor nodes of the Mashup node and the Web API node;
fusing the ID embedding vector and the text embedding vector of the Mashup node and the ID embedding vector and the text embedding vector of the neighbor node of the Mashup node to obtain a fused embedding vector E M
Fusing the ID embedding vector and the text embedding vector of the Web API node and the ID embedding vector and the text embedding vector of the neighbor node of the Web API node to obtain a fused embedding vector E A
Based on the embedding vector E M And the embedding vector E A Calculating the matching degree of the Mashup node and the Web API node to obtain a recommendation result of the Web API;
the process of obtaining the ID embedded vectors of the Mashup node and the Web API node comprises the following steps:
analyzing a historical calling relationship data set between the Mashup node and the Web API node, extracting from the historical calling relationship data set and generating a calling relationship graph of the Mashup and the Web API, constructing the calling relationship graph of the Mashup and the Web API, and generating an ID embedding vector of the Mashup node and an ID embedding vector of the Web API node by utilizing a graph embedding vector generation technology based on the calling relationship graph.
2. The graph embedding enhanced Web API recommendation method according to claim 1, wherein the graph embedding vector generation technology includes generating ID embedding vectors of the Mashup node and the Web API node by using a graph embedding vector generation tool provided by an open source tool TensorFlow, and the ID embedding vectors are respectively recorded as:
Figure FDA0004007594550000021
3. the graph embedding enhanced Web API recommendation method according to claim 1, wherein the process of obtaining the text embedding vectors of the Mashup nodes and the Web API nodes comprises:
respectively fusing text information describing the Mashup node and the Web API node with a graph embedding-based method to generate a text embedding vector of the Mashup node and a text embedding vector of the Web API node, and respectively recording the text embedding vectors as:
Figure FDA0004007594550000022
the process of generating the text embedding vector comprises: performing word segmentation processing on a text field of text information, extracting a keyword, performing connection operation on the extracted text field to form an integral text field, and generating a text embedded vector of the integral text field after connection based on a Doc2Vec method; wherein the text information includes: name, description information, classification information.
4. The graph embedding enhanced Web API recommendation method according to claim 1, wherein the process of calculating the ID embedding vectors and the text embedding vectors of all the neighboring nodes of the Mashup node and the Web API node comprises:
calculating a neighbor node set of the Mashup node and the Web API node;
calculating ID embedded vectors and text embedded vectors of all the neighbor nodes based on the neighbor node set;
and selecting any Mashup node and any Web API node, and fusing the ID embedded vectors and the text embedded vectors of the neighbor nodes of any Mashup node and any Web API node respectively.
5. The graph embedding enhanced Web API recommendation method according to claim 4, wherein the method of performing the fusion of the text embedding vector and the ID embedding vector is described as the following formula (1) and formula (2), respectively:
Figure FDA0004007594550000031
/>
Figure FDA0004007594550000032
wherein the content of the first and second substances,
Figure FDA0004007594550000033
any neighbor node M representing Mashup node M i ∈N M The text embedding vector, | N M I represents the number of elements in all neighbor node sets of the Mashup node M; />
Figure FDA0004007594550000034
Any neighbor node M representing Mashup node M i ∈N M The ID embedding vector of (1); all neighbor nodes N to any Mashup node M M ={M 1 ,M 2 ,…,M k The ID of the } is embedded in the vector to be fused and is ≥ er>
Figure FDA0004007594550000035
All neighbor nodes N of any Mashup node M M ={M 1 ,M 2 ,…,M k The text of the } is embedded into a vector to be fused and is ≥ er>
Figure FDA0004007594550000036
Based on the same steps, all neighbor nodes N of any one Web API node A are calculated A ={A 1 ,A 2 ,…,A s ID and text embedding vectors of }, respectively
Figure FDA0004007594550000037
6. The graph embedding enhanced Web API recommendation method of claim 5, wherein obtaining the embedding vector E A And the embedding vector E M The process comprises the following steps:
respectively to the
Figure FDA0004007594550000038
Performing connection operation to obtain an embedded vector E after the connection operation M
Figure FDA0004007594550000039
Wherein the symbol | | represents a join operation,
Figure FDA00040075945500000310
embedding a vector for the ID of any Mashup node M, <' >>
Figure FDA0004007594550000041
Embedding a vector for the text of any Mashup node M, <' >>
Figure FDA0004007594550000042
For all neighbor nodes N of any Mashup node M M Is embedded in the fusion of the vector, is greater than or equal to>
Figure FDA0004007594550000043
For all neighbor nodes N of any Mashup node M M Fusing the text embedding vectors;
based on the same steps, respectively aligning the
Figure FDA0004007594550000044
Performing a connection operation to obtain an embedded vector after the connection operation, namely obtaining the embedded vector E A
Figure FDA0004007594550000045
Wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0004007594550000046
embedding a vector for any one Web API node A ID, based on the ID value of the node A, and based on the embedded vector>
Figure FDA0004007594550000047
Embedding a vector for the text of any one Web API node A, </or >>
Figure FDA0004007594550000048
For all neighbor nodes N of any one Web API node A A The ID of (2) is embedded in the fusion vector,
Figure FDA0004007594550000049
for all neighbor nodes N to any one Web API node A A The text embedding vector of (2).
7. The graph-embedded enhanced Web API recommendation method according to claim 1, wherein calculating the matching degree of the Mashup node and the Web API node comprises:
based on the embedding vector E M And the embedding vector E A And executing dot product operation to obtain the matching degree of the Mashup node and the Web API node.
8. A graph embedding enhanced Web API recommendation system, comprising:
an embedded vector acquisition unit: the system comprises a Mashup node, a Web API node, a first node and a second node, wherein the first node is used for acquiring ID embedded vectors and text embedded vectors of the Mashup node and the Web API node, and respectively calculating the ID embedded vectors and the text embedded vectors of all neighbor nodes of the Mashup node and the Web API node;
the process of obtaining the ID embedded vectors of the Mashup node and the Web API node comprises the following steps:
analyzing a historical calling relationship data set between the Mashup node and the Web API node, extracting from the historical calling relationship data set and generating a calling relationship graph of the Mashup and the Web API, constructing the calling relationship graph of the Mashup and the Web API, and generating an ID embedding vector of the Mashup node and an ID embedding vector of the Web API node by utilizing a graph embedding vector generation technology based on the calling relationship graph;
an embedded vector fusion unit: the system is used for respectively fusing the ID embedded vectors and the text embedded vectors of the Mashup node and the Web API node, and the ID embedded vectors and the text embedded vectors of the neighbor nodes of the Mashup node and the Web API node to obtain a fused embedded vector E M And embedding vector E A
An embedded vector matching unit: for based on the embedding vector E M And the embedding vector E A And calculating the matching degree of the Mashup node and the Web API node to obtain the recommendation result of the Web API.
CN202210552890.1A 2022-05-19 2022-05-19 Graph embedding enhanced Web API recommendation method and system Active CN114817745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210552890.1A CN114817745B (en) 2022-05-19 2022-05-19 Graph embedding enhanced Web API recommendation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210552890.1A CN114817745B (en) 2022-05-19 2022-05-19 Graph embedding enhanced Web API recommendation method and system

Publications (2)

Publication Number Publication Date
CN114817745A CN114817745A (en) 2022-07-29
CN114817745B true CN114817745B (en) 2023-04-18

Family

ID=82517131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210552890.1A Active CN114817745B (en) 2022-05-19 2022-05-19 Graph embedding enhanced Web API recommendation method and system

Country Status (1)

Country Link
CN (1) CN114817745B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115600012B (en) * 2022-12-01 2023-04-21 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) API recommendation method based on knowledge enhancement and structure comparison

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10606658B2 (en) * 2016-03-22 2020-03-31 International Business Machines Corporation Approach to recommending mashups
CN107423396A (en) * 2017-07-26 2017-12-01 中山大学 It is a kind of that method is recommended based on the Mashup of function implication relation and cluster
CN112148999B (en) * 2020-09-09 2022-04-08 浙江工业大学 Web API recommendation method based on Mashup service neighborhood under Web open environment
CN112084416A (en) * 2020-09-21 2020-12-15 哈尔滨理工大学 Web service recommendation method based on CNN and LSTM
CN113343078B (en) * 2021-05-11 2022-07-15 浙江工业大学 Web API recommendation method based on topic model clustering
CN113407731A (en) * 2021-06-16 2021-09-17 浙江工商大学 API recommendation method based on knowledge graph and collaborative filtering
CN114201669B (en) * 2021-11-19 2023-02-03 西安电子科技大学 API recommendation method based on word embedding and collaborative filtering technology

Also Published As

Publication number Publication date
CN114817745A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
Chen et al. Social media visual analytics
CN110019812B (en) User self-production content detection method and system
CN105095433B (en) Entity recommended method and device
Gilson et al. From web data to visualization via ontology mapping
CN102779114B (en) It is supported using the unstructured data of automatically rule generation
Andryani et al. Social media analytics: data utilization of social media for research
JP2019519019A (en) Method, apparatus and device for identifying text type
Olmezogullari et al. Representation of click-stream datasequences for learning user navigational behavior by using embeddings
Amplayo Rethinking attribute representation and injection for sentiment classification
CN114357197B (en) Event reasoning method and device
CN114817745B (en) Graph embedding enhanced Web API recommendation method and system
CN111930915B (en) Session information processing method, device, computer readable storage medium and equipment
CN110442730A (en) A kind of knowledge mapping construction method based on deepdive
US20220382795A1 (en) Method and system for detection of misinformation
Sun et al. Graph force learning
Shi et al. Heterogeneous Graph Representation Learning and Applications
Skarpathiotaki et al. Cross-industry process standardization for text analytics
JP2024502400A (en) Automatic depiction and extraction of tabular data in portable document formats using graph neural networks
Zhao et al. Aspect-based sentiment analysis using local context focus mechanism with deberta
CN117574915A (en) Public data platform based on multiparty data sources and data analysis method thereof
CN116450827A (en) Event template induction method and system based on large-scale language model
CN112734519B (en) Commodity recommendation method based on convolution self-encoder network
CN115168609A (en) Text matching method and device, computer equipment and storage medium
Langlois Networks and layers: Technocultural encodings of the World Wide Web
CN114491029A (en) Short text similarity calculation method based on graph neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant