CN102457569B - Redundancy check method and system for Web services facing IOT (Internet of Things) application - Google Patents

Redundancy check method and system for Web services facing IOT (Internet of Things) application Download PDF

Info

Publication number
CN102457569B
CN102457569B CN201110206923.9A CN201110206923A CN102457569B CN 102457569 B CN102457569 B CN 102457569B CN 201110206923 A CN201110206923 A CN 201110206923A CN 102457569 B CN102457569 B CN 102457569B
Authority
CN
China
Prior art keywords
service
similarity
rule
wsdl
internet
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.)
Expired - Fee Related
Application number
CN201110206923.9A
Other languages
Chinese (zh)
Other versions
CN102457569A (en
Inventor
牛温佳
徐月梅
赵志军
唐晖
谭红艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Acoustics CAS
Original Assignee
Institute of Acoustics CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Acoustics CAS filed Critical Institute of Acoustics CAS
Priority to CN201110206923.9A priority Critical patent/CN102457569B/en
Publication of CN102457569A publication Critical patent/CN102457569A/en
Application granted granted Critical
Publication of CN102457569B publication Critical patent/CN102457569B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a redundancy check method and a redundancy check system for Web services facing IOT (Internet of Things) application. The method comprises the following steps of: a step of service acquisition, i.e. a Web server acquires a plurality of services to be subjected to redundancy check through an interface; steps of WSDL (Web Services Description Language) analysis on the basis of rules and rule vectorization, i.e. each service is described and depicted by adopting a WSDL grammar on the basis of the rules and the Web services adopt expanded WSDL service elements, so that rule description on service functions is increased; a step of similarity calculation; and a step of redundancy decision. The redundancy check method and the redundancy check system have the following advantages that 1, the rule expansion on the basis of a logical expression is carried out on the WSDL grammar for the first time, the rule description on the service functions is increased, and the support is provided for calculation of more exquisite service similarity; and 2, the rule of the logical expression is introduced into calculation of service similarity for the first time, the novel service redundancy check method is given on the basis of the introduction of rule of the logical expression into calculation of service similarity, and the redundancy check and recognition capability of the services in the IOT is improved.

Description

A kind of redundant detecting method and system of Web service of internet of things oriented application
Technical field
The present invention relates to the service management of Internet of Things, redundant detecting method and system that particularly a kind of Web service of internet of things oriented application represents.
Background technology
Internet of Things (Internet ofThings, IOT) be an emerging concept, a kind of by information sensing equipment such as radio-frequency (RF) identification (RFID), infrared inductor, global positioning system, laser scanners, any article and the Internet are coupled together, carry out information exchange and communication, to realize the network of intelligent identification, location, tracking, monitoring and management.Definition by Internet of Things can find out, its core and basis remain the Internet, and different is that the user side that the Internet is connected expands to article and article.Therefore, the various Internet of Things application services that provider provides, can dispose so that client remote access and call execution by Internet, by a kind of inevitable development trend that is Internet of Things Service Management.
Web service (Web Service, WS) be that in current Internet, topmost a kind of service realizes technology, it is described and encapsulates various software applications by WSDL (WSDL), and then the software application after utilizing Uniform Resource Identifier (URI) to encapsulation carries out mark location, by Simple Object Access Protocol (SOAP), carry out message communicating, interoperability between the service of final realization leap different geographical, different industries.
Web service technology provides effective technical support for the Service Management on Internet.Yet towards concrete Internet of Things application, Web service still faces following problem and challenge:
The first, from user perspective, the service of Internet of Things presents the feature of magnanimity.On the one hand, these services can rely on the sensing equipment (as transducer) of bottom mostly, and therefore, along with the growth of time, the data that service itself is processed are by exponential growth; On the other hand, the type of goods of access Internet is various, Various Functions, will cause quantity of service magnanimity to increase.Do not affecting under the prerequisite of QoS of customer, if above service scale is not controlled, will produce enormous impact to existing storage, search and the communication technology, becoming a bottleneck of present stage Internet of Things development.
The second, from provider's angle, the service of Internet of Things presents dynamic feature.Sensor sensing equipment, along with the frequency using strengthens, can exist energy to consume degradation problem under excessive, susceptibility.If frequently change hardware device, or changing and rebuild and issue new service according to sensor performance, all will cause the serious waste of resource, is not rational solution.Therefore,, when sensing equipment performance changes, in good time respective service is made to dynamic adjustment just become extremely important.
In Internet of Things application, traditional Web service method for expressing (WSDL2.0) lacks fully portraying service function, especially lack the description to core rule, causing cannot the similar service of distinctive function and cannot eliminate service redundant, greatly the storage of increment internet services and search burden.Therefore, on WSDL2.0 basis, the present invention proposes a kind of new Web service method for expressing, WSDL grammer has been carried out to the Rule Extended of logic-based expression formula, and further provided corresponding service redundant detection method.
Therefore,, for the fast development of Internet of Things application, the problem that how to solve above Web service technology existence is extremely urgent.By analyzing us, find, the key of dealing with problems still will be in the key foundation of Web service technology, i.e. Web service represents seeking breakthrough.
At present, Web service represents the WSDL descriptive language that mainly adopts the companies such as IBMHe Microsoft to propose March calendar year 2001, by being revised in June, 2007, obtains the recommendation of W3C international organization, and current latest edition is WSDL2.0.WSDL2.0 is the service describing standard being based upon on XML language basis, on grammer, take description as root element, and description root element has encapsulated types, interface, binding and tetra-daughter elements of service, its syntactic frame as shown in Figure 1.Wherein types element definition the data type used while exchanging messages of service; Interface element definition concrete Web service operation, the error message sequence of returning after input, output and the service that comprises service makes mistakes; Binding element definition user's agreement of communicating by letter with Web service; Service element has been each a binding element declaration unique Web service reference address.WSDL2.0 syntactic frame as shown in Figure 6.
In fact, how WSDL WSDL no matter define and expand on grammer, it is all following a basic principle when describing Web service, i.e. any Web service portray the service semantics intension that all needs to fully take into account three aspects: input (Input), output (Output) and service function (Function).Fig. 1 provided in WSDL2.0 grammer four daughter elements respectively with the mapping relations of import of services, output and service function.
Be summed up, WSDL2.0 possesses following three features in the process of portraying service semantics intension:
The first, types element has portrayed with interface element the content that most of import of services is relevant with output, comprises data type, message format, transmission of messages order etc.;
The second, service element is mainly used to portray service function, it is pointed out that it does not provide concrete functional description, but has provided the reference address of service function;
The 3rd, binding element is used for defining message format (as SOAP) and the host-host protocol (as HTTP) of import of services output, other three daughter elements of comparing, from service function angle, it on Web service core content without any impact.
By above analysis, be not difficult to find that current WSDL2.0 only has service element to relate to the description that service function is relevant on grammer.Description interface to service function is single, and descriptor is insufficient, by having caused two similar Web services to describe difference by WSDL, comes.For example the light in room is controlled in service, a service is if brightness is greater than 300 (nits) in room, turns off the light, and another one is if brightness is less than 500 (nits), turns off the light.Input is all brightness, and output is all the instruction of turning off the light, and it is all also reference address that service function is described, and for the core rule relating in service, traditional WSDL cannot portray and distinguish at all.
In sum, in Internet of Things application, the defect of this traditional Web service method for expressing (WSDL2.0) is: lack fully portraying service function, especially lack the description to core rule, causing cannot the similar service of distinctive function and cannot eliminate service redundant, greatly the storage of increment internet services and search burden.
Therefore, on traditional WSDL basis, the present invention proposes a kind of new Web service method for expressing, and further provide corresponding service redundant detection method.
Summary of the invention
The object of the invention is to, for overcoming the redundant detecting method that the Web service of prior art based on internet of things oriented application represent, lack the description to different service core rules, causing cannot the similar service of distinctive function and cannot eliminate service redundant, and then the storage of increment internet services and the problem of search burden greatly, thereby the redundant detecting method and the system that provide a kind of Web service of internet of things oriented application to represent.
In view of service element in Web service description only relates to the reference address of service function, the present invention will start with from service element, introduce rule description to increase the portraying of import of services output relation, thus the redundant detecting method that provides a kind of Web service based on internet of things oriented application to represent.
For achieving the above object, the similarity the invention provides based on calculating between some input services is carried out redundancy detection, and described method comprises following steps:
Obtain the step of service, Web server obtains several services that will carry out redundancy detection by interface;
The step of rule-based WSDL parsing and regular vectorization, according to WSDL syntax rule, carries out resolving based on XML to the WSDL of each service, extracts each and serves relevant input/output variable and respective logic expression formula rule; Described each service adopts rule-based WSDL grammer to be described and portrays; Described Web service adopts the WSDL service element of expansion, and then has increased the rule description to service function;
Calculate the step of similarity, the rule of each service is carried out to vectorization, logic-based expression formula is relatively one of them service and all the other services one by one, calculates several similarity value calculations based on service regulation;
Redundancy steps in decision-making, by all similarity values that obtain one by one with a setting threshold comparison, similarity is greater than threshold value and judges that two services exist redundancy; Otherwise dissimilar between service.
In technique scheme, it is as follows that the WSDL service element of described expansion comprises label: policy, condition, element, relation, bracket, operand, loperator and roperator;
Described policy element, is used for mark service regulation;
In described policy element definition condition daughter element, the necessary satisfied precondition of the use of this this service of condition daughter element mark input;
Wherein, described precondition is comprised of several element labels, and each element is a simple relational expression, and described expression formula can form complicated logical expression by relation and bracket; In each element, by operand, defined the operand of expression formula, by loperator defining relation operator, by roperator, define basic operation.
Described relational operator comprises: >, and <, >=, <=,==, unequal to, described basic operation symbol comprises :+,-, * ,/, %.
In technique scheme, described that rule is carried out to vectorization concrete steps is as follows:
Step 1 navigates to service element from WSDL, by XML, resolves policy label, according to logical operator, extracts the relational expression set in rule, forms the binary tree data structure of logical expression;
Step 2,, each relational expression is operated by transposition, vector turns to the standard multi-C vector ti in following formula;
t=(s1 v11 q11 v12 q12 v13…v1n,…,si vi1 qi1 vi2 qi2 vi3…vin,…,sn vn1 qn1 vn2qn2 vn3…vnn,p,c)
Wherein, V is variables collection, and C is constant set, and P is that relational operator set and Q are the set of basic operation symbol; Transposition symbol si ∈+,-, vij ∈ V, qij ∈ Q, p ∈ P, c ∈ C.Described logical operator comprises: & &,! , || and
Figure GDA0000108962380000041
The described similarity based on service regulation is calculated and is adopted Dice coefficient two-value weight method.Described calculating formula of similarity is:
Sim(W1,W2)=0.5SimIO(W1,W2)+0.5SimRule(W1,W2);
Wherein, W1 and W2 are respectively two services need to carrying out similarity calculating.The similarity of service comprises service IO similarity and service regulation similarity, uses respectively SimIO (W1, W2) and SimRule (W1, W2) to represent.Here consider that service IO and service regulation are of equal importance in service similarity is calculated, therefore, give respectively their each calculating weights of 0.5.
Based on said method, the present invention also provides a kind of redundancy detection system of the Web service based on internet of things oriented application, for calculating the similarity between some input services, this system comprises: service acquisition module, similarity calculation module, redundancy decision-making module and post-processed module, it is characterized in that, described system also comprises: rule-based WSDL resolves and regular vectorization module;
Described rule-based WSDL parsing module, according to WSDL syntax rule, carries out resolving based on XML to the WSDL of each service, extracts each and serves relevant input/output variable and respective logic expression formula rule;
Described regular vectorization module, for carrying out vectorization to the rule of each service;
Wherein, described similarity calculation module adopts the similarity calculating method based on service regulation;
The similarity of the value judgement decision service of the similarity that the similarity calculating method of described redundancy decision-making module based on service regulation obtains.
Described each service adopts rule-based WSDL grammer to be described and portrays; Described Web service represents that expansion service element increases the rule to the rule description of service function and described WSDL grammer logic-based expression formula; Described similarity be calculated as based on the similarity of logical expression calculate.
It is as follows that the WSDL service element of described expansion comprises label: policy, condition, element, relation, bracket, operand, loperator and roperator; Described policy element, is used for mark service regulation; In described policy element definition condition daughter element, the necessary satisfied precondition of the use of this this service of condition daughter element mark input; Wherein, described precondition is comprised of several element labels, and each element is a simple relational expression, and described expression formula can form complicated logical expression by relation and bracket; In each element, by operand, defined the operand of expression formula, by loperator defining relation operator, by roperator, define basic operation.
Described relational operator comprises: >, and <, >=, <=,==, unequal to, described basic operation symbol comprises :+,-, * ,/, %.
Described regular vectorization module further comprises: resolve and form binary tree submodule, for navigating to service element from WSDL, by XML, resolve policy label, according to logical operator, extract the relational expression set in rule, form the binary tree data structure of logical expression; Vectorization module, for each relational expression is operated by transposition, vector turns to the standard multi-C vector ti in following formula;
t=(s1 v11 q11 v12 q12 v13…v1n,…,si vi1 qi1 vi2 qi2 vi3…vin,…,sn vn1 qn1 vn2qn2 vn3…vnn,p,c)
Wherein, V is variables collection, and C is constant set, and P is that relational operator set and Q are the set of basic operation symbol; Transposition symbol si ∈+,-, vij ∈ V, qij ∈ Q, p ∈ P, c ∈ C.
The described similarity based on service regulation is calculated and is adopted Dice coefficient two-value weight method.
The present invention relates to the redundant detecting method that a kind of Web service based on internet of things oriented application represents, the method has been carried out the Rule Extended of logic-based expression formula to WSDL grammer, and further provide corresponding service redundant detection method, comprising: 1) regular vectorization; 2) service similarity is calculated; 3) service redundant detects.Compared with prior art, the present invention has the following advantages: 1,, first to having carried out the Rule Extended of logic-based expression formula on WSDL grammer, increased the rule description to service function, for finer service similarity, calculated and provide support; 2, the similarity of first logical expression rule being introduced to service is calculated, and has provided on this basis a kind of new service redundant detection method, has improved redundancy detection and the identification capability of in Internet of Things, serving.
The invention has the advantages that, the present invention compared with prior art, has the following advantages:
1, first to having carried out the Rule Extended of logic-based expression formula on WSDL grammer, increased the rule description to service function, for finer service similarity, calculated and provide support;
2, the similarity of first logical expression rule being introduced to service is calculated, and provided on this basis a kind of new service redundant detection method, improve redundancy detection and the identification capability of in Internet of Things, serving, thereby greatly reduced storage and the search burden of Internet of Things service.
Accompanying drawing explanation
Fig. 1 is the WSDL2.0 syntactic element of prior art and the mapping relations of import of services, output and service function;
Fig. 2 is service service element expansion figure of the present invention;
Fig. 3-a1 is the workflow diagram that rule-based WSDL of the present invention represents;
Fig. 3-a2 is the workflow diagram of rule-based WSDL parsing module of the present invention;
Fig. 3-b is the workflow diagram of regular vectorization module of the present invention;
Fig. 3-c is the workflow diagram of similarity calculation module of the present invention;
Fig. 4 is the binary tree schematic diagram of logical expression in rule of the present invention;
Fig. 5 is service redundant detection method flow chart of the present invention;
Fig. 6 is the WSDL2.0 syntactic frame schematic diagram of prior art;
Fig. 7 is description of the invention example schematic.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in more detail.As shown in Figure 2, the improvement of the present invention to service service element, grey box is the new part that expands.Can find out, improvement and expansion are along from outside to inside, and route from coarse to fine carries out.First, define policy element, be in and column position with endpoint element, be used for the whole service regulation of mark; Then in policy element the inside, defined condition daughter element, the necessary satisfied precondition of use input of this service of mark; Precondition is comprised of several element, and an element is exactly a simple relational expression (as a > b), by relation and bracket, can form complicated logical expression; In each element, by operand, defined the operand of expression formula, by loperator defining relation operator (as >, <, >=, <=,==, unequal to), by roperator define basic operation (as+,-, *, /, %).Need to explicitly point out, for the sake of simplicity, above computing is defined as basic numeric type computing at present, does not consider character manipulation.Yet this does not have influence on the extended capability of this method to character manipulation, because any character manipulation finally can change into the numeric type computing of ASCII character.
After improvement, seven of newly-increased customized labels: policy, condition, element, relation, bracket, operand, loperator and roperator; In newly-increased label, quote the existing attribute keyword of WSDL, amount to two: type and value; Introduce and rely on constraint two places: the type Feature Dependence in operand is in the types type of NameSpace definition, the parameter that value Feature Dependence defines in input; Loperato, roperator and relation element are defined respectively to corresponding value set, as shown in table 1.
Table 1:loperato, roperator and the set of relation value
Figure GDA0000108962380000071
The data type of WSDL document definition is followed the XML Schema standard that W3C formulates, so the definition of loperato, roperator and rel ation element data type also needs to be consistent with XML Schema standard.Data type in XML pattern is divided into single data type, built-in data type and user's derived data type, wherein user's derived data type allows user to pass through restriction, list or union keyword limit existing data type and create user's derived data type from creating containment surfaces that data type: restriction allows by use, and the containment surfaces of permission is as shown in table 2; List creates table data type; Union creates the new data type of being combined by one or more data types.Known by analyzing, available restriction keyword is that loperato, roperator and rel ation element definition derive from the self-defining data type from string data type, and it is as shown in table 1 with enumeration, to retrain the acceptable value of this derived data type.The present invention is that the data type of loperato, roperator and rel ation element definition is respectively: loperatorType, roperatorType, rel ationType, describe example as shown in Figure 7.
Table 2, the containment surfaces that restriction keyword allows
sequence number the containment surfaces allowing implication
1 enumeration a list of definition acceptable value
2 fractionDigits the maximum decimal digits that definition allows
3 length the character that definition allows or the exact number of list-item
4 maxExclusive the upper limit of definition numerical value.The value allowing must be less than this value
5 maxInclusive the upper limit of definition numerical value.The value allowing must be less than or equal to this value
6 maxLength the character that definition allows or the maximum number of list-item
7 minExclusive the lower limit of definition numerical value.The value allowing must be greater than this value
8 minInclusive the lower limit of definition numerical value.The value allowing must be more than or equal to this value
9 minLength the character that definition allows or the minimal amount of list-item
10 pattern define the accurate sequence of acceptable character
11 totalDigits the accurate figure place of the Arabic numerals that definition allows
12 whiteSpace The processing mode of definition blank character (line feed, carriage return, space and tab)
If Fig. 3-a and 3-b are that rule-based WSDL of the present invention represents and the workflow diagram of parsing module, the module of core of the present invention is that rule-based WSDL represents and parsing module, regular vectorization module and similarity calculation module.
Rule-based WSDL represents to be divided into parsing module that WSDL represents and analytical capabilities.Wherein, WSDL presentation function has been followed the linguistic norm of WSDL, with policy label, represent respectively the beginning of rule description, this rule of condition label is that service should be described by satisfied initial conditions, these initial conditions represent with relational expression and logical operator, every a pair of element describes a relational expression, with relation type, describes the relation between these expression formulas.WSDL analytical capabilities is according to XML schema syntax gauge, navigate to respectively policy label, condition label, element label, extract the relational expression of describing service regulation, in addition extract by the logical relation between the relational expression of relation type mark, for regular vectorization is prepared.
Rule vectorization module with representing as the binary tree data structure of Fig. 4, and turns to each relational expression vector the standard vector of formula (1) by the relational expression that carries out obtaining after WSDL parsing and the logical relation between them.
Similarity calculation module has considered service IO similarity and regular IO similarity, and gives their identical weights in total service similarity is calculated.Wherein, service IO similarity adopts Dice coefficient two-value weight method; The innovative point of regular IO similarity is to calculate each and go the similarity between the relational expression vector after constant quoting Levenstein method.
1) regular vectorization
Logical expression in rule can formal definitions be two tuple <E, F>, wherein E is the relational expression set in logical expression, and F is the set of relationship between relational expression, be summed up and have four logic of class operation relations: & &,! , || and
Figure GDA0000108962380000081
relational expression T consists of the element of four set, i.e. variables collection V={v1, v2, vn}, constant set C, relational operator set P={ >, <, >=, <=,==, unequal to } and basic operation symbol set Q={+ ,-, *, /, %}.
Relational expression take relational operator as in the middle of boundary, by transposition, respectively the item that comprises variable and constant item are moved to the both sides of relational operator.Might as well stipulate, after the direction of transposition operation should be followed transposition, positve term sum is greater than negative term sum.Like this, relational expression just can be expressed as the multi-C vector t of a standard:
t=(s1v11q11v12q12v13…v1n,…,si vi1qi1vi2qi2vi3…vin,…,sn vn1qn1vn2qn2vn3…vnn,p,c),(1)
Transposition symbol si ∈ {+,-} wherein, vij ∈ V, qij ∈ Q, p ∈ P, c ∈ C.
By above analysis and definition, regular vectorization needs two steps altogether, as shown in Fig. 3-b:
The first, from WSDL, navigate to service element, by XML analytic technique, policy daughter element is resolved, according to logical operator
Figure GDA0000108962380000091
extract the relational expression set E={e1 in rule, e2 ... en}, the binary tree data structure Tr of formation logical expression, as shown in Figure 4.
The second, to each relational expression ei, by transposition, operate, vector turns to the standard multi-C vector ti in formula (1).
By analysis, be not difficult to find, regular vectorization has embodied relational expression vectorization and take the feature that relational expression combines as basic logical expression binary treeization.In fact, logical expression can directly form binary tree structure with more fine-grained operator and operator.Why logical expression is combined to construct binary tree with relational expression and the logical operator of coarseness, and further to relational expression vectorization, be for following 2 considerations.First, the emphasis of service regulation should be to excavate in the logical relation presenting in relational expression aspect, rather than specific in each input variable.Secondly, on the basis of relational expression vectorization, also to take into account the logical operation relation between relational expression, utilize binary tree to carry out association, by clear overall structure of portraying logical expression in rule.In sum, the regular vectorization relational expression internal structure of not only having given prominence to the key points, and integrally portrayed the logical operation relation between relational expression, the calculating of service similarity is produced to material impact.
2) service similarity is calculated, as shown in Fig. 3-c.
Rule-based service function is described, and in fact two large divisions, consists of: service IO and the rule that is connected IO.And IO can be portrayed by the set of input variable and output variable respectively, i.e. I={v1, v2 ..., O={o1, o2 ...; Rule can be represented by the binary tree Tr of logical expression, wherein the relational expression node e in binary tree further vector turn to the standard multi-C vector t in formula (1), logical operator node is
Figure GDA0000108962380000092
owing to being not that all input variables all participate in the portraying of service regulation, therefore the similarity of service, except emphasis is considered regular similarity, also must be taken into account the similarity of service IO simultaneously.
Similarity calculating method about service IO has many kinds, and the present invention has just adopted wherein a kind of simple comparative approach, i.e. Dice coefficient two-value weight method.If two Web services are respectively W1 and W2, IO similarity is calculated as follows:
Sim IO ( W 1 , W 2 ) = 2 ( B I + B O ) | I 1 | + | O 1 | + | I 2 | + | O 2 | - - - ( 2 )
Wherein, BI is W1, the number of W2 input variable set I1 and the identical input variable of I2, and BO is W1, the number of W2 output variable set O1 and the identical output variable of O2, || represent the element number in set of computations.
About the similarity calculating method of service regulation, the present invention proposes for the first time.The rule of two Web service W1 and W2 can be represented by binary tree Tr1 and Tr2 respectively.Regulation is carried out consistent preorder traversal to binary tree, obtains respectively two preorder traversal S set Tr1={e1, f1, and e2 ... and STr2={e ' 1, f ' 1, and e ' 2 ..., wherein e is relational expression node, f is logical operator node.
First the similarity of calculated relationship expression formula node e.E can represent with the standard multi-C vector t of formula (1).For relational expression T > 300 and T < 500, we think that constant 300 and 500 can ignore the impact of similarity, and T > and T < produce important impact to similarity.Therefore to t, go constant to process, form tw=(s1v11 q11 v12 q12 v13 ... v1n ..., si vi1 qi1 vi2 qi2 vi3 ... vin ..., sn vn1 qn1 vn2 qn2vn3 ... vnn, p)=(tw1, tw2 ... twn).Below we utilize improved Levenstein editing distance calculate two relational expression knot vectors (tw1, tw2 ..., twn) and (tw ' 1, tw ' 2 ..., tw ' n) similarity.Two similarities between character string are calculated in the map function (character inserts, deletes and replaces) that Levenstein method transforms to another character string by calculating from a character string.Obviously, above method is through improving, and is equally applicable to the relational expression that is comprised of character string and relational operator vectorial, and different is from a relational expression vector transformation to the needed map function of another relational expression by calculating.The map function of order from ei to ej is defined as xform (ei, ej), wherein map function comprises the insertion (insert) of tw, delete (delete) and replace (replace) three kinds of operations, and the cost function c of three kinds of operations of regulation exists and is related to c (delete)+c (insert) <=c (replace), the similarity of relational expression vector ei and ej is defined as so:
SimLeven(ei,ej)=1-xform(ei,ej)/max(|ei|,|ej|)(3)
So, in two service regulations, the binary tree Tr1 of logical expression and the calculating formula of similarity between Tr2 are as follows:
Sim Rule ( W 1 , W 2 ) = 2 | STr sf | * Max { Sim leven ( e i , e j ) , e i &Element; STr 1 , e j &Element; STr 2 } | STr 1 f | + | STr 2 f | - - - ( 4 )
Wherein, STr1, STr2 is Tr1, the preorder traversal set of Tr2; STr1f, STr2f is Tr1, in Tr2 preorder traversal set about the subset of logical operator; STrsf is Tr1, the identical number of same position logical operator f in Tr2 preorder traversal set; The latter half of molecule represents to get the internodal similarity maximum of relational expression in two preorder traversal set.
Wherein, the preorder traversal set that STr is Tr, d is the not identical number of same position logical operator f in two preorder traversal set.The latter half of molecule represents to get the internodal similarity maximum of relational expression in two preorder traversal set.
Finally can obtain total similarity is:
Sim(W1,W2)=0.5SimIO(W1,W2)+0.5SimRule(W1,W2)(5)
3) service redundant detects
Fig. 5 has provided the flow process of service redundant detection method.Can find out, rule-based WSDL represents that with the functional module such as parsing, regular vectorization and similarity calculating be the core that the present invention and other method are distinguished in dotted line frame.First, " service acquisition " will obtain by Web service api interface, and be ready to carry out two services of redundancy detection.Certainly, these two services are to adopt rule-based WSDL grammer proposed by the invention to be described to portray.Then follow syntax rule, service WSDL is carried out resolving based on XML, extract I/O variable and respective logic expression formula rule that service is relevant.Then the rule in service is carried out to vectorization operation, and further carry out similarity calculating.If similarity is greater than predetermined threshold, judge that two services are similar, there is redundancy situation, and carry out the operation of respective redundant service mark.
In fact, service redundant detects the operation that is all very important to user, service provider and UDDI keeper.For user, in the time of lookup service redundancy, " post-processed " means request service selected; For service provider, if find that the service of new issue and own early stage issuing service exist redundancy, need new service to carry out deletion action or old service is carried out to corresponding modify; For UDDI keeper, if find that a plurality of services exist redundancy situation, may need service further to sort out or the operation such as cleaning.Need to indicate, although redundancy is also the important means of a kind of carrying out safety backup and fault recovery, this situation is not studied the scope of consideration in the present invention.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described.Although the present invention is had been described in detail with reference to embodiment, those of ordinary skill in the art is to be understood that, technical scheme of the present invention is modified or is equal to replacement, do not depart from the spirit and scope of technical solution of the present invention, it all should be encompassed in the middle of claim scope of the present invention.It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described.Although the present invention is had been described in detail with reference to embodiment, those of ordinary skill in the art is to be understood that, technical scheme of the present invention is modified or is equal to replacement, do not depart from the spirit and scope of technical solution of the present invention, it all should be encompassed in the middle of claim scope of the present invention.

Claims (11)

1. a redundant detecting method for the Web service that internet of things oriented is applied, the similarity based on calculating between some inputs services is carried out redundancy detection, and described method comprises following steps:
Obtain the step of service, Web server obtains several services that will carry out redundancy detection by interface;
The step of rule-based WSDL parsing and regular vectorization, according to WSDL syntax rule, carries out resolving based on XML to the WSDL of each service, extracts each and serves relevant input/output variable and respective logic expression formula rule; Described each service adopts rule-based WSDL grammer to be described and portrays; Described Web service adopts the WSDL service element of expansion, and then has increased the rule description to service function; Described WSDL is that the English of WSDL is write a Chinese character in simplified form;
Calculate the step of similarity, the rule of each service is carried out to vectorization, logic-based expression formula is relatively one of them service and all the other services one by one, calculates several similarity value calculations based on service regulation;
Redundancy steps in decision-making, by all similarity values that obtain one by one with a setting threshold comparison, similarity is greater than threshold value and judges that two services exist redundancy; Otherwise dissimilar between service;
Wherein, to comprise label as follows for the WSDL service element of described expansion: policy, condition, element, relation, bracket, operand, loperator and roperator;
Described policy element, is used for mark service regulation;
In described policy element definition condition daughter element, the necessary satisfied precondition of the use of this this service of condition daughter element mark input;
Wherein, described precondition is comprised of several element labels, and each element is a simple relational expression, and described expression formula forms logical expression by relation and bracket; In each element, by operand, defined the operand of expression formula, by loperator defining relation operator, by roperator, define basic operation.
2. the redundant detecting method of the Web service that internet of things oriented according to claim 1 is applied, it is characterized in that, described relational operator comprises: >, <, >=, <=,==and unequal to, described basic operation symbol comprises :+,-, * ,/and %.
3. the redundant detecting method of the Web service based on internet of things oriented application according to claim 1, is characterized in that, described that rule is carried out to vectorization concrete steps is as follows:
Step 1 navigates to service element from WSDL, by XML, resolves policy label, according to logical operator, extracts the relational expression set in rule, forms the binary tree data structure of logical expression;
Step 2, operates by transposition each relational expression, and vector turns to the standard multi-C vector ti in following formula;
t=(s1v11q11v12q12v13…v1n,…,si vi1qi1vi2qi2vi3…vin,…,sn vn1qn1vn2qn2vn3…vnn,p,c)
Wherein, V is variables collection, and C is constant set, and P is that relational operator set and Q are the set of basic operation symbol; Transposition symbol si ∈+,-, vij ∈ V, qij ∈ Q, p ∈ P, c ∈ C.
4. the redundant detecting method of the Web service based on internet of things oriented application according to claim 3, is characterized in that, described logical operator comprises: & &,! , || and ⊕.
5. the redundant detecting method of the Web service based on internet of things oriented application according to claim 1, is characterized in that, the described similarity based on service regulation is calculated and adopted Dice coefficient two-value weight method.
6. the redundant detecting method of the Web service based on internet of things oriented application according to claim 5, is characterized in that, described calculating formula of similarity is:
Sim(W1,W2)=0.5SimIO(W1,W2)+0.5SimRule(W1,W2);
Wherein, W1 and W2 are respectively two services need to carrying out similarity calculating; The similarity of service comprises service IO similarity and service regulation similarity, uses respectively SimIO (W1, W2) and SimRule (W1, W2) to represent; 0.5 value is the calculating weight in service similarity is calculated for service IO and service regulation.
7. the redundancy detection system of the Web service based on internet of things oriented application, for calculating the similarity between some input services, this system comprises: service acquisition module, similarity calculation module, redundancy decision-making module and post-processed module, it is characterized in that, described system also comprises: rule-based WSDL parsing module and regular vectorization module;
Described rule-based WSDL parsing module, according to WSDL syntax rule, carries out resolving based on XML to the WSDL of each service, extracts each and serves relevant input/output variable and respective logic expression formula rule;
Described regular vectorization module, for carrying out vectorization to the rule of each service;
Wherein, described similarity calculation module adopts the similarity calculating method based on service regulation;
The similarity of the value judgement decision service of the similarity that the similarity calculating method of described redundancy decision-making module based on service regulation obtains;
Described each service adopts rule-based WSDL grammer to be described and portrays; Described Web service adopts the WSDL service element of expansion, and this service element increases the rule description to service function; Described similarity be calculated as based on the similarity of logical expression calculate;
Wherein, to comprise label as follows for the WSDL service element of described expansion: policy, condition, element, relation, bracket, operand, loperator and roperator;
Described policy element, is used for mark service regulation;
In described policy element definition condition daughter element, the necessary satisfied precondition of the use of this this service of condition daughter element mark input;
Wherein, described precondition is comprised of several element labels, and each element is a simple relational expression, and described expression formula can form logical expression by relation and bracket; In each element, by operand, defined the operand of expression formula, by loperator defining relation operator, by roperator, define basic operation.
8. the redundant detecting method of the Web service based on internet of things oriented application according to claim 7, it is characterized in that, described relational operator comprises: >, <, >=, <=,==and unequal to, described basic operation symbol comprises :+,-, * ,/and %.
9. the redundant detecting method of the Web service based on internet of things oriented application according to claim 7, is characterized in that, described regular vectorization module further comprises:
Resolve and form binary tree submodule, for navigating to service element from WSDL, by XML, resolving policy label, according to logical operator, extracting the relational expression set in rule, forming the binary tree data structure of logical expression;
Vectorization module, for each relational expression is operated by transposition, vector turns to the standard multi-C vector ti in following formula;
t=(s1v11q11v12q12v13…v1n,…,si vi1qi1vi2qi2vi3…vin,…,sn vn1qn1vn2qn2vn3…vnn,p,c)
Wherein, V is variables collection, and C is constant set, and P is that relational operator set and Q are the set of basic operation symbol; Transposition symbol si ∈+,-, vij ∈ V, qij ∈ Q, p ∈ P, c ∈ C.
10. the redundant detecting method of the Web service based on internet of things oriented application according to claim 7, is characterized in that, the described similarity based on service regulation is calculated and adopted Dice coefficient two-value weight method.
The redundant detecting method of 11. Web services based on internet of things oriented application according to claim 7, is characterized in that, described calculating formula of similarity is:
Sim(W1,W2)=0.5SimIO(W1,W2)+0.5SimRule(W1,W2);
Wherein, W1 and W2 are respectively two services need to carrying out similarity calculating; The similarity of service comprises service IO similarity and service regulation similarity, uses respectively SimIO (W1, W2) and SimRule (W1, W2) to represent; 0.5 value is the calculating weight in service similarity is calculated for service IO and service regulation.
CN201110206923.9A 2010-10-25 2011-07-22 Redundancy check method and system for Web services facing IOT (Internet of Things) application Expired - Fee Related CN102457569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110206923.9A CN102457569B (en) 2010-10-25 2011-07-22 Redundancy check method and system for Web services facing IOT (Internet of Things) application

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201010525971 2010-10-25
CN201010525971.X 2010-10-25
CN201110206923.9A CN102457569B (en) 2010-10-25 2011-07-22 Redundancy check method and system for Web services facing IOT (Internet of Things) application

Publications (2)

Publication Number Publication Date
CN102457569A CN102457569A (en) 2012-05-16
CN102457569B true CN102457569B (en) 2014-04-02

Family

ID=46040219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110206923.9A Expired - Fee Related CN102457569B (en) 2010-10-25 2011-07-22 Redundancy check method and system for Web services facing IOT (Internet of Things) application

Country Status (1)

Country Link
CN (1) CN102457569B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111106B (en) * 2014-07-01 2016-03-16 武汉领傲科技有限公司 A kind of Internet of Things cognitive method based on article consumption and composition transfer and system
CN107329946B (en) * 2016-04-29 2021-08-24 阿里巴巴集团控股有限公司 Similarity calculation method and device
CN110532260B (en) * 2019-07-23 2021-05-25 北京三快在线科技有限公司 Logic expression storage and reading method and device, electronic equipment and medium
CN110474929B (en) * 2019-09-27 2021-06-22 新华三信息安全技术有限公司 Redundancy rule detection method and device
CN112990466A (en) * 2021-03-31 2021-06-18 龙马智芯(珠海横琴)科技有限公司 Redundancy rule detection method and device and server

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764837A (en) * 2009-12-23 2010-06-30 宁波东海蓝帆科技有限公司 Web service dynamic calling system and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4285658B2 (en) * 2006-10-17 2009-06-24 インターナショナル・ビジネス・マシーンズ・コーポレーション Apparatus and method for providing web service
US7865535B2 (en) * 2007-05-18 2011-01-04 International Business Machines Corporation Apparatus, system, and method for a data server-managed web services runtime
CN100583846C (en) * 2008-01-08 2010-01-20 北京邮电大学 A semantic telecommunication network capability service gateway component, network system and work method
CN101827125B (en) * 2010-03-31 2013-04-10 吉林大学 Semantic Web service body and application thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764837A (en) * 2009-12-23 2010-06-30 宁波东海蓝帆科技有限公司 Web service dynamic calling system and method

Also Published As

Publication number Publication date
CN102457569A (en) 2012-05-16

Similar Documents

Publication Publication Date Title
US20090125529A1 (en) Extracting information based on document structure and characteristics of attributes
US8046681B2 (en) Techniques for inducing high quality structural templates for electronic documents
US7080067B2 (en) Apparatus, method, and program for retrieving structured documents
CN101470728B (en) Method and device for automatically abstracting text of Chinese news web page
Verykios et al. Automating the approximate record-matching process
JP3842577B2 (en) Structured document search method, structured document search apparatus and program
Lohani et al. An invoice reading system using a graph convolutional network
US20100169311A1 (en) Approaches for the unsupervised creation of structural templates for electronic documents
CN102457569B (en) Redundancy check method and system for Web services facing IOT (Internet of Things) application
CN102279894A (en) Method for searching, integrating and providing comment information based on semantics and searching system
CN101114281A (en) Open type document isomorphism engines system
Fernau Learning XML grammars
Bornhovd Semantic metadata for the integration of web-based data for electronic commerce
US20090307187A1 (en) Tree automata based methods for obtaining answers to queries of semi-structured data stored in a database environment
US20220121881A1 (en) Systems and methods for enabling relevant data to be extracted from a plurality of documents
Carme et al. The lixto project: Exploring new frontiers of web data extraction
Firat et al. Information aggregation using the caméléon# web wrapper
Bornhövd Mix-a representation model for the integration of web-based data
Gaafar et al. Towards a framework for mapping between UML/OCL and XML/XQuery
JP3842574B2 (en) Information extraction method, structured document management apparatus and program
JP2003288365A (en) Additive information management method and additive information management system
JP7540676B1 (en) Information processing device, information processing method, and information processing program
Harit et al. Managing document images in a digital library: An ontology guided approach
Gu et al. ELTIML: Express logistics tracking information markup language for data exchange processes in express logistics
Thomas Bottom-up learning of logic programs for information extraction from hypertext documents

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140402

Termination date: 20160722