CN105930443A - Goal-oriented RESTful Web service discovery method - Google Patents
Goal-oriented RESTful Web service discovery method Download PDFInfo
- Publication number
- CN105930443A CN105930443A CN201610247123.4A CN201610247123A CN105930443A CN 105930443 A CN105930443 A CN 105930443A CN 201610247123 A CN201610247123 A CN 201610247123A CN 105930443 A CN105930443 A CN 105930443A
- Authority
- CN
- China
- Prior art keywords
- service
- word
- web service
- goal
- field
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/3332—Query translation
- G06F16/3335—Syntactic pre-processing, e.g. stopword elimination, stemming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a goal-oriented RESTful Web service discovery method. The method comprises the steps of firstly collecting information (particularly functional text description) of RESTful Web services, and performing domain division on Web service sets; secondly constructing a domain knowledge base in the Web service set of each domain, wherein the domain knowledge base comprises a Web service-service goal assignment matrix, service goal clusters and the like; and finally based on the constructed domain knowledge base, recommending service goals with semantic similarity for a given user query, and then matching a service goal set selected by a user with a service goal set of the Web services to obtain a candidate Web service set. According to the method, the RESTful Web services meeting a user requirement goal can be accurately discovered; the method has very high practicality; and by recommending the service goals with the semantic similarity for an initial query of the user, the user can be assisted in making a high-quality query meeting the user demand.
Description
Technical field
The invention belongs to service computing technique field, take particularly to a kind of object-oriented RESTful Web
Business discovery method.
Background technology
Web service is basic as service-oriented computing (Service-Oriented Computing, SOC)
Component, is to encapsulate self-contained, the self-described of specific calculation or business function, the software module of platform independence,
Can issue on the internet and call.Utilize existing Web service resource, the effect of software development can be improved
Rate and quality, reduce development cost [document 1] simultaneously.Along with the fast development of SOC, service-oriented software
Exploitation (Service-Oriented Software Development, SOSD) is increasingly becoming on the Internet soft
The main flow of part exploitation, has been widely used in many fields, such as ecommerce, Workflow Management etc. [document 2].
Under this situation, the Web service resource of interconnection Web realease presents the trend of quickly growth.
At present, on the Internet, announced Web service can be largely classified into two classes: follows simple object access association
The Web service of view (Simple Object Access Protocol, SOAP) (is called for short SOAP-based Web
Service) and follow sign state transfer (REpresentational State Transfer, REST) agreement
RESTful Web service.SOAP-based Web service must use the WSDL of standard
(Web Services Description Language, WSDL) is described, to the exploitation of Web service
Person causes certain restriction.Although RESTful Web service also possesses Web application describes language (Web
Application Description Language, WADL), the structurized description language such as WSDL 2.0,
But most of developers tend to the RESTful Web service using simple natural language text to be developed it
It is described [document 7].In recent years, RESTful Web service is favored by more and more developers, its
Growth trend also becomes apparent from [document 8] than traditional SOAP-based Web service.Such as, by the end of 2016
On March 23, in, famous Web service programming website ProgrammableWeb
(http://www.programmableweb.com/ is called for short PWeb) Web service of upper registration reaches
14,836, wherein, the ratio of RESTful Web service is about 62%, the ratio of SOAP-based Web service
Example is about 16%.
Web service finds one of key support technology as SOC, it is intended to help user from numerous Web
Service Source is excavated the Web service that disclosure satisfy that its demand, promotes reusing of Web service.Although it is existing big
The Web service of amount finds that method (such as [document 3], [document 4], [document 5], [document 6]) is suggested,
But current Web service finds method and still there is the following problem:
(1) existing Web service finds that method is mainly for the SOAP-based Web clothes using WSDL to describe
Business, the RESTful Web service to mainly describing with natural language text is paid close attention to less.
(2) when carrying out Web service and finding, user would generally use and can accurately express the high-level of its demand
Target, such as " planning stroke (plan a trip) ", " searching hotel (find hotels) ", as inquiry
Condition.But, the Web service registration center (such as PWeb) of current main flow still uses based on keyword
The Web service discovery mechanism joined, performance is the highest, it is difficult to meet the demand of user.
(3) in addition to the matching mechanisms between user's inquiry and Web service, the quality of user's inquiry is also impact
Web service finds the key factor of result.One inquiry that can accurately reflect user's request contributes to obtaining more
Relevant Web service.But, for most of users, owing to lacking and desired Web service function
Relevant knowledge, is difficult to formulate high-quality inquiry.Such as, due to Web service developer/supplier's statement
The difference of mode, the Web service function that can there is semantic similitude describes, such as " get hotels ", " find
Hotels ", " search accommodations " etc..When formulating inquiry, user is difficult to consider comprehensively
To the function of these semantic similitude, and then cause omitting many Web services that disclosure satisfy that its demand.The most right
The concern of this problem is less.
[document 1] M.Bano, D.Zowghi, N.Ikram, et al.What makes service oriented
requirements engineering challenging?a qualitative study.IET Software,
2014,8(4),pp.154-160.
[document 2] L.Chen, L.Hu, Z.Zheng, et al.WTCluster:Utilizing Tags for
Web Services Clustering.International Conference on Service-Oriented
Computing,2011,pp.204-218.
[document 3] P.Plebani and B.Pernici.URBE:Web Service Retrieval Based on
Similarity Evaluation.IEEE Transactions on Knowledge and Data
Engineering,2009,21(11),pp.1629-1642.
[document 4] F.Liu, Y.Shi, J.Yu, et al.Measuring Similarity of Web Services
Based on WSDL.IEEE International Conference on Web Services,2011,
pp.155-162.
[document 5] G.Cassar, P.Barnaghi, and K.Moessner, Probabilistic
Matchmaking Methods for Automated Service Discovery.IEEE Transactions
on Services Computing,2013,7(4),pp.654-666.
[document 6] Z.Cong, A.Fernandez, H.Billhardt, et al.ServiceDiscovery
Acceleration with Hierarchical Clustering.Information Systems Frontiers,
2014,17(4),pp.799-808.
[document 7] W.Jiang, D.Lee, and S.Hu.Large-Scale Longitudinal Analysis
of SOAP-Based and RESTful Web Services.IEEE 19th International
Conference on Web Services,2012,pp.218-225.
[document 8] M.Maleshkova, C.Pedrinaci, and J.Domingue.Investigating Web
APIs on the World Wide Web.European Conference on Web Services,2010,
pp.107-114.
Summary of the invention
In order to solve above-mentioned technical problem, the invention provides a kind of object-oriented RESTful Web service
Discovery method, it is possible to find to meet the RESTful Web service of user's request target exactly, and have very well
Practicality.
The technical solution adopted in the present invention is: 1. an object-oriented RESTful Web service discovery side
Method, it is characterised in that comprise the following steps:
Step 1: collect the information of RESTful Web service, including Web service title, art and merit
The text of energy property describes, and obtains Web service collection;
Step 2: Web service collection is carried out pretreatment;
Step 3: for pretreated Web service collection, it may be judged whether there is field and divide (i.e. Web service
Whether comprise the information of art);
The most then perform following step 4;
If it is not, then perform following step 5;
Step 4: judge field divides whether there is overlap;
The most then perform following step 5;
If it is not, then perform following step 6;
Step 5: use Web service sorting technique that Web service collection is carried out field division;
The basic process of Web service sorting technique is as follows: first, it is intended that need the field carrying out classifying (permissible
It is that existing field or the field of user's setting are concentrated in Web service), Web service collection is divided into appointment neck
The unrelated Web service collection of Web service collection that territory is relevant and field;Then, relevant from field respectively Web
The unrelated Web service of services set and field is concentrated and is chosen the same number of Web service structure training set, except training
Web service outside collection constitutes test set;Then, vector is built for the Web service in training set and test set empty
Between model, specifically, each Web service is expressed as a vector, the dimension of vector is all Web
The sum of the different words that services package contains, vector one word of every one-dimensional representation, each word each Web service to
Weights in amount use TF-IDF (Term Frequency Inverse Document Frequency) meter
Calculate;Finally, use the support vector machine (Support Vector Machine, the SVM) vector to building empty
Between classify, obtain the Web service collection of designated field.
Step 6: carry out the structure of domain knowledge base for the Web service collection in each field, including: domain term
Converge sequencing table (Ranked Domain Word List, RDWL), field verb collection (Domain Verb Set,
DV), field core name word set (Domain Core Noun Set, DCN), Web service-service goal association
Matrix (Web Service-Service Goal Assignment Matrix, WSSGAM) and service goal bunch
Collection (Service Goal Clusters, SGC);
Step 7: given user is inquired about q and carries out Web service discovery.
As preferably, described in step 2, Web service collection is carried out pretreatment, including participle, lemmatization,
Remove stop words and word frequency statistics, implement and include following sub-step:
Step 2.1: resolve the information of each Web service, obtains all words wherein comprised;
Step 2.2: all words are reduced into its basic original shape, such as " retrieves ", " retrieved "
The basic prototype of " retrieving " is " retrieve ";
Step 2.3: remove some words without practical significance according to disabling vocabulary, as " can ", " it ",
" the " etc.;
Step 2.4: add up each word frequency in Web service.
As preferably, in step 6, first to each field, add up the pretreated Web service in this field collection
In all words of comprising and each word frequency of occurrence in this field (the most each word is at all Web in this field
Frequency of occurrence sum in service);Then, carrying out domain knowledge base structure for specific field d, it is concrete
Realization includes following sub-step:
Step 6.1: calculate each word importance to this field in d, and according to importance to words all in d
Descending, obtains the Field Words sequencing table of d, is designated as RDWLd;
Step 6.2: select RDWLd150 words of top in noun, constitute d field core noun
Collection, is designated as DCNd;
Step 6.3: the text of each Web service from d carries out service goal extraction in describing, and obtains d's
Web service-service goal incidence matrix, is designated as WSSGAMd;
Service goal (Service Goal) is for representing the function that Web service can be provided by.One service mesh
Mark sg is expressed as: sg=< sgv, sgn, sgp >, and wherein, sgv is verb or verb phrase, represents sg
Operation to be performed;Sgn is noun or noun phrase, represents the operation object of sg;Sgp is optional ginseng
Manifold, for sg is remarked additionally, the mode of operation of such as sg and constraint etc..
The basic process carrying out service goal extraction from the text of Web service describes is as follows: first, obtains literary composition
The statement set that this description comprises;Then, Stanford Parser is utilized
(http://nlp.stanford.edu/software/lex-parser.shtml) carries out language to every statement
Method resolves, and obtains embodying Stanford Dependency (SD) of grammer dependence between vocabulary in sentence
Set;Then, according to 3 kinds of SD pattern: dobj (a, b) →<a,b,null>, nsubjpass (a, b) →
<a,b,null>with prep (a, b)+nsubj (a, c) →<a,b,null>, concentrate from the SD of every statement and obtain
Take the skeleton (referred to as initial target) of some critical services targets that this statement comprises;Then, every language is utilized
In Ju other SD relation (such as amod, nn, conj and prep) to from this statement obtain each at the beginning of
Beginning target carries out information expansion, identifies hiding service goal simultaneously, obtains the candidate service object set of this statement;
Finally, the candidate service target obtained from all statements carried out lemmatization and goes stop words to process, obtaining
The service goal collection that the text of Web service comprises in describing.
Make SdRepresent the Web service collection of d, SGdRepresent the service mesh extracted from all Web services of d
Mark collection, thenWSSGAMdEach element
WSSGAMd(si,sgj) ∈ { 0,1}, WSSGAMd(si,sgj)=1 represents Web service si∈SdComprise
Service goal sgj∈SGd;
Step 6.4: all service goals (i.e. SG in statistics dd) verb (i.e. sgv part) that comprises,
Obtain the field verb collection of d, be designated as DVd;
Step 6.5: calculate the semantic similarity between service goal in d, build service goal semantic similarity
Matrix, every a line of matrix represents a service goal in d, and every string also represents a service in d
Target, the value of each unit is the semantic similitude between two service goals that the row and column at this unit place is corresponding
Degree;
Step 6.6: based on service goal semantic similarity matrix, service goal each in d is expressed as one
Vector, the dimension of vector is the sum of service goal in d, a service in every one-dimensional representation d of vector
Target, value the most one-dimensional in the vector of each service goal sg is between the service goal that sg is corresponding with this dimension
Semantic similarity;Then, utilize K-Means algorithm that the vector of service goals all in d is clustered,
To the service goal gathering of d, it is designated as SGCd。
As preferably, each word w importance to this field in d described in step 6.1, computational methods are such as
Under:
Wherein, N (w, d) represents w frequency of occurrence in d,Represent the maximum that in d, word occurs
The frequency, | and d:w ∈ d} | representing the field number comprising w, | D | represents that the field belonging to whole Web service is total
Number,Represent w frequency of occurrence sum in all spectra;α is little between 0 to 1
Number, acquiescence takes 0.6, can be adjusted by user.
As preferably, semantic similarity between service goal in d described in step 6.5, computational methods are as follows:
First, the word that service goal sg each in d comprises is divided into 3 subsets, i.e.
Vd(sg)=W (sg) ∩ DVd,CNd(sg)=W (sg) ∩ DCNd,
Othd(sg)=W (sg)-Vd(sg)-CNd(sg),
Wherein, W (sg) represents the word set that sg comprises;DVdAnd DCNdRepresent respectively d field verb collection and
Field core name word set;Vd(sg)、CNdAnd Oth (sg)d(sg) represent respectively verb collection that sg comprises,
Field core name word set and other word sets in addition to verb with field core noun are (such as adjective, field non-core
Heart noun etc.);For service goal, the importance priority between these 3 kinds of words is: field core noun >
Verb > other words;
Then, any two service goal sg in d is calculatediAnd sgjBetween semantic similarity, use as follows
Formula:
Wherein, λ1、λ2And λ3For weight factor;Acquiescence takes λ1=0.3, λ2=0.6, λ3=0.1, can be by
User adjusts;WSim(W1,W2) represent two word sets W1And W2Between semantic similarity, computing formula is:
Wherein, | W1| and | W2| represent word set W respectively1And W2In the number of word that comprises;wsim(wi,wj) represent
Two word wiAnd wjBetween semantic similarity;Represent word set W2In all words with
Word wiBetween maximum semantic similarity;WNSim(wi,wj) represent two word wiAnd wjAt WordNet
Semantic similarity in (http://wordnet.princeton.edu/).
As preferably, implementing of step 7 includes following sub-step:
Step 7.1: given user is inquired about q and carries out pretreatment, including participle, lemmatization, goes to disable
Word and word frequency statistics;
Step 7.2: calculate the matching degree between q and each field, obtain the field the highest with q matching degree,
It is designated as md;
Step 7.3: calculate the semantic similarity between each service goal bunch in q and md, obtain and q language
The service goal gathering that justice is similar, is designated as mC;
Step 7.4: calculate the semantic similarity between each service goal and q in mC, and according to semantic phase
Like degree to service goal descendings all in mC, obtain the service goal recommendation list of q, therefrom user's choosing
Select the service goal that can embody its demand, be designated as SGq, as new inquiry;
Step 7.5: by SGqThe service goal collection of Web service each with md mates, and is met
Candidate's Web service collection of user's request.
As preferably, described in step 7.2, calculate the matching degree between q and each field d, use following public
Formula:
Wherein, K represents the Field Words sequencing table RDWL only considering ddIn K word of top, acquiescence takes
300, can be adjusted by user;Represent word wkImportance to d;Represent word wkFrequency in q
Secondary.
As preferably, described in step 7.3, calculate the semantic similitude between each service goal bunch in q and md
Degree, concrete grammar is as follows:
First, by service goal bunch C each in mdiThe word comprised is divided into 3 subsets, i.e.
Wherein, Vmd(Ci)、CNmd(Ci) and Othmd(Ci) represent C respectivelyiThe verb collection that comprises, field core name
Word set and other word sets in addition to verb with field core noun;Vmd(sgk)、CNmd(sgk) and
Othmd(sgk) represent service goal sg respectivelykThe verb collection that comprises, field core name word set and except verb and neck
Other word sets outside the core noun of territory.
Then, V is obtained respectivelymd(Ci)、CNmd(Ci) and Othmd(CiWith any word semantic similitude in q in)
Vocabulary subset;
Vmd(CiWith the vocabulary subset of any word semantic similitude in q in), it is defined as follows:
Wherein, W (q) represents the word set that q comprises;θvFor similarity threshold;wsim(wi, wj) represent two word wi
And wjBetween semantic similarity.
CNmd(CiWith the vocabulary subset of any word semantic similitude in q in), it is defined as follows:
Wherein, W (q) represents the word set that q comprises;θcnFor similarity threshold;wsim(wi, wj) represent two words
wiAnd wjBetween semantic similarity.
Othmd(CiWith the vocabulary subset of any word semantic similitude in q in), it is defined as follows:
Wherein, W (q) represents the word set that q comprises;θothFor similarity threshold;wsim(wi, wj) represent two words
wiAnd wjBetween semantic similarity.
Finally, q and C is calculatediBetween semantic similarity, use equation below:
Wherein, Vmd(Ci)、CNmd(Ci) and Othmd(Ci) represent C respectivelyiThe verb collection that comprises, field core name
Word set and other word sets in addition to verb with field core noun;WithRepresent V respectivelymd(Ci)、CNmd(Ci) and Othmd(CiWith any word justice phase in q in)
As vocabulary subset;N(wk,Ci) represent word wkAt CiIn the frequency;λ1、λ2And λ3For weight factor,
Corresponding to step 6.5 calculates the λ in the semantic similarity between service goal1、λ2And λ3。
As preferably, described in step 7.3, mC is defined as follows:
MC={Ci|Ci∈SGCmd∧qCSim(q,Ci)≥θc,
Wherein, SGCmdRepresent the service goal gathering of md;qCSim(q,Ci) represent q and CiBetween semanteme
Similarity;θcFor similarity threshold, acquiescence takes 0.4, can be adjusted by user.
As preferably, described in step 7.4, calculate the semantic similarity between each service goal and q in mC,
Concrete grammar is as follows:
First, the word that q comprises is divided into 3 subsets, it may be assumed that
Vmd(q)=W (q) ∩ DVmd,CNmd(q)=W (q) ∩ DCNmd,
Othmd(q)=W (q)-Vmd(q)-CNmd(q),
Wherein, W (q) represents the word set that q comprises;DVmdAnd DCNmdRepresent the field verb collection of md respectively
With field core name word set;Vmd(q)、CNmd(q) and Othmd(q) represent respectively verb collection that q comprises,
Field core name word set and other word sets in addition to verb with field core noun.
Then, the semantic similarity between each service goal sg and q in mC is calculated:
Wherein, Vmd(q)、CNmd(q) and OthmdQ () represents verb collection, the field core noun that q comprises respectively
Collection and other word sets in addition to verb with field core noun;Vmd(sg)、CNmdAnd Oth (sg)md(sg)
Represent verb collection that sg comprises, field core name word set and its in addition to verb with field core noun respectively
His word set;λ1、λ2And λ3For weight factor, corresponding to step 6.5 calculates the semanteme between service goal
λ in similarity1、λ2And λ3;WSima(W1,W2) represent two word sets W1And W2Between asymmetric
Semantic similarity, calculation is:
Wherein, | W1| represent word set W1In the number of word that comprises;wsim(wi,wj) represent two word wiAnd wjIt
Between semantic similarity;Represent word set W2In all words and word wiBetween maximum language
Justice similarity.
As preferably, the collection of candidate's Web service described in step 7.5 is:
Wherein, SmdRepresent the Web service collection of md;SGqRepresent user to select from the service goal recommendation list of q
The service goal collection selected;SGsRepresent the service goal collection of Web service s, can be by WSSGAMmdObtain,
I.e. SGs={ sgj|WSSGAMmd(s,sgj)=1};W(sgi) and W (sgj) represent service goal sg respectivelyi
And sgjThe word set comprised.
Relative to prior art, the invention has the beneficial effects as follows:
1) can find to meet the RESTful Web service of user's request target exactly, there is good reality
The property used;
2) by recommending the service goal of semantic similitude for the initial query of user, user can be helped to formulate energy
Enough embody the high-quality inquiry of its demand.
Accompanying drawing explanation
Fig. 1 is the overall framework schematic diagram of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet that in the embodiment of the present invention, domain knowledge base builds;
Fig. 3 is the part log-on message of Web service in PWeb " Tgels ";
Fig. 4 is in the embodiment of the present invention to service the 3rd article of statement in the text description of Web service " Tgels "
The process schematic of Objective extraction;
In Fig. 5 embodiment of the present invention in Travel field with inquiry " get hotel " semantic similarity >=θc2
The service goal recommendation list of individual service goal bunch and correspondence, wherein the service goal of band underscore represents user
The service goal selected.
Detailed description of the invention
Understand and implement the present invention for the ease of those of ordinary skill in the art, below in conjunction with the accompanying drawings and embodiment pair
The present invention is described in further detail, it will be appreciated that enforcement example described herein is merely to illustrate reconciliation
Release the present invention, be not intended to limit the present invention.
Carry out object-oriented RESTful Web service with the Web service on PWeb website below and be found to be real
Execute example, and combine accompanying drawing, describe the implementation process of the present invention in detail.
PWeb is the famous mashup and Web service registration center that can openly access on current the Internet.By
On March 23rd, 2016, the Web service of the upper registration of PWeb has reached 14,836, including follow SOAP, REST,
All kinds of Web services of the agreements such as XML-RPC, and provide some log-on messages of Web service, such as name,
Text description, classification (i.e. art) etc..Fig. 3 illustrates Web service in PWeb " Tgels "
The part log-on message of (http://www.programmableweb.com/api/tgels).
Asking for an interview Fig. 1, the present embodiment is first carried out step 1, uses reptile to collect 6 fields from PWeb website:
Financial, Music, Media Management, Payment, Travel, Weather, Web clothes
The log-on message of business, describes and classification including name, text.
Then, the Web service to collecting carries out pretreatment, specifically includes: utilize Apache Lucene
The StandardAnalyzer instrument of (http://lucene.apache.org/) letter to each Web service
Breath resolves, and obtains all words that each Web service comprises;Then, utilize WordNet's
Lemmatization instrument carries out lemmatization process to all words;Then, remove without real according to disabling vocabulary
The word of border meaning;Finally, the frequency of each word in statistics Web service.
Although the Web service collection collected possesses category division, but exists the most overlapping between classification, as
" Financial " and " Payment ", " Music " and " Media Management ", " Travel "
" Weather ".Therefore, use Web service sorting technique that the category division of Web service collection is adjusted.
Ask for an interview Fig. 2, then perform step 2, be that 6 fields carry out domain knowledge base structure;
First, all words and each word comprised in the pretreated Web service in each field are added up in this field
In frequency of occurrence;Then, each specific field d is carried out domain knowledge base structure, specifically includes: meter
Calculate each word importance to this field in d, and according to importance to word descendings all in d, obtain
Field Words sequencing table RDWLd;Then, RDWL is selectedd150 words of top in noun, constitute
Field core name word set DCNd。
Then, the text of each Web service from d carries out service goal extraction in describing, obtain Web service-
Service goal incidence matrix WSSGAMd.Fig. 4 is with the 3rd article of language in the text description of Web service " Tgels "
Sentence: " API methods support listings of flight options, as well as creating
And deleting flight deal packages. " as a example by illustrate service goal extract process.
Then, in statistics d, the sgv part of all service goals, obtains field verb collection DVd;
Then, calculate the semantic similarity between service goal in d, build service goal semantic similarity matrix;
Based on service goal semantic similarity matrix, obtain the vector representation of all service goals in d;Then, use
The vector of service goals all in d is clustered by K-Means algorithm, obtains service goal gathering SGCd。
Finally, perform step 3, as a example by user's inquiry " get hotel " (being designated as q), carry out Web service
Find, obtain candidate's Web service collection;
First, q is carried out pretreatment, including participle, lemmatization, remove stop words and word frequency statistics;Then,
The matching degree calculated between q and 6 fields (only considers the top 300 of the Field Words sequencing table in each field
Individual word, i.e. arranges K=300).Table 1 is the matching degree in 6 fields and q, it can be seen that with q matching degree
High field is Travel.
16 fields of table and the matching degree inquiring about " get hotel "
Then, semantic similarity (the threshold value setting between each service goal bunch in q and Travel field is calculated
For: θv=θcn=θoth=0.8, θc=0.4) semantic similarity >=θ with q, is obtainedcService goal
Gathering mC.Then, the semantic similarity between each service goal in q and mC is calculated, and according to semanteme
Similarity, to service goal descendings all in mC, obtains service goal recommendation list.From recommendation list,
User is selected to the service goal embodying its demand as new inquiry.
Fig. 5 is the semantic similarity >=θ with qc2 service goals bunch and correspondence service goal recommend row
Table, wherein the service goal of band underscore represents the service goal that user selects.
Finally, service goal collection user selected and the service goal collection of each Web service in Travel field
Mate, be met candidate's Web service collection of user's request.Table 2 be 5 candidate's Web services and they
Comprise with user selected by the service goal mated of service goal.
5 candidate's Web services of table 2 " get hotel "
It should be appreciated that the part that this specification does not elaborates belongs to prior art.
It should be appreciated that the above-mentioned description for preferred embodiment is more detailed, can not therefore be considered
Restriction to scope of patent protection of the present invention, those of ordinary skill in the art is under the enlightenment of the present invention, not
Depart under the ambit that the claims in the present invention are protected, it is also possible to make replacement or deformation, each fall within this
Within bright protection domain, the scope that is claimed of the present invention should be as the criterion with claims.
Claims (13)
1. an object-oriented RESTful Web service finds method, it is characterised in that include following step
Rapid:
Step 1: collect the information of RESTful Web service, including Web service title, art and merit
The text of energy property describes, and obtains Web service collection;
Step 2: Web service collection is carried out pretreatment;
Step 3: for pretreated Web service collection, it is judged that whether Web service comprises the letter of art
Breath;
The most then perform following step 4;
If it is not, then perform following step 5;
Step 4: judge field divides whether there is overlap;
The most then perform following step 5;
If it is not, then perform following step 6;
Step 5: use Web service sorting technique that Web service collection is carried out field division;
Step 6: carry out the structure of domain knowledge base for the Web service collection in each field, including: domain term
Remittance sequencing table, field verb collection, field core name word set, Web service-service goal incidence matrix and service
Target gathering;
Step 7: given user is inquired about q and carries out Web service discovery.
Object-oriented RESTful Web service the most according to claim 1 finds method, and its feature exists
In: described in step 2, Web service collection is carried out pretreatment, including participle, lemmatization, go stop words and
Word frequency statistics, implements and includes following sub-step:
Step 2.1: resolve the information of each Web service, obtains all words wherein comprised;
Step 2.2: all words are reduced into its basic original shape;
Step 2.3: remove some words without practical significance according to disabling vocabulary;
Step 2.4: add up each word frequency in Web service.
Object-oriented RESTful Web service the most according to claim 1 finds method, and its feature exists
In, implementing of step 5 includes following sub-step:
Step 5.1: specify the field needing to carry out classifying, is divided into what designated field was correlated with by Web service collection
The unrelated Web service collection of Web service collection and field;
Step 5.2: the unrelated Web service of Web service collection relevant from field respectively and field is concentrated and chosen number
The Web service structure training set that mesh is identical, the Web service in addition to training set constitutes test set;
Step 5.3: build vector space model for the Web service in training set and test set, will each Web
Agent list is shown as a vector, and the dimension of vector is the sum of the different words that all Web services comprise, vector
Every one word of one-dimensional representation, each word weights in each Web service vector use TF-IDF to calculate;
Step 5.4: use support vector machine that the vector space built is classified, obtain the Web of designated field
Services set.
Object-oriented RESTful Web service the most according to claim 1 finds method, and its feature exists
In, in step 6, first to each field, add up the pretreated Web service in this field and concentrate the institute comprised
There is word and each word frequency of occurrence sum in all Web services in this field;Then, for specific field
D carries out domain knowledge base structure, and it implements and includes following sub-step:
Step 6.1: calculate each word importance to this field in d, and according to importance to words all in d
Descending, obtains the Field Words sequencing table of d, is designated as RDWLd;
Step 6.2: select RDWLd150 words of top in noun, constitute d field core noun
Collection, is designated as DCNd;
Step 6.3: the text of each Web service from d carries out service goal extraction in describing, and obtains d's
Web service-service goal incidence matrix, is designated as WSSGAMd;
Step 6.4: the verb that in statistics d, all service goals comprise, obtains the field verb collection of d, is designated as
DVd;
Step 6.5: calculate the semantic similarity between service goal in d, build service goal semantic similarity
Matrix, every a line of matrix represents a service goal in d, and every string also represents a service in d
Target, the value of each unit is the semantic similitude between two service goals that the row and column at this unit place is corresponding
Degree;
Step 6.6: based on service goal semantic similarity matrix, service goal each in d is expressed as one
Vector, the dimension of vector is the sum of service goal in d, a service in every one-dimensional representation d of vector
Target, value the most one-dimensional in the vector of each service goal sg is between the service goal that sg is corresponding with this dimension
Semantic similarity;Then, utilize K-Means algorithm that the vector of service goals all in d is clustered,
To the service goal gathering of d, it is designated as SGCd。
Object-oriented RESTful Web service the most according to claim 4 finds method, and its feature exists
In, each word w importance to this field in d described in step 6.1, computational methods are as follows:
Wherein, N (w, d) represents w frequency of occurrence in d,Represent the maximum that in d, word occurs
The frequency, | and d:w ∈ d} | representing the field number comprising w, | D | represents that the field belonging to whole Web service is total
Number,Representing w frequency of occurrence sum in all spectra, α is little between 0 to 1
Number.
Object-oriented RESTful Web service the most according to claim 4 finds method, and its feature exists
In, described in step 6.3, from d, the text of each Web service carries out service goal extraction in describing, its tool
Body realizes step: first, obtains text and describes the statement set comprised;Then, Stanford Parser is utilized
Every statement is carried out syntax parsing, obtains embodying the SD set of grammer dependence between vocabulary in sentence;
Then, according to 3 kinds of SD pattern: dobj (a, b) →<a,b,null>, nsubjpass (a, b) →<a,b,null>
With prep (a, b)+nsubj (a, c) →<a,b,null>, concentrate from the SD of every statement and obtain this statement bag
The skeleton of some the critical services targets contained, referred to as initial target;Then, other is utilized in every statement
SD relation carries out information expansion to each initial target obtained from this statement, identifies hiding service simultaneously
Target, obtains the candidate service object set of this statement;Finally, to the candidate service mesh obtained from all statements
Mark carries out lemmatization and goes stop words to process, and obtains the service goal collection comprised in the text description of Web service.
Object-oriented RESTful Web service the most according to claim 4 finds method, and its feature exists
In, semantic similarity between service goal in d described in step 6.5, computational methods are as follows:
First, the word that service goal sg each in d comprises is divided into 3 subsets, i.e.
Vd(sg)=W (sg) ∩ DVd,CNd(sg)=W (sg) ∩ DCNd,
Othd(sg)=W (sg)-Vd(sg)-CNd(sg),
Wherein, W (sg) represents the word set that sg comprises;DVdAnd DCNdRepresent respectively d field verb collection and
Field core name word set;Vd(sg)、CNdAnd Oth (sg)d(sg) represent respectively verb collection that sg comprises,
Field core name word set and other word sets in addition to verb with field core noun;For service goal, this
Importance priority between 3 kinds of words is: field core noun > verb > other words;
Then, any two service goal sg in d is calculatediAnd sgjBetween semantic similarity, use as follows
Formula:
gSim(sgi,sgj)=λ1×WSim(Vd(sgi),Vd(sgj))+λ2×WSim(CNd(sgi),CNd(sgj))
+λ3×WSim(Othd(sgi),Othd(sgj)),
Wherein, λ1、λ2And λ3For weight factor;WSim(W1,W2) represent two word sets W1And W2Between language
Justice similarity, computing formula is:
Wherein, | W1| and | W2| represent word set W respectively1And W2In the number of word that comprises;wsim(wi,wj) represent
Two word wiAnd wjBetween semantic similarity;Represent word set W2In all words with
Word wiBetween maximum semantic similarity;WNSim(wi,wj) represent two word wiAnd wjAt WordNet
In semantic similarity.
Object-oriented RESTful Web service the most according to claim 1 finds method, and its feature exists
In, implementing of step 7 includes following sub-step:
Step 7.1: given user is inquired about q and carries out pretreatment, including participle, lemmatization, goes to disable
Word and word frequency statistics;
Step 7.2: calculate the matching degree between q and each field, obtain the field the highest with q matching degree,
It is designated as md;
Step 7.3: calculate the semantic similarity between each service goal bunch in q and md, obtain and q language
The service goal gathering that justice is similar, is designated as mC;
Step 7.4: calculate the semantic similarity between each service goal and q in mC, and according to semantic phase
Like degree to service goal descendings all in mC, obtain the service goal recommendation list of q, therefrom user's choosing
Select the service goal that can embody its demand, be designated as SGq, as new inquiry;
Step 7.5: by SGqThe service goal collection of Web service each with md mates, and is met
Candidate's Web service collection of user's request.
Object-oriented RESTful Web service the most according to claim 8 finds method, and its feature exists
In, calculate the matching degree between q and each field d described in step 7.2, employing equation below:
Wherein, K represents the Field Words sequencing table RDWL only considering ddIn K word of top;Generation
Table word wkImportance to d;Represent word wkThe frequency in q.
Object-oriented RESTful Web service the most according to claim 8 finds method, its feature
It is, calculates the semantic similarity between each service goal bunch in q and md described in step 7.3, specifically
Method is as follows:
First, by service goal bunch C each in mdiThe word comprised is divided into 3 subsets, i.e.
Wherein, Vmd(Ci)、CNmd(Ci) and Othmd(Ci) represent C respectivelyiThe verb collection that comprises, field core name
Word set and other word sets in addition to verb with field core noun;Vmd(sgk)、CNmd(sgk) and
Othmd(sgk) represent service goal sg respectivelykThe verb collection that comprises, field core name word set and except verb and neck
Other word sets outside the core noun of territory;
Then, V is obtained respectivelymd(Ci)、CNmd(Ci) and Othmd(CiWith any word semantic similitude in q in)
Vocabulary subset;
Vmd(CiWith the vocabulary subset of any word semantic similitude in q in), it is defined as follows:
Wherein, W (q) represents the word set that q comprises;θvFor similarity threshold;wsim(wi,wj) represent two word wi
And wjBetween semantic similarity;
CNmd(CiWith the vocabulary subset of any word semantic similitude in q in), it is defined as follows:
Wherein, W (q) represents the word set that q comprises;θcnFor similarity threshold;wsim(wi,wj) represent two words
wiAnd wjBetween semantic similarity;
Othmd(CiWith the vocabulary subset of any word semantic similitude in q in), it is defined as follows:
Wherein, W (q) represents the word set that q comprises;θothFor similarity threshold;wsim(wi,wj) represent two words
wiAnd wjBetween semantic similarity;
Finally, q and C is calculatediBetween semantic similarity:
Wherein, Vmd(Ci)、CNmd(Ci) and Othmd(Ci) represent C respectivelyiThe verb collection that comprises, field core name
Word set and other word sets in addition to verb with field core noun;WithRepresent V respectivelymd(Ci)、CNmd(Ci) and Othmd(CiWith any word justice phase in q in)
As vocabulary subset;N(wk,Ci) represent word wkAt CiIn the frequency;λ1、λ2And λ3For weight factor,
Corresponding to the λ in claim 71、λ2And λ3。
11. object-oriented RESTful Web services according to claim 10 find method, its feature
Being, described in step 7.3, mC is defined as follows:
MC={Ci|Ci∈SGCmd∧qCSim(q,Ci)≥θc,
Wherein, SGCmdRepresent the service goal gathering of md;qCSim(q,Ci) represent q and CiBetween semanteme
Similarity, calculation is given the most;θcFor similarity threshold.
12. object-oriented RESTful Web services according to claim 8 find method, its feature
It is, described in step 7.4, calculates the semantic similarity between each service goal and q, specifically side in mC
Method is as follows:
First, the word that q comprises is divided into 3 subsets, it may be assumed that
Vmd(q)=W (q) ∩ DVmd,CNmd(q)=W (q) ∩ DCNmd,
Othmd(q)=W (q)-Vmd(q)-CNmd(q),
Wherein, W (q) represents the word set that q comprises;DVmdAnd DCNmdRepresent the field verb collection of md respectively
With field core name word set;Vmd(q)、CNmd(q) and Othmd(q) represent respectively verb collection that q comprises,
Field core name word set and other word sets in addition to verb with field core noun;
Then, the semantic similarity between each service goal sg and q in mC is calculated, employing formula:
QGSim (q, sg)=λ1×WSima(Vmd(q),Vmd(sg))+λ2×WSima(CNmd(q),CNmd(sg))
+λ3×WSima(Othmd(q),Othmd(sg)),
Wherein, Vmd(q)、CNmd(q) and OthmdQ () represents verb collection, the field core noun that q comprises respectively
Collection and other word sets in addition to verb with field core noun;Vmd(sg)、CNmdAnd Oth (sg)md(sg)
Represent verb collection that sg comprises, field core name word set and its in addition to verb with field core noun respectively
His word set;λ1、λ2And λ3For weight factor, corresponding to the λ in claim 71、λ2And λ3;
WSima(W1,W2) represent two word sets W1And W2Between asymmetric semantic similarity, calculation is:
Wherein, | W1| represent word set W1In the number of word that comprises;wsim(wi,wj) represent two word wiAnd wjIt
Between semantic similarity, calculation is given the most;Represent word
Collection W2In all words and word wiBetween maximum semantic similarity.
13. object-oriented RESTful Web services according to claim 8 find method, its feature
Being, the collection of candidate's Web service described in step 7.5 is:
Wherein, SmdRepresent the Web service collection of md;SGqRepresent user to select from the service goal recommendation list of q
The service goal collection selected;SGsRepresent the service goal collection of Web service s, can be by WSSGAMmdObtain,
I.e. SGs={ sgj|WSSGAMmd(s,sgj)=1};W(sgi) and W (sgj) represent sg respectivelyiAnd sgjBag
The word set contained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610247123.4A CN105930443B (en) | 2016-04-20 | 2016-04-20 | A kind of object-oriented RESTful Web services find method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610247123.4A CN105930443B (en) | 2016-04-20 | 2016-04-20 | A kind of object-oriented RESTful Web services find method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105930443A true CN105930443A (en) | 2016-09-07 |
CN105930443B CN105930443B (en) | 2017-06-27 |
Family
ID=56838583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610247123.4A Active CN105930443B (en) | 2016-04-20 | 2016-04-20 | A kind of object-oriented RESTful Web services find method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105930443B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388477A (en) * | 2018-01-11 | 2018-08-10 | 上海交通大学 | Dynamic service network construction method and system |
CN109992244A (en) * | 2018-12-06 | 2019-07-09 | 中国船舶重工集团公司第七0九研究所 | A kind of discrete division methods of serviceization requirement of information system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102129479A (en) * | 2011-04-29 | 2011-07-20 | 南京邮电大学 | World wide web service discovery method based on probabilistic latent semantic analysis model |
CN102855312A (en) * | 2012-08-24 | 2013-01-02 | 武汉大学 | Domain-and-theme-oriented Web service clustering method |
CN103440343A (en) * | 2013-09-11 | 2013-12-11 | 武汉大学 | Knowledge base construction method facing domain service target |
CN105404693A (en) * | 2015-12-18 | 2016-03-16 | 浙江工商大学 | Service clustering method based on demand semantics |
-
2016
- 2016-04-20 CN CN201610247123.4A patent/CN105930443B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102129479A (en) * | 2011-04-29 | 2011-07-20 | 南京邮电大学 | World wide web service discovery method based on probabilistic latent semantic analysis model |
CN102855312A (en) * | 2012-08-24 | 2013-01-02 | 武汉大学 | Domain-and-theme-oriented Web service clustering method |
CN103440343A (en) * | 2013-09-11 | 2013-12-11 | 武汉大学 | Knowledge base construction method facing domain service target |
CN105404693A (en) * | 2015-12-18 | 2016-03-16 | 浙江工商大学 | Service clustering method based on demand semantics |
Non-Patent Citations (3)
Title |
---|
JIAN WANG等: "《Towards Services Discovery based on Service Goal Extraction and Recommendation》", 《2013 IEEE 10TH INTERNATIONAL CONFERENCE ON SERVICES COMPUTING》 * |
ZHANG NENG等: "《WSGM-SD: An Approach to RESTful Service Discovery Based on Weighted Service Goal Model》", 《CHINESE JOURNAL OF ELECTRONICS》 * |
张能等: "《一种领域服务目标知识库的构建方法》", 《小型微型计算机系统》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108388477A (en) * | 2018-01-11 | 2018-08-10 | 上海交通大学 | Dynamic service network construction method and system |
CN108388477B (en) * | 2018-01-11 | 2020-11-17 | 上海交通大学 | Dynamic service network construction method and system |
CN109992244A (en) * | 2018-12-06 | 2019-07-09 | 中国船舶重工集团公司第七0九研究所 | A kind of discrete division methods of serviceization requirement of information system |
CN109992244B (en) * | 2018-12-06 | 2022-08-02 | 中国船舶重工集团公司第七0九研究所 | Discrete division method for requirements of service information system |
Also Published As
Publication number | Publication date |
---|---|
CN105930443B (en) | 2017-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Gillick et al. | A scalable global model for summarization | |
US6965900B2 (en) | Method and apparatus for electronically extracting application specific multidimensional information from documents selected from a set of documents electronically extracted from a library of electronically searchable documents | |
Li et al. | A probabilistic approach for web service discovery | |
CN105955981B (en) | A kind of personalized traveling bag recommended method based on demand classification and subject analysis | |
Foley et al. | Learning to extract local events from the web | |
Kozareva et al. | Learning arguments and supertypes of semantic relations using recursive patterns | |
US20030115188A1 (en) | Method and apparatus for electronically extracting application specific multidimensional information from a library of searchable documents and for providing the application specific information to a user application | |
AU2017200094A1 (en) | Systems of computerized agents and user-directed semantic networking | |
CN105589948A (en) | Document citation network visualization and document recommendation method and system | |
CN106156272A (en) | A kind of information retrieval method based on multi-source semantic analysis | |
Gao et al. | Network model of knowledge diffusion | |
CN106372060A (en) | Search text labeling method and device | |
Tahri et al. | DBPedia based factoid question answering system | |
CN106844632A (en) | Based on the product review sensibility classification method and device that improve SVMs | |
Dehkharghani et al. | Adaptation and use of subjectivity lexicons for domain dependent sentiment classification | |
Shao et al. | Personalized travel recommendation based on sentiment-aware multimodal topic model | |
Tur et al. | Exploiting the semantic web for unsupervised natural language semantic parsing | |
CN110134820A (en) | A kind of mixed type individualized music recommended method being incremented by based on feature | |
CN103440343B (en) | Knowledge base construction method facing domain service target | |
CN103095849B (en) | A method and a system of spervised web service finding based on attribution forecast and error correction of quality of service (QoS) | |
Gong et al. | Phrase-based hashtag recommendation for microblog posts. | |
Gupta et al. | Sentiment analysis using support vector machine | |
Wang et al. | Seeft: Planned social event discovery and attribute extraction by fusing twitter and web content | |
CN105930443A (en) | Goal-oriented RESTful Web service discovery method | |
CN103530419B (en) | A kind of Method for Ontology Learning of web oriented service describing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |