CN110717047B - Web service classification method based on graph convolution neural network - Google Patents
Web service classification method based on graph convolution neural network Download PDFInfo
- Publication number
- CN110717047B CN110717047B CN201911008035.9A CN201911008035A CN110717047B CN 110717047 B CN110717047 B CN 110717047B CN 201911008035 A CN201911008035 A CN 201911008035A CN 110717047 B CN110717047 B CN 110717047B
- Authority
- CN
- China
- Prior art keywords
- web service
- word
- graph
- service description
- words
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a Web service classification method based on a graph convolution neural network, which comprises the following steps: firstly, taking a WEB service data set as a basic corpus, taking words and Web service description documents in the basic corpus as single nodes, and constructing a heterogeneous graph network based on word co-occurrence and Web service description document word relation; and secondly, carrying out convolution calculation on the heterogeneous graph network by utilizing a graph convolution neural network, and realizing the classification of the Web service through a convolution prediction result. The method can obtain stronger classification performance only by labeling a small amount of Web service documents, and can independently learn the embedded information between words and Web service description documents, and experiments prove that the indexes of precision ratio, recall ratio, F-measure, purity, entropy and the like of the method are obviously improved compared with the traditional Web service classification method.
Description
Technical Field
The invention mainly relates to the technical field related to Web service classification, in particular to a Web service classification method based on a graph convolution neural network.
Background
With the advent of the Web2.0 era and the development of Web service technology, the number and variety of Web services on the Internet are rapidly increasing, and how to find Web services meeting the requirements of users becomes more and more difficult.
In order to improve the performance of Web service discovery and composition, researchers have proposed many Web service classification methods, with some research efforts focused on Web service classification and recommendation based on functional attributes. The existing research shows that: the Web service function description text has the characteristics of short space, sparse characteristics, small information content and the like, and is very similar to the short text. Therefore, how to construct the short text into a form that can be understood by a computer becomes a main problem of short text classification. In response to the above problems, some researchers have utilized key features mined from WSDL documents to implement functional classification of Web services. Firstly, extracting a feature vector of each Web service from a WSDL document; then, calculating the similarity between the extracted Web service characteristic vectors; and finally, classifying the Web services into groups with similar functions according to the calculated similarity of the characteristic vectors of the Web services. In addition, many researchers use lda (latent Dirichlet allocation) topic models or extended topic models thereof to extract implicit topic information (low-dimensional topic vector features) from Web service description documents to represent Web services, and calculate similarities between Web services according to the topic vectors to complete classification of the Web services. With the progress of research, deep mining of hidden information (such as word order between words, context information, etc.) in Web service description texts has become one of the research hotspots in recent years.
In summary, the above researches improve the performance of service classification to some extent, but they do not consider the network structure information implied between the words in the Web service description text and the description text itself, and the performance of service classification can be further improved by using the network structure information.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides a Web service classification method based on a graph convolution neural network based on practical application by combining the prior art, and the performance of Web service classification can be practically improved.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a method for classifying Web services based on a graph convolution neural network, the method comprising: firstly, taking a WEB service data set as a basic corpus, taking words and Web service description documents in the basic corpus as single nodes, constructing a heterogeneous graph network based on word co-occurrence and Web service description document word relation, and calculating each path weight; and secondly, carrying out convolution calculation on the heterogeneous graph network by utilizing a graph convolution neural network, and realizing classification of the Web service through a convolution prediction result.
Further, before constructing the heterogeneous graph network, preprocessing the Web service description document, wherein the preprocessing process comprises the following steps:
(1) Respectively extracting relevant information of the Web API from the selected Web service by using a natural language processing toolkit pandas in python;
(2) dividing words according to spaces by using a natural language toolkit NLTK in python, and dividing punctuation marks from the words;
(3) removing stop words by using a stop word list in a natural language toolkit NLTK in python;
(4) performing stemming processing on the words with the substantially same word;
(5) extracting words appearing in the processed Web service description document and performing dictionary processing;
(6) and representing each word in the processed Web service description document and the dictionary as an One-Hot vector, and then constructing the One-Hot vector into a feature matrix.
Further, in the constructed heterogeneous graph network, edges between nodes are constructed based on Web service description document-word and word-word.
Furthermore, in the constructed heteromorphic graph network, word frequency-inverse text frequency is adopted to calculate the weight of edges between Web service description document nodes and word nodes, the classification capability of the Web service description document is judged based on the frequency of the words appearing in the Web service description document, and the weight of the edges between the two word nodes is calculated by using point mutual information so as to measure the association degree between the two words; wherein, for all the Web service description documents in the corpus, a sliding window with a fixed size is used to collect the co-occurrence statistical information of the words.
Further, the method for calculating the weight specifically includes: defining the weight of an edge between any two nodes i and j in the heterogeneous graph network as follows:
the weight of an edge between a word pair i, j is calculated as follows:
wherein p (i, j) is the frequency of occurrence of word pairs, p is the frequency of occurrence of a single word, # W (i) is the number of sliding windows containing word i in the corpus, # W (i, j) is the number of sliding windows containing word i and word j in the corpus, and # W is the total number of sliding windows in the corpus;
for the computed PMI values, edges are only added between pairs of words that have positive PMI values.
Further, after the heterogeneous graph network is constructed, modeling and convolution operation are carried out on the heterogeneous graph network by utilizing a two-layer graph convolution neural network to form an embedded characterization vector of a word and a Web service description document, and the specific process comprises the following steps:
(1) for the first layer graph convolution neural network, a k-dimensional characteristic matrix of a nodeThe calculation formula is as follows:
wherein, the first and the second end of the pipe are connected with each other,is a normalized symmetric adjacency matrix, D is a graph matrix, a is a graph adjacency matrix,is a feature matrix, where n is the number of nodes and m is the number of nodesThe number of characteristic dimensions of the point is,is a weight matrix, ρ is the activation function; when a plurality of graph convolution neural networks are stacked, more neighborhood information is integrated to obtain high-order neighborhood information:
Wherein, WjIs a weight coefficient representing the weight of the jth convolutional layer, j represents the number of convolutional layers of the graph convolutional neural network, L(0)=χ;
(2) Embedding the feature matrixes of all nodes and the feature matrix of the tag set into the same dimension by the aid of the second-layer graph convolution neural network, and then inputting the feature matrixes into a softmax classification function for calculation:
wherein the content of the first and second substances,is a symmetric adjacency matrix that is subjected to normalization processing, weight matrix W0And W1Training by gradient descent;
order toE1And E2Embedded information of the first layer and the second layer of Web service description documents and words can be respectively contained;
(3) defining a loss function as the cross entropy error of all Web service description documents:
wherein, yDIs an index set of Web service description documents with tags; f is the dimension of the output characteristic, which is equal to the number of classes, Y is the label indication matrix;
and obtaining a final Web service classification result through the convolution calculation of the two-layer graph convolution neural network.
The invention has the beneficial effects that:
in the invention, the Web service data set is firstly modeled into a word and Web service description document heteromorphic graph network as the whole corpus, and learning the word and the embedded information of the Web service description document by combining the graph convolution neural network, by modeling and predicting the characteristic information of the Web service function description text, deeply excavating the network structure information between words appearing in the Web service description text and carrying out classification prediction, integrating the prediction result as the final result of service classification, the method can obtain stronger classification performance only by labeling a small amount of Web service documents, and the embedded information between the words and the Web service description documents can be independently learned, and experiments prove that the indexes of precision ratio, recall ratio, F-measure, purity, entropy and the like of the method are remarkably improved compared with the traditional Web service classification method.
Drawings
FIG. 1 is a general framework diagram of the Web services classification method of the present invention;
FIG. 2 is a diagram of a Web services classification model architecture of the present invention;
FIG. 3 is a schematic diagram of the information exchange between pairs of Web service description documents in accordance with the present invention;
FIG. 4 is a graph comparing precision index for different Web service classification methods;
FIG. 5 is a chart comparing recall index for different Web service classification methods;
FIG. 6 is a comparison graph of F-measure indicators for different Web service classification methods;
FIG. 7 is a comparison graph of entropy indices for different Web service classification methods;
FIG. 8 is a comparison of purity levels for different Web service classification methods.
Detailed Description
The invention is further described with reference to the accompanying drawings and specific embodiments. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and these equivalents also fall within the scope of the present application.
Because the existing Web service classification technology mainly focuses on realizing classification by using functional information such as description texts, labels and the like of Web services, the network structure information implied between words in the description texts of the Web services and the description texts is not considered for a moment. Therefore, the invention provides a Web service classification method based on a graph convolution neural network. The method comprises the steps of firstly, taking information such as names, text description and labels of Web services as a basic corpus, and constructing a word and Web service description document heteromorphic network based on word co-occurrence and Web service description document word relation. In the heteromorphic graph network, the word frequency-inverse text frequency is used for calculating the weight of edges between Web service description document nodes and word nodes, and the point-to-point information is used for calculating the weight of edges between different word nodes. Then, aiming at the word & Web service description document heteromorphic graph network, a graph convolution neural network is used for learning the embedded information of the word and the Web service description document, and the Web service document problem is converted into a node classification problem.
The general framework of the Web service classification method proposed by the present invention is shown in fig. 1, and includes three parts: preprocessing a Web service description document, constructing and training a Web service classification model (namely a WSC-GCN model) based on a graph convolution neural network, and classifying Web services. In the Web service description document preprocessing process, a Web service description text and other related information are firstly crawled and stored from a programable Web website, and corresponding feature columns are extracted to construct a feature vector matrix. In the process of constructing and training a WSC-GCN model, words in a Web service description text after pretreatment are extracted separately, a word and Web service description document heteromorphic network is established with the Web service description document, and each path weight is calculated. Then, convolution calculation is carried out on the word & Web service description document heterogeneous graph network by using the graph convolution neural network. And in the Web service classification process, taking the convolution prediction result of the Web service class as the final result of the service classification.
The following describes the Web service description document preprocessing, WSC-GCN model construction and training, and Web service classification in detail.
Web service description document preprocessing:
The description document of the Web service describes the core functions of the Web service and is also the main information source of the Web service classification. Since some entries in the Web service description document contain a lot of useless information, preprocessing operations are required. The pretreatment process comprises the following steps:
web service description document information extraction: the natural language processing toolkit pandas in python is used to extract five columns of Web APIs ('APIName', 'tags', 'desc', 'primary _ category', 'sub _ primary') from the selected Web service, respectively.
Web services description document tokenization (tokenize): the word is space-segmented using NLTK (natural language toolkit) in python and punctuation is separated from the word.
3. Filter stop words (stop words): there are many invalid words and punctuation marks in english, such as "a", "to", "and", "etc., and these words or marks without practical meaning are called stop words, and the stop words are removed by using the stop word list in NLTK.
4. Word drying treatment (curing): in english, the same word may have different expressions, for example, 'provide', 'providing', etc., due to different tenses, names, etc., but they are actually the same word 'provide', and if these words are treated as different words, the accuracy of similarity calculation is reduced, so it is necessary to perform word drying processing.
5. And extracting words appearing in the processed Web service description document and performing dictionary processing.
6. And representing each word in the processed Web service description document and the dictionary as One-Hot vectors, constructing the One-Hot vectors into a feature matrix, and using the feature matrix as the input of the WSC-GCN classification model.
The WSC-GCN classification model comprises:
the WSC-GCN classification model constructed by the method disclosed by the invention is shown in figure 2 and comprises three parts: the word & Web service description document is an abnormal graph network, word and Web service description document representation, Web service classification (English words in the figure are only used as examples).
For the convenience of further description of the method of the present invention, the graph convolution neural network GCN in this embodiment has the following description: the network is a multilayer neural network, is a variant of the traditional convolution algorithm on graph structure data, can be directly used for processing the graph structure data and deriving an embedded vector of a node according to the property of a node neighborhood, and is defined as follows:
(1)represents a diagram in whichThe nodes of the diagram are represented by,representing an edge in the diagram. Taking fig. 2 as an example, the nodes are words or Web service description documents; an edge is an edge constructed from "word-word" or "word-Web service description document".
(4) Let A be the adjacency matrix (adjacency matrix) of the graph. For recursive reasons, the diagonal elements of a are all set to 1, so that the GCN can only capture neighboring information using one layer of convolution.
(5) Let D be the degree matrix (degree matrix) of the graph, where Dii=∑jAij。
Heterogeneous graph network:
for the heteromorphic network of the present invention, as shown in fig. 2, in the left part of fig. 2, a heteromorphic network containing word nodes and Web service description document nodes is constructed, wherein the nodes marked as "API" are Web service description document nodes, and the other nodes are word nodes. The number of nodes in the "word & Web service description document" heteromorphic network v is the sum of the number of Web service description documents (corpus size) and the number of words (vocabulary number) after de-duplication, and meanwhile, edges between nodes are jointly constructed based on word occurrence (document-word) in the Web service description document and co-occurrence (word-word) of the words in the whole corpus. Wherein, the weight of the edge between the Web service description Document node and the word node is calculated by using the Term Frequency-Inverse text Frequency (TF-IDF). If a word appears frequently in the Web service description document TF is high and rarely appears in other Web service description documents (IDF is high), the word is considered to have a good category discrimination ability and to be suitable for classification. To better utilize co-occurrence information of words throughout the corpus, a fixed-size sliding window is used to collect co-occurrence statistics of words for all Web service description documents in the corpus. The weight of the edge between two word nodes is calculated using the Point Mutual Information (PMI) to measure the degree of association between two words. Thus, the weight of an edge between any two nodes i and j in the heteromorphic graph network v is defined as:
Thus, the weight (PMI) of an edge between a word pair i, j is calculated as follows:
where p (i, j) is the frequency of occurrence of word pairs, p is the frequency of occurrence of a single word, # W (i) is the number of sliding windows in the corpus containing word i, # W (i, j) is the number of sliding windows in the corpus containing word i and word j, and # W is the total number of sliding windows in the corpus. A positive PMI value means that the semantic relevance of words in the corpus is high, while a negative PMI value means that there is little or no semantic relevance in the corpus. Here, edges are only added between pairs of words having positive PMI values.
Classified convolution calculation of Web services:
after the word & Web service description document heterogeneous graph network is constructed, modeling and convolution operation are carried out on the word & Web service description document heterogeneous graph network by using a two-layer graph convolution neural network to form an embedded characterization vector of the word and Web service description document (as shown in the middle part of FIG. 2, R (x) is an embedded characterization vector of x), and the specific process is as follows:
(1) for the first layer GCN, k-dimensional feature matrix of a nodeThe calculation formula is as follows:
wherein the content of the first and second substances,is a normalized symmetric adjacency matrix, D is a graph matrix, a is a graph adjacency matrix,is a feature matrix, where n is the number of nodes, m is the feature dimension number of the node, Is a weight matrix, ρ is the activation function; when a plurality of graph convolution neural networks are stacked, more neighborhood information is integrated to obtain high-order neighborhood information:
wherein, WjIs a weight coefficient representing the weight of the jth convolutional layer, j represents the number of GCN convolutional layers, and L(0)=x。
(2) The second layer GCN embeds the feature matrixes of all the nodes and the feature matrixes of the tag sets into the same dimension, and then inputs the feature matrixes into a softmax classification function for calculation:
as with the first layer of GCN,is a normalized symmetric adjacency matrix, andp(xi),wherein the content of the first and second substances,weight matrix W0And W1Training may be by gradient descent, such that the order isThen E1And E2Embedded information for the first and second layers of Web service description documents and words, respectively, may be included.
(3) The loss function is defined as the cross entropy error of all Web service markup documents:
wherein, yDIs an index set of Web service description documents with tags; f is the dimension of the output characteristic, which is equal to the number of classes. Y is the label indication matrix.
Therefore, the final Web service classification result can be obtained through the convolution calculation of the two layers of GCNs. As shown in the right part of fig. 2. In the present invention, in a "word & Web service description document" heteromorphic graph network, although a connection edge between Web service description documents is not directly constructed, two-layer GCNs can allow messages to be passed between nodes beyond a maximum of two steps. As shown in fig. 3, different Web service description documents establish communication links through commonly connected words, so that information exchange can be performed between pairs of Web service description documents through commonly connected word nodes, and then classification convolution calculation is performed, thereby ensuring the integrity and consistency of information.
The embodiment is as follows:
in this embodiment, experimental verification is performed on the classification method provided by the present invention, and the data set, the experimental setup, the evaluation index, the comparison method, and the experimental result of this embodiment are described in detail below.
Data set and experimental setup:
in order to evaluate the Web service classification method provided by the invention, a Web service real data set is crawled from a programammableWeb website. The data set comprises links between 6673 Mashups, 9121 Web APIs, 13613 Web APIs and Mashups, and Web service description documents and label information thereof. For convenience, 9121 Web APIs are selected as the experimental data set, based on which the top 10, 20, 30, 40 and 50 Web service categories containing the largest number of Web services (Web APIs) are selected as the classification reference data set, and then the classification reference data set is divided into 70% training set and 30% testing set by using the random segmentation tool in sklern. In the WSC-GCN model, some important parameters are set as: the Learning _ rate is 0.02, the epoch is 20, the Hidden1 is 20, and the Dropout is 0.5.
Evaluation indexes are as follows:
in the experiment, five indices were set to evaluate classification performance: precision (Precision), Recall (Recall), F-measure, Purity (Purity) and Entropy (Encopy). Assume that the standard Web service classification result is SWSC ═ { SC ═ SC 1,SC2,…,SCKAnd the Web service classification result obtained by the experiment is EWSC ═ C1,C2,…,CK′H, the ith Web service type CiThe precision ratio and the recall ratio of (1) are respectively defined as follows:
wherein, | SCiIs | is SCiNumber of Web services in Category, | CiIs | CiNumber of Web services in Categories, | SCi∩CiIs | is SCiAnd CiThe number of Web services co-occurring in a category. F-Measure represents the overall evaluation of the Web service classification result, and the calculation formula is as follows:
in addition, the accuracy of service classification is also measured by purity and entropy. Each Web service class CiThe purity and entropy of the Web service classification result obtained by the experiment and the purity and entropy of the Web service classification result obtained by the experiment are respectively as follows:
wherein, | CiIs | CiThe number of Web services in a category,is originally SCjIs divided into CiAnd | EWSC | is the total number of Web services that need to be classified during the experiment. In summary, higher precision, recall, purity, and lower entropy mean higher accuracy of Web service classification.
The comparison method comprises the following steps:
TF-IDF + LR: calculating the similarity between Web services by using the word frequency-inverse document frequency (TF-IDF) of the Web service description document, and dividing the services with similar functions into the same class by using Logistic Regression as a classifier.
LDA: and classifying the Web services by using the LDA topic model, and classifying each Web service into a topic class with the highest topic probability.
WE-LDA: the method comprises the steps of improving the performance of Web service clustering by using high-quality Word vectors, processing the Word vectors obtained after Word2vec conversion through a K-means + + algorithm to form Word clusters, and merging the Word clusters into a semi-supervised LDA training process, so that better distributed representation and clustering results of Web services are obtained.
LSTM: and mining historical context information in the Web service description document by using a Long Short-Term Memory (LSTM) network and realizing the classification of the Web service, wherein the input of the Long Short-Term Memory (LSTM) network is a characteristic vector matrix of the Web service description document, and the output of the Long Short-Term Memory (LSTM) network is a Web service classification prediction matrix.
Bi-LSTM: the bidirectional long-short time memory neural network (Bi-LSTM) is provided with two parallel LSTM layers in the positive sequence direction and the reverse sequence direction, so that not only is historical context information (preorder information) of a Web service description document extracted, but also future context information (postorder information) of the Web service description document is considered, and the classification of Web services is realized.
Wide & Deep: the wide linear model and the deep neural network are trained through wide learning and deep learning together, the memory model and the generalization function are organically combined, and Web services are classified.
And improving the Wide & Bi-LSTM model, and replacing Deep components in the Wide & Deep model with the Bi-LSTM model, so that the generalization capability of the Deep neural network is further enhanced to obtain better Web service classification performance.
Experimental results and analysis:
as shown in fig. 4-8, the Web service classification performance of different methods is given when the number of Web service classes varies between 10 and 50 (in steps of 10), where the horizontal coordinate represents the number of Web service classes and the vertical coordinate represents the corresponding performance index value. The experimental results show that: when the method is applied to Web service classification, the five indexes of precision ratio, recall ratio, F-measure, purity and entropy are superior to other methods. Specifically, the method comprises the following steps:
under the same category number, the classification performance of the WSC-GCN model without tag information is higher than that of other seven models. For example, when the number of service types is 50, the precision ratio of the WSC-GCN without tag information is improved by 85.3 percent compared with TF-IDF + LR, 70.6 percent compared with LDA and 30.2 percent compared with WE-LDA. The reason for this is that: the WSC-GCN model can fully mine network structure information contained in Web service description documents and words through convolution calculation, so that a more accurate classification result is obtained.
When the number of Web service classes is 40, the performance of TF-IDF + LR, LDA, and WE-LDA is the best in all cases. As the number of Web service categories increases from 10 to 40, the performance of Web service categories is progressively improved because more Web services can be used in these categories to learn more valuable hidden information (such as word frequency co-occurrence, semantic relevance, etc.) for better classification accuracy. However, as the number of classifications continues to increase from 40 to 50, the accuracy of the classifications decreases. The reason is that: the added extra categories mostly contain less Web services (content information), which reduces the accuracy of the classification. Furthermore, the performance of TF-IDF + LR was the worst in all cases. This is because the TF-IDF + LR uses only the term-based vector space model to represent features of the Web service description document without considering the potential semantic relevance behind them.
Compared with the LSTM model, the precision ratio of the WSC-GCN model without tag information is improved by 51.6 percent; compared with the Bi-LSTM model, the precision ratio of the WSC-GCN model without tag information is improved by 19.0%. This is because the Bi-LSTM neural network and the LSTM neural network, although using the context information of the Web service description document, ignore the network structure information contained in the Web service description document and words.
Compared with the Wide & Deep model and the Wide & Bi-LSTM model, the precision ratio of the GCN model without tag information is respectively improved by 36.5 percent and 5.5 percent. The reason is that: although the Wide & Deep model and the Wide & Bi-LSTM model improve the classification effect of the Web service by memorization and generalization, the network structure information contained in the Web service description document and words is not considered.
After the tag information is added, the precision ratio of the WSC-GCN + tag model is respectively improved by 0.9%, 1.5%, 1.8%, 2.0% and 2.5% compared with the Text GCN model without the tag information (when the number of the Web service classes is 10/20/30/40/50 respectively). The fact that tag information is added enriches the linguistic data and semantic information of the heteromorphic graph network of words and Web service description documents enables Web service classification to be more accurate.
When the number of Web service categories is 50, the entropy value of the WSC-GCN + tag model is the minimum, and the classification effect of the WSC-GCN + tag model is superior to that of other models (the smaller the entropy value is, the better the classification effect is); the purity of the WSC-GCN model without tag information is improved by 13.5 percent compared with the Wide & Bi-LSTM model. The curve variation trends of entropy and purity are basically consistent with those of precision ratio, recall ratio and F-measure.
The invention provides a Web service classification method based on a graph convolution neural network. The method deeply excavates network structure information contained in Web service text information, establishes a word and Web service description document heteromorphic network by taking a programmable Web data set as a complete Web service corpus, and converts a Web service document classification problem into a node classification problem facing the heteromorphic network by learning embedded information of words and Web service description documents by a graph convolution neural network. Experimental results show that the Web service classification method based on the graph convolution neural network is superior to other methods in performance indexes such as precision ratio, recall ratio, F-measure, purity, entropy and the like.
Claims (4)
1. A Web service classification method based on a graph convolution neural network is characterized by comprising the following steps: firstly, taking a WEB service data set as a basic corpus, taking words and Web service description documents in the basic corpus as single nodes, constructing a heterogeneous graph network based on word co-occurrence and Web service description document word relation, and calculating each path weight; secondly, carrying out convolution calculation on the heterogeneous graph network by utilizing a graph convolution neural network, and realizing classification of Web services through a convolution prediction result;
The method for calculating the weight specifically includes: defining the weight of an edge between any two nodes i and j in the heteromorphic graph network as:
the weight of an edge between a word pair i, j is calculated as follows:
wherein p (i, j) is the frequency of occurrence of word pairs, p is the frequency of occurrence of a single word, # W (i) is the number of sliding windows containing word i in the corpus, # W (i, j) is the number of sliding windows containing word i and word j in the corpus, and # W is the total number of sliding windows in the corpus;
for a calculated PMI value, only edges are added between word pairs having a positive PMI value;
after the heterogeneous graph network is constructed, modeling and convolution operation are carried out on the heterogeneous graph network by utilizing a two-layer graph convolution neural network to form an embedded characterization vector of a word and a Web service description document, and the specific process comprises the following steps:
(1) for the first layer graph convolution neural network, a k-dimensional characteristic matrix of a nodeThe calculation formula is as follows:
wherein the content of the first and second substances,is a normalized symmetric adjacency matrix, D is a graph matrix, a is a graph adjacency matrix,is a feature matrix, where n is the number of nodes, m is the feature dimension number of the node,is a weight matrix, ρ is the activation function; when a plurality of graph convolution neural networks are stacked, more neighborhood information is integrated to obtain high-order neighborhood information:
Wherein, WjIs a weight coefficient representing the weight of the jth convolutional layer, j represents the number of convolutional layers of the graph convolutional neural network convolutional layer,
(2) embedding the feature matrixes of all nodes and the feature matrix of the tag set into the same dimension by the aid of the second-layer graph convolution neural network, and then inputting the feature matrixes into a softmax classification function for calculation:
wherein the content of the first and second substances,is a symmetric adjacency matrix that is subjected to normalization processing, weight matrix W0And W1Training by gradient descent;
order toE1And E2Embedded information of the first layer and the second layer of Web service description documents and words can be respectively contained;
(3) defining a loss function as the cross entropy error of all Web service description documents:
wherein, yDIs an index set of Web service description documents with tags; f is the dimension of the output characteristic, which is equal to the number of classes, Y is the label indication matrix;
and obtaining a final Web service classification result through the convolution calculation of the two-layer graph convolution neural network.
2. The method for classifying Web services based on the graph convolution neural network as claimed in claim 1, wherein before constructing the heterogeneous graph network, the Web service description document is preprocessed, and the preprocessing process comprises:
(1) respectively extracting relevant information of the Web API from the selected Web services by using a natural language processing toolkit pandas in python;
(2) Dividing words according to spaces by using a natural language toolkit NLTK in python, and dividing punctuation marks from the words;
(3) removing stop words by using a stop word list in a natural language toolkit NLTK in python;
(4) performing stemming processing on the words with the substantially same meaning;
(5) extracting words appearing in the processed Web service description document and performing dictionary processing;
(6) and representing each word in the processed Web service description document and the dictionary as an One-Hot vector, and then constructing the One-Hot vector into a feature matrix.
3. The method of claim 1, wherein edges between nodes are constructed based on Web service description document-word and word-word together in the constructed heteromorphic graph network.
4. The method as claimed in claim 3, wherein in the constructed heteromorphic network, word frequency-inverse text frequency is used to calculate the weight of the edge between the Web service description document node and the word node, the classification capability is judged based on the frequency of the word appearing in the Web service description document, and point mutual information is used to calculate the weight of the edge between the two word nodes to measure the association degree between the two words; wherein, for all the Web service description documents in the corpus, a sliding window with a fixed size is used to collect the co-occurrence statistical information of the words.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911008035.9A CN110717047B (en) | 2019-10-22 | 2019-10-22 | Web service classification method based on graph convolution neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911008035.9A CN110717047B (en) | 2019-10-22 | 2019-10-22 | Web service classification method based on graph convolution neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110717047A CN110717047A (en) | 2020-01-21 |
CN110717047B true CN110717047B (en) | 2022-06-28 |
Family
ID=69214024
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911008035.9A Active CN110717047B (en) | 2019-10-22 | 2019-10-22 | Web service classification method based on graph convolution neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110717047B (en) |
Families Citing this family (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111274405B (en) * | 2020-02-26 | 2021-11-05 | 北京工业大学 | Text classification method based on GCN |
CN111339754B (en) * | 2020-03-04 | 2022-06-21 | 昆明理工大学 | Case public opinion abstract generation method based on case element sentence association graph convolution |
CN111309983B (en) * | 2020-03-10 | 2021-09-21 | 支付宝(杭州)信息技术有限公司 | Method and device for processing service based on heterogeneous graph |
CN113495958A (en) * | 2020-03-20 | 2021-10-12 | 北京沃东天骏信息技术有限公司 | Text classification method and device |
CN111581326B (en) * | 2020-03-30 | 2022-05-31 | 中国科学院信息工程研究所 | Method for extracting answer information based on heterogeneous external knowledge source graph structure |
CN111552803B (en) * | 2020-04-08 | 2023-03-24 | 西安工程大学 | Text classification method based on graph wavelet network model |
CN111538989B (en) * | 2020-04-22 | 2022-08-26 | 四川大学 | Malicious code homology analysis method based on graph convolution network and topic model |
CN111581488B (en) * | 2020-05-14 | 2023-08-04 | 上海商汤智能科技有限公司 | Data processing method and device, electronic equipment and storage medium |
CN112000788B (en) * | 2020-08-19 | 2024-02-09 | 腾讯云计算(长沙)有限责任公司 | Data processing method, device and computer readable storage medium |
CN112214335B (en) * | 2020-10-13 | 2023-12-01 | 重庆工业大数据创新中心有限公司 | Web service discovery method based on knowledge graph and similarity network |
CN112215837B (en) * | 2020-10-26 | 2023-01-06 | 北京邮电大学 | Multi-attribute image semantic analysis method and device |
CN112085127A (en) * | 2020-10-26 | 2020-12-15 | 安徽大学 | Semi-supervised classification method for mixed high-low order neighbor information |
CN112329877A (en) * | 2020-11-16 | 2021-02-05 | 山西三友和智慧信息技术股份有限公司 | Voting mechanism-based web service classification method and system |
CN112632984A (en) * | 2020-11-20 | 2021-04-09 | 南京理工大学 | Graph model mobile application classification method based on description text word frequency |
CN112598044B (en) * | 2020-12-17 | 2024-04-02 | 中山大学 | Text classification method based on multi-channel graph convolution |
CN112765352A (en) * | 2021-01-21 | 2021-05-07 | 东北大学秦皇岛分校 | Graph convolution neural network text classification method based on self-attention mechanism |
CN112836491B (en) * | 2021-01-25 | 2024-05-07 | 浙江工业大学 | NLP-oriented Mashup service spectrum clustering method based on GSDPMM and topic model |
CN112925907A (en) * | 2021-02-05 | 2021-06-08 | 昆明理工大学 | Microblog comment viewpoint object classification method based on event graph convolutional neural network |
CN112818112A (en) * | 2021-02-26 | 2021-05-18 | 广东工业大学 | Advertisement pushing method, device and system based on text classification |
CN113157859B (en) * | 2021-04-06 | 2023-04-18 | 北京理工大学 | Event detection method based on upper concept information |
CN113111288A (en) * | 2021-04-09 | 2021-07-13 | 湖南科技大学 | Web service classification method fusing unstructured and structured information |
CN113554100B (en) * | 2021-07-28 | 2023-04-07 | 湖南科技大学 | Web service classification method for enhancing attention network of special composition picture |
CN113657473B (en) * | 2021-08-04 | 2023-06-30 | 北京航空航天大学 | Web service classification method based on transfer learning |
CN113792144B (en) * | 2021-09-16 | 2024-03-12 | 南京理工大学 | Text classification method of graph convolution neural network based on semi-supervision |
CN113961708B (en) * | 2021-11-10 | 2024-04-23 | 北京邮电大学 | Power equipment fault tracing method based on multi-level graph convolutional network |
CN115442309B (en) * | 2022-09-01 | 2023-06-09 | 深圳信息职业技术学院 | Packet granularity network traffic classification method based on graph neural network |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106570148A (en) * | 2016-10-27 | 2017-04-19 | 浙江大学 | Convolutional neutral network-based attribute extraction method |
CN107103359A (en) * | 2017-05-22 | 2017-08-29 | 东南大学 | The online Reliability Prediction Method of big service system based on convolutional neural networks |
CN107102985A (en) * | 2017-04-23 | 2017-08-29 | 四川用联信息技术有限公司 | Multi-threaded keyword extraction techniques in improved document |
CN108428478A (en) * | 2018-02-27 | 2018-08-21 | 东北师范大学 | The thyroid cancer Risk Forecast Method excavated based on heterogeneous medical data |
CN108573068A (en) * | 2018-05-02 | 2018-09-25 | 重庆邮电大学 | A kind of text representation and sorting technique based on deep learning |
CN108595440A (en) * | 2018-05-11 | 2018-09-28 | 厦门市美亚柏科信息股份有限公司 | Short text content categorizing method and system |
CN108647191A (en) * | 2018-05-17 | 2018-10-12 | 南京大学 | It is a kind of based on have supervision emotion text and term vector sentiment dictionary construction method |
CN108694476A (en) * | 2018-06-29 | 2018-10-23 | 山东财经大学 | A kind of convolutional neural networks Stock Price Fluctuation prediction technique of combination financial and economic news |
CN108763216A (en) * | 2018-06-01 | 2018-11-06 | 河南理工大学 | A kind of text emotion analysis method based on Chinese data collection |
CN108763326A (en) * | 2018-05-04 | 2018-11-06 | 南京邮电大学 | A kind of sentiment analysis model building method of the diversified convolutional neural networks of feature based |
CN109117826A (en) * | 2018-09-05 | 2019-01-01 | 湖南科技大学 | A kind of vehicle identification method of multiple features fusion |
CN109241530A (en) * | 2018-08-29 | 2019-01-18 | 昆明理工大学 | A kind of more classification methods of Chinese text based on N-gram vector sum convolutional neural networks |
CN109583562A (en) * | 2017-09-28 | 2019-04-05 | 西门子股份公司 | SGCNN: the convolutional neural networks based on figure of structure |
CN109977226A (en) * | 2019-03-14 | 2019-07-05 | 南京邮电大学 | High-precision file classification method and system based on convolutional neural networks |
CN109977223A (en) * | 2019-03-06 | 2019-07-05 | 中南大学 | A method of the figure convolutional network of fusion capsule mechanism classifies to paper |
CN110046250A (en) * | 2019-03-17 | 2019-07-23 | 华南师范大学 | Three embedded convolutional neural networks model and its more classification methods of text |
CN110134786A (en) * | 2019-05-14 | 2019-08-16 | 南京大学 | A kind of short text classification method based on theme term vector and convolutional neural networks |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10740304B2 (en) * | 2014-08-25 | 2020-08-11 | International Business Machines Corporation | Data virtualization across heterogeneous formats |
-
2019
- 2019-10-22 CN CN201911008035.9A patent/CN110717047B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106570148A (en) * | 2016-10-27 | 2017-04-19 | 浙江大学 | Convolutional neutral network-based attribute extraction method |
CN107102985A (en) * | 2017-04-23 | 2017-08-29 | 四川用联信息技术有限公司 | Multi-threaded keyword extraction techniques in improved document |
CN107103359A (en) * | 2017-05-22 | 2017-08-29 | 东南大学 | The online Reliability Prediction Method of big service system based on convolutional neural networks |
CN109583562A (en) * | 2017-09-28 | 2019-04-05 | 西门子股份公司 | SGCNN: the convolutional neural networks based on figure of structure |
CN108428478A (en) * | 2018-02-27 | 2018-08-21 | 东北师范大学 | The thyroid cancer Risk Forecast Method excavated based on heterogeneous medical data |
CN108573068A (en) * | 2018-05-02 | 2018-09-25 | 重庆邮电大学 | A kind of text representation and sorting technique based on deep learning |
CN108763326A (en) * | 2018-05-04 | 2018-11-06 | 南京邮电大学 | A kind of sentiment analysis model building method of the diversified convolutional neural networks of feature based |
CN108595440A (en) * | 2018-05-11 | 2018-09-28 | 厦门市美亚柏科信息股份有限公司 | Short text content categorizing method and system |
CN108647191A (en) * | 2018-05-17 | 2018-10-12 | 南京大学 | It is a kind of based on have supervision emotion text and term vector sentiment dictionary construction method |
CN108763216A (en) * | 2018-06-01 | 2018-11-06 | 河南理工大学 | A kind of text emotion analysis method based on Chinese data collection |
CN108694476A (en) * | 2018-06-29 | 2018-10-23 | 山东财经大学 | A kind of convolutional neural networks Stock Price Fluctuation prediction technique of combination financial and economic news |
CN109241530A (en) * | 2018-08-29 | 2019-01-18 | 昆明理工大学 | A kind of more classification methods of Chinese text based on N-gram vector sum convolutional neural networks |
CN109117826A (en) * | 2018-09-05 | 2019-01-01 | 湖南科技大学 | A kind of vehicle identification method of multiple features fusion |
CN109977223A (en) * | 2019-03-06 | 2019-07-05 | 中南大学 | A method of the figure convolutional network of fusion capsule mechanism classifies to paper |
CN109977226A (en) * | 2019-03-14 | 2019-07-05 | 南京邮电大学 | High-precision file classification method and system based on convolutional neural networks |
CN110046250A (en) * | 2019-03-17 | 2019-07-23 | 华南师范大学 | Three embedded convolutional neural networks model and its more classification methods of text |
CN110134786A (en) * | 2019-05-14 | 2019-08-16 | 南京大学 | A kind of short text classification method based on theme term vector and convolutional neural networks |
Non-Patent Citations (1)
Title |
---|
Web Services Classification Based;Hongfan Ye;《IEEE》;20190326;第43697-43706页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110717047A (en) | 2020-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110717047B (en) | Web service classification method based on graph convolution neural network | |
Devika et al. | Sentiment analysis: a comparative study on different approaches | |
CN109800310B (en) | Electric power operation and maintenance text analysis method based on structured expression | |
CN110427623A (en) | Semi-structured document Knowledge Extraction Method, device, electronic equipment and storage medium | |
CN110717332B (en) | News and case similarity calculation method based on asymmetric twin network | |
CN107122349A (en) | A kind of feature word of text extracting method based on word2vec LDA models | |
CN107180026B (en) | Event phrase learning method and device based on word embedding semantic mapping | |
Wahid et al. | Topic2Labels: A framework to annotate and classify the social media data through LDA topics and deep learning models for crisis response | |
CN113392209B (en) | Text clustering method based on artificial intelligence, related equipment and storage medium | |
Zobeidi et al. | Opinion mining in Persian language using a hybrid feature extraction approach based on convolutional neural network | |
Kaur | Incorporating sentimental analysis into development of a hybrid classification model: A comprehensive study | |
CN112732916A (en) | BERT-based multi-feature fusion fuzzy text classification model | |
CN112949713B (en) | Text emotion classification method based on complex network integrated learning | |
CN111126067B (en) | Entity relationship extraction method and device | |
CN112395421B (en) | Course label generation method and device, computer equipment and medium | |
CN115952292B (en) | Multi-label classification method, apparatus and computer readable medium | |
CN113312480A (en) | Scientific and technological thesis level multi-label classification method and device based on graph convolution network | |
CN111581943A (en) | Chinese-over-bilingual multi-document news viewpoint sentence identification method based on sentence association graph | |
CN108846033B (en) | Method and device for discovering specific domain vocabulary and training classifier | |
Chang et al. | A METHOD OF FINE-GRAINED SHORT TEXT SENTIMENT ANALYSIS BASED ON MACHINE LEARNING. | |
CN115859980A (en) | Semi-supervised named entity identification method, system and electronic equipment | |
CN114491062B (en) | Short text classification method integrating knowledge graph and topic model | |
CN116610818A (en) | Construction method and system of power transmission and transformation project knowledge base | |
Hashemzadeh et al. | Improving keyword extraction in multilingual texts. | |
CN113158659B (en) | Case-related property calculation method based on judicial text |
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 |