Mashup service clustering method based on feature semantic enhancement and graph contrastive learning

By combining singular value decomposition and standardization with non-functional entity word enhancement, along with graph contrastive learning and spectral clustering, the generation of representation vectors for Mashup services is optimized. This solves the problem of poor clustering quality in existing Mashup services and achieves higher-precision clustering results.

CN117421419BActive Publication Date: 2026-03-10NINGBO FULCRUM INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing Mashup service clustering methods suffer from anisotropy, semantic feature imbalance, and unclear category division in the generation of service function vectors, which affect the clustering quality.

Method used

A method based on singular value decomposition and standardization is adopted to correct the service function vector space distribution, and the feature semantics are enhanced by non-functional entity words. By combining graph contrastive learning and spectral clustering algorithms, a Mashup service association graph is constructed to optimize the generation of service representation vectors.

Benefits of technology

It improves the semantic feature balance and clustering accuracy of service function vectors, reduces the impact of feature overlap in the vector space, and enhances the quality of Mashup service clustering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117421419B_ABST
    Figure CN117421419B_ABST
Patent Text Reader

Abstract

The application discloses a Mashup service clustering method based on feature semantic enhancement and graph contrast learning. Mashup service data participating in clustering is preprocessed, then a service function vector is generated based on a singular value decomposition and a standardized space distribution correction method, and a feature semantic enhancement method of the service function vector is based on a non-functional entity word, a named entity recognition method is used to extract the non-functional entity word in the description text, and a feature semantic enhancement vector is constructed. The feature semantic enhancement vector and the service function vector are spliced; on this basis, two kinds of Mashup service association graphs facing sharing dependence are established, and a service function vector fusing a label association neighborhood feature and a fusion Web service association neighborhood feature is constructed. Finally, the two vectors are optimized through an infoNCE loss function, a service representation vector is constructed, and a spectral clustering algorithm is adopted to realize Mashup service clustering, so that the clustering quality can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cloud computing, specifically relating to a Mashup service clustering method based on feature semantic enhancement and graph contrastive learning. Background Technology

[0002] Currently, Web services have become the primary form of service organization on the network, widely used in the development and deployment of various service-oriented architectures. Web services have relatively small functional granularity, and a single Web service cannot meet complex business needs. Against this backdrop, Mashup services have been developed. A Mashup service is a value-added service that combines multiple Web services, integrating more data resources and providing richer business functions. While Mashup services offer users a wealth of choices, they also significantly increase the difficulty for users to find a Mashup service that meets their business needs.

[0003] Service clustering groups functionally similar Mashup services together into different service clusters, effectively reducing the service search space and is a commonly used method to improve service discovery efficiency. Service descriptions are the intuitive source of functional information for Mashup services. Mainstream service clustering methods typically employ topic models or neural network models to generate feature vectors (often called service function vectors) for service description documents, and then calculate the similarity of these service function vectors to achieve service clustering. In addition to extracting functional features from service descriptions, researchers often use graph neural network models to construct a network of relationships between services based on the call relationships between Mashup services and Web services. By aggregating the topological features of neighboring Mashup services, the density of the service's own functional features is improved. Related research results indicate that fully exploring and utilizing the structural relationships formed between Mashup services can improve the quality of clustering.

[0004] In current Mashup service clustering methods, the similarity of service function vectors is the main basis for clustering. Although various technologies focus on generating high-quality service function vectors, existing technical solutions generally face the following technical challenges during clustering, affecting the improvement of service clustering quality:

[0005] (1) In existing service function vector generation methods, BERT and its variant models are often used as the extraction model for function vectors. The generated service function vector space is anisotropic, which reduces the accuracy of service similarity calculation and is not conducive to improving the quality of service clustering.

[0006] (2) In existing service function vector generation methods, service descriptions are often expanded to improve the quality of service function vector generation by enriching the corpus used for service function vector generation. When expanding service descriptions, some words that express service functions are usually selected and expanded in a semantic enhancement manner (synonym replacement, back translation, label expansion). Although this type of method can improve the density of functional semantics, the improvement is limited and it is easy to cause an imbalance of semantic features in the generated service function vectors, thereby reducing the accuracy of service similarity calculation and hindering the improvement of service clustering quality.

[0007] (3) Mashup services exhibit diverse functions. Different categories of Mashup services may share some of the same business function characteristics. These business function characteristics can cause partial overlap in the generated service function vectors in the vector space, thereby affecting the category division during the clustering process and hindering the improvement of service clustering quality. Summary of the Invention

[0008] This invention addresses the shortcomings of existing technologies, such as poor service clustering quality and semantic feature imbalance, by proposing a Mashup service clustering method based on feature semantic enhancement and graph contrastive learning to effectively improve the quality of Mashup service clustering.

[0009] This invention is implemented using the following technical solution: a Mashup service clustering method based on feature semantic enhancement and graph contrastive learning, comprising the following steps:

[0010] Step A: Crawl Mashup services and Web services from the service registration platform, clean the obtained service data, and build a dataset suitable for clustering;

[0011] Step B: Construct service function vectors based on feature semantic enhancement;

[0012] Step B1: Generate Mashup service function vectors based on the singular value decomposition and standardized spatial distribution correction method;

[0013] Step B2: A method for enhancing the feature semantics of service function vectors based on non-functional entity words. This method uses named entity recognition to extract non-functional entity words from the descriptive text and constructs feature semantic enhancement vectors.

[0014] Step B3: Concatenate the feature semantic enhancement vector formed by the entity words in Step B2 with the Mashup service function vector in Step B1 to obtain the feature semantic enhancement Mashup service function vector.

[0015] Step C: Building upon Step B, and combining the crawled Mashup services and Web services, establish two types of Mashup service association graphs oriented towards shared dependencies: a shared tag association graph T_MAG and a shared Web service association graph S_MAG, and assign a Mashup service m... i Construct a service function vector Tu that integrates label-related neighborhood features. i And the service function vector Su that integrates the neighborhood features associated with Web services i ;

[0016] Step D: Optimize the vectors generated in the two association graphs in Step C using the infoNCE loss function to construct Mashup service representation vectors, and use the spectral clustering algorithm to achieve Mashup service clustering.

[0017] Furthermore, step B1 is specifically implemented in the following manner:

[0018] (1) Use the BERT model to generate function vectors for Mashup services and output an m*n matrix A, where m is the number of service function vectors and n is its dimension;

[0019] (2) Perform singular value decomposition on matrix A, sort the obtained singular values ​​from largest to smallest, take the eigenvectors corresponding to the top half of the singular values, and construct the dimension-reduced matrix A′ of A.

[0020] (3) Perform z-score normalization on each row vector in matrix A′ for Mashup service m i Its corresponding service function vector is h fi :

[0021]

[0022] Where a i ∈A is from the service description d i The function vector extracted from it, a i (mean) is the average value of the components in the function vector, a i (s) represents the standard deviation of the components in the function vector, h fi This is the corrected Mashup service function vector.

[0023] Furthermore, step B2 is specifically implemented in the following manner:

[0024] (1)m i .d={w1,w2,…,w n}∈D serves Mashup m i The description text for m iThe words in the .d file are tagged with part-of-speech tags to construct the current Mashup service m. i The non-functional entity word set NFW, denoted as m i .NFW={nfw1,nfw2,...,nfw k};

[0025] (2) For Mashup service m i Word2vec is used to vectorize non-functional entities in NFW, generating an entity word vector set HW, denoted as m. i .HW={hw1,hw2,...,hw k}, and introduces a self-attention mechanism to obtain the attention weight of each entity word vector in the feature semantic enhancement vector, and then sums all entity word vectors with their attention weights to obtain the service m. i Feature semantic enhancement vector:

[0026]

[0027] Among them, h nfwi hw is the feature semantic enhancement vector. j For m i Entity word vectors in .HW, aw-hw j Assign attention weights to it.

[0028] Furthermore, the construction of the shared tag association graph and the shared Web service association graph in step C is specifically carried out in the following manner:

[0029] Define label sharing: If there exists a label t such that t∈m i .T∩m j .T, then it is called Mashup service m i With service m j There is a shared tag association, denoted as: m i ~m j ;

[0030] Define Web service sharing: If there exists a Web service s such that s∈m i .S∩m j .S, then it is called Mashup service m i With service m j There is a shared web service association, denoted as:

[0031] Define a Mashup service relationship graph for tag-based sharing:

[0032] The association graph of a tag-sharing-oriented Mashup service is an undirected weighted graph T_MAG = (V, E, W), where:

[0033] (1) V = {v1, v2, ..., v} m} represents the set of Mashup service nodes, node v i Indicates Mashup service m i ;

[0034] (2) E={e ij} represents the set of edges associated with shared labels, e ij =(v i ,v j )∈E represents node v i With v j The corresponding Mashup service m i and m j Satisfy m i ~m j ;

[0035] (3) W = {w ij} is edge e ij The set of weights, where the weights are for the Mashup service m i With m j The number of common tags;

[0036] Define a Mashup service relationship graph for web service sharing:

[0037] The association graph of shared Mashup services for Web services is an undirected weighted graph S_MAG = (V, E, W), where:

[0038] (1) V = {v1, v2, ..., v} m} represents the set of Mashup service nodes, node v i Indicates Mashup service m i ;

[0039] (2) E={e ij} represents the set of edges associated with shared web services, e ij =(v i ,v j ) represents node v i With v j The corresponding Mashup service m i and m j satisfy

[0040] (3) W = {w ij Let} be the set of edge weights, where each weight is a Mashup service m. i With m j The number of web services called together.

[0041] Furthermore, the principle behind constructing the service function vector that integrates tag-related neighborhood features and the service function vector that integrates Web service-related neighborhood features in step C is as follows:

[0042] A network model, SOGAN, is established that integrates node and sequence second-order graph attention. The node sequence is sampled using the breadth-first traversal method of Node2vec. A node-sequence second-order attention mechanism is established to aggregate the features of neighboring nodes in a single sequence and the contextual structure features of nodes in different sequences, thereby optimizing the generation of graph embedding vectors for service nodes.

[0043] The following steps are used to process the Mashup service association graph T_MAG which is oriented towards shared dependencies:

[0044] (1) Node2vec is used to sample nodes using a breadth-first search approach, prioritizing nodes with high functional similarity in the node sequence. For node v i , respectively, generate a set of breadth-first walk sequences T(v) under T_MAG. i );

[0045] (2) Construct a second-order attention mechanism that includes node-level and sequence-level attention, node v i From the sequence set T(v) i The process of generating the embedding vector in ) is as follows:

[0046] First, optimize v through a node-level attention layer. i In T(v) i For each sequence of vectors, for node v in the q-th sequence j Calculate v j For v i Node-level attention weights; pair each node in the q-th sequence with v i The node-level attention weights are weighted and summed with their corresponding feature-enhanced service function vectors to obtain v in the q-th sequence. i Vectors optimized by node-level attention;

[0047] Then, through a sequence-level attention layer, v is obtained. i The final representation output Tu i :

[0048] Calculate the attention weights for each sequence. The sequence vector of the q-th sequence is defined as the mean vector of all services within the sequence after node-level attention optimization. T(v i The attention weight of each sequence in the algorithm is summed with its sequence vector, thus achieving the attention weight of v. i Second-order attention optimization is used to obtain the service function vector Tu that fuses label-related neighborhood features. i :

[0049]

[0050] in, This indicates that the h-th sequence pair v is obtained after normalization. i Sequence-level attention weights, It is the sequence vector of the h-th sequence, and is the mean vector of all services in the sequence after node-level attention optimization.

[0051] v is obtained using the same processing method i Service function vector Su that integrates Web service association neighborhood features in S_MAG i .

[0052] Furthermore, in step D, service representation vectors are generated based on graph contrastive learning:

[0053] (1) Construct positive and negative sample pairs for Mashup services: Let the total number of Mashup services be Nm. For Mashup service m i , will m i The vector Tu generated in T_MAG in step C i And the vector Su generated in S_MAG i Combining into positive sample pairs (Tu) i Su i ), Tu i Service function vector Tu that shares label-associated neighborhood features with other Mashup services j Form negative sample pairs, forming a negative sample pair set {(Tu i Tu j )}, where 1 <= i, j <= Nm, and i ≠ j;

[0054] (2) Model training yields service representation vectors:

[0055] The trainable parameters are iteratively updated using the infoNCE loss function. When the loss function converges, the Mashup service m is obtained. i The representation vector mrv i .

[0056] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0057] (1) A service function vector space distribution correction method based on singular value decomposition and standardization is proposed. Compared with existing methods, it can uniformly distribute the service function feature vector space, effectively alleviate the anisotropy of the vector space, and is more conducive to improving the accuracy of vector similarity calculation in the clustering process. In addition, it combines the method of enhancing the feature semantics of service function vectors based on non-functional entity words. The named entity recognition method is used to extract non-functional entity words in the descriptive text, and the feature semantic enhancement vector formed by the entity words is concatenated with the service function vector, which can effectively improve the semantic feature balance and feature discriminability of the service function vector.

[0058] (2) A weighted Mashup service association graph construction method from the perspective of shared dependencies is proposed. This method establishes the associations between Mashup services from the perspective of shared dependencies. Existing technical solutions mostly establish associations between Mashup services and Web services, but there are no technical solutions that use the association information between Mashup services for clustering. The Mashup service association graph established by this technical solution has the following advantages:

[0059] 1) The inclusion of the weights of associated edges allows nodes with high association strength to be sampled into the node sequence first when selecting nodes in the graph, providing a high-quality node sequence for the processing of the candidate graph attention network.

[0060] 2) Two types of Mashup service association graphs oriented towards shared dependencies were established: T_MAG and S_MAG. These two service association graphs provide a graph model foundation for subsequent graph comparison and learning.

[0061] In addition, a second-order graph attention network is constructed, which adds sequence-level attention on the basis of node-level attention and realizes the fusion of node-sequence attention. Compared with previous methods, it can not only aggregate the features of the neighboring nodes of the service node in a certain sequence, but also aggregate the contextual structure features of the node in different sequences due to different positions and different neighboring nodes, thus optimizing the vector representation quality of the node.

[0062] (3) A method for generating Mashup service representation vectors based on graph contrast learning is proposed. The vectors generated by the two association graphs are optimized by the infoNCE loss function to maximize the main functional features of the service. At the same time, the functional differences of the service are used to correct the distribution of functional features, effectively reducing the impact of some identical business features of different categories of Mashup services on clustering caused by feature overlap in the vector space, and improving the clustering quality. Attached Figure Description

[0063] Figure 1 This is a schematic diagram illustrating an example of a Web service described in an embodiment of the present invention;

[0064] Figure 2 This is a schematic diagram illustrating an example of the Mashup service described in an embodiment of the present invention;

[0065] Figure 3 This is a schematic diagram illustrating the feature aggregation implementation of SOGAN in an embodiment of the present invention;

[0066] Figure 4 This is a schematic diagram of the clustering method framework described in an embodiment of the present invention;

[0067] Figure 5 This is a schematic diagram of the clustering method described in an embodiment of the present invention. Detailed Implementation

[0068] To better understand the above-described objects, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the present invention; however, the present invention may be practiced in other ways than those described herein, and therefore, the present invention is not limited to the specific embodiments disclosed below.

[0069] This embodiment discloses a Mashup service clustering method based on feature semantic enhancement and graph contrastive learning, such as Figure 4 and Figure 5 As shown, it includes the following steps:

[0070] Step A: Crawl Mashup services and Web services from the service registration platform, clean the obtained service data, and build a dataset suitable for clustering;

[0071] Step B: Construct Mashup service function vectors based on feature semantic enhancement;

[0072] Step B1: Generate Mashup service function vectors based on the singular value decomposition and standardized service function vector space distribution correction method;

[0073] Step B2: A method for enhancing the feature semantics of service function vectors based on non-functional entity words. This method uses named entity recognition to extract non-functional entity words from the descriptive text and constructs feature semantic enhancement vectors.

[0074] Step B3: Concatenate the feature semantic enhancement vector formed by the entity words in Step B2 with the Mashup service function vector in Step B1;

[0075] Step C: Based on step B, and combining the crawled Mashup services, establish two Mashup service association graphs oriented towards shared dependencies: T_MAG and S_MAG, and construct service function vectors that integrate tag association neighborhood features and Web service association neighborhood features.

[0076] Step D: Optimize the vectors generated in the two association graphs in Step C using the infoNCE loss function to construct Mashup service representation vectors, and use the spectral clustering algorithm to achieve Mashup service clustering.

[0077] Specifically, the present invention will be described in detail below:

[0078] Step A: Data processing for Mashup services participating in clustering:

[0079] First, Mashup services and Web services are crawled from a service registry platform. The obtained data is then cleaned to construct a dataset suitable for clustering. A Mashup service consists of one or more Web services. Figure 1 This is an example of a Web API. Figure 2 This is a Mashup service example, and the relevant definitions are given below.

[0080] Definition 1. Web Service

[0081] A web service is defined as a quadruple, s = (Id, n, T, d), where Id is the identifier of the web service, n is the name, T is the set of tags, and d is the service description.

[0082] Definition 2. Mashup Service

[0083] A Mashup service is defined as a quintuple, m = (Id, n, T, d, S). Here, Id is the identifier of the Mashup service, n is the name of the Mashup service, T is the set of service tags, d is the service description, and S is the set of web services included in the Mashup service.

[0084] Compared to Mashup services, web services, in addition to having a service name, tags, and service function description, also include a set of related web services. Figure 2 Related APIs in the table.

[0085] Step B: Construct Mashup service function vectors based on semantic feature enhancement

[0086] Step B1: Generate Mashup service function vectors based on the singular value decomposition and standardized spatial distribution correction method;

[0087] Considering that the anisotropy of service function vectors generated by BERT and its variants affects the quality of service clustering, this embodiment constructs a service function vector spatial distribution correction method based on singular value decomposition and normalization to alleviate the anisotropy of service function vectors and improve the quality of service clustering. Specifically:

[0088] (1) Use BERT to generate function vectors for Mashup services

[0089] Let MD = {m1.d, m2.d, ..., m n .d} is the set of Mashup service description texts to be clustered. Using the BERT model, functional vectors are generated for all service descriptions. The output is an m*n dimensional matrix A, where m = 768 is the vector dimension of each service description, and n is the total number of services.

[0090] (2) Service function vector space distribution correction based on singular value decomposition and standardization

[0091] The SVD decomposition of matrix A is:

[0092] A=PΣZ T (1)

[0093] Let the i-th eigenvalue of A be λ. i For i∈[1,n], we can obtain the following from the properties of matrices:

[0094] (A T A)z i =λ i z i (2)

[0095] For each eigenvalue λ of A i Solve for the corresponding z according to the above formula. i This yields the eigenvector corresponding to the eigenvalue. Combining all n eigenvectors column-wise gives the Z matrix.

[0096] The process is the same as that for solving the Z matrix. The P matrix can be obtained according to formula (3).

[0097] (AA T )p i =λ1p i (3) At this point, the singular value decomposition of matrix A can be obtained as follows:

[0098]

[0099] In the singular value decomposition of a matrix, the sum of a small number of large singular values ​​usually accounts for more than 90% of the total sum of singular values. Therefore, in order to reduce the exacerbation of anisotropy caused by excessive spatial dimensionality and to retain most of the original vector information, this invention sorts the obtained singular values ​​from largest to smallest, takes the eigenvectors corresponding to the top half of the singular values, and constructs a dimensionality-reduced matrix A′ of A, which approximately describes the original matrix A, as shown in formula (5).

[0100]

[0101] Next, the vector is standardized using z-score, which transforms the mean of the vector to 0 and the standard deviation to 1, as shown in formula (6). For Mashup service m i Its corresponding service function vector is h fi .

[0102]

[0103] Where a i ∈A is the description of service m i The function vector extracted from .d, a i (mean) is the average value of the components in the function vector, a i (s) represents the standard deviation of the components in the function vector, h fi This is the corrected service function vector. Through the two transformations described above, the main characteristics of the vectors in the matrix are preserved, the anisotropy of the BERT vector space is significantly reduced, and the distribution of the vectors is optimized.

[0104] As can be seen, this embodiment effectively alleviates the anisotropy of service function vectors generated by BERT and its variants by constructing a service function vector space distribution correction method based on singular value decomposition and standardization. While preserving service function feature information as much as possible, it corrects the distribution of the service function feature vector space generated by BERT, making the service function feature vectors tend to be isotropic, which is beneficial for similarity matching of vectors during clustering and achieves higher quality clustering.

[0105] Step B2: A method for enhancing the feature semantics of service function vectors based on non-functional entity words. This involves using named entity recognition to extract non-functional entity words from the descriptive text and constructing a feature semantic enhancement vector.

[0106] (1) Feature extraction of non-functional entity words in Mashup service description text:

[0107] Traditional methods expand the descriptive corpus with functional words, which can improve the semantic feature density of service function vectors, but the improvement is limited and easily leads to semantic feature imbalance. To address these issues, this embodiment constructs a method to expand the service description corpus using non-functional entity words to improve the semantic feature balance and feature discriminability of service function vectors.

[0108] m i .d={w1,w2,…,w n}∈MD serves Mashup m i The service description text. First, use Stanford NLP tools to analyze m. iThe constituent words in the .d file are tagged with part-of-speech tags, and three categories of named entities—ORGANIZATION, NATIONALITY, and LOCATION—are extracted to construct the current Mashup service m. i The non-functional entity word set NFW, denoted as m i .NFW={nfw1,nfw2,...,nfw k}

[0109] (2) Enhance the feature semantics of service function vectors using non-functional entity words.

[0110] For Mashup service m i Using Word2vec for m i Non-functional entity word vectorization in .NFW generates an entity word vector set HW, denoted as m. i .HW={hw1,hw2,...,hw k}

[0111] Since different categories of entity words have varying effects on the semantic enhancement of service function vectors, this invention introduces a self-attention mechanism. Through training, the model acquires the attention weight of each entity word vector within the semantic enhancement vector. For entity words hw... j ∈m i .HW, 1<=j<=k:

[0112] as-hw j =sigmoid(W att hw j +b att (7)

[0113]

[0114] In formula (7), W att b is a trainable weight matrix att For the bias term, hw j For m i Entity word vectors in .HW. as-hw j hw, the entity word vector j Attention score, as-hw j After normalization using formula (8), its attention weight aw-hw in all entity word vectors is obtained. j The service m is obtained by summing all entity word vectors with their attention weights. i Feature semantic enhancement vector:

[0115]

[0116] Step B3: Concatenate the service function vector and the feature semantic enhancement vector to obtain m. i Feature semantic enhancement service function vector h fvi :

[0117] h fvi =h fi ||h nfwi (10)

[0118] Existing clustering methods primarily focus on enhancing functional features, neglecting the role of non-functional entity words. However, these non-functional entity words play a crucial role in improving clustering quality. For example, given similar functionalities, if services contain the non-functional entity word "google," they are likely related to Google and thus more likely to cluster together. Therefore, non-functional entity words can supplement the semantic features of services. This embodiment uses the Stanford NLP tool to extract entity words from the service description text, selecting three named entity words: ORGANIZATION, NATIONALITY, and LOCATION. These are all non-functional entity words, but other categories can be selected as needed. The extracted non-functional entity words are converted into vectors using Word2Vec. All word vectors of non-functional entity words are then passed through a self-attention mechanism layer to output a semantically enhanced vector for the service. Finally, the semantically enhanced vector is concatenated with the service function vector to form a semantically enhanced service function vector.

[0119] Step C: Construct service function vectors that integrate tag-related neighborhood features and service function vectors that integrate Web service-related neighborhood features.

[0120] Step C1: Construct a shared tag association graph and a shared web service association graph for Mashup services.

[0121] Definition 3. Tag Sharing

[0122] If there exists a label t such that t∈m i .T∩m j .T, then it is called Mashup service m i With service m j There is a shared tag association, denoted as: m i ~m j .

[0123] Definition 4. Web Service Sharing

[0124] If there exists a web service s such that s∈m i .S∩m j .S, then it is called Mashup service m iWith service m j There is a shared web service association, denoted as:

[0125] Definition 5. Tag-Sharing-Oriented Mashup Service Association Diagram

[0126] The association graph of a tag-sharing-oriented Mashup service is an undirected weighted graph T_MAG = (V, E, W), where:

[0127] (1) V = {v1, v2, ..., v} m} represents the set of Mashup service nodes, node v i Indicates Mashup service m i ;

[0128] (2) E={e ij} represents the set of edges associated with shared labels, e ij =(v i ,v j )∈E represents node v i With v j The corresponding Mashup service m i and m j Satisfy m i ~m j .

[0129] (3) W = {w ij} is edge e ij The set of weights, where the weights are for the Mashup service m i With m j The number of common tags.

[0130] Definition 6. Mashup service association diagram for Web service sharing

[0131] The association graph of shared Mashup services for Web services is an undirected weighted graph S_MAG = (V, E, W), where:

[0132] (1) V = {v1, v2, ..., v} m} represents the set of Mashup service nodes, node v i Indicates Mashup service m i ;

[0133] (2) E={e ij} represents the set of edges associated with shared web services, e ij =(v i ,v j ) represents node v i With v j The corresponding Mashup service m i and mj satisfy

[0134] (3) W = {w ij Let} be the set of edge weights, where each weight is a Mashup service m. i With m j The number of web services called together.

[0135] This embodiment proposes a method for constructing a weighted Mashup service association graph from the perspective of shared dependencies. It mines the shared tags and shared Web services of Mashup services, and establishes a weighted Mashup service association graph (T_MAG) oriented towards shared tags and a weighted Mashup service association graph (S_MAG) oriented towards shared Web services, respectively. In T_MAG, if two Mashup services have the same tag, a shared tag association edge is established, with the edge weight being the number of shared tags they possess. In S_MAG, if two Mashup services jointly call the same Web service, a shared Web service association edge is established, with the edge weight being the number of Web services jointly called by both services.

[0136] Step C2: Construct a second-order graph attention network. Use the service function vector with enhanced semantic features from step B as the initial vector of the graph node. Aggregate the functional features of the associated services for each Mashup service in the two shared association graphs to generate service function vectors that fuse the features of the two shared association neighborhoods.

[0137] For the two types of Mashup service association graphs oriented towards shared dependencies: T_MAG and S_MAG, the following steps are performed respectively:

[0138] (1) Node2vec is used to sample nodes using a breadth-first search approach, prioritizing nodes with high functional similarity in the node sequence. This node association feature helps to group similar Mashup service nodes into one category. For node v i , respectively, generate a set of breadth-first walk sequences T(v) under T_MAG. i ) and the set of breadth-walk sequences S(v) under S_MAG i ).

[0139] (2) Construct a second-order attention mechanism that includes node-level and sequence-level attention to optimize the generation of graph embedding vectors for service nodes.

