WO2019201068A1 - 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 - Google Patents
一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 Download PDFInfo
- Publication number
- WO2019201068A1 WO2019201068A1 PCT/CN2019/079967 CN2019079967W WO2019201068A1 WO 2019201068 A1 WO2019201068 A1 WO 2019201068A1 CN 2019079967 W CN2019079967 W CN 2019079967W WO 2019201068 A1 WO2019201068 A1 WO 2019201068A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- word
- service
- word embedding
- query
- embedding
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/088—Non-supervised learning, e.g. competitive learning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Definitions
- the present invention relates to the field of service computing technologies, and in particular, to a semantic sparse Web service discovery method based on Gaussian ATM and word embedding.
- the present invention provides a semantic sparse Web service discovery method based on Gaussian ATM and word embedding.
- a semantic sparse Web service discovery method based on Gaussian ATM and word embedding comprising the following steps
- Step 1 collecting the Web service description document, parsing the collected Web service description document, obtaining the feature vocabulary in the Web service description document, and pre-processing the feature vocabulary in the Web service description document to obtain a group a collection of prototype words;
- Step 2 Use a set of words embedded in word prototype training model trained Word2V eC obtained in Step 1, to obtain a continuous prototype vector set of words each word representation;
- the ATM model trains the set of prototype words obtained in step 1 to obtain a hierarchical structure of each web service
- Step 3 using the set of consecutive vectors obtained by the step 2 training to enrich the user query, and obtaining the extended user query;
- the web service description document described in step 1 is derived from a web service registration center or a web service portal that can be accessed.
- the preprocessing in the step 1 includes removing the stop word, obtaining the word root and expanding the abbreviation
- the step 2 the specific implementation includes the following sub-steps:
- Step 2.1 Use Word2V eC prototype model training set of words, each word to obtain a continuous word embedded expression
- Step 2.2 Mapping based on the word embedding obtained in step 2.1, traversing each word in the service description, if the word is embedded in the expression set, directly using the word embedding instead of the word; if the word is not in the word embedding expression In the collection, the word will be discarded;
- the words in the service description are converted into word embedding expressions, thereby representing the service features into the continuous word embedding space, and constructing inputs for the word embedding topic model Gaussian ATM;
- Step 2.3 embedding the word description of the service description obtained in step 2.2 as input, based on Gaussian ATM, mining service knowledge, constructing service-tag, label-topic and topic-word embedding distribution, based on the above three distributions, Service-tag-topic-word embedding hierarchical model to organize services into different topics
- the step 2.3 includes the following sub-steps:
- Step 2.3.1 In Gaussian ATM, each word
- the subject-word embedding hierarchy is established by the multivariate Gaussian distribution
- Step 2.3.2 Each service document can be treated as a uniform distribution of labels, and their distribution is pre-observable, and the service-label distribution can be obtained directly by using a uniformly distributed calculation formula;
- Step 2.3.3 Each topic belongs to a different tag.
- the way to create a tag-topic hierarchy is similar to step 2.3.1.
- the prior distribution of each topic is a Dirichlet distribution with parameters, and the words are embedded in the tag.
- the value of the converged parameter is obtained after Gibbs sampling, and thus according to the parameter
- Step 2.3.4 After step 2.3.3, the words, word embedding, tags, topics, and service documents have the following relationship: Each word has a corresponding word embedding, and each word embedding belongs to a different topic, each The topics are subordinate to different tags, each tag belongs to a different service. According to the above relationship, the obtained service-label, tag-topic, topic-word embedding distribution is input as input, and the service-tag-topic-word embedding is established. A hierarchical model that organizes services into different potential topics.
- step 3 the following sub-steps are specifically included:
- Step 3.1 According to the query feature expression, use the continuous word embedded expression trained in step 2.1, traverse each word in the user query, if the word is embedded in the expression set, directly use the word embedding instead of the word; Not in the word embedding expression set, the word will be discarded; mapping the user query to a continuously expressed word embedding, providing support for query embedding based on word embedding and service discovery based on word embedding topic model;
- Step 3.2 According to the word embedded representation obtained by the user query in step 3.1 as an input, and setting a similarity threshold, traversing each word embedded in the input, and retrieving a word whose similarity with the word embedding exceeds a predetermined threshold Embed, embed the word as an extension, and repeat the process until all the words in the input are embedded The input is traversed once, and finally the user query vector after the addition of the extended word is returned;
- Step 3.3 The user query expressed by the word embedding will be mapped to the similarity degree of the same service based on a probabilistic expression, and the similarity of the word embedding with the subject can be obtained according to the service-topic-word embedding hierarchy:
- the number of topics indicates the degree of similarity between the query and the service, which will be used to provide the user with the basis for matching and sorting the service;
- the magnitude of the probability will be used to provide the user with the basis for service matching and sorting
- z f is a potential feature
- 0 is the word embedding included in the query
- the value of the query indicates how similar the query is to the service and will be used to provide the user with the basis for service matching and sorting.
- the present invention has the beneficial effects of:
- the service description feature expression method based on the "word bag” model has the problem of "excessive number of dimensions".
- the method maps the expression of the service description to a fixed-length word embedding space by introducing a word embedding model. Ensuring the dimension of the service description feature, this method can also use word embedding while ensuring dimension determination Semantic similarity features enhance the semantics of service descriptions;
- the service level established by the learning method can be used for the hierarchical organization of the Web service, thereby supporting semantic sparse Web service discovery, and has wide applicability.
- 1 is a schematic flow chart of a semantic sparse web service discovery method based on Gaussian ATM and word embedding.
- FIG. 2 is a schematic diagram of a hierarchy of Web services generated by Gaussian ATM.
- FIG. 3 is a web service hierarchy obtained after running step 2.
- a semantic sparse Web service discovery method based on Gaussian ATM and word embedding includes the following steps:
- Step 1 Collect a Web service description document, parse the collected Web service description document, obtain a feature vocabulary in the Web service description document, and preprocess the feature vocabulary in the Web service description document to obtain a group.
- the web service description document is derived from a web service registry or web service portal that can be accessed.
- Pre-processing includes removing stop words, obtaining word roots, and augmenting abbreviations.
- Step 2 Use a set of words embedded in word prototype training model trained Word2V eC obtained in Step 1, to obtain a continuous prototype vector set of words each word representation;
- the Gaussian ATM (Author-Topic-Model) model is used to train the set of prototype words obtained in step 1 to obtain a hierarchical structure of each Web service.
- Step 2.1 Use Word2V eC prototype model training set of words, to obtain a continuous word of each word embedded Into the expression;
- Step 2.2 Mapping based on the word embedding obtained in step 2.1, traversing each word in the service description, if the word is embedded in the expression set, directly using the word embedding instead of the word; if the word is not in the word embedding expression In the collection, the word will be discarded;
- the words in the service description are converted into word embedding expressions, thereby representing the service features into the continuous word embedding space, and constructing inputs for the word embedding topic model Gaussian ATM;
- Step 2.3 embedding the word description of the service description obtained in step 2.2 as input, based on Gaussian ATM, mining service knowledge, constructing service-tag, label-topic and topic-word embedding distribution, based on the above three distributions, Service-tag-topic-word embedding hierarchical model to organize services into different topics
- Step 2.3 specifically comprising the following sub-steps:
- Step 2.3.1 In Gaussian ATM, each word
- covariance is Using the word embedding expression of the service as input, after Gibbs sampling, after the algorithm runs to converge, the subject-word embedding hierarchy is established through the multivariate Gaussian distribution;
- Step 2.3.2 Each service document can be treated as a uniform distribution of labels, and their distribution is pre-observable, and the service-label distribution can be obtained directly by using a uniformly distributed calculation formula;
- Step 2.3.3 Each topic belongs to a different label.
- the way to create a label-topic hierarchy is similar to the step 2.3.1.
- the prior distribution of each topic is a parameter of
- Step 2.3.4 After step 2.3.3, words, word embedding, tags, topics, and service documents have the following relationship: Each word has a corresponding word embedding, and each word embedding belongs to a different topic, each The topics are subordinate to different tags, each tag belongs to a different service. According to the above relationship, the obtained service-label, tag-topic, topic-word embedding distribution is input as input, and the service-tag-topic-word embedding is established.
- a hierarchical model that organizes services into different potential topics.
- FIG. 2 is a schematic diagram of a generated service hierarchy model after performing the Gaussian ATM algorithm of the present invention.
- each word has a corresponding word embedding, and each word embedding belongs to a different subject, each subject belongs to a different label, and each label belongs to a different service.
- users can provide a flexible service query experience. For example, services that are similar in word distribution can be grouped into the same topic to cluster services based on the topic. Reduce query space by querying services on clusters to improve query efficiency.
- this hierarchy to establish a probabilistic service discovery method.
- Step 3 Enrich the user query using the set of continuous vectors trained in step 2, obtain an extension to utilize the service hierarchy obtained in step 2, and use the probability ranking method to obtain a user query for the extension. Corresponding query output.
- Step 3.1 According to the query feature expression, use the continuous word embedded expression trained in step 2.1, traverse each word in the user query, if the word is embedded in the expression set, directly use the word embedding instead of the word; Not in the word embedding expression set, the word will be discarded; mapping the user query to a continuously expressed word embedding, providing support for query embedding based on word embedding and service discovery based on word embedding topic model;
- Step 3.2 According to the word embedded representation obtained by the user query in step 3.1 as an input, and setting a similarity threshold, traversing each word embedded in the input, and retrieving a word whose similarity with the word embedding exceeds a predetermined threshold Embedding, embedding the word as an extended word, repeating the process until all the word embedding in the input is traversed, and finally returning the user query vector after the addition of the extended word;
- Step 3.3 The user query expressed by the word embedding will be mapped to the similarity degree of the same service based on a probabilistic expression, and the similarity of the word embedding with the subject can be obtained according to the service-topic-word embedding hierarchy:
- the number of topics indicates the degree of similarity between the query and the service, which will be used to provide the user with the basis for matching and sorting the service;
- the magnitude of the probability will be used to provide the user with the basis for service matching and sorting
- the value of the query indicates how similar the query is to the service and will be used to provide the user with the basis for service matching and sorting.
- the PWeb website is a well-known mashup and Web service registry that is publicly accessible on the Internet. As of May 1, 2016, there are more than 15,000 registered Web services, including SOAP, REST, and XML-RPC. Web API, and provides some registration information for API services, such as API descriptions, names, tags, and so on. For API services that use the SOAP protocol, a WSDL document describing the Web service is also provided.
- step 1 is performed, and the natural semantic description of the service in the fields of Weather, Gove mment, and the like is collected from the website using the open API provided by the PWeb website, and preprocessed.
- the collected Web service description document is parsed, specifically: parsing each collected web service description document, extracting all core feature words in the document, and further processing the vocabulary, including stems Restore, acronym expansion, etc.
- step 2 is performed to establish a continuous vector representation of each word using the training feature word set of the word2 veC distributed representation method.
- the system After calling word2 veC , the system will get the results shown in Table 1.
- Each word is given a continuous vector expression, the length of the vector can be selected, in this case the selection vector length is 50.
- Table 1 uses the word2vec method, the continuous vector expression of the word
- the Gaussian ATM model After training to obtain a continuous representation of each word, the Gaussian ATM model is used to establish the level of the Web service.
- the established service-thematic hierarchy is shown in Table 2.
- Table 2 uses the Gaussian ATM method to establish a service-label hierarchy
- Table 3 uses the Gaussian ATM method to create a label-thematic hierarchy
- Table 4 uses the Gaussian ATM method to establish the topical embedding level
- Step 3 is then performed to extend the user query using the similarities of the continuous vectors. For example, design expands to design + plan.
- the query output corresponding to the user query after the extension is obtained, and the final returned result is shown in Table 5.
- Table 5 query and system compilation results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Signal Processing (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供了一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法,按如下顺序进行:收集Web服务描述文档,对收集的Web服务描述文档进行解析,得到Web服务描述文档中的特征词汇,并对Web服务描述文档中的词汇进行预处理,得到一组原型单词的集合;使用词嵌入训练模型Word2Vec训练原型单词的集合,得到原型单词的集合中每个单词的连续向量表示;使用Gaussian ATM模型得到的原型单词的集合进行训练,获得每个Web服务层次结构;使用训练得到的连续向量的集合丰富用户查询,得到扩展以后的用户查询;利用得到的服务层次结构,使用概率排序方法,得到针对扩展之后用户查询所对应的查询输出。本发明提供的方法能实现准确、高效的Web服务发现。
Description
一种基于 Gaussian ATM和词嵌入的语义稀疏 W eb服务发 现方法
技术领域
[0001] 本发明涉及服务计算技术领域, 具体涉及一种基于 Gaussian ATM和词嵌入的语 义稀疏 Web服务发现方法。
背景技术
[0002] 在信息化日益普及的今天, 互联网的软件体系结构和其计算环境发生着急剧的 变化, 促成了基于互联网体系的软件服务开发的发展和普及。 在多变的软件服 务环境下, 由于各种计算资源具有高度分布和自治的根本特征, 所以软件系统 的开发将会面临新挑战。 可以使用基于面向服务思想的 Web架构解决这种具有动 态、 多变和复杂的疑难问题, 于是伴随着利用面向服务思想设计的架构和软件 集为一体的服务技术快速发展, 运用面向服务思想的软件开发开始迅速地发展 起来。 在这种环境发展下, 互联网上 Web服务的规模开始迅速扩大, 如 WWW 2008的论文中统计发现: 从 2006年 10月到 2007年 10月约一年的时间里, 利用搜 索引擎得到的 WSDL服务的数量同比增长了 286%。 并且从 2011年 6月 20日到 2014 年 4月 21日, 世界著名服务注册网站 ProgrammableWeb上的接收到的服务数目一 直在稳步增长, 并在不到三年的时间里服务数目由 3261个增长为 11222个, 其增 长幅度已经达到 244%。 此外, 越来越多的企业也通过碎片化拆分和封装把原来 的遗留软件系统转换为 Web服务并部署到网络上。 出于这样的原因, Web服务规 模不断剧增, 使大众用户难以准确、 高效地发现 Web服务。 同时, 互联网上发布 的 Web服务不论是利用 XML进行描述的还是利用自然语言描述的服务, 都存在 着其描述特征词汇较少 (例如 PWeb中的服务描述特征词小于 100个的占 70%以上 ) , 并且在转换之后的特征词汇统计信息存在不足的问题。 这种语义稀疏的现 象使相似度计算无法有效的进行, 此问题给次基于关键字的搜索方法带来了新 的难题。
[0003] 因此, 在互联网 Web服务的规模化持续增长的环境下, 如何根据现有的 Web服
务描述语义稀疏的特点来进行准确、 高效的 Web服务发现, 是现在服务计算领域 中一个亟需解决的关键技术问题。
发明概述
技术问题
问题的解决方案
技术解决方案
[0004] 针对现有的 Web服务描述语义稀疏的特点, 为了能实现准确、 高效的 Web服务 发现, 本发明提供了一种基于 Gaussian ATM和词嵌入的语义稀疏 Web服务发现 方法。
[0005] 本发明采用以下的技术方案:
[0006] 一种基于 Gaussian ATM和词嵌入的语义稀疏 Web服务发现方法, 包括以下步骤
[0007] 步骤 1 : 收集 Web服务描述文档, 对收集的 Web服务描述文档进行解析, 得到 W eb服务描述文档中的特征词汇, 并对 Web服务描述文档中的特征词汇进行预处理 , 得到一组原型单词的集合;
[0008] 步骤 2: 使用词嵌入训练模型 Word2VeC训练步骤 1中得到的原型单词的集合, 得到原型单词的集合中每个单词的连续向量表示;
[0009] 使用 Gaussian
ATM模型对步骤 1中得到的原型单词的集合进行训练, 获得每个 Web服务的层次 结构;
[0010] 步骤 3: 使用步骤 2训练得到的连续向量的集合丰富用户查询, 得到扩展以后的 用户查询;
[0011] 利用步骤 2得到的服务层次结构, 使用概率排序方法, 得到针对扩展之后用户 查询所对应的查询输出。
[0012] 优选地, 步骤 1中所述的 Web服务描述文档来源于能够被访问的 Web服务注册 中心或 Web服务门户网站。
[0013] 优选地, 所述步骤 1中的预处理包括去除停用词、 取得单词词根和扩充缩写词
[0014] 优选地, 所述的步骤 2, 其具体实现包括以下子步骤:
[0015] 步骤 2.1 : 使用 Word2VeC模型训练原型单词的集合, 得到每个单词的连续词嵌 入表达;
[0016] 步骤 2.2: 基于步骤 2.1中得到的词嵌入进行映射, 遍历服务描述中的每一个单 词, 如果单词在词嵌入表达集合中, 则直接使用词嵌入代替该单词; 如果单词 不在词嵌入表达集合中, 该单词将被丢弃;
[0017] 经过多次迭代将服务描述中的单词转换成为词嵌入表达, 从而将服务特征表示 到连续词嵌入空间, 为词嵌入主题模型 Gaussian ATM构建输入;
[0018] 步骤 2.3: 以步骤 2.2得到的服务描述的词嵌入表示为输入, 基于 Gaussian ATM , 挖掘服务知识, 构建服务-标签、 标签-主题和主题-词嵌入分布, 基于上述三 个分布, 建立服务 -标签 -主题 -词嵌入层次模型, 从而将服务组织到不同的主题
[0019] 优选地, 所述步骤 2.3 , 具体包括以下子步骤:
[0020] 步骤 2.3.1 : 在 Gaussian ATM中, 每个单词
W
, 其中
M
表示词嵌入的长度, 这样每个单词就被表示到一个
维的连续空间, 而每个主题
z
就被表示成词嵌入
V:
上的一个多元高斯分布, 其中均值为
, 协方差为
E.
, 以服务的词嵌入表达作为输入, 经过 Gibbs抽样, 算法运行收敛之后, 通过该 多元高斯分布, 建立主题-词嵌入层次;
[0021] 步骤 2.3.2: 每个服务文档可以当作标签的均匀分布, 它们的分布是预先可观测 的, 直接利用均匀分布的计算公式可以获得服务 -标签分布;
[0022] 步骤 2.3.3: 每个主题属于不同的标签, 建立标签-主题层次的方式与步骤 2.3.1 类似, 每个主题的先验分布为参数为 的 Dirichlet分布, 以标签的词嵌入表达作为输入, 经过 Gibbs抽样之后得到收敛 后的参数值, 从而根据参数
获得标签 -主题分布;
[0023] 步骤 2.3.4: 步骤 2.3.3之后, 单词、 词嵌入、 标签、 主题和服务文档存在如下关 系: 每个单词都有一个对应的词嵌入, 每个词嵌入属于不同的主题, 每个主题 又隶属于不同的标签, 每个标签又属于不同的服务, 根据上述关系, 以获得的 服务-标签、 标签-主题、 主题-词嵌入分布作为输入, 建立服务 -标签 -主题 -词嵌 入层次模型, 从而将服务组织到不同的潜在主题。
[0024] 优选地, 所述步骤 3中, 具体包括以下子步骤:
[0025] 步骤 3.1 : 根据查询特征表达, 使用步骤 2.1训练的连续词嵌入表达, 遍历用户 查询中的每一个单词, 如果单词在词嵌入表达集合中, 则直接使用词嵌入代替 该单词; 如果单词不在词嵌入表达集合中, 该单词将被丢弃; 将用户查询映射 为连续表达的词嵌入, 为基于词嵌入的查询语义扩充和基于词嵌入主题模型的 服务发现提供支持;
[0026] 步骤 3.2: 根据步骤 3.1中获得用户查询的词嵌入表示作为输入, 并设定一个相 似度阈值, 遍历输入中的每一个词嵌入, 检索与该词嵌入的相似度超过预定阈 值的词嵌入, 将该词嵌入作为扩充词保留, 重复该过程直至输入中所有的词嵌
入都被遍历一遍, 最后返回添加了扩充词之后的用户查询向量;
[0027] 步骤 3.3: 词嵌入表达的用户查询将基于一种概率表达映射为同服务的相似程度 , 根据服务-主题-词嵌入层次结构可以获得词嵌入同主题的相似度:
P{e | z)
, 每个查询
0 同主题的相似度能够表示为公式 (1):
[0028]
HQ 1 z /》 = n W 》
( 1)
[0029] 其中
为主题,
为查询中包含的词嵌入;
[0030] 同样根据服务 -主题 -词嵌入层次结构, 可以获得主题同服务的相似度:
[0032] 其中
O
为查询,
为标签,
为潜在特征,
%
为查询包含的词嵌入,
Z
为主题的数目; 的取值表示查询和服务的相似程度, 将被用来为用户提供服务 匹配和排序的依据;
[0033] 最后, 计算每个查询
;o
同服务
的相似程度
PiOis )
, 该概率的大小将被用来为用户提供服务匹配和排序的依据;
[0035] 其中
g
为查询,
为服务,
为标签,
z f 为潜在特征, 0 为查询包含的词嵌入,
为主题的数目,
T
的取值表示查询和服务的相似程度, 将被用来为用户提供服务匹配和排序的依 据。
发明的有益效果
有益效果
[0036] 本发明具有的有益效果是:
[0037] ( 1) 可以实现语义稀疏 Web服务的组织和检索, 具有较好的通用性;
[0038] (2) 基于“词袋”模型的服务描述特征表达方法存在“维数过多”的问题, 本方 法通过引入词嵌入模型来将服务描述的表达映射到固定长度的词嵌入空间从而 确保服务描述特征的维度, 本方法在保证维数确定的情况下还能够利用词嵌入
的语义相似特性增强服务描述的语义;
[0039] (3) 因为本方法采用的是无监督的学习方法, 所以参数推导不需要过多的经 验值, 提高了方法的准确性;
[0040] (4) 学习方法建立的服务层次可以用于 Web服务层次组织, 从而支撑语义稀 疏 Web服务发现, 具有广泛的适用性。
对附图的简要说明
附图说明
[0041] 图 1为基于 Gaussian ATM和词嵌入的语义稀疏 Web服务发现方法的流程示意图
[0042] 图 2为 Gaussian ATM生成的 Web服务层次示意图。
[0043] 图 3为运行步骤 2之后得到的 Web服务层次。
发明实施例
本发明的实施方式
[0044] 下面结合附图和具体实施例对本发明的具体实施方式做进一步说明:
[0045] 结合图 1至图 3, 一种基于 Gaussian ATM和词嵌入的语义稀疏 Web服务发现方法 , 包括以下步骤:
[0046] 步骤 1 : 收集 Web服务描述文档, 对收集的 Web服务描述文档进行解析, 得到 W eb服务描述文档中的特征词汇, 并对 Web服务描述文档中的特征词汇进行预处理 , 得到一组原型单词的集合。
[0047] Web服务描述文档来源于能够被访问的 Web服务注册中心或 Web服务门户网站
[0048] 预处理包括去除停用词、 取得单词词根和扩充缩写词等。
[0049] 步骤 2: 使用词嵌入训练模型 Word2VeC训练步骤 1中得到的原型单词的集合, 得到原型单词的集合中每个单词的连续向量表示;
[0050] 使用 Gaussian ATM (Author-Topic-Model) 模型对步骤 1中得到的原型单词的集 合进行训练, 获得每个 Web服务的层次结构。
[0051] 其具体实现包括以下子步骤:
[0052] 步骤 2.1 : 使用 Word2VeC模型训练原型单词的集合, 得到每个单词的连续词嵌
入表达;
[0053] 步骤 2.2: 基于步骤 2.1中得到的词嵌入进行映射, 遍历服务描述中的每一个单 词, 如果单词在词嵌入表达集合中, 则直接使用词嵌入代替该单词; 如果单词 不在词嵌入表达集合中, 该单词将被丢弃;
[0054] 经过多次迭代将服务描述中的单词转换成为词嵌入表达, 从而将服务特征表示 到连续词嵌入空间, 为词嵌入主题模型 Gaussian ATM构建输入;
[0055] 步骤 2.3: 以步骤 2.2得到的服务描述的词嵌入表示为输入, 基于 Gaussian ATM , 挖掘服务知识, 构建服务-标签、 标签-主题和主题-词嵌入分布, 基于上述三 个分布, 建立服务 -标签 -主题 -词嵌入层次模型, 从而将服务组织到不同的主题
[0056] 步骤 2.3, 具体包括以下子步骤:
[0057] 步骤 2.3.1 : 在 Gaussian ATM中, 每个单词
W
, 其中
M
表示词嵌入的长度, 这样每个单词就被表示到一个
维的连续空间, 而每个主题
z
就被表示成词嵌入 上的一个多元高斯分布, 其中均值为
, 协方差为
, 以服务的词嵌入表达作为输入, 经过 Gibbs抽样, 算法运行收敛之后, 通过该 多元高斯分布, 建立主题-词嵌入层次;
[0058] 步骤 2.3.2: 每个服务文档可以当作标签的均匀分布, 它们的分布是预先可观测 的, 直接利用均匀分布的计算公式可以获得服务 -标签分布;
[0059] 步骤 2.3.3: 每个主题属于不同的标签, 建立标签-主题层次的方式与步骤 2.3.1 类似, 每个主题的先验分布为参数为
的 Dirichlet分布, 以标签的词嵌入表达作为输入, 经过 Gibbs抽样之后得到收敛 后的参数值, 从而根据参数
获得标签 -主题分布;
[0060] 步骤 2.3.4: 步骤 2.3.3之后, 单词、 词嵌入、 标签、 主题和服务文档存在如下关 系: 每个单词都有一个对应的词嵌入, 每个词嵌入属于不同的主题, 每个主题 又隶属于不同的标签, 每个标签又属于不同的服务, 根据上述关系, 以获得的 服务-标签、 标签-主题、 主题-词嵌入分布作为输入, 建立服务 -标签 -主题 -词嵌 入层次模型, 从而将服务组织到不同的潜在主题。
[0061] 如图 2所示, 图 2是本发明的执行 Gaussian ATM算法之后的生成的服务层次模型 示意图。
[0062] 在图 2中, 每个单词都有一个对应的词嵌入, 每个词嵌入属于不同的主题, 每 个主题又隶属于不同的标签, 每个标签又属于不同的服务。 基于这个三个层次 结构可以为用户提供灵活的服务查询体验。 例如可以基于主题组织服务, 单词 分布类似的服务将划分到同一个主题从而将服务聚类。 通过在类簇上查询服务 减小搜索空间, 提高查询效率。 而在本发明中, 我们利用该层次结构建立一种 概率服务发现方法。
[0063] 步骤 3: 使用步骤 2训练得到的连续向量的集合丰富用户查询, 得到扩展以利用 步骤 2得到的服务层次结构, 使用概率排序方法, 得到针对扩展之后用户查询所
对应的查询输出。
[0064] 具体包括以下子步骤:
[0065] 步骤 3.1 : 根据查询特征表达, 使用步骤 2.1训练的连续词嵌入表达, 遍历用户 查询中的每一个单词, 如果单词在词嵌入表达集合中, 则直接使用词嵌入代替 该单词; 如果单词不在词嵌入表达集合中, 该单词将被丢弃; 将用户查询映射 为连续表达的词嵌入, 为基于词嵌入的查询语义扩充和基于词嵌入主题模型的 服务发现提供支持;
[0066] 步骤 3.2: 根据步骤 3.1中获得用户查询的词嵌入表示作为输入, 并设定一个相 似度阈值, 遍历输入中的每一个词嵌入, 检索与该词嵌入的相似度超过预定阈 值的词嵌入, 将该词嵌入作为扩充词保留, 重复该过程直至输入中所有的词嵌 入都被遍历一遍, 最后返回添加了扩充词之后的用户查询向量;
[0067] 步骤 3.3 : 词嵌入表达的用户查询将基于一种概率表达映射为同服务的相似程度 , 根据服务-主题-词嵌入层次结构可以获得词嵌入同主题的相似度:
P (
, 每个查询
0
同主题的相似度能够表示为公式 (1) :
( D
[0069] 其中
为主题,
为查询中包含的词嵌入;
[0070] 同样根据服务 -主题 -词嵌入层次结构, 可以获得主题同服务的相似度:
P(z | f)
, 每个查询
0
同服务
[0072] 其中
Q
为查询,
为标签, z f
为潜在特征,
为查询包含的词嵌入,
z
为主题的数目; 的取值表示查询和服务的相似程度, 将被用来为用户提供服务 匹配和排序的依据;
[0073] 最后, 计算每个查询
O
同服务
, 该概率的大小将被用来为用户提供服务匹配和排序的依据;
[0075] 其中
;o
为查询,
s :
为服务,
t
为标签,
为潜在特征,
为查询包含的词嵌入,
Z
为主题的数目,
T
的取值表示查询和服务的相似程度, 将被用来为用户提供服务匹配和排序的依 据。
[0076] 下面是应用本发明的方法进行语义稀疏服务发现的具体实施例: 以 Progmmmab leWeb (PWeb , http://www.programmableweb.com/) 网站上的 Web服务进行基于 Web服务描述的语义稀疏服务发现为实施例, 详细描述本发明的实施过程。
[0077] PWeb网站是目前互联网上可以公开访问的著名 mashup和 Web服务注册中心, 截至 2016年 5月 1日, 注册的 Web服务已超过 15000个, 包括遵循 SOAP、 REST、 XML-RPC的各类Web API, 并且提供了 API服务的一些注册信息, 比如 API描述 、 名字、 标签等。 对于采用 SOAP协议的 API服务, 还提供了描述该 Web服务的 WSDL文档。
[0078] 首先, 执行步骤 1, 使用 PWeb网站提供的开放 API从该网站收集 Weather、 Gove mment等领域的服务自然语义描述, 并对其进行预处理。
[0079] 然后, 对收集的 Web服务描述文档进行解析, 具体包括: 对收集的每个 Web服 务描述文档进行解析, 抽取该文档中的所有核心特征词汇, 并将词汇做进一步 处理, 包括词干还原、 缩写词扩充等。
[0080] 接着, 执行步骤 2, 使用 word2veC分布式表示方法的训练特征单词集合, 建立 每个单词的连续向量表示。 在调用 word2veC之后, 系统将得到表 1所示的结果。 每个单词都获得一个连续向量的表达, 向量的长度可以选择, 本例中选择向量 长度为 50。
[0081] 表 1使用 word2vec方法之后, 单词的连续向量表达
[]
[表 1]
[0082] .
[0083] 训练得到每个单词的连续表示之后, 使用 Gaussian ATM模型建立 Web服务的层 次。 建立的服务-主题层次如表 2所示。
[0084] 表 2使用 Gaussian ATM方法, 建立的服务—标签层次
[]
[表 2]
[0085]
[0086] 表 3使用 Gaussian ATM方法, 建立的标签—主题层次
[] [表 3]
[0087]
[0088] 建立的主题-单词层次如表 3所示。
[0089] [0092]表 4使用 Gaussian ATM方法, 建立的主题一词嵌入层次
[] [表 4]
[0090] 然后执行步骤 3, 利用连续向量的相似特性, 扩展用户查询。 例如, design扩展 为 design + plan。 利用步骤 2得到的服务层次结构, 使用概率排序方法, 得到针 对扩展之后用户查询所对应的查询输出, 最终返回的结果如表 5所示。
[0091] 表 5查询与系统編出结果
[0092]
[0093] 请见图 3 , 运行步骤 2之后得到的 Web服务层次如图 3所示。
[0094] 当然, 上述说明并非是对本发明的限制, 本发明也并不仅限于上述举例, 本技 术领域的技术人员在本发明的实质范围内所做出的变化、 改型、 添加或替换, 也应属于本发明的保护范围。
Claims
[权利要求 1] 一种基于 Gaussian ATM和词嵌入的语义稀疏 Web服务发现方法, 其特 征在于, 包括以下步骤:
步骤 1 : 收集 Web服务描述文档, 对收集的 Web服务描述文档进行解 析, 得到 Web服务描述文档中的特征词汇, 并对 Web服务描述文档中 的特征词汇进行预处理, 得到一组原型单词的集合;
步骤 2: 使用词嵌入训练模型 Word2VeC训练步骤 1中得到的原型单词 的集合, 得到原型单词的集合中每个单词的连续向量表示; 使用 Gaussian ATM模型对步骤 1中得到的原型单词的集合进行训练, 获得每个 Web服务的层次结构;
步骤 3: 使用步骤 2训练得到的连续向量的集合丰富用户查询, 得到扩 展以后的用户查询;
利用步骤 2得到的服务层次结构, 使用概率排序方法, 得到针对扩展 之后用户查询所对应的查询输出。
[权利要求 2] 根据权利要求 1所述的一种基于 Gaussian
ATM和词嵌入的语义稀疏 Web服务发现方法, 其特征在于, 步骤 1中 所述的 Web服务描述文档来源于能够被访问的 Web服务注册中心或 W eb服务门户网站。
[权利要求 3] 根据权利要求 1所述的一种基于 Gaussian
ATM和词嵌入的语义稀疏 Web服务发现方法, 其特征在于, 所述步 骤 1中的预处理包括去除停用词、 取得单词词根和扩充缩写词。
[权利要求 4] 根据权利要求 1所述的一种基于 Gaussian
ATM和词嵌入的语义稀疏 Web服务发现方法, 其特征在于, 所述的 步骤 2, 其具体实现包括以下子步骤:
步骤 2.1 : 使用 Word2VeC模型训练原型单词的集合, 得到每个单词的 连续词嵌入表达;
步骤 2.2: 基于步骤 2.1中得到的词嵌入进行映射, 遍历服务描述中的 每一个单词, 如果单词在词嵌入表达集合中, 则直接使用词嵌入代替
该单词; 如果单词不在词嵌入表达集合中, 该单词将被丢弃;
经过多次迭代将服务描述中的单词转换成为词嵌入表达, 从而将服务 特征表示到连续词嵌入空间, 为词嵌入主题模型 Gaussian ATM构建 输入;
步骤 2.3: 以步骤 2.2得到的服务描述的词嵌入表示为输入, 基于 Gauss ian ATM , 挖掘服务知识, 构建服务-标签、 标签-主题和主题-词嵌入 分布, 基于上述三个分布, 建立服务-标签-主题-词嵌入层次模型, 从 而将服务组织到不同的主题。
[权利要求 5] 根据权利要求 4所述的一种基于 Gaussian
ATM和词嵌入的语义稀疏 Web服务发现方法, 其特征在于, 所述步 骤 2.3 , 具体包括以下子步骤:
步骤 2.3.1 : 在 Gaussian ATM中, 每个单词
W
对应的词嵌入 . , 其中
M
表示词嵌入的长度, 这样每个单词就被表示到一个
M
维的连续空间, 而每个主题
z
就被表示成词嵌入
¥
, 协方差为
E.
, 以服务的词嵌入表达作为输入, 经过 Gibbs抽样, 算法运行收敛之 后, 通过该多元高斯分布, 建立主题-词嵌入层次; 步骤 2.3.2: 每个服务文档可以当作标签的均匀分布, 它们的分布是预 先可观测的, 直接利用均匀分布的计算公式可以获得服务-标签分布 步骤 2.3.3: 每个主题属于不同的标签, 建立标签 -主题层次的方式与 步骤 2.3.1类似, 每个主题的先验分布为参数为
a
获得标签 -主题分布;
步骤 2.3.4: 步骤 2.3.3之后, 单词、 词嵌入、 标签、 主题和服务文档存 在如下关系: 每个单词都有一个对应的词嵌入, 每个词嵌入属于不同 的主题, 每个主题又隶属于不同的标签, 每个标签又属于不同的服务 , 根据上述关系, 以获得的服务-标签、 标签-主题、 主题 -词嵌入分布 作为输入, 建立服务 -标签 -主题 -词嵌入层次模型, 从而将服务组织到 不同的潜在主题。
[权利要求 6] 根据权利要求 4所述的一种基于 Gaussian
ATM和词嵌入的语义稀疏 Web服务发现方法, 其特征在于, 所述步 骤 3中, 具体包括以下子步骤:
步骤 3.1 : 根据查询特征表达, 使用步骤 2.1训练的连续词嵌入表达, 遍历用户查询中的每一个单词, 如果单词在词嵌入表达集合中, 则直 接使用词嵌入代替该单词; 如果单词不在词嵌入表达集合中, 该单词 将被丢弃; 将用户查询映射为连续表达的词嵌入, 为基于词嵌入的查 询语义扩充和基于词嵌入主题模型的服务发现提供支持;
步骤 3.2: 根据步骤 3.1中获得用户查询的词嵌入表示作为输入, 并设 定一个相似度阈值, 遍历输入中的每一个词嵌入, 检索与该词嵌入的 相似度超过预定阈值的词嵌入, 将该词嵌入作为扩充词保留, 重复该 过程直至输入中所有的词嵌入都被遍历一遍, 最后返回添加了扩充词 之后的用户查询向量;
步骤 3.3: 词嵌入表达的用户查询将基于一种概率表达映射为同服务 的相似程度, 根据服务 -主题 -词嵌入层次结构可以获得词嵌入同主题 的相似度:
P ( )
, 每个查询
;0
( D
其中
zf 为主题, ei
为查询中包含的词嵌入;
, 每个查询
0
同服务
⑵
Z
为主题的数目; 的取值表示查询和服务的相似程度, 将被用来为用户 提供服务匹配和排序的依据;
最后, 计算每个查询
Q
, 该概率的大小将被用来为用户提供服务匹配和排序的依据;
其中
o
为查询, SJ
为标签,
z f.
为查询包含的词嵌入,
Z
为主题的数目,
J
的取值表示查询和服务的相似程度, 将被用来为用户提供服务匹配和 排序的依据。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810345829.3 | 2018-04-18 | ||
| CN201810345829.3A CN108712466A (zh) | 2018-04-18 | 2018-04-18 | 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019201068A1 true WO2019201068A1 (zh) | 2019-10-24 |
Family
ID=63866976
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/079967 Ceased WO2019201068A1 (zh) | 2018-04-18 | 2019-03-28 | 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108712466A (zh) |
| WO (1) | WO2019201068A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112487805A (zh) * | 2020-11-30 | 2021-03-12 | 武汉大学 | 一种基于元学习框架的小样本Web服务分类方法 |
| CN113887245A (zh) * | 2021-12-02 | 2022-01-04 | 腾讯科技(深圳)有限公司 | 一种模型训练方法及相关装置 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108712466A (zh) * | 2018-04-18 | 2018-10-26 | 山东科技大学 | 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 |
| CN110134798B (zh) * | 2019-05-15 | 2021-07-27 | 八戒科技服务有限公司 | 一种创新需求挖掘方法、系统、终端及介质 |
| CN111475609B (zh) * | 2020-02-28 | 2022-04-05 | 浙江工业大学 | 一种围绕主题建模的改进型K-means服务聚类方法 |
| CN112749281B (zh) * | 2021-01-19 | 2023-04-07 | 青岛科技大学 | 一种融合服务协作关系的Restful类型Web服务聚类方法 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110270870A1 (en) * | 2010-04-30 | 2011-11-03 | International Business Machines Corporation | Web service discovery via data abstraction model and condition creation |
| CN106156272A (zh) * | 2016-06-21 | 2016-11-23 | 北京工业大学 | 一种基于多源语义分析的信息检索方法 |
| CN106599086A (zh) * | 2016-11-25 | 2017-04-26 | 山东科技大学 | 一种基于Gaussian LDA和词嵌入的语义稀疏Web服务发现方法 |
| CN108712466A (zh) * | 2018-04-18 | 2018-10-26 | 山东科技大学 | 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102622396B (zh) * | 2011-11-30 | 2016-09-21 | 浙江大学 | 一种基于标签的web服务聚类方法 |
| CN106874397B (zh) * | 2017-01-16 | 2021-03-30 | 华南理工大学 | 一种面向物联网设备的自动语义标注方法 |
-
2018
- 2018-04-18 CN CN201810345829.3A patent/CN108712466A/zh active Pending
-
2019
- 2019-03-28 WO PCT/CN2019/079967 patent/WO2019201068A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110270870A1 (en) * | 2010-04-30 | 2011-11-03 | International Business Machines Corporation | Web service discovery via data abstraction model and condition creation |
| CN106156272A (zh) * | 2016-06-21 | 2016-11-23 | 北京工业大学 | 一种基于多源语义分析的信息检索方法 |
| CN106599086A (zh) * | 2016-11-25 | 2017-04-26 | 山东科技大学 | 一种基于Gaussian LDA和词嵌入的语义稀疏Web服务发现方法 |
| CN108712466A (zh) * | 2018-04-18 | 2018-10-26 | 山东科技大学 | 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112487805A (zh) * | 2020-11-30 | 2021-03-12 | 武汉大学 | 一种基于元学习框架的小样本Web服务分类方法 |
| CN112487805B (zh) * | 2020-11-30 | 2024-02-02 | 武汉大学 | 一种基于元学习框架的小样本Web服务分类方法 |
| CN113887245A (zh) * | 2021-12-02 | 2022-01-04 | 腾讯科技(深圳)有限公司 | 一种模型训练方法及相关装置 |
| CN113887245B (zh) * | 2021-12-02 | 2022-03-25 | 腾讯科技(深圳)有限公司 | 一种模型训练方法及相关装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108712466A (zh) | 2018-10-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019201068A1 (zh) | 一种基于Gaussian ATM和词嵌入的语义稀疏Web服务发现方法 | |
| CN106599086A (zh) | 一种基于Gaussian LDA和词嵌入的语义稀疏Web服务发现方法 | |
| CN106096066B (zh) | 基于随机近邻嵌入的文本聚类方法 | |
| CN102207945B (zh) | 基于知识网络的文本标引系统及其方法 | |
| CN102782678B (zh) | 用于项关联的联合嵌入 | |
| CN103927302B (zh) | 一种文本分类方法和系统 | |
| CN109063159B (zh) | 一种基于神经网络的实体关系抽取方法 | |
| CN102129479B (zh) | 一种基于概率潜在语义分析模型的万维网服务发现方法 | |
| CN103235825A (zh) | 一种基于Hadoop云计算框架的海量人脸识别搜索引擎设计方法 | |
| CN102289522A (zh) | 一种对于文本智能分类的方法 | |
| CN112860898B (zh) | 一种短文本框聚类方法、系统、设备及存储介质 | |
| CN105653668A (zh) | 云环境中基于DOMTree的网页内容分析提取优化方法 | |
| CN106844349A (zh) | 基于协同训练的垃圾评论识别方法 | |
| CN111813955A (zh) | 一种基于知识图谱表示学习的服务聚类方法 | |
| CN103871402A (zh) | 语言模型训练系统、语音识别系统及相应方法 | |
| CN105404693A (zh) | 一种基于需求语义的服务聚类方法 | |
| CN117744785A (zh) | 基于网络采集数据的时空知识图谱智能构建方法及系统 | |
| CN111522923A (zh) | 一种多轮任务式对话状态追踪方法 | |
| CN101079024A (zh) | 一种专业词表动态生成系统和方法 | |
| CN110728135B (zh) | 文本主题标引方法、装置、电子设备及计算机存储介质 | |
| CN103530419B (zh) | 一种面向Web 服务描述的本体学习方法 | |
| CN114969422B (zh) | 非对称图像检索方法、系统、设备及存储介质 | |
| CN115309849A (zh) | 一种基于知识蒸馏的特征提取方法、装置及数据分类方法 | |
| CN119917942A (zh) | 一种基于文本资料的知识语义树构建方法 | |
| CN119398195A (zh) | 一种少样本关系分类模型的训练方法及相关设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19788842 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19788842 Country of ref document: EP Kind code of ref document: A1 |