[0140] Node-level attention optimizes the feature aggregation of a service node's functions with its neighboring nodes in its sequence. Since the position and neighboring nodes of the same node differ across sequences, they exhibit varying contextual structure information. Therefore, sequence-level attention is constructed to further aggregate the contextual structure features of Mashup service nodes across different sequences. The following details v i From the sequence set T(v) i The process of generating embedding vectors in ).

[0141] First, optimize v through a node-level attention layer. i In T(v) i The vector in each sequence of ). For the node v in the q-th sequence j Calculate v j For v i Node-level attention weights:

[0142]

[0143]

[0144] Among them, W n1 W t2 b is a trainable weight matrix node As the bias term, the above trainable parameters are related to T(v) i ) Shared by nodes in all sequences. fvi h fvj v i With v j The feature semantic enhancement service function vector, The number of nodes in the q-th sequence, as-node q i,j (t) is v j For v i The node-level attention score, after normalization, yields v. j For v i Node-level attention weights aw-node q i,j (t). This sequence contains each node pair v. i The node-level attention weights are weighted and summed with their corresponding feature-enhanced service function vectors to obtain v in the q-th sequence. i Vectors optimized by node-level attention:

[0145]

[0146] Next, through a sequence-level attention layer, we obtain v. i The final representation output Tu iThe process is as follows. First, the attention weight of each sequence is calculated. The calculation process of the attention weight of the qth sequence is shown in formulas (14)-(15):

[0147]

[0148]

[0149] Among them, z T seq Let X be a trainable sequence-level attention vector, T denote the vector transpose, and X be a trainable sequence-level attention vector. seq b are trainable weight parameters seq The bias vector is used, and the trainable parameters above are shared across all sequences. |T(v i )| is T(v i The total number of sequences in the set. For T(v) i The total number of nodes in the q-th sequence of the set. Let be the embedding vector of the j-th service in the q-th sequence after node-level attention optimization. For the q-th sequence pair node v i Sequence-level attention score, For the h-th sequence pair node v i The sequence-level attention score, h, is used for counting. After normalization, the q-th sequence pair v is obtained. i Sequence-level attention weights

[0150] The sequence vector of the q-th sequence is defined as the mean of the vectors of all services within the sequence after node-level attention optimization:

[0151]

[0152] T(v) i By summing the attention weights of each sequence in the sequence vector, we can achieve the desired attention for v. i Second-order attention optimization is used to obtain the service function vector Tu of shared label-related neighborhood features. i :

[0153]

[0154] The same processing method can obtain v i Service function vector Su that shares Web service association neighborhood features in S_MAG i Tu i with Su i The entire generation process is as follows Figure 3 As shown.

[0155] By establishing a network model that integrates node and sequence second-order graph attention: SOGAN (second-order graph attention network), this model uses the breadth-first traversal method of Node2vec to sample node sequences, establishes a node-sequence second-order attention mechanism, and aggregates the features of neighboring nodes in a single sequence and the contextual structure features of nodes in different sequences, which can optimize the vector representation quality of nodes.

[0156] Step D: Construct service representation vectors and use the spectral clustering algorithm to achieve Mashup service clustering;

[0157] Step D1: Generation of service representation vectors based on graph contrastive learning

[0158] Considering the diverse functionalities of Mashup services, there is partial overlap in the service function vectors between different categories of Mashup services in the vector space, affecting the category division during the clustering process. To address this issue, this embodiment constructs a service representation vector generation method for Mashup services based on graph contrastive learning. This method aims to maximize the main functional features of the services while utilizing differences in service functions to correct the distribution of functional features, effectively reducing the impact of overlap in some business functions among different categories of Mashup services on clustering.

[0159] (1) Construct positive and negative sample pairs for Mashup services

[0160] Let the total number of Mashup services be Nm, and for each Mashup service m... i , will m i The vector Tu generated in T_MAG in step C2 i And the vector Su generated in S_MAG i Combining into positive sample pairs (Tu) i Su i ). Tu i Service function vector Tu that shares label-associated neighborhood features with other Mashup services j Form negative sample pairs, forming a negative sample pair set {(Tu i Tu j )}, where 1<=i,j<=Nm, and i≠j.

[0161] (2) Model Training

[0162] The infoNCE loss function (info Noise Contrastive Estimation loss, explained upon its first appearance) is used to iteratively update the trainable parameters throughout the method. When the loss function converges, the Mashup service m is obtained. iThe representation vector mrv i .

[0163]

[0164] Among them, sim(h) i ,h j ) = h T i h j / ||h i ||·||h j || represents the cosine similarity function. In the fraction, the numerator is the cosine similarity of positive sample pairs, the denominator is the sum of the cosine similarities of negative sample pairs, and τ is the temperature hyperparameter. By adjusting the temperature hyperparameter, the sensitivity of the model in distinguishing the similarity between positive and negative samples is controlled. The lower the value of τ, the greater the difference between positive and negative samples in the generated vector, and the stronger the model's ability to capture the differences between different samples. This helps generate more discriminative Mashup service representation vectors to improve the accuracy of cluster partitioning. sim(h i ,h j Dividing by τ is equivalent to proportionally amplifying the logistic values ​​of positive and negative samples in the loss function, which can speed up the model convergence.

[0165] By using the service function vectors with enhanced semantic features as input to SOGAN, for a Mashup service, its output vectors in T_MAG and S_MAG are used as positive samples, and its vector in T_MAG and the vectors of other Mashup services in the T_MAG graph are used as negative samples. The service representation vectors of the Mashup service are generated by training with the infoNCE loss function.

[0166] Step D2: Using the spectral clustering algorithm, Mashup service clustering is implemented based on the generated service representation vectors.

[0167] (1) Construct the similarity matrix SM for Mashup services. The similarity of service representation vectors is calculated using the cosine similarity function. Mashup service m i With m j The cosine similarity is as follows, where T represents the vector transpose:

[0168]

[0169] (2) Construct the normalized Laplacian matrix. First, calculate the degree matrix, serving m. i In the graph formed by spectral clustering, the degree of a node is defined as the sum of the similarity weights of all nodes connected to that node:

[0170]

[0171] Nm represents the total number of Mashup services. The calculated degree matrix is ​​shown below:

[0172]

[0173] Next, the Laplace matrix LM = D - SM is calculated, and LM is standardized using formula (22):

[0174]

[0175] (3) Perform eigenvalue decomposition on the normalized Laplace matrix to obtain the eigenvalues. The eigenvalue decomposition formula is as follows:

[0176]

[0177] in, FV is the normalized Laplace matrix, Λ is its eigenvector matrix, and Λ is the eigenvalue matrix, with the diagonal elements of Λ being the eigenvalues.

[0178] (4) Perform clustering. Sort the eigenvalues ​​in ascending order, take the eigenvectors corresponding to the k smallest eigenvalues, normalize them, and combine them into a matrix FMRV = {fmrv1, fmrv2, ..., fmrv}. Nm The cluster set MC is output using the K-means algorithm based on FMRV.

[0179] The constructed spectral clustering algorithm, compared to the widely used K-means algorithm in service clustering, does not face the technical challenge of relying on the selection of initial cluster centers. K-means randomly selects cluster centers in the vector space, and different initial cluster centers lead to different clustering results. Due to the diversity of Mashup service functions, the feature distribution in the service function vectors becomes sparser, increasing the probability of inappropriate initial cluster center selection and greatly affecting the clustering effect. The spectral clustering algorithm reduces the dimensionality of the service function vectors and clusters based on the eigenvectors of the service Laplacian matrix. Each column of the eigenvector contains a cluster center. Due to the orthogonality of the eigenvectors, the cluster center represented by each eigenvector is independent of the cluster centers represented by other eigenvectors. Therefore, different initial cluster centers do not affect their independence and clustering results. This makes spectral clustering insensitive to the selection of initial cluster centers, resulting in higher stability and clustering quality.

[0180] Experimental Results and Analysis

[0181] The experiment used real services from the well-known web service registry website ProgrammableWeb as validation data. After crawling the registered Mashup services on the platform, data with short descriptions, duplicate registrations, or too few services in their respective categories were removed, leaving 4773 Mashup services. Because the built-in category information of ProgrammableWeb's Mashup services is inaccurate, 10 researchers were assigned to perform two rounds of classification. Finally, 4150 Mashup services belonging to 80 categories were retained, including 1018 component web services. The number of Mashup services in the dataset is shown in Table 1, and Table 2 shows the distribution of the number of Mashup services in different categories among the Top-20.

[0182] Table 1. Dataset Overview

[0183]

[0184] Table 2 Examples of Top-20 Mashup Service Categories

[0185]

[0186]

[0187] Table 3 Experimental Environment

[0188]

[0189] Commonly used clustering quality evaluation metrics, DBI, SC, NMI, and Purity, are used as the metrics for evaluating the clustering quality of the service in this paper. Among them, DBI and SC are internal metrics, while NMI and Purity are external evaluation metrics.

[0190] For ease of description, the basic symbols in the evaluation indicators are defined first, as shown in Table 4:

[0191] Table 4. Definitions of Basic Symbols for Clustering Indicators

[0192]

[0193] 1) Davies-Bouldin index (DBI)

[0194] The Distributed Intra-Cluster Bias (DBI) is calculated by dividing the sum of the average intra-cluster distances between any two clusters by the distance between the two cluster centers. The formula for this metric is as follows:

[0195]

[0196] Where, x i and x jThere are two clusters, where n is the number of clusters, and xc i It is a cluster x i Cluster center sample, σ i It is x i All samples in the cluster to v i The average distance, d(c i ,c j ) are two cluster center samples c i With c j The distance between them. The smaller the DBI value, the higher the clustering quality.

[0197] 2) Silhouette Coefficient (SC)

[0198] For a sample xs, let a(xs) be its average distance to other samples in the same class, and b(xs) be its average distance to the nearest sample in a different class. The silhouette coefficient of xs is given by formula (24). The higher the SC value, the better the clustering effect.

[0199]

[0200] 3) Normalized Mutual Information (NMI)

[0201] NMI is the normalization of mutual information (MI) score, and its calculation formula is as shown in (25).

[0202]

[0203] PT = {pt1, pt2, ..., pt k} represents the clustered sample category partitioning, YT={yt1,yt2,…,yt k} represents the true category division; mutual information (MI) can be used to calculate the correlation between PT and YT; H(PT) and H(YT) are the entropies of PT and YT, respectively, and F is the normalization function. The larger the NMI value, the better the clustering effect.

[0204] 4) Purity

[0205] Purity is defined as the proportion of correctly clustered samples out of the total sample. Its defining formula is:

[0206]

[0207] k is the total number of samples, X = {x1, x2, ..., x} l ,...,x n} represents the cluster set after clustering, YX={yx1,yx2,…,yx j,...,yx k} represents the set of real clusters, w l z represents all samples in the l-th cluster (without distinguishing between cluster center samples and non-cluster center samples). j This represents all samples from the j-th real cluster. The purity value ranges from [0,1], with a higher value indicating higher clustering quality.

[0208] (1) Performance comparison of service function vector generation methods

[0209] The methods formed by the technical improvements involved in this invention are named as follows:

[0210] (1) The BERT model is adopted and a service function vector generation method based on singular value decomposition and standardization of service function vector space distribution is introduced and named: SNBERT.

[0211] (2) The method of generating service function vectors with enhanced feature semantics by incorporating non-functional entity noun vectors into SNBERT is named: NF-SNBERT.

[0212] (3) Based on NF-SNBERT, a Mashup service association graph is established, and the method of generating the final service representation vector by graph comparison learning is named GCL-NF-SNBERT.

[0213] The above method is compared with commonly used service function vector generation models LDA, GSDMM, Bi-LSTM and BERT. The spectral clustering algorithm is used to verify that the technical improvement scheme proposed in this invention can effectively improve the quality of Mashup service clustering.

[0214] Different methods were used to generate service feature vectors for the service descriptions in datasets DS1 to DS3, and spectral clustering was performed. The evaluation metrics for each clustering are shown in Table 5.

[0215] Table 5 Performance Comparison of Service Function Vector Generation Methods

[0216]

[0217] Table 5 shows that the service feature vectors generated by the LDA method produce the worst Mashup service clustering quality. Compared to LDA, GSDMM is more suitable for extracting topic features from short texts, so the clustering quality of its generated feature vectors is significantly better than that of LDA. BERT is a pre-trained method based on neural networks that captures service description context information by processing the input in the forward and backward directions of the sequence. Compared to GSDMM, it can handle dependencies between words and performs better. The introduction of the self-attention mechanism allows it to capture the importance of different words in sentence vector generation, improving the quality of Mashup service feature vector generation.

[0218] However, BERT's vector space suffers from anisotropy, limiting its performance in similarity-based clustering tasks. SNBERT addresses this by introducing singular value decomposition and normalization methods to correct the distribution of BERT's function vector space, making it more isotropic and thus more conducive to similarity calculation. Clustering evaluation data from three datasets show that SNBERT outperforms BERT by an average of 6.08% in the DBI metric, and by an average of 3%, 7.15%, and 3.79% in the SC, NMI, and Purity metrics, respectively. Building on this, NF-SNBERT further incorporates non-functional entity word vectors to enhance the semantic features of service functions. This increases the feature density in the service function vectors without causing semantic imbalance, thereby further improving clustering quality. Clustering evaluation data from the three datasets show that, on the DBI metric, NF-SNBERT is 5.28% lower than SNBERT on average, and on the SC, NMI, and Purity metrics, it is 9.62%, 10.53%, and 7.43% higher than BERT on average, respectively.

[0219] The GCL-NF-SNBERT method optimizes the feature vectors of two association graphs through comparative learning. The mean clustering evaluation metrics on three datasets show that, compared to the NF-SNBERT method, it reduces the DBI metric by 15.2%, and improves SC, NMI, and Purity by 11.6%, 14.62%, and 13.76%, respectively, all outperforming the clustering results of the aforementioned comparative experiments. Therefore, the technical solution in this invention effectively solves the three technical challenges mentioned above and can construct high-quality Mashup service clusters.

[0220] (2) Comparison of GCL-NF-SNBERT method with other Mashup service clustering methods

[0221] To verify the advancement of our proposed method, we selected Mashup service clustering methods published in well-known domestic and international journals in recent years for comparison. These methods mainly include the following:

[0222] (1) AUG-LDA: All word vectors of the Mashup service are obtained through Word2vec, and K-means++ is used to cluster the words based on the word vectors to improve the topic feature selection of the LDA model. Finally, LDA is used to obtain the sentence vectors of the Mashup service, and the K-means++ algorithm is used to cluster the clusters for output.

[0223] (3) CWSR-K: Proposes a service clustering method based on Sentence-BERT. It uses the Sentence-BERT model, combining the advantages of Siamese networks and BERT. It can find semantically similar sentences and directly fine-tune BERT parameters based on these similar sentences, effectively analyzing the contextual features of words in sentences. This generates functional vectors that are close in the vector space for similar services, and uses the K-means algorithm to complete the clustering.

[0224] (3) Sim-LDA-SC: This method utilizes fuzzy hierarchical analysis to assess structural and semantic similarity between Mashup services. The SimRank algorithm is used to calculate structural similarity from the usage history of Mashups and Web services. LDA (Latent Dirichlet Allocation) is used to calculate semantic similarity from the mashup descriptions and tags. A genetic algorithm-based clustering algorithm is employed to cluster the Mashup services.

[0225] (4) TWE-NMF: A TWE-NMF model based on nonnegative matrix factorization is proposed for topic modeling of Mashup services. After normalizing the service description, a Dirichlet process hybrid model based on improved Gibbs sampling is used to automatically estimate the number of topics. Then, word embeddings and service tags are combined with nonnegative matrix factorization to solve the topic features of Mashup services, and the services are clustered by spectral clustering algorithm.

[0226] As shown in Table 6, GCL-NF-SNBERT achieved the highest scores across all four clustering evaluation metrics across the three datasets, indicating that the generated Mashup service clustering quality is superior to the comparative methods. Compared to the other four methods, the internal metric DBI decreased by 3.79%–10.02%, and the SC improved by 2.21%–11.14%, indicating that the clusters constructed using the proposed method have closer proximity between services within each cluster in the vector space, and the inter-cluster spacing is increased. The external metrics NMI and Purity improved by 3.45%–8.72% and 3.13%–11.53%, respectively, demonstrating that the accuracy of the Mashup service clustering is significantly higher than the other four methods, and the degree of agreement between the clustering results and the true service categories is significantly improved.

[0227] Table 6 compares the GCL-NF-SNBERT method with other service clustering methods.

[0228]

[0229]

[0230] Among the four methods, the AUG-LDA method has the lowest clustering quality. It first vectorizes all words describing the Mashup service and then improves LDA's topic feature selection through clustering. However, LDA is inherently unsuitable for extracting topic features from short texts in Mashup services, easily leading to loss of topic semantics and poor quality in terms of feature vector generation tools. Furthermore, it doesn't focus on extracting key feature words from the Mashup service, making LDA's topic feature improvement susceptible to noise words and hindering the improvement of clustering accuracy.

[0231] Compared to AUG-LDA, CWSR-K introduces a high-quality pre-trained model to generate feature vectors for services. The Siamese network allows for fine-tuning of parameters and the model within the Mashup service description. Compared to topic models, it can extract richer word contextual features, improving clustering quality. However, it does not improve feature density from a description expansion perspective; it lacks the integration of shared service tags and Web service features, focusing solely on sentence-based vector generation and using K-means for clustering. Therefore, the clustering quality still has room for improvement.

[0232] The Sim-LDA-SC method not only extracts Mashup service feature vectors from the descriptive text, but also uses the SimRank algorithm to perform clustering by combining the shared web service associations and functional semantic similarity calculations of Mashup services. Its advantage lies in extracting features of similar Mashup services at the association level to shorten their distance in the vector space. However, Sim-LDA-SC does not improve the density of service feature density at the text expansion level, resulting in sparse service topic features obtained by the LDA model. The lack of incorporation of label-shared associations makes it difficult to further improve its clustering accuracy.

[0233] The TWE-NMF method employs a Dirichlet process mixture model based on improved Gibbs sampling. Compared to LDA, this model is more suitable for extracting topic feature information from short texts and can automatically estimate the number of topics, thus reducing the influence of prior noise caused by manually selecting the number of topics. Clustering is achieved through spectral clustering, which, compared to the previous K-means method, allows for a more reasonable selection of the number of clusters and initial cluster centroids. However, its drawbacks are also obvious: TWE-NMF treats labels as supplementary features for individual services rather than discovering similar services to aggregate similar functional features; it does not consider the shared associations of Web services, making it impossible to further shorten the distance between Mashup services categorized by function in the vector space. These are all important factors hindering the improvement of its clustering accuracy.

[0234] Comparative experiments demonstrate that the proposed GCL-NF-SNBERT clustering method not only corrects the vector space distribution of the BERT model through singular value decomposition and normalization, but also enhances the feature density in service descriptions by extracting non-functional entity words based on Mashup service descriptions and clustering characteristics. Furthermore, considering the two crucial factors determining similar neighbors for Mashup services—label sharing and Web service sharing—a graph contrastive learning method is introduced. A second-order graph attention network is constructed to optimize the vectors of nodes in both graphs as positive and negative sample pairs. This data augmentation method aggregates the features of neighboring Mashup nodes before contrastive learning, thereby further shortening the distance between Mashup services in the vector space. Finally, spectral clustering achieves high-quality service cluster output. The overall performance of this method outperforms current popular service clustering methods.

[0235] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A Mashup service clustering method based on feature semantic enhancement and graph contrastive learning, characterized in that, The method comprises the following steps: Step A, crawling Mashup services and Web services from a service registration platform, performing data cleaning on the obtained services, and constructing a data set suitable for clustering; Step B, constructing a service function vector based on feature semantic enhancement; Step B1, generating a Mashup service function vector based on a singular value decomposition and a space distribution correction method; Step B2, a method for enhancing the feature semantics of the service function vector based on non-functional entity words, using a named entity recognition method to extract non-functional entity words in the description text, and constructing a feature semantic enhancement vector; Step B3, splicing the feature semantic enhancement vector formed by the entity words in step B2 and the Mashup service function vector in step B1 to obtain a feature semantic enhancement Mashup service function vector; Step C, on the basis of step B, combining the crawled Mashup services and Web services, establishing two Mashup service association graphs facing sharing dependence: a shared label association graph T_MAG and a shared Web service association graph S_MAG, and constructing a service function vector fused with label association neighborhood features and a service function vector fused with Web service association neighborhood features; Step D, optimizing the vectors generated in the two association graphs in step C through an infoNCE loss function, constructing a Mashup service representation vector, and using a spectral clustering algorithm to realize Mashup service clustering. 2.The Mashup service clustering method based on feature semantic enhancement and graph contrastive learning according to claim 1, wherein: The step B1 is specifically implemented in the following manner: (1) generating a function vector for the Mashup service using a BERT model, outputting an m*n matrix A, where m is the number of service function vectors and n is the dimension thereof; (2) performing singular value decomposition on the matrix A, sorting the obtained singular values from large to small, and taking the feature vectors corresponding to the top half of the singular values to construct a dimension-reduced matrix A' of A; (3) z-score standardization is performed on each row vector in matrix A', for Mashup service m i , and its corresponding service function vector is h fi : where a i ∈A is the function vector extracted from the service description d i i (mean) is the mean value of the components in the function vector, a i (s) is the standard deviation of the components in the function vector, h fi is the corrected Mashup service function vector.​ 3.The Mashup service clustering method based on feature semantic enhancement and graph contrastive learning according to claim 2, characterized in that: The step B2 is specifically implemented in the following manner: (1) Set m i .d = {w1, w2, …, w n} ∈ D is a description text of a Mashup service, and m i .d is the set of component words in the description text of the Mashup service m i , and the set of non-functional entity words of the current Mashup service m i is denoted as m k .NFW = {nfw1, nfw2, …, nfw (2) For Mashup service m i , using Word2vec to vectorize non-functional entity words in NFW, generate entity word vector set HW, denoted as m i .HW={hw1,hw2,...,hw k}, and introduce self-attention mechanism to obtain the attention weight of each entity word vector in the feature semantic enhancement vector. Weighted sum of all entity word vectors and their attention weights to get the feature semantic enhancement vector of service m i : wherein h nfwi is the feature semantic enhanced vector, hw j is the m i entity word vector in Hw, aw-hw j is its attention weight. 4.The Mashup service clustering method based on feature semantic enhancement and graph contrastive learning of claim 1, wherein: The shared label association graph and the shared Web service association graph in step C are constructed in the following manner: Definition Tag sharing: there exists a tag t such that t∈m i .T∩m j .T, then Mashup service m i is said to share a tag with service m j if there exists a shared tag association, denoted as: m i ~m j ; Definition of Web service sharing: There exists a Web service s such that s e m i .S∩m j .S, then the Mashup service m i is said to share Web service m j There exists a shared Web service association, denoted as: Define a Mashup service association graph facing label sharing: The Mashup service association graph facing label sharing is an undirected weighted graph T_MAG=(V, E, W), wherein: (1) V = {v1, v2,..., v m} is a Mashup service node set, node v i represents a Mashup service m i ; (2) E = {e ij}} is a set of shared tag associated edges, e ij = (v i ,v j ) E represents that the node v i and v j corresponding Mashup service m i and m j satisfy m i ~ m j ; (3) W = {w ij} is the weight set of edge e ij , the weight is the number of common tags of Mashup service m i and m j . Define a Mashup service association graph facing Web service sharing: The Mashup service association graph facing Web service sharing is an undirected weighted graph S_MAG=(V, E, W), wherein: (1) V = {v1, v2,..., vn} is a Mashup service node set, node v m represents the Mashup service m i ; v = {v1, v2,..., vn} is a Mashup service node set, node v i represents the Mashup service m (2) E = {e ij} is the edge set associated with the shared Web service, e ij = (v i ,v j ) represents that the Mashup services m i and m j corresponding to the nodes v i and v j satisfy (3) W = {w ij} is the weight set of edges, the weight is Mashup service m i The number of Web services invoked jointly with m j ​ 5.The Mashup service clustering method based on feature semantic enhancement and graph contrastive learning of claim 1, wherein: The principle of constructing the service function vector fused with label association neighborhood features and the service function vector fused with Web service association neighborhood features in step C is as follows: A network model SOGAN is established to fuse node and sequence second-order graph attention, node sequences are sampled using a breadth-first walk traversal method of Node2vec, a node-sequence second-order attention mechanism is established, neighborhood node features of a node in a single sequence and context structure features of the node in different sequences are aggregated, and graph embedding vector generation of a service node is optimized. 6.The Mashup service clustering method based on feature semantic enhancement and graph contrastive learning according to claim 5, characterized in that: In step C, the Mashup service association graph T_MAG facing sharing dependence is processed in the following steps: (1) Node2vec is used to sample nodes in the manner of breadth walk traversal, and nodes with high functional similarity are preferentially included in the node sequence. For node v i , a set of breadth walk sequences T(v i ) under T_MAG is generated respectively; (2) Construct a second-order attention mechanism containing node level and sequence level, node v i From the sequence set T(v i ) to generate an embedding vector: First, through the node-level attention layer, the v i is optimized i In each sequence of T(v j ), the node-level attention weight of v j to v i is calculated; the node-level attention weight of each node in the qth sequence to v i is weighted and summed with the corresponding feature-enhanced service function vector to obtain the node-level attention-optimized vector of v i in the qth sequence Then, by the sequence-level attention layer, get v i the final representation output Tu i : The attention weight of each sequence is calculated, and the sequence vector of the qth sequence is defined as the vector mean of all service nodes in the sequence after the node-level attention optimization. The attention weight of each sequence in T(v i ) is weighted and summed with its sequence vector, that is, the second-order attention optimization of v i is realized, and the service function vector Tu i that fuses the label-related neighborhood features is obtained. wherein, represents the normalized h-th sequence pair v i sequence-level attention weight of the h-th sequence, is the sequence vector of the h-th sequence, and is the vector mean of all service nodes in the sequence after the sequence-level attention optimization. The same processing method is used to obtain v i In S_MAG, the service function vector Su of the Web service associated neighborhood feature is fused i .

7. The Mashup service clustering method based on feature semantic enhancement and graph contrastive learning according to claim 1, characterized in that: In the step D, the service representation vector is generated based on the graph contrastive learning: (1) Construct positive and negative sample pairs for Mashup services: Let the total number of Mashup services be Nm. For Mashup service m i , will m i The vector Tu generated in T_MAG in step C i And the vector Su generated in S_MAG i Combining into positive sample pairs (Tu) i Su i ), Tu i Service function vector Tu, which shares label-related neighborhood features with other Mashup services j Form negative sample pairs, forming a negative sample pair set {(Tu i Tu j )}, where 1 <= i, j <= Nm, and i ≠ j; (2) Model training to obtain the service representation vector The trainable parameters are iteratively updated using an infoNCE loss function, and when the loss function converges, a representation vector mrv i of the Mashup service m i is obtained.