CN109284086B - Demand-oriented adaptive dynamic evolution method for Web service - Google Patents

Demand-oriented adaptive dynamic evolution method for Web service Download PDF

Info

Publication number
CN109284086B
CN109284086B CN201810939197.3A CN201810939197A CN109284086B CN 109284086 B CN109284086 B CN 109284086B CN 201810939197 A CN201810939197 A CN 201810939197A CN 109284086 B CN109284086 B CN 109284086B
Authority
CN
China
Prior art keywords
service
prop
similarity
attribute
concept
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810939197.3A
Other languages
Chinese (zh)
Other versions
CN109284086A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201810939197.3A priority Critical patent/CN109284086B/en
Publication of CN109284086A publication Critical patent/CN109284086A/en
Application granted granted Critical
Publication of CN109284086B publication Critical patent/CN109284086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A demand-oriented adaptive Web service dynamic evolution method comprises the following steps: firstly, calculating semantic similarity between two concepts A and B in a domain ontology; second step, providing service S1And service S2Input similarity SiminputThe calculation method of (1); third step, providing service S1And service S2Output similarity SimoutputThe calculation method of (1); fourth step, calculation service S1And service S2Functional similarity functional sim (S) of1,S2) (ii) a Step five, providing a service clustering algorithm by combining the service function similarity measurement mode in the step four; sixthly, obtaining the center service of each cluster according to the clustering result in the fifth step; seventhly, respectively calculating the functional similarity between the RCT node requirement description and each cluster center service description; eighthly, screening candidate service sets CandidateServices according to the QoS threshold in the user request; and ninthly, performing comprehensive service scoring and ranking on the candidate service sets CandidateServices filtered in the eighth step. The invention can select the best service meeting the user requirements.

Description

Demand-oriented adaptive dynamic evolution method for Web service
Technical Field
The invention relates to the field of Web service evolution, in particular to a demand-oriented adaptive dynamic Web service evolution method.
Background
A Web service is a software system intended to support cross-network interactions between machines. There are currently two main types of Web services: one is based on SOAP and the other is based on REST. The difference between the two is the use of different interfaces, SOAP-based Web services use the SOAP interface to pass messages and use the Web Services Description Language (WSDL) to describe Web services, which specifies a protocol-and code-independent mechanism for Web service providers, which is an XML vocabulary that describes services accessible on the network and maps them into a collection of communication endpoints with messaging capabilities. While Web services using REST interfaces use generic HTTP methods (GET, DELETE, POST, and PUT) to describe, publish, and use relevant resources.
Current research efforts aim at providing semantic descriptions of Web services by using conceptualized knowledge called ontologies. An ontology is a vocabulary that describes a set of concepts within a domain (a domain may be defined as a particular subject domain or knowledge domain) and the relationships that exist between those concepts. It is applied to attribute reasoning within a domain, or to the definition of the domain itself. In the context of Web services, ontologies play an important role as a way to provide semantic descriptions of Web services. The enhancement of Web services descriptions has prompted the development of semantic Web services, which are described in a machine-understandable manner, which will have a significant impact on areas such as e-commerce and application integration, since it can enable dynamic, extensible and efficient collaboration between different systems and organizations.
With the continuous development of Web services, in order to adapt to changes in environment and changes in user requirements, the Web services in the internet need to evolve continuously. Therefore, Web services have evolved as one of the important research points in the field of service computing. Meanwhile, the Web service is an important technology for constructing the software service, and important research significance and application value are provided for enabling the software system to operate in a self-adaptive mode and supporting dynamic evolution of the service.
Web service evolution generally refers to a process of performing a series of changes after a service is released and operated in order to adapt to environmental changes and continuously meet user requirements. According to the evolution implementation mode, the service evolution can be divided into static evolution and dynamic evolution, the static evolution must pass through the processes of suspending service, updating software and restarting service, and the dynamic evolution refers to the evolution of software during operation, namely, updating while running.
Currently, a lot of research has been conducted on the dynamic evolution of Web services by many researchers. Seung Hwan Ryu et al, university of New Nanwelshi, focuses on dynamic evolution of service composition at the service orchestration level and proposes a method for determining the migratability of a service composition instance. Vasillios Andrikopoulos et al, the university of thelberg, the netherlands, introduced the concept of service evolution management and studied the consistency problem of various versions of services (including composite services) generated in the evolution process. Sony, wei, et al, at the university of tokyo, classified dynamic evolution into two categories: ad-hoc (ad-hoc) evolution and evolutionary (evolutionary) evolution. Wherein the ad hoc evolution affects only specific process instances, which are typically caused by process instances encountering an anomaly during operation; the evolutionary evolution is caused by the modification and the upgrade of the process model, the modification of the model necessarily affects all the in-operation process instances, and the evolution of the process instances caused by the upgrade of the process model is called the evolutionary evolution.
Disclosure of Invention
In order to adapt to the rapidly changing user requirements, the Web application needs to effectively understand and manage the requirements in a flexible and self-adaptive manner, and then a reusable software unit is constructed to enhance the software evolution capability. The invention provides a dynamic service evolution method facing to demand self-adaptation. The method utilizes an improved DBSCAN algorithm to cluster services, calculates the distance between samples by combining the functional similarity between the services in the clustering process, and provides a service dynamic matching method based on an RCT model to realize service matching on the basis of service clustering, wherein the process comprises service filtering, service comprehensive scoring and service ranking.
In order to solve the technical problems, the invention adopts the technical scheme that:
a demand-oriented adaptive Web service dynamic evolution method comprises the following steps:
the method comprises the following steps of firstly, calculating semantic similarity between two concepts A and B in a domain ontology, wherein the process is as follows: the functional similarity measurement considers the domain ontology concepts of input and output between services, the matching between the input and the output refers to the matching of concepts related to the input and the output, and in order to calculate the similarity of the two concepts A and B, the relationship between the two concepts in the domain ontology needs to be considered;
a second step of providing a service S by combining the concept similarity calculation method of the first step1And service S2Input similarity SiminputThe calculation method of (1);
step three, combining the concept similarity calculation method of the step one, and providing a service S1And service S2Output similarity SimoutputThe calculation method of (1);
the fourth step combines the service input similarity Sim obtained in the second step and the third stepinputSimilarity with service output SimOutputComputing service S1And service S2Functional similarity functional sim (S) of1,S2) The calculation formula is as follows:
FunctionalSim(S1,S2)=w1×Siminput+w2×SimOutputwherein the weight w1And w2Are real numbers between 0 and 1 and sum to 1, which represent the importance of the service consumer to the input similarity and output similarity determinations;
step five, a service clustering algorithm is given by combining the service function similarity measurement mode of the step four, firstly, an unallocated core object is selected arbitrarily as a seed, and then all sample sets with reachable density of the core object are searched to form a cluster; then, continuously selecting another unallocated core object to search a sample set with a reachable density to obtain another cluster until all the core objects are allocated; search radius Eps is given by
Figure BDA0001768618840000031
Determining, wherein n represents the dimension size of the service, i.e. the average attribute number of all services, k represents the minimum number of services required to form a cluster, and r represents the hypersphere hemisphere composed of n-dimensional servicesThe diameter m is the number of n-dimensional services contained in the hypersphere; while the minimum number MinPts follows empirical heuristics: MinPts is round (m/25), where round is the rounding function and m is the number of samples in the sample set;
sixthly, according to the clustering result obtained in the fifth step, obtaining the center service of each cluster, wherein the cluster center service can represent the typical characteristics of the clustering service;
seventhly, in the service matching process of the system, functional similarity between RCT node requirement description and each cluster center service description needs to be calculated respectively, wherein the RCT nodes are constituent units of an RCT model and are described as Web services needed for completing current Web subtasks, and an iSar framework defines four dependency relationships in a policy dependency model, which are: target dependency, meaning that one role depends on another role to accomplish a certain goal; resource dependence, meaning that one role depends on another role to provide it with physical resources and information; task dependency, meaning that one role depends on another role to complete a certain task; non-functional demand related soft target dependencies, similar to target dependencies; the atomic concepts of roles, targets, tasks and resources of the iSAR are expanded to support mapping relations and related description specifications among user requirements, Web tasks, services and service sequences, and the RCT model is instantiated by an OWL-S format file so as to ensure normal execution of a service matching process; in the RCT model, an ellipse is used for representing user requirements, namely RCT requirement nodes, a hexagon is used for representing Web subtasks, well numbers above the left side of the hexagon nodes are used for representing serial numbers of the Web subtasks, a circle is used for representing services, and a rectangle is used for representing information resources;
because OWL-S is a language designed for describing Web services and is suitable for describing the requirements of services, the requirements of RCT nodes are also described by adopting OWL-S, the functional similarity measurement method of the fourth step is also suitable for calculating the similarity between the RCT nodes and the cluster center services, the cluster where the cluster center services with the maximum functional similarity are located is obtained by calculation, and the services in the cluster are candidate services Candidateservice which can meet the requirements of current users;
eighthly, screening candidate service sets CandidateServices according to the QoS threshold value in the user request, filtering out services which do not meet the requirements of the user, and enabling a service consumer to designate the QoS threshold value in the service request to indicate that Web services with the QoS lower than or higher than the threshold value are rejected;
ontology-based OWL-S extension, namely adding non-functional description QoS into Web service description;
OWL-S is called totally on-load Web Language for Services, it is Web service Ontology description Language based on OWL, use a complete set of description mechanism to carry on the semantic description to the Web service, and the description file that is produced can be understood and processed by the computer;
OWL-S includes three basic components:
(1) the Service Profile describes what the Service does, and the basic attributes comprise a Service name (serviceName), a text description (textDescription) and the like; the functional attributes comprise four parts of input information (hasInput), output information (hasOutput), preconditions (hasRecondition) and expected effects (hasEffect);
(2) service Model describes how services work, OWL-S treats each Service as a Process (Process) and divides it into three categories: atomic processes (Atomic processes), Simple processes (Simple processes), and Composite processes (Composite processes); the atomic process has no subprocess and can be directly called; the simple process can not be directly called, and a corresponding Service group description file does not exist; the combined process is formed by combining a plurality of sub-processes through a certain control structure, and in OWL-S, each process body can be semantically described through IOPE;
(3) service grouping describes Service calling information, OWL-S defines a specific message format by using WSDL as the basis of a Service grouping mechanism, and encapsulates input information, output information and a Service address;
constructing an ontology-based OWL-S extended semantic service description model based on a Web service description language OWL-S;
the semantic service description is represented by a quadruplet: WS ═ N, D, I, O >, where:
n represents the Name of the service, D represents the text Description of the service, and the N and D form the basic attribute of the service;
the functional attributes of the service include I and O, which represent the attributes of the Input (Input) and Output (Output) interface parameters of the service WS, respectively, each interface is a set of parameter sets, and I ═ I1,…,im}, element i1,…,imRepresenting semantic concepts corresponding to input parameters of the service WS in the domain ontology; o is the output set of the service, O ═ O1,…,on}, element o1,…,onRepresenting semantic concepts corresponding to the output parameters of the service WS in the domain ontology;
in the OWL-S Service Profile, a group of Service parameters (ServiceParameter) is used, the Service parameters comprise a name (serviceParameterName) and a parameter value (Sparamer), after the OWL-S is connected with a QoS body, QoProperty becomes a subclass of the OWL-S serviceParameter, and qoPropertyName and qProperty are respectively the sub-attributes of the OWL-S serviceParameterName and the Sparamer attribute;
each QoS attribute QoSProperty is defined by a name in the form of a string, qoospropertyname, and a set of characteristics qoschharacteristic, described as follows:
value: a value representing a QoS attribute, which represents one QoS attribute of a provided service to a service provider; but for the service consumer it represents the threshold for the QoS attribute;
type: this feature is used to distinguish between two types of QoS:
revenue-type benefit, in which case the user-specified QoS attribute value represents the minimum value to consider;
cost type cost, in which case the user specified QoS attribute value represents the maximum value to be considered;
unit: a unit of measure of the QoS attribute;
weight: a QoS weight for specifying the importance of the QoS attribute;
confidence: representing a confidence level of the user's preference for it;
ninthly, performing comprehensive service scoring and ranking on the candidate service sets CandidateServices filtered in the eighth step, wherein the service with the highest score is the best service; before service scoring, consistency verification needs to be performed on the QoS weight determined by the user, if the obtained consistency ratio CR is smaller than 0.1, scoring and ranking steps are performed, otherwise, the QoS weight needs to be revised again by the user, and the calculation is finished.
Further, in the first step, the step of calculating the semantic similarity between the two concepts a and B in the domain ontology is as follows:
step (1.1) if the concepts A and B are identical or they are declared equivalent classes, the similarity Sim of the concepts A, B concept1, otherwise, performing the step (1.2);
step (1.2) if the concept A is directly or indirectly a subclass of the concept B, the similarity Sim of the concepts A and BconceptThe calculation formula is as follows:
Figure BDA0001768618840000051
wherein prop (A) and prop (B) represent the attribute sets of concept A and concept B, respectively, and Size (prop (B)) and Size (prop (A)) represent the attribute numbers of concept B and concept A, respectively, otherwise, the step (1.3) is carried out
Step (1.3) if the concept B is directly or indirectly a subclass of the concept A, the similarity Sim of the concepts A and BconceptThe calculation formula is as follows:
Figure BDA0001768618840000052
otherwise, performing the step (1.4);
step (1.4) if the concept A and the concept B have no parent-child relationship, but the two concepts directly or indirectly have a common parent class concept C, a word semantic similarity measurement method based on a naive Bayes model is adopted, firstly, all attributes of the concept A and the concept B are respectively traversed, the attribute names of the concept A and the concept B are subjected to feature extraction through a computeFeature function, and then, a conditional probability distribution list and an adjustment factor after sample training are adopted to calculate the similarity Sim between the concept attributeswordAccording to the similarity Sim between the concept attributeswordIs likeComparing the judgment factor eta, judging whether the two attributes are the same attribute, counting, and finally calculating the similarity Sim of the concepts A and Bconcept
Step (1.5) if the relationship between the concept A and the concept B does not meet the above condition, the similarity Sim of the concepts A and BconceptIs set to 0.
Still further, the process of step (1.4) is as follows:
step (1.4.1) setting variable i to represent the same number of attributes in concept A and concept B and setting the initial value to be 0, and performing step (1.4.2);
step (1.4.2) if the traversal of the attribute set prop (A) of the concept A is completed, then step (1.4.7) is performed, otherwise, the next prop (A) is taken out from prop (A)jAnd removing it from prop (A) and carrying out step (1.4.3);
step (1.4.3) if the traversal of the attribute set prop (B) of the concept B is completed, returning to the step (1.4.2), otherwise, taking out the next prop (B) from the prop (B)kAnd removing it from prop (B) and carrying out step (1.4.4);
step (1.4.4) is based on naive Bayes model, combines WorkNet English dictionary, and pairs of prop (A) through ComputeFeature functionjAnd prop (B)kThe attribute name of (2) is subjected to feature extraction to obtain L (prop (A)j,prop(B)k) And D (prop (A)j,prop(B)k) The process is as follows:
calculating the word semantics of each attribute name, wherein each word corresponds to one or more semantics, each word pair also corresponds to one or more semantic pairs, and the semantic node distance with the shortest distance among all the semantic pairs corresponding to the word pair is defined as the word pair distance L (prop (A)j,prop(B)k) And defining the semantic pair depth with the shortest distance between semantic nodes as word pair depth D (prop (A)j,prop(B)k) Known attribute names prop (A)jPresence in semantic node vj1,vj2,…,vjnIn the synonymous phrase of (1), attribute name prop (B)kPresence in semantic node vk1,vk2,…vkmIn a synonymous phrase of (1), then prop (A)jAnd prop (B)kThe distance calculation formula and the depth calculation formula are as follows:
Figure BDA0001768618840000061
Figure BDA0001768618840000062
wherein L (v)ja,vkb) Representing semantic nodes vjaAnd semantic node vkbDistance of D (v)ja,vkb) Representing semantic pairs (v)ja,vkb) Depth of (d);
further, mean functions LW (i) and DW (o) are generated according to a training set of the naive Bayes model, and then a conditional probability distribution column P (L (prop (A)) is calculated by utilizing the mean functions LW (i) and DW (o)j,prop(B)k) I C and P (D (prop (A))j,prop(B)k) I C), wherein C is a word class classification, the value range is { U, N }, wherein U represents 'consistent' and N represents 'inconsistent', and finally, the adjustment factors alpha and beta are calculated according to the following calculation formula:
Figure BDA0001768618840000063
Figure BDA0001768618840000064
then, the step (1.4.5) is carried out;
step (1.4.5) based on naive Bayes model, the characteristic L (prop (A) of ontology concept attribute is processedj,prop(B)k) And D (prop (A)j,prop(B)k) Injecting the mixture into the conditional probability distribution list obtained in the step (1.4.4), and sequentially extracting the conditional probability V1=P(L(prop(A)j,prop(B)k)=i|C=U),V2=P(D(prop(A)j,prop(B)k)=o|C=U),
V3=P(L(prop(A)j,prop(B)k) I | C ═ N) and V4=P(D(prop(A)j,prop(B)k) O | C ═ N), finally combining the adjustment factors α and β in step (1.4.4) to calculate prop (a)jAnd prop (B)kSimilarity between them SimwordThe calculation formula is as follows:
Simword(prop(A)j,prop(B)k)=(αV1×V2)/(αV1×V2+βV3×V4) Carrying out the step (1.4.6);
step (1.4.6) if SimwordGreater than or equal to the similarity criterion factor eta, prop (A)jAnd prop (B)kAdding 1 to the variable i for the same attribute, returning to the step (1.4.2), and otherwise, returning to the step (1.4.3);
step (1.4.7) calculating similarity Sim of concepts A and BconceptThe calculation formula is as follows:
Figure BDA0001768618840000071
wherein i represents the number of attributes in concept A and concept B, prop (A) and prop (B) represent the attribute sets of concept A and concept B, respectively, and Size (prop (B)) and Size (prop (A)) represent the number of attributes in concept B and concept A, respectively, and step (1.5) is performed.
Further, in the second step, the service S1And service S2Input similarity SiminputThe process of the calculation method of (1) is as follows:
step (2.1) establishing a service input parameter similarity maximum matching array InSim and initializing, and performing step (2.2);
step (2.2) service S1Is subtracted by the service S2Obtaining a parameter quantity difference d by inputting the parameter quantity, and performing the step (2.3);
step (2.3) if d is less than or equal to 0, then service S1Is set to SshortService S2Is set to SlongOtherwise, it will serve S2Is set to SshortService S1Is set to SlongCarrying out the step (2.4);
step (ii) of(2.4) traverse SlongIf the traversal is completed, go to step (2.8), otherwise go from SlongIn the next input parameter long is taken outiCarrying out the step (2.5);
step (2.5) traverse SshortIf the traversal is completed, returning to the step (2.4), otherwise, returning to the step SshortGet the next input parameter shortjCarrying out the step (2.6);
step (2.6) calculating parameter Long according to the concept similarity calculation method of the first stepiAnd parameter shortjSimilarity Sim ofijCarrying out the step (2.7);
step (2.7) with SimijAnd InSim [ i ]]By comparison, if SimijGreater than InSim [ i]Then, will InSim [ i ]]Is set to SimijOtherwise InSim [ i ]]Returning to the step (2.5) when the value is the original value;
step (2.8) calculation service S1And service S2Input similarity SiminputThe calculation formula is as follows:
Figure BDA0001768618840000072
wherein Size (S)longInput) and Size (S)shortInput) represents the service S, respectivelylongNumber of input parameters and service SshortThe number of input parameters, | d | represents the difference between the number of input parameters of two services, and InSim is the maximum matching array of the similarity of the input parameters.
In the third step, service S1And service S2Output similarity SimoutputThe process of the calculation method of (1) is as follows:
step (3.1) creating a service output parameter similarity maximum matching array OutSim and initializing, and performing step (3.2);
step (3.2) service S1Minus the service S2Obtaining a parameter quantity difference d according to the output parameter quantity, and performing the step (3.3);
step (3.3) if d is less than or equal to 0,will serve S1Is set to SshortService S2Is set to SlongOtherwise, it will serve S2Is set to SshortService S1Is set to SlongAnd (4) performing the step (3.4);
step (3.4) traverse SlongIf the traversal is completed, go to step (3.8), otherwise go from SlongIn the next output parameter longiAnd (5) carrying out the step (3.5);
step (3.5) traverse SshortIf the traversal is completed, the step (3.4) is returned, otherwise, the step S is startedshortIn the next output parameter shortjAnd (4) carrying out the step (3.6);
step (3.6) calculating the parameter Long according to the concept similarity calculation method of the first stepiAnd parameter shortjSimilarity Sim ofijCarrying out the step (3.7);
step (3.7) with SimijAnd OutSim [ i ]]By comparison, if SimijGreater than OutSim [ i ]]Then OutSim [ i ] is set]Is set to SimijElse OutSim [ i ]]Returning to the step (3.5) when the value is the original value;
step (3.8) calculation service S1And service S2Output similarity SimOutputThe calculation formula is as follows:
Figure BDA0001768618840000081
wherein Size (S)long.Output) and Size (S)shortOutput) respectively represent the services SlongNumber of output parameters and service SshortThe number of output parameters, | d | represents the difference value of the number of output parameters of two services, and OutSim is the maximum matching array of the similarity of the output parameters.
In the fifth step, the process of the service clustering algorithm is as follows:
step (5.1) initializing an unvisited sample set into an original sample set T, dividing a cluster set C into empty sets, and performing step (5.2);
step (5.2) traverse the originalStarting a sample set T, if traversal is completed, ending, otherwise, taking out the next service S from TiAnd removing it from T, proceeding to step (5.3);
step (5.3) combines the service function similarity measurement mode defined by step four to search service SiThe Eps neighborhood of (c);
step (5.4) creation of a New Cluster CkIf S isiIf the number of Eps neighborhood samples is not less than MinPts, then S is determinediAdding the mixture into the cluster, performing the step (5.5), and otherwise, returning to the step (5.2);
step (5.5) traversal service SiNeighborhood set N ofEps(Si) If the traversal is completed, the step (5.13) is carried out, otherwise the set N is taken outEps(Si) Of (2) next service S'kAnd (5.6) carrying out the step;
step (5.6) creating service S'kNeighborhood set N ofEps(S’k) Carrying out the step (5.7);
step (5.7) if the original sample set T contains service S'kThen service S'kRemoving from T, performing step (5.8), otherwise, returning to step (5.5);
step (5.8) traverses the original sample set T, if the traversal is finished, the step (5.11) is carried out, otherwise, the next service S 'is taken out from the T'lCarrying out the step (5.9);
step (5.9) adopts the service function similarity measurement mode defined in step four to calculate service S'kAnd service S'lFunctional similarity functional Sim (S'k,S’l) Go to step (5.10)
Step (5.10) if service S'kAnd service S'lFunctional similarity functional Sim (S'k,S’l) Is less than or equal to the search radius Eps, then service S'lAdd service S'kNeighborhood set N ofEps(S’k) Returning to the step (5.8), otherwise, directly returning to the step (5.8);
step (5.11) if service S'kIf the number of Eps neighborhood samples is not less than MinPts, the service in the neighborhood is added to the serviceSiEps neighborhood set NEps(Si) And (5.12) performing the step (5.12), otherwise, returning to the step (5.5);
step (5.12) if the cluster set C does not contain service S'kCluster of (2), then service S'kAdding the cluster C created in the step (5.4)kReturning to the step (5.5), otherwise, directly returning to the step (5.5);
step (5.13) clustering the clusters CkAnd adding the cluster set C and returning to the step (5.2).
In the step (5.3), the search service SiThe Eps neighborhood of (c) is as follows:
step (5.3.1) Create service SiNeighborhood set N ofEps(Si) Carrying out the step (5.3.2);
step (5.3.2) traverses the original sample set T, if the traversal is completed, the step (5.4) is carried out, otherwise, the next service S is taken out from the TjCarrying out the step (5.3.3);
step (5.3.3) uses the functional similarity defined in step four to calculate service SiAnd service SjFunctional similarity functional sim (S)i,Sj) And (5.3.4) carrying out the step;
step (5.3.4) if service SiAnd service SjFunctional similarity functional sim (S)i,Sj) Less than or equal to the search radius Eps, the service S will be providedjJoining service SiNeighborhood set N ofEps(Si) And (5.3.2) returning, otherwise, directly returning to the step (5.3.2).
In the sixth step, the calculation process of the cluster center service is as follows:
step (6.1) creation of the list ScenterRecording the service of each cluster center, and performing the step (6.2);
step (6.2) traversing the cluster set C created in the fifth step, if the traversal is completed, ending the process, otherwise, taking out the next cluster C from the cluster set CkCarrying out the step (6.3);
step (6.3) of establishing a variable in.num and out.num pair cluster CkAll input parameters and output parameters ofLine statistics is carried out, initial values of two variables are set to be 0, and a cluster center service S is createdkcenterAnd (6.4) carrying out the step;
step (6.4) traverse clustering CkIf the traversal is completed, go to step (6.6), otherwise take out the next service SkAnd (6.5) carrying out the step;
step (6.5) statistical service SkNumber of input parameters SkInnum and the number of output parameters SkOutnum, and accumulating to the in.num and out.num respectively, and returning to the step (6.4);
step (6.6) traverse clustering CkIf traversal is complete, then SkcenterJoin list ScenterAnd returning to the step (6.2), otherwise, taking out the next service SkCarrying out step (6.7);
step (6.7) calculation service SkIn, num if p1 is greater than a given threshold, p1
Figure BDA0001768618840000103
The input parameter is considered to have higher importance in the current cluster and added to the input parameter list S of the cluster center servicekcenterInput, performing step (6.8);
step (6.8) calculation service SkOut. num if p2 is greater than a given threshold, p2
Figure BDA0001768618840000104
The output parameter is considered to have a higher importance in the current cluster and added to the output parameter list S of the cluster center servicekcenterOutput, return to step (6.6).
In the eighth step, the QoS threshold-based service filtering method includes the steps of:
step (8.1) traverses the services in the candidate service set CandidateServices, if the traversal is completed, the operation is ended, otherwise, the next service S is taken out from the candidate service set CandidateServicescAnd (4) carrying out the step (8.2);
step (8.2) traversal service ScIf the traversal is completed, the step (8.1) is returned, otherwise, the slave service ScThe next QoS attribute QoSPropity is taken out, and the step (8.3) is carried out;
step (8.3), if the QoS constraint QoSProperty specified by the user comprises QoSProperty, the step (8.4) is carried out, otherwise, the step (8.2) is returned;
step (8.4) judging whether the Confidence coefficient Confidence of QoSconstruments to QoSproperty of QoS constraint QoSconstruments is not 0, wherein the Confidence coefficient represents the Confidence of a user to a specified threshold consValue, the value of the coefficient is in the range of [0,1], and 1 represents that a filtering algorithm must strictly adhere to the specified threshold; 0 represents that the filtering algorithm must ignore the threshold, if Confidence is not 0, then go to step (8.5), otherwise return to step (8.2);
step (8.5), if the Type of QoSProperty belongs to benefit Type benefit and the attribute Value of QoSProperty is less than the product of Confidence and consValue, performing step (8.6), otherwise, if the Type belongs to cost Type cost and the attribute Value of QoSProperty is greater than the result of the ConsValue divided by the Confidence, also performing step (8.6), otherwise, returning to step (8.2);
step (8.6) will serve ScFiltering out and removing from candidate service set CandidateServices, and returning to the step (8.2).
The ninth step comprises the following steps:
step (9.1) of carrying out weight calculation on QoS attribute set by a user, wherein a judgment matrix for pair comparison is constructed by combining the mechanism of an Analytic Hierarchy Process (AHP), wherein each element scores each other element through a predefined score (from 1 to 9) to represent the relative importance of each element; the scale method of 1-9 conforms to the psychological habits of people in making judgments, and table 1 gives the corresponding absolute scale:
Figure BDA0001768618840000111
TABLE 1
The steps of QoS attribute weight calculation are as follows:
step (9.1.1) determining an index to be used by the AHP method, and performing step (9.1.2);
step (9.1.2) establishing an n-order pairwise comparison matrix A [ n ] [ n ] based on user preference, and performing step (9.1.3);
step (9.1.3) calculates importance weight of each QoS attribute based on the pairwise comparison matrix a, specifically the calculation steps are as follows:
step (9.1.3.1) establishing vector W [ n ] and temporary vector M [ n ] recording importance weight of each QoS attribute and temporary matrix P [ n ] [ n ], and proceeding step (9.1.3.2);
step (9.1.3.2) sets up temporary variable j and initial value 0, proceed step (9.1.3.3);
step (9.1.3.3) if j is less than n, proceeding to step (9.1.3.4), otherwise proceeding to step (9.1.3.5);
step (9.1.3.4) the sum of jth column of the matrix A is assigned to M [ j ], the value of j plus 1 is assigned to j, and the step (9.1.3.3) is returned;
step (9.1.3.5) sets temporary variables k, l and initial value 0, and proceeds step (9.1.3.6);
step (9.1.3.6), if k is less than n, performing step (9.1.3.7), otherwise performing step (9.1.3.9);
step (9.1.3.7) if l is less than n, then step (9.1.3.8) is carried out, otherwise, the value of adding 1 to k is given to k, and the step (9.1.3.6) is returned;
step (9.1.3.8) assigning P [ l ] [ k ] the value obtained by dividing A [ l ] [ k ] by M [ k ], assigning l the value of l plus 1 to l, and returning to step (9.1.3.7);
step (9.1.3.9) sets temporary variable m and initial value 0, and proceeds step (9.1.3.10);
step (9.1.3.10), if m is smaller than n, performing step (9.1.3.11), otherwise performing step (9.1.3.12);
step (9.1.3.11) assigning the sum of the mth row of the matrix P to W [ m ], assigning the value of m plus 1 to m, and returning to step (9.1.3.10);
step (9.1.3.12) sets temporary variable i and initial value 0, and proceeds step (9.1.3.13);
step (9.1.3.13) if i is less than n, then step (5.3.14) is carried out, otherwise, the calculation is finished;
step (9.1.3.14) of dividing W [ i ] by n and then assigning W [ i ], and then assigning i with a value of i plus 1 and returning to step (9.1.3.13);
step (9.2) verifies the consistency of the user judgment according to the pair comparison matrix A constructed in step (9.1) and the weight vector W obtained in step (9.1), in the AHP method, if the corresponding consistency ratio CR is less than 0.1, the user judgment is considered to have satisfactory consistency, otherwise, the user judgment needs to be subjectively corrected until the consistency requirement is met, CR needs to be obtained by dividing the CI value by the average random consistency index RI, and the calculation steps are as follows:
step (9.2.1) of establishing a temporary vector M [ n ]]And a temporary matrix P [ n ]][n]Setting up the variable CI to represent the index of conformity, λmaxThe element with the largest median value in the vector M is represented, and the step (9.2.2) is carried out;
step (9.2.2) setting temporary variables i, j and setting initial values 0, and performing step (9.2.3);
step (9.2.3), if j is less than n, performing step (9.2.4), otherwise, performing step (9.2.6);
step (9.2.4) if i is less than n, then step (9.2.5) is carried out, otherwise, the value of adding 1 to i is given to i, and then step (9.2.3) is returned;
step (9.2.5) assigning the value obtained by multiplying A [ i ] [ j ] by W [ j ] to P [ i ] [ j ], then assigning the value obtained by adding 1 to j, and returning to the step (9.2.4);
step (9.2.6) sets temporary variable k and initial value 0, and proceeds step (9.2.7);
step (9.2.7), if k is less than n, performing step (9.2.8), otherwise performing step (9.2.9);
step (9.2.8) assigning the sum of the k-th row of the matrix P to M [ k ], assigning the value of k plus 1 to k, and returning to step (9.2.7);
step (9.2.9) sets temporary variable l and initial value 0, and proceeds step (9.2.10);
step (9.2.10), if l is less than n, performing step (9.2.11), otherwise performing step (9.2.12);
step (9.2.11) of assigning M [ l ] to a value obtained by dividing M [ l ] by W [ l ], assigning l to a value obtained by adding 1 to l, and returning to step (9.2.10);
step (9.2.12) assigns the element of the vector M with the largest median to λmaxCarrying out the step (9.2.13);
step (9.2.13) is based on the formula CI ═ λmax-n)/(n-1) calculating a consistency index, and proceeding to step (9.2.14);
step (9.2.14) dividing the CI value by the corresponding average random consistency index RI to obtain a consistency ratio CR, if CR is less than 0.1, the user is judged to have satisfactory consistency, otherwise, the user is judged to have no satisfactory consistency;
and (9.3) carrying out comprehensive scoring and ranking on the services, wherein the steps are as follows:
step (9.3.1), if the final result of step (9.2) is that the user is judged to have satisfactory consistency, step (9.3.2) is carried out, otherwise, the result that the QoS weight needs to be revised again by the user is fed back, and the calculation is finished;
step (9.3.2) of establishing a vector of service composite score, namely, compScore [ services.size ], QoS score vector, qossscore [ services.size ], and QoSMtx matrix recording standardized QoS values, wherein services.size represents the number of services of a candidate service set, rows in QoSMtx represent candidate Web services, and columns represent QoS attributes, and step (9.3.3) is carried out;
step (9.3.3) traverses candidate service sets CandidateServices, if the traversal is completed, step (9.3.8) is carried out, otherwise, the next service S of the candidate service sets CandidateServices is taken outiCarrying out the step (9.3.4);
step (9.3.4) traversal service SiQoS attribute set S in (1)iQsproperties, if traversal is complete, proceed to step (9.3.7), otherwise from SiThe next property S is fetched from the qsPropertiesi.PjPerforming step (9.3.5);
in the step (9.3.5), since the measurement intervals of each QoS attribute value are different, the QoS values need to be normalized to make the value range between 0 and 1, so as to ensure that each QoS attribute is evaluated by using the same span, and therefore, the QoS attribute S needs to be calculatedi.PjNormalized value of (n) v (p)ij) And assigns this value to QoSMtx [ i ]][j]The concrete calculation steps are as followsThe following:
step (9.3.5.1) if the attribute Si.PjIf the attribute is a profit type attribute, the step (9.3.5.2) is performed, and if the attribute S is the profit type attributei.PjIf the attribute is a cost attribute, the step (9.3.5.3) is performed;
step (9.3.5.2) nv (p)ij) The calculation formula of (a) is as follows:
Figure BDA0001768618840000131
wherein, v (p)ij) Presentation service SiIn the attribute Si.PjIs taken as the original value of v (p)j)maxRepresentation of candidate service set CandidateServices and S in each servicei.PjMaximum values belonging to the same attribute, v (p)j)minRepresentation of candidate service set CandidateServices and S in each servicei.PjA minimum value belonging to the same attribute, and a step (9.3.6) is performed;
step (9.3.5.3) nv (p)ij) The calculation formula of (a) is as follows:
Figure BDA0001768618840000132
step (9.3.6) if the attribute Si.Pj(ii) satisfies the user-defined QoS constraints QoSContriants, then calculates the attribute Si.PjQoS score of (q) QoS score of [ i ]]And then, accumulating and recording the QoS scores, wherein a calculation formula in the whole process is as follows:
qosScore[i]+=(QoSMtx[i][j]×QoSConstraint[j].Weight)
wherein QoSConstratent [ j ]]Weight represents the user vs. attribute Si.PjReturning to the step (9.3.4) according to the defined weight, otherwise, directly returning to the step (9.3.4);
step (9.3.7) combines the function similarity calculation method of the fourth step to calculate the current RCT node requirement SRCTAnd service SiFunctional similarity functional sim (S) ofi,SRCT) And combining the steps of (a)9.3.6) the resulting QoS score qosScore [ i]To service SiThe composite score is weighted and the final result is assigned to the ComScore [ i ]]The calculation formula is as follows:
compScore[i]=w1*FunctionalSim(Si,SRCT)+w2*qosScore[i]
wherein w1 and w2 respectively represent the function similarity weight and the QoS scoring weight, and the step (9.3.3) is returned;
step (9.3.8) ranks the services that completed the composite score and returns the service with the highest score, i.e., the best service.
The invention has the advantages that the improved DBSCAN algorithm is utilized to cluster the services, the distance between samples is calculated by combining the functional similarity between the services in the clustering process, and then the RCT model-based dynamic service matching method is carried out on the basis of service clustering, including the algorithm execution of service filtering, service comprehensive scoring and ranking. The server program can thus finally select the best service that meets the user's needs.
Drawings
Figure 1 shows a service dynamic evolution process diagram.
Fig. 2 shows an RCT model diagram.
Fig. 3 shows an OWL-S extension diagram supporting QoS.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, a dynamic evolution method of a demand-oriented adaptive Web service is described, where a main flow of the dynamic evolution method of the service is described as follows:
in the system initialization stage, the service system clusters the Web services in the repository to reduce the search space of the services (step (r), corresponding to the first step to the sixth step of the inventive content). Meanwhile, a context-aware Web task (RCT) model facing the user requirements needs to be constructed in advance (step two).
After the initialization work is finished, when a user sends a request, the system can be matched with a corresponding RCT demand node in an RCT model according to the request, and the demand node is connected by a series of Web subtask nodes through a certain structure. The system reads each Web subtask node from the demand node according to a defined flow structure. And when a node is positioned, reading the OWL-S description information of the node to match services meeting the requirements of the node for execution. In the matching process, the functional similarity between the RCT node requirement description and each cluster center service description needs to be calculated respectively, and then the cluster where the cluster center service with the largest functional similarity is located is obtained (step three, corresponding to the seventh step of the invention content). And then, screening the services according to the QoS threshold value in the user request, and filtering the services which do not meet the requirements of the user (step (c), corresponding to the eighth step of the invention content). And finally ranking the candidate services according to the comprehensive score formed by the QoS attribute score and the function similarity, and returning the service with the highest score (step five, corresponding to the ninth step of the invention content), namely the best service.
The RCT model in the above description is an extension and redefinition of the issar framework of the present invention, supporting evolving user requirements, and specification of Web interactions and related contexts. The iSAR framework is a target-oriented requirement modeling method which is proposed by professor Eric YU of Toronto university and the like to understand and redesign a business process according to strategy dependency and principles thereof, and defines four dependencies in the strategy dependency model, namely: target dependency, meaning that one role depends on another role to accomplish a certain goal; resource dependence, meaning that one role depends on another role to provide it with physical resources and information; task dependency, meaning that one role depends on another role to complete a certain task; non-functional requirements are related to soft target dependencies, similar to target dependencies. In particular, the invention extends the atomic concepts of the roles, targets, tasks and resources of the iStar to support the mapping relationships and relevant description specifications among user requirements, Web tasks, services and service sequences, and the RCT model is instantiated by an OWL-S format file to ensure the normal execution of the service matching process. Fig. 2 is an RCT model diagram provided by the present invention, where an oval node represents a user requirement (RCT requirement node), a hexagon node represents a Web subtask, a well number on the upper left of the hexagon node represents a Web subtask sequence number, a circle represents a service, and a rectangle represents an information resource (e.g., order information in a hotel reservation scenario).
The dynamic service evolution method of the present invention is specifically introduced below, and the steps are as follows:
the method comprises the following steps of firstly, calculating semantic similarity between two concepts A and B in a domain ontology, and specifically comprising the following steps:
the functional similarity measure takes into account domain ontology concepts of inputs and outputs between services, and a match between inputs (outputs) mainly refers to a match of concepts related to inputs (outputs). To calculate the similarity of two concepts a and B, the relationship between the two concepts in the domain ontology needs to be considered.
A domain ontology is a specialized ontology describing knowledge of a given domain, where a "domain" is established according to the needs of an ontology builder, and may be a subject domain, a combination of several domains, or a small area within a domain. If two concepts in a domain ontology have different names but the same set of individuals, they are called equivalence classes (equivalent classes).
Step (1.1) if the concepts A and B are identical or they are declared equivalent classes, the similarity Sim of the concepts A, B concept1, otherwise, performing the step (1.2);
step (1.2) if the concept A is directly or indirectly a subclass of the concept B, the similarity Sim of the concepts A and BconceptThe calculation formula is as follows:
Figure BDA0001768618840000151
wherein prop (A) and prop (B) represent the attribute sets of concept A and concept B, respectively, and Size (prop (B)) and Size (prop (A)) represent the attribute numbers of concept B and concept A, respectively, otherwise, the step (1.3) is carried out
Step (1.3) if the concept B is directly or indirectly a subclass of the concept A, the similarity Sim of the concepts A and BconceptThe calculation formula is as follows:
Figure BDA0001768618840000161
otherwise, performing the step (1.4);
step (1.4) if the concept A and the concept B have no parent-child relationship, but the two concepts directly or indirectly have a common parent class concept C, a word semantic similarity measurement method based on a naive Bayes model is adopted, firstly, all attributes of the concept A and the concept B are respectively traversed, the attribute names of the concept A and the concept B are subjected to feature extraction through a computeFeature function, and then, a conditional probability distribution list and an adjustment factor after sample training are adopted to calculate the similarity Sim between the concept attributeswordAccording to the similarity Sim between the concept attributeswordComparing with similarity judgment factor eta, judging whether two attributes are the same attribute, counting, and finally calculating similarity Sim of concepts A and BconceptThe method comprises the following steps:
step (1.4.1) setting variable i to represent the same number of attributes in concept A and concept B and setting the initial value to be 0, and performing step (1.4.2);
step (1.4.2) if the traversal of the attribute set prop (A) of the concept A is completed, then step (1.4.7) is performed, otherwise, the next prop (A) is taken out from prop (A)jAnd removing it from prop (A) and carrying out step (1.4.3);
step (1.4.3) if the traversal of the attribute set prop (B) of the concept B is completed, returning to the step (1.4.2), otherwise, taking out the next prop (B) from the prop (B)kAnd removing it from prop (B) and carrying out step (1.4.4);
step (1.4.4) is based on naive Bayes model, combines WorkNet English dictionary, and pairs of prop (A) through ComputeFeature functionjAnd prop (B)kThe attribute name of (2) is subjected to feature extraction to obtain L (prop (A)j,prop(B)k) And D (prop (A)j,prop(B)k). The naive Bayes model is one of the two most extensive classification models, and WorkNet is an English dictionary established and maintained by the university of Princeton, cognition, science and laboratory under the guidance of Miller in the teaching of psychology. The specific calculation process is as follows:
calculating the word semantics of each attribute name, since each word corresponds to oneMultiple semantics, each word pair may correspond to one or more semantic pairs. Defining the semantic node distance with the shortest distance in all semantic pairs corresponding to the word pair as the word pair distance L (prop (A)j,prop(B)k) And defining the semantic pair depth with the shortest distance between semantic nodes as word pair depth D (prop (A)j,prop(B)k) Known attribute names prop (A)jPresence in semantic node vj1,vj2,…,vjnIn the synonymous phrase of (1), attribute name prop (B)kPresence in semantic node vk1,vk2,…vkmIn a synonymous phrase of (1), then prop (A)jAnd prop (B)kThe distance calculation formula and the depth calculation formula are as follows:
Figure BDA0001768618840000162
Figure BDA0001768618840000163
wherein L (v)ja,vkb) Representing semantic nodes vjaAnd semantic node vkbDistance of D (v)ja,vkb) Representing semantic pairs (v)ja,vkb) Of the depth of (c).
Further, mean functions LW (i) and DW (o) are generated according to a training set of the naive Bayes model, and then a conditional probability distribution column P (L (prop (A)) is calculated by utilizing the mean functions LW (i) and DW (o)j,prop(B)k) I C and P (D (prop (A))j,prop(B)k) I C), wherein C is a word class classification with a value range of { U, N }, wherein U represents "consistent" and N represents "inconsistent". Finally, adjusting factors alpha and beta are calculated, and the calculation formula is as follows:
Figure BDA0001768618840000171
Figure BDA0001768618840000172
then, the step (1.4.5) is carried out;
step (1.4.5) based on naive Bayes model, the characteristic L (prop (A) of ontology concept attribute is processedj,prop(B)k) And D (prop (A)j,prop(B)k) Injecting the mixture into the conditional probability distribution list obtained in the step (1.4.4), and sequentially extracting the conditional probability V1=P(L(prop(A)j,prop(B)k)=i|C=U),V2=P(D(prop(A)j,prop(B)k)=o|C=U),V3=P(L(prop(A)j,prop(B)k) I | C ═ N) and V4=P(D(prop(A)j,prop(B)k) O | C ═ N). Finally, the pro (A) is calculated by combining the regulatory factors alpha and beta in step (1.4.4)jAnd prop (B)kSimilarity between them SimwordThe calculation formula is as follows:
Simword(prop(A)j,prop(B)k)=(αV1×V2)/(αV1×V2+βV3×V4) Carrying out the step (1.4.6);
step (1.4.6) if SimwordGreater than or equal to the similarity criterion factor eta, prop (A)jAnd prop (B)kAdding 1 to the variable i for the same attribute, returning to the step (1.4.2), and otherwise, returning to the step (1.4.3);
step (1.4.7) calculating similarity Sim of concepts A and BconceptThe calculation formula is as follows:
Figure BDA0001768618840000173
wherein i represents the number of attributes in concept A and concept B, prop (A) and prop (B) represent the attribute sets of concept A and concept B, respectively, and Size (prop (B)) and Size (prop (A)) represent the number of attributes in concept B and concept A, respectively, and the step (1.5) is performed;
step (1.5) if the relationship between the concept A and the concept B does not meet the above condition, the similarity Sim of the concepts A and BconceptSet to 0;
second step, concept of combining the first stepSimilarity calculation method, providing service S1And service S2Input similarity SiminputThe specific process of the calculation method is as follows:
step (2.1) establishing a service input parameter similarity maximum matching array InSim and initializing, and performing step (2.2);
step (2.2) service S1Is subtracted by the service S2Obtaining a parameter quantity difference d by inputting the parameter quantity, and performing the step (2.3);
step (2.3) if d is less than or equal to 0, then service S1Is set to SshortService S2Is set to SlongOtherwise, it will serve S2Is set to SshortService S1Is set to SlongCarrying out the step (2.4);
step (2.4) traverse SlongIf the traversal is completed, go to step (2.8), otherwise go from SlongIn the next input parameter long is taken outiCarrying out the step (2.5);
step (2.5) traverse SshortIf the traversal is completed, returning to the step (2.4), otherwise, returning to the step SshortGet the next input parameter shortjCarrying out the step (2.6);
step (2.6) calculating parameter Long according to the concept similarity calculation method of the first stepiAnd parameter shortjSimilarity Sim ofijCarrying out the step (2.7);
step (2.7) with SimijAnd InSim [ i ]]By comparison, if SimijGreater than InSim [ i]Then, will InSim [ i ]]Is set to SimijOtherwise InSim [ i ]]Returning to the step (2.5) when the value is the original value;
step (2.8) calculation service S1And service S2Input similarity SiminputThe calculation formula is as follows:
Figure BDA0001768618840000181
wherein Size (S)long.Input and Size: (SshortInput) represents the service S, respectivelylongNumber of input parameters and service SshortThe number of input parameters, | d | represents the difference value of the number of the input parameters of two services, and InSim is the maximum matching array of the similarity of the input parameters;
step three, combining the concept similarity calculation method of the step one, and providing a service S1And service S2Output similarity SimoutputThe specific process of the calculation method is as follows:
step (3.1) creating a service output parameter similarity maximum matching array OutSim and initializing, and performing step (3.2);
step (3.2) service S1Minus the service S2Obtaining a parameter quantity difference d according to the output parameter quantity, and performing the step (3.3);
step (3.3) if d is less than or equal to 0, service S is carried out1Is set to SshortService S2Is set to SlongOtherwise, it will serve S2Is set to SshortService S1Is set to SlongAnd (4) performing the step (3.4);
step (3.4) traverse SlongIf the traversal is completed, go to step (3.8), otherwise go from SlongIn the next output parameter longiAnd (5) carrying out the step (3.5);
step (3.5) traverse SshortIf the traversal is completed, the step (3.4) is returned, otherwise, the step S is startedshortIn the next output parameter shortjAnd (4) carrying out the step (3.6);
step (3.6) calculating the parameter Long according to the concept similarity calculation method of the first stepiAnd parameter shortjSimilarity Sim ofijCarrying out the step (3.7);
step (3.7) with SimijAnd OutSim [ i ]]By comparison, if SimijGreater than OutSim [ i ]]Then OutSim [ i ] is set]Is set to SimijElse OutSim [ i ]]Returning to the step (3.5) when the value is the original value;
step (3.8) calculation service S1And service S2Output similarity SimOutputThe calculation formula is as follows:
Figure BDA0001768618840000191
wherein Size (S)longOutput) and Size (S)shortOutput) respectively represent the services SlongNumber of output parameters and service SshortThe number of output parameters, | d | represents the difference value of the number of the output parameters of the two services, and OutSim is a maximum matching array of the similarity of the output parameters;
the fourth step combines the service input similarity Sim obtained in the second step and the third stepinputSimilarity with service output SimOutputComputing service S1And service S2Functional similarity functional sim (S) of1,S2) The calculation formula is as follows:
FunctionalSim(S1,S2)=w1×Siminput+w2×SimOutputwherein the weight w1And w2Is a real number between 0 and 1 and sums to 1. They represent the importance of the service consumer to input similarity and output similarity determinations. By default, w1And w2Are all set to 0.5.
And fifthly, giving a service clustering algorithm by combining the service function similarity measurement mode in the fourth step, firstly, arbitrarily selecting an unallocated core object as a seed, and then searching all sample sets with reachable densities of the core object to form a cluster. And then continuously selecting another unallocated core object to search a sample set with a reachable density to obtain another cluster until all the core objects are allocated. Formula of search radius Eps in the invention
Figure BDA0001768618840000192
Determining, wherein n represents the dimension size of the service, i.e. the average attribute number of all services, k represents the minimum number of services required to form a cluster, r represents the radius of a hypersphere composed of n-dimensional services, and m is the n-dimensional radius contained in the hypersphereThe number of services; while the minimum number MinPts follows empirical heuristics: MinPts is round (m/25), where round is the rounding function and m is the number of samples in the sample set.
Step (5.1) initializing an unvisited sample set into an original sample set T, dividing a cluster set C into empty sets, and performing step (5.2);
step (5.2) traversing the original sample set T, if the traversal is finished, ending, otherwise, taking out the next service S from the TiAnd removing it from T, proceeding to step (5.3);
step (5.3) combines the service function similarity measurement mode defined by step four to search service SiThe Eps neighborhood of (c);
further, step (5.3) said finding service SiThe Eps neighborhood of (c) is as follows:
step (5.3.1) Create service SiNeighborhood set N ofEps(Si) Carrying out the step (5.3.2);
step (5.3.2) traverses the original sample set T, if the traversal is completed, the step (5.4) is carried out, otherwise, the next service S is taken out from the TjCarrying out the step (5.3.3);
step (5.3.3) uses the functional similarity defined in step four to calculate service SiAnd service SjFunctional similarity functional sim (S)i,Sj) And (5.3.4) carrying out the step;
step (5.3.4) if service SiAnd service SjFunctional similarity functional sim (S)i,Sj) Less than or equal to the search radius Eps, the service S will be providedjJoining service SiNeighborhood set N ofEps(Si) Returning to the step (5.3.2), otherwise, directly returning to the step (5.3.2);
step (5.4) creation of a New Cluster CkIf S isiIf the number of Eps neighborhood samples is not less than MinPts, then S is determinediAdding the mixture into the cluster, performing the step (5.5), and otherwise, returning to the step (5.2);
step (5.5) traversal service SiNeighborhood set N ofEps(Si) If the traversal is completed, the step (5.13) is carried out, otherwise the set N is taken outEps(Si) Of (2) next service S'kAnd (5.6) carrying out the step;
step (5.6) creating service S'kNeighborhood set N ofEps(S’k) Carrying out the step (5.7);
step (5.7) if the original sample set T contains service S'kThen service S'kRemoving from T, performing step (5.8), otherwise, returning to step (5.5);
step (5.8) traverses the original sample set T, if the traversal is finished, the step (5.11) is carried out, otherwise, the next service S 'is taken out from the T'lCarrying out the step (5.9);
step (5.9) adopts the service function similarity measurement mode defined in step four to calculate service S'kAnd service S'lFunctional similarity functional Sim (S'k,S’l) Go to step (5.10)
Step (5.10) if service S'kAnd service S'lFunctional similarity functional Sim (S'k,S’l) Is less than or equal to the search radius Eps, then service S'lAdd service S'kNeighborhood set N ofEps(S’k) Returning to the step (5.8), otherwise, directly returning to the step (5.8);
step (5.11) if service S'kIf the number of Eps neighborhood samples is not less than MinPts, the service in the neighborhood is added to the service SiEps neighborhood set NEps(Si) And (5.12) performing the step (5.12), otherwise, returning to the step (5.5);
step (5.12) if the cluster set C does not contain service S'kCluster of (2), then service S'kAdding the cluster C created in the step (5.4)kReturning to the step (5.5), otherwise, directly returning to the step (5.5);
step (5.13) clustering the clusters CkAdding the cluster set C, and returning to the step (5.2);
and sixthly, obtaining the central service of each cluster according to the clustering result of the fifth step. The cluster center service can represent the typical characteristics of the cluster service, and in general, the cluster center service is not a specific existing service but a virtual service constructed by a certain algorithm. The specific calculation process of the cluster center service is as follows:
step (6.1) creation of the list ScenterRecording the service of each cluster center, and performing the step (6.2);
step (6.2) traversing the cluster set C created in the fifth step, if the traversal is completed, ending the process, otherwise, taking out the next cluster C from the cluster set CkCarrying out the step (6.3);
step (6.3) of establishing a variable in.num and out.num pair cluster CkAll the input parameters and the output parameters are counted, initial values of the two variables are set to be 0, and a cluster center service S is establishedkcenterAnd (6.4) carrying out the step;
step (6.4) traverse clustering CkIf the traversal is completed, go to step (6.6), otherwise take out the next service SkAnd (6.5) carrying out the step;
step (6.5) statistical service SkNumber of input parameters SkInnum and the number of output parameters SkOutnum, and accumulating to the in.num and out.num respectively, and returning to the step (6.4);
step (6.6) traverse clustering CkIf traversal is complete, then SkcenterJoin list ScenterAnd returning to the step (6.2), otherwise, taking out the next service SkCarrying out step (6.7);
step (6.7) calculation service SkIn, num if p1 is greater than a given threshold, p1
Figure BDA0001768618840000213
The input parameter is considered to have higher importance in the current cluster and added to the input parameter list S of the cluster center servicekcenterInput, performing step (6.8);
step (6.8) calculation service SkOut. num if p2 is greater than a given threshold, p2
Figure BDA0001768618840000212
The output parameter is considered to have a higher importance in the current cluster and added to the output parameter list S of the cluster center servicekcenterOutput, return to step (6.6);
and seventhly, in the service matching process of the system, the functional similarity between the RCT node requirement description and each cluster center service (obtained in the sixth step) description needs to be calculated respectively. The RCT node is a constituent unit of the RCT model, and can be described as a Web service required for completing a current Web subtask, and the RCT model is an extension and redefinition of the itar framework proposed by professor Eric YU of toronto-the-world of the present invention, and the itar framework defines four dependencies in the policy dependency model, which are: target dependency, meaning that one role depends on another role to accomplish a certain goal; resource dependence, meaning that one role depends on another role to provide it with physical resources and information; task dependency, meaning that one role depends on another role to complete a certain task; non-functional requirements are related to soft target dependencies, similar to target dependencies. In particular, the present invention extends the atomic concept of roles, goals, tasks, and resources of iStar to support mapping relationships and related description specifications between user requirements, Web tasks, services, and service sequences. The RCT model will be instantiated in an OWL-S format file to ensure normal execution of the service matching process. In the RCT model, an ellipse is used to represent a user demand (RCT demand node), a hexagon is used to represent a Web subtask, a well number above and to the left of the hexagon represents a sequence number of the Web subtask, a circle represents a service, and a rectangle represents an information resource.
Because OWL-S is a language designed for describing Web services and is suitable for describing the requirements of services, the requirements of RCT nodes are also described by adopting OWL-S, the functional similarity measurement method in the fourth step is also suitable for calculating the similarity between the RCT nodes and cluster center services, the cluster where the cluster center services with the maximum functional similarity are located is obtained through calculation, the services in the cluster are candidate services CandidateServices which can meet the requirements of current users, and the calculation step is the same as the fourth step, so that repeated description is not needed.
And eighthly, screening candidate service sets CandidateServices (obtained in the seventh step) according to the QoS threshold in the user request, and filtering out services which do not meet the requirements of the user. The service consumer may specify a QoS threshold in the service request indicating rejection of Web services having a QoS below or above the threshold.
Before introducing the QoS threshold based service filtering method, the ontology based OWL-S extension proposed by the present invention is introduced, i.e. non-functional description (QoS) is added to the Web service description.
OWL-S (original DAML-S) is called as Ontology Web Services for Services, is a Web service Ontology description Language based on OWL (Web Ontology Web), semantically describes Web Services by using a whole set of description mechanism, and generates a description file which can be understood and processed by a computer.
OWL-S includes three basic components:
(4) the Service Profile describes what the Service does, and the basic attributes comprise a Service name (serviceName), a text description (textDescription) and the like; the functional attributes include four parts of input information (hasInput), output information (hasOutput), preconditions (hasRecondition) and expected effects (hasEffect).
(5) Service Model describes how services work, OWL-S treats each Service as a Process (Process) and divides it into three categories: atomic processes (Atomic processes), Simple processes (Simple processes), and Composite processes (Composite processes). The atomic process has no subprocess and can be directly called; the simple process can not be directly called, and a corresponding grouping description file does not exist; the combined process is formed by combining a plurality of sub-processes through a certain control structure, and in OWL-S, each process body can be semantically described through IOPE.
(6) Service grouping describes the calling information of the Service, OWL-S uses WSDL as the basis of the Service grouping mechanism, defines a specific message format, and encapsulates input information, output information, Service addresses and the like.
Based on Web service description language OWL-S, the invention constructs a semantic service description model as shown in the following.
The invention adopts quadruplets to express semantic service description: WS ═ N, D, I, O >, where:
n represents the Name (Name) of the service, D represents the text Description (Description) of the service, and the N and the D form the basic attribute of the service;
the functional attributes of the service include I and O, which represent the attributes of the Input (Input) and Output (Output) interface parameters of the service WS, respectively, each interface is a set of parameter sets, and I ═ I1,…,im}, element i1,…,imRepresenting semantic concepts corresponding to input parameters of the service WS in the domain ontology; o is the output set of the service, O ═ O1,…,on}, element o1,…,onAnd representing semantic concepts corresponding to the output parameters of the service WS in the domain ontology.
Fig. 3 shows a new Service Profile model. In the figure, a dotted arrow (subcolasiof) represents an inheritance relationship between a subclass and a parent class, a solid arrow (hasProperty) represents a membership relationship of an attribute, and in OWL-S Service Profile, the invention uses a group of Service parameters (ServiceParameter) comprising a name (serviceParameteName) and a parameter value (Sparamer), wherein Thing represents the specific content of the parameter value (Sparamer) & xsd; # string indicates the attribute of the type string, & process; # Input and & process; # Output indicates the input information content and the Output information content of the service, respectively. After the OWL-S and the QoS body are connected, QoSProperty becomes a subclass of the OWL-S ServiceParameter, and qoPropertyName and qProperty are child attributes of the OWL-S serviceParameterName and the sParameter attribute respectively.
Each QoS attribute (QoSProperty) is defined by a name in the form of a string (qoospropertyname) and a set of characteristics (qoschharacteristic), described as follows:
value: a value representing a QoS attribute. For a service provider, it represents a QoS attribute of the service provided; but for the service consumer it indicates the threshold for the QoS attribute.
Type: this feature is used to distinguish between two types of QoS:
revenue-type benefit (e.g., reliability, quality improves as attribute values increase). In this case, the user-specified QoS attribute value represents the minimum value to be considered.
Cost type costs (e.g., response time, quality decreases as the attribute value increases). In this case, the user-specified QoS attribute value represents the maximum value to be considered.
Unit: the metric unit (e.g., meta, sec) of the QoS attribute.
Weight: QoS weights are used to specify the importance of QoS attributes.
Confidence: representing the confidence level of the user's preference for it.
Where Weight and Confidence are two attributes of the qoschharacteristic subclass RequesterQoS, RequesterQoS representing QoS settings of a service requester and qoschharacteristic another subclass ProviderQoS representing QoS settings of a service provider.
Next, a QoS threshold based service filtering method will be described, which includes the following steps:
step (8.1) traverses the services in the candidate service set CandidateServices, if the traversal is completed, the operation is ended, otherwise, the next service S is taken out from the candidate service set CandidateServicescAnd (4) carrying out the step (8.2);
step (8.2) traversal service ScIf the traversal is completed, the step (8.1) is returned, otherwise, the slave service ScThe next QoS attribute QoSPropity is taken out, and the step (8.3) is carried out;
step (8.3), if the QoS constraint QoSProperty specified by the user comprises QoSProperty, the step (8.4) is carried out, otherwise, the step (8.2) is returned;
and (8.4) judging whether the Confidence coefficient Confidence of the QoSContractions to QoSproperty is not 0 or not. The confidence coefficient represents the user's confidence in the designated threshold consValue, and should be in the range of 0, 1.1 indicates that the filtering algorithm must strictly adhere to the specified threshold; 0 represents that the filtering algorithm must ignore this threshold. If the Confidence is not 0, performing the step (8.5), otherwise, returning to the step (8.2);
step (8.5), if the Type of QoSProperty belongs to benefit Type benefit and the attribute Value of QoSProperty is less than the product of Confidence and consValue, performing step (8.6), otherwise, if the Type belongs to cost Type cost and the attribute Value of QoSProperty is greater than the result of the ConsValue divided by the Confidence, also performing step (8.6), otherwise, returning to step (8.2);
step (8.6) will serve ScFiltering and removing from candidate service sets CandidateServices, and returning to the step (8.2);
and ninthly, performing comprehensive service scoring and ranking on the candidate service sets CandidateServices filtered in the eighth step, wherein the service with the highest score is the best service. Before service scoring, consistency verification needs to be performed on the QoS weight determined by the user, if the obtained consistency ratio CR is smaller than 0.1, scoring and ranking steps are performed, otherwise, the QoS weight is fed back, the result of revising the user is required, and the calculation is finished, specifically, the following steps are performed:
and (9.1) performing weight calculation on the QoS attribute set by the user, wherein the Analytic Hierarchy Process (AHP) mechanism is combined, and the analytic hierarchy process is a decision-making method which decomposes elements always related to decision into a target, a standard, a scheme and the like and performs qualitative and quantitative analysis on the basis. A decision matrix is constructed for pairwise comparison, where each element scores every other element by a predefined score (from 1 to 9), indicating their relative importance. The scale method of 1-9 conforms to the psychological habit of people in making judgment, and the corresponding absolute scale is given in table 1.
Figure BDA0001768618840000241
TABLE 1
Further, the QoS attribute weight calculation steps are as follows:
step (9.1.1) determining an index (specified by a user) to be used by the AHP method, and performing step (9.1.2);
step (9.1.2) establishing an n-order pairwise comparison matrix A [ n ] [ n ] based on user preference, and performing step (9.1.3);
step (9.1.3) calculates importance weight of each QoS attribute based on the pairwise comparison matrix a, specifically the calculation steps are as follows:
step (9.1.3.1) establishing vector W [ n ] and temporary vector M [ n ] recording importance weight of each QoS attribute and temporary matrix P [ n ] [ n ], and proceeding step (9.1.3.2);
step (9.1.3.2) sets up temporary variable j and initial value 0, proceed step (9.1.3.3);
step (9.1.3.3) if j is less than n, proceeding to step (9.1.3.4), otherwise proceeding to step (9.1.3.5);
step (9.1.3.4) the sum of jth column of the matrix A is assigned to M [ j ], the value of j plus 1 is assigned to j, and the step (9.1.3.3) is returned;
step (9.1.3.5) sets temporary variables k, l and initial value 0, and proceeds step (9.1.3.6);
step (9.1.3.6), if k is less than n, performing step (9.1.3.7), otherwise performing step (9.1.3.9);
step (9.1.3.7) if l is less than n, then step (9.1.3.8) is carried out, otherwise, the value of adding 1 to k is given to k, and the step (9.1.3.6) is returned;
step (9.1.3.8) assigning P [ l ] [ k ] the value obtained by dividing A [ l ] [ k ] by M [ k ], assigning l the value of l plus 1 to l, and returning to step (9.1.3.7);
step (9.1.3.9) sets temporary variable m and initial value 0, and proceeds step (9.1.3.10);
step (9.1.3.10), if m is smaller than n, performing step (9.1.3.11), otherwise performing step (9.1.3.12);
step (9.1.3.11) assigning the sum of the mth row of the matrix P to W [ m ], assigning the value of m plus 1 to m, and returning to step (9.1.3.10);
step (9.1.3.12) sets temporary variable i and initial value 0, and proceeds step (9.1.3.13);
step (9.1.3.13) if i is less than n, then step (5.3.14) is carried out, otherwise, the calculation is finished;
step (9.1.3.14) of dividing W [ i ] by n and then assigning W [ i ], and then assigning i with a value of i plus 1 and returning to step (9.1.3.13);
and (9.2) verifying the consistency of the judgment of the user according to the pair of comparison matrixes A constructed in the step (9.1) and the weight vector W obtained in the step (9.1). In the AHP method, if the corresponding consistency ratio CR is less than 0.1, it is considered that the user has a satisfactory consistency, otherwise, the user needs to subjectively correct until the consistency requirement is satisfied. CR is obtained by dividing the CI value by the average random consistency index RI, and the calculation steps are as follows:
step (9.2.1) of establishing a temporary vector M [ n ]]And a temporary matrix P [ n ]][n]Setting up the variable CI to represent the index of conformity, λmaxThe element with the largest median value in the vector M is represented, and the step (9.2.2) is carried out;
step (9.2.2) setting temporary variables i, j and setting initial values 0, and performing step (9.2.3);
step (9.2.3), if j is less than n, performing step (9.2.4), otherwise, performing step (9.2.6);
step (9.2.4) if i is less than n, then step (9.2.5) is carried out, otherwise, the value of adding 1 to i is given to i, and then step (9.2.3) is returned;
step (9.2.5) assigning the value obtained by multiplying A [ i ] [ j ] by W [ j ] to P [ i ] [ j ], then assigning the value obtained by adding 1 to j, and returning to the step (9.2.4);
step (9.2.6) sets temporary variable k and initial value 0, and proceeds step (9.2.7);
step (9.2.7), if k is less than n, performing step (9.2.8), otherwise performing step (9.2.9);
step (9.2.8) assigning the sum of the k-th row of the matrix P to M [ k ], assigning the value of k plus 1 to k, and returning to step (9.2.7);
step (9.2.9) sets temporary variable l and initial value 0, and proceeds step (9.2.10);
step (9.2.10), if l is less than n, performing step (9.2.11), otherwise performing step (9.2.12);
step (9.2.11) of assigning M [ l ] to a value obtained by dividing M [ l ] by W [ l ], assigning l to a value obtained by adding 1 to l, and returning to step (9.2.10);
step (9.2.12) assigns the element of the vector M with the largest median to λmaxCarrying out the step (9.2.13);
step (9.2.13) is based on the formula CI ═ λmaxCalculating a consistency index of-n)/(n-1), and performingA step (9.2.14);
step (9.2.14) dividing the CI value by the corresponding average random consistency index RI to obtain a consistency ratio CR, if CR is less than 0.1, the user is judged to have satisfactory consistency, otherwise, the user is judged to have no satisfactory consistency;
to further understand step (9.1) and step (9.2), step (9.1) and step (9.2) are described herein with reference to the following example:
(1) an index to be used by the method is determined. As an example, the present invention selects four QoS attributes as indicators, namely: response time, execution price, reliability, and availability.
(2) A pairwise comparison matrix based on user preferences is established. Since there are four QoS attributes in the example, the matrix will contain 16 elements, and the matrix described in Table 2 represents the corresponding decisions of the user in the pairwise comparison.
Figure BDA0001768618840000261
TABLE 2
(3) And (4) calculating each QoS attribute weight in combination with the calculating step of the step (9.1). The RI values corresponding to different values of n are given in table 3, where n is the number of QoS attributes.
Figure BDA0001768618840000262
TABLE 3
In this example, n is 4, so the calculation step according to step (9.1) can derive each QoS attribute weight (as in table 4).
Figure BDA0001768618840000263
TABLE 4
(4) And finally, verifying the consistency of the judgment of the user by combining the calculation step of the step (9.2). The following results were calculated: lambda [ alpha ]max=4.203,CI=0.068,CR ═ 0.075. The CR value is less than 0.1 and thus the weight is accepted and the user judges to have satisfactory consistency.
And (9.3) carrying out comprehensive scoring and ranking on the services, which comprises the following specific steps:
step (9.3.1), if the final result of step (9.2) is that the user is judged to have satisfactory consistency, step (9.3.2) is carried out, otherwise, the result that the QoS weight needs to be revised again by the user is fed back, and the calculation is finished;
step (9.3.2) establishes a vector of service composite scores, comp [ services.size ], QoS score vector, QoS score [ services.size ], and QoSMtx matrix recording normalized QoS values, where services.size represents the number of services in the candidate service set, rows in QoSMtx represent candidate Web services, and columns represent QoS attributes, and step (9.3.3) is performed.
Step (9.3.3) traverses candidate service sets CandidateServices, if the traversal is completed, step (9.3.8) is carried out, otherwise, the next service S of the candidate service sets CandidateServices is taken outiCarrying out the step (9.3.4);
step (9.3.4) traversal service SiQoS attribute set S in (1)iQsproperties, if traversal is complete, proceed to step (9.3.7), otherwise from SiThe next property S is fetched from the qsPropertiesi.PjPerforming step (9.3.5);
step (9.3.5) because the measurement interval of each QoS attribute value is different, the QoS values need to be normalized to have a value range between 0 and 1, so as to ensure that each QoS attribute is evaluated with the same span. It is therefore necessary to calculate the QoS attribute Si.PjNormalized value of (n) v (p)ij) And assigns this value to QoSMtx [ i ]][j]The specific calculation steps are as follows:
step (9.3.5.1) if the attribute Si.PjIf the attribute is a profit type attribute, the step (9.3.5.2) is performed, and if the attribute S is the profit type attributei.PjIf the attribute is a cost attribute, the step (9.3.5.3) is performed;
step (9.3.5.2) nv (p)ij) The calculation formula of (a) is as follows:
Figure BDA0001768618840000271
wherein, v (p)ij) Presentation service SiIn the attribute Si.PjIs taken as the original value of v (p)j)maxRepresentation of candidate service set CandidateServices and S in each servicei.PjMaximum values belonging to the same attribute, v (p)j)minRepresentation of candidate service set CandidateServices and S in each servicei.PjA minimum value belonging to the same attribute, and a step (9.3.6) is performed;
step (9.3.5.3) nv (p)ij) The calculation formula of (a) is as follows:
Figure BDA0001768618840000281
step (9.3.6) if the attribute Si.Pj(ii) satisfies the user-defined QoS constraints QoSContriants, then calculates the attribute Si.PjQoS score of (q) QoS score of [ i ]]And then, accumulating and recording the QoS scores, wherein a calculation formula in the whole process is as follows:
qosScore[i]+=(QoSMtx[i][j]×QoSConstraint[j].Weight)
wherein QoSConstratent [ j ]]Weight represents the user vs. attribute Si.PjReturning to the step (9.3.4) according to the defined weight, otherwise, directly returning to the step (9.3.4);
step (9.3.7) combines the function similarity calculation method of the fourth step to calculate the current RCT node requirement SRCTAnd service SiFunctional similarity functional sim (S) ofi,SRCT) And combining the QoS score qOSScore [ i ] obtained in the step (9.3.6)]To service SiThe composite score is weighted and the final result is assigned to the ComScore [ i ]]The calculation formula is as follows:
compScore[i]=w1*FunctionalSim(Si,SRCT)+w2*qosScore[i]
wherein w1 and w2 respectively represent the function similarity weight and the QoS scoring weight, and the step (9.3.3) is returned;
step (9.3.8) ranks the services that completed the composite score and returns the service with the highest score, i.e., the best service.

Claims (10)

1. A dynamic evolution method of demand-oriented adaptive Web services is characterized by comprising the following steps:
the method comprises the following steps of firstly, calculating semantic similarity between two concepts A and B in a domain ontology, wherein the process is as follows: the functional similarity measurement considers the domain ontology concepts of input and output between services, the matching between the input and the output refers to the matching of concepts related to the input and the output, and in order to calculate the similarity of the two concepts A and B, the relationship between the two concepts in the domain ontology needs to be considered;
a second step of providing a service S by combining the concept similarity calculation method of the first step1And service S2Input similarity SiminputThe calculation method of (1);
step three, combining the concept similarity calculation method of the step one, and providing a service S1And service S2Output similarity SimoutputThe calculation method of (1);
the fourth step combines the service input similarity Sim obtained in the second step and the third stepinputSimilarity with service output SimOutputComputing service S1And service S2Functional similarity functional sim (S) of1,S2) The calculation formula is as follows:
FunctionalSim(S1,S2)=w1×Siminput+w2×SimOutputwherein the weight w1And w2Are real numbers between 0 and 1 and sum to 1, which represent the importance of the service consumer to the input similarity and output similarity determinations;
step five, a service clustering algorithm is given by combining the service function similarity measurement mode of the step four, firstly, an unallocated core object is selected arbitrarily as a seed, and then all sample sets with reachable density of the core object are searched to form a cluster; then, another unallocated core object is continuously selected to search for a sample set with a reachable density, and another sample set is obtainedClustering until all core objects are distributed; search radius Eps is given by
Figure FDA0002969696320000011
Determining, wherein n represents the dimension size of the service, namely the average attribute number of all the services, k represents the minimum number of services required for forming a cluster, r represents the radius of a hypersphere composed of n-dimensional services, and m is the number of n-dimensional services contained in the hypersphere; while the minimum number MinPts follows empirical heuristics: MinPts is round (m/25), where round is the rounding function and m is the number of samples in the sample set;
sixthly, according to the clustering result obtained in the fifth step, obtaining the center service of each cluster, wherein the cluster center service can represent the typical characteristics of the clustering service;
seventhly, in the service matching process of the system, functional similarity between RCT node requirement description and each cluster center service description needs to be calculated respectively, wherein the RCT nodes are constituent units of an RCT model and are described as Web services needed for completing current Web subtasks, and an iSar framework defines four dependency relationships in a policy dependency model, which are: target dependency, meaning that one role depends on another role to accomplish a certain goal; resource dependence, meaning that one role depends on another role to provide it with physical resources and information; task dependency, meaning that one role depends on another role to complete a certain task; non-functional demand related soft target dependencies, similar to target dependencies; the atomic concepts of roles, targets, tasks and resources of the iSAR are expanded to support mapping relations and related description specifications among user requirements, Web tasks, services and service sequences, and the RCT model is instantiated by an OWL-S format file so as to ensure normal execution of a service matching process; in the RCT model, an ellipse is used for representing user requirements, namely RCT requirement nodes, a hexagon is used for representing Web subtasks, well numbers above the left side of the hexagon nodes are used for representing serial numbers of the Web subtasks, a circle is used for representing services, and a rectangle is used for representing information resources;
because OWL-S is a language designed for describing Web services and is suitable for describing the requirements of services, the requirements of RCT nodes are also described by adopting OWL-S, the functional similarity measurement method of the fourth step is also suitable for calculating the similarity between the RCT nodes and the cluster center services, the cluster where the cluster center services with the maximum functional similarity are located is obtained by calculation, and the services in the cluster are candidate services Candidateservice which can meet the requirements of current users;
eighthly, screening candidate service sets CandidateServices according to the QoS threshold value in the user request, filtering out services which do not meet the requirements of the user, and enabling a service consumer to designate the QoS threshold value in the service request to indicate that Web services with the QoS lower than or higher than the threshold value are rejected;
ontology-based OWL-S extension, namely adding non-functional description QoS into Web service description; OWL-S is called totally on-load Web Language for Services, it is Web service Ontology description Language based on OWL, use a complete set of description mechanism to carry on the semantic description to the Web service, and the description file that is produced can be understood and processed by the computer;
OWL-S includes three basic components:
(1) the Service Profile describes what the Service does, and the basic attributes comprise a Service name serviceName and a text description; the functional attributes comprise four parts of input information hasInput, output information hasOutput, precondition hasRecondition and expected effect hasEffect;
(2) service Model describes how services work, OWL-S treats each Service as a Process, and divides it into three categories: atomic Process Atomic, Simple, and Composite; the atomic process has no subprocess and can be directly called; the simple process can not be directly called, and a corresponding Service group description file does not exist; the combined process is formed by combining a plurality of sub-processes through a certain control structure, and in OWL-S, each process body can be semantically described through IOPE;
(3) service grouping describes Service calling information, OWL-S defines a specific message format by using WSDL as the basis of a Service grouping mechanism, and encapsulates input information, output information and a Service address;
constructing an ontology-based OWL-S extended semantic service description model based on a Web service description language OWL-S;
the semantic service description is represented by a quadruplet: WS ═ N, D, I, O >, where:
n represents the Name of the service, D represents the text Description of the service, and the N and D form the basic attribute of the service;
the function attribute of the service comprises I and O, which respectively represent the attributes of the Input and output interface parameters of the service WS, each interface is a set of parameter sets, and I ═ { I ═ is1,…,im}, element i1,…,imRepresenting semantic concepts corresponding to input parameters of the service WS in the domain ontology; o is the output set of the service, O ═ O1,…,on}, element o1,…,onRepresenting semantic concepts corresponding to the output parameters of the service WS in the domain ontology;
in the OWL-S Service Profile, using a group of Service parameters, namely, ServiceParameter, including a name ServiceParameterName and a parameter value, Sparamer, connecting an OWL-S and a QoS body, so that QoProperty becomes a subclass of the OWL-S Service Parameter, and qoPropertyName and qProperty are respectively sub-attributes of the OWL-S serviceParameterName and Sparamer attributes;
each QoS attribute QoSProperty is defined by a name in the form of a string, qoospropertyname, and a set of characteristics qoschharacteristic, described as follows:
value: a value representing a QoS attribute, which represents one QoS attribute of a provided service to a service provider; but for the service consumer it represents the threshold for the QoS attribute;
type: this feature is used to distinguish between two types of QoS:
revenue-type benefit, in which case the user-specified QoS attribute value represents the minimum value to consider;
cost type cost, in which case the user specified QoS attribute value represents the maximum value to be considered; unit: a unit of measure of the QoS attribute;
weight: a QoS weight for specifying the importance of the QoS attribute;
confidence: representing a confidence level of the user's preference for it;
ninthly, performing comprehensive service scoring and ranking on the candidate service sets CandidateServices filtered in the eighth step, wherein the service with the highest score is the best service; before service scoring, consistency verification needs to be performed on the QoS weight determined by the user, if the obtained consistency ratio CR is smaller than 0.1, scoring and ranking steps are performed, otherwise, the QoS weight needs to be revised again by the user, and the calculation is finished.
2. The dynamic evolution method of demand-oriented adaptive Web services according to claim 1, wherein in the first step, the step of calculating the semantic similarity between two concepts a and B in the domain ontology is as follows:
step (1.1) if the concepts A and B are identical or they are declared equivalent classes, the similarity Sim of the concepts A, Bconcept1, otherwise, performing the step (1.2);
step (1.2) if the concept A is directly or indirectly a subclass of the concept B, the similarity Sim of the concepts A and BconceptThe calculation formula is as follows:
Figure FDA0002969696320000031
wherein prop (A) and prop (B) represent the attribute sets of concept A and concept B, respectively, and Size (prop (B)) and Size (prop (A)) represent the attribute numbers of concept B and concept A, respectively, otherwise, the step (1.3) is carried out
Step (1.3) if the concept B is directly or indirectly a subclass of the concept A, the similarity Sim of the concepts A and BconceptThe calculation formula is as follows:
Figure FDA0002969696320000032
otherwise, performing the step (1.4);
step (1.4) if the concept A and the concept B have no parent-child relationship, but the two concepts have a common parent class directly or indirectlyAnd the concept C adopts a word semantic similarity measurement method based on a naive Bayes model, firstly, the attributes of the concept A and the concept B are respectively traversed, the attribute names of the concept A and the concept B are subjected to feature extraction through a computeFeature function, and then the similarity Sim between the concept attributes is calculated by adopting a conditional probability distribution list and an adjustment factor after sample trainingwordAccording to the similarity Sim between the concept attributeswordComparing with similarity judgment factor eta, judging whether two attributes are the same attribute, counting, and finally calculating similarity Sim of concepts A and Bconcept
Step (1.5) if the relationship between the concept A and the concept B does not meet the above condition, the similarity Sim of the concepts A and BconceptIs set to 0.
3. The dynamic evolution method of demand-oriented adaptive Web services according to claim 2, characterized in that the procedure of step (1.4) is as follows:
step (1.4.1) setting variable i to represent the same number of attributes in concept A and concept B and setting the initial value to be 0, and performing step (1.4.2);
step (1.4.2) if the traversal of the attribute set prop (A) of the concept A is completed, then step (1.4.7) is performed, otherwise, the next prop (A) is taken out from prop (A)jAnd removing it from prop (A) and carrying out step (1.4.3);
step (1.4.3) if the traversal of the attribute set prop (B) of the concept B is completed, returning to the step (1.4.2), otherwise, taking out the next prop (B) from the prop (B)kAnd removing it from prop (B) and carrying out step (1.4.4);
step (1.4.4) is based on naive Bayes model, combines WorkNet English dictionary, and pairs of prop (A) through ComputeFeature functionjAnd prop (B)kThe attribute name of (2) is subjected to feature extraction to obtain L (prop (A)j,prop(B)k) And D (prop (A)j,prop(B)k) The process is as follows:
calculating the word semantics of each attribute name, wherein each word corresponds to one or more semantics, and each word pair corresponds to one or more semantic pairs, and the word semantics are compared with the semantic pairsThe semantic node distance with the shortest distance among all semantic pairs corresponding to a word pair is defined as the word pair distance L (prop (A)j,prop(B)k) And defining the semantic pair depth with the shortest distance between semantic nodes as word pair depth D (prop (A)j,prop(B)k) Known attribute names prop (A)jPresence in semantic node vj1,vj2,…,vjnIn the synonymous phrase of (1), attribute name prop (B)kPresence in semantic node vk1,vk2,…vkmIn a synonymous phrase of (1), then prop (A)jAnd prop (B)kThe distance calculation formula and the depth calculation formula are as follows:
Figure FDA0002969696320000041
Figure FDA0002969696320000042
wherein L (v)ja,vkb) Representing semantic nodes vjaAnd semantic node vkbDistance of D (v)ja,vkb) Representing semantic pairs (v)ja,vkb) Depth of (d);
further, mean functions LW (i) and DW (o) are generated according to a training set of the naive Bayes model, and then a conditional probability distribution column P (L (prop (A)) is calculated by utilizing the mean functions LW (i) and DW (o)j,prop(B)k) I C and P (D (prop (A))j,prop(B)k) I C), wherein C is a word class classification, the value range is { U, N }, wherein U represents 'consistent' and N represents 'inconsistent', and finally, the adjustment factors alpha and beta are calculated according to the following calculation formula:
Figure FDA0002969696320000051
Figure FDA0002969696320000052
then, the step (1.4.5) is carried out;
step (1.4.5) based on naive Bayes model, the characteristic L (prop (A) of ontology concept attribute is processedj,prop(B)k) And D (prop (A)j,prop(B)k) Injecting the mixture into the conditional probability distribution list obtained in the step (1.4.4), and sequentially extracting the conditional probability V1=P(L(prop(A)j,prop(B)k)=i|C=U),V2=P(D(prop(A)j,prop(B)k)=o|C=U),V3=P(L(prop(A)j,prop(B)k) I | C ═ N) and V4=P(D(prop(A)j,prop(B)k) O | C ═ N), finally combining the adjustment factors α and β in step (1.4.4) to calculate prop (a)jAnd prop (B)kSimilarity between them SimwordThe calculation formula is as follows:
Simword(prop(A)j,prop(B)k)=(αV1×V2)/(αV1×V2+βV3×V4) Carrying out the step (1.4.6);
step (1.4.6) if SimwordGreater than or equal to the similarity criterion factor eta, prop (A)jAnd prop (B)kAdding 1 to the variable i for the same attribute, returning to the step (1.4.2), and otherwise, returning to the step (1.4.3);
step (1.4.7) calculating similarity Sim of concepts A and BconceptThe calculation formula is as follows:
Figure FDA0002969696320000053
wherein i represents the number of attributes in concept A and concept B, prop (A) and prop (B) represent the attribute sets of concept A and concept B, respectively, and Size (prop (B)) and Size (prop (A)) represent the number of attributes in concept B and concept A, respectively, and step (1.5) is performed.
4. The dynamic evolution method of demand-oriented adaptive Web services according to any of claims 1 to 3, characterized in that in said second step, service S1And service S2Input phaseSimilarity SiminputThe process of the calculation method of (1) is as follows:
step (2.1) establishing a service input parameter similarity maximum matching array InSim and initializing, and performing step (2.2);
step (2.2) service S1Is subtracted by the service S2Obtaining a parameter quantity difference d by inputting the parameter quantity, and performing the step (2.3);
step (2.3) if d is less than or equal to 0, then service S1Is set to SshortService S2Is set to SlongOtherwise, it will serve S2Is set to SshortService S1Is set to SlongCarrying out the step (2.4);
step (2.4) traverse SlongIf the traversal is completed, go to step (2.8), otherwise go from SlongIn the next input parameter long is taken outiCarrying out the step (2.5);
step (2.5) traverse SshortIf the traversal is completed, returning to the step (2.4), otherwise, returning to the step SshortGet the next input parameter shortjCarrying out the step (2.6);
step (2.6) calculating parameter Long according to the concept similarity calculation method of the first stepiAnd parameter shortjSimilarity Sim ofijCarrying out the step (2.7);
step (2.7) with SimijAnd InSim [ i ]]By comparison, if SimijGreater than InSim [ i]Then, will InSim [ i ]]Is set to SimijOtherwise InSim [ i ]]Returning to the step (2.5) when the value is the original value;
step (2.8) calculation service S1And service S2Input similarity SiminputThe calculation formula is as follows:
Figure FDA0002969696320000061
wherein Size (S)long.Input) and Size (S)short.Input) represents services S, respectivelylongNumber of input parameters and servicesSshortThe number of input parameters, | d | represents the difference between the number of input parameters of two services, and InSim is the maximum matching array of the similarity of the input parameters.
5. Requirement-oriented adaptive Web service dynamic evolution method according to any of claims 1 to 3, characterized in that in said third step, service S1And service S2Output similarity SimoutputThe process of the calculation method of (1) is as follows:
step (3.1) creating a service output parameter similarity maximum matching array OutSim and initializing, and performing step (3.2);
step (3.2) service S1Minus the service S2Obtaining a parameter quantity difference d according to the output parameter quantity, and performing the step (3.3);
step (3.3) if d is less than or equal to 0, service S is carried out1Is set to SshortService S2Is set to SlongOtherwise, it will serve S2Is set to SshortService S1Is set to SlongAnd (4) performing the step (3.4);
step (3.4) traverse SlongIf the traversal is completed, go to step (3.8), otherwise go from SlongIn the next output parameter longiAnd (5) carrying out the step (3.5);
step (3.5) traverse SshortIf the traversal is completed, the step (3.4) is returned, otherwise, the step S is startedshortIn the next output parameter shortjAnd (4) carrying out the step (3.6);
step (3.6) calculating the parameter Long according to the concept similarity calculation method of the first stepiAnd parameter shortjSimilarity Sim ofijCarrying out the step (3.7);
step (3.7) with SimijAnd OutSim [ i ]]By comparison, if SimijGreater than OutSim [ i ]]Then OutSim [ i ] is set]Is set to SimijElse OutSim [ i ]]Returning to the step (3.5) when the value is the original value;
step (3.8) calculation service S1And service S2Similar outputDegree SimOutputThe calculation formula is as follows:
Figure FDA0002969696320000062
wherein Size (S)long.Output) and Size (S)short.Output) respectively represent services SlongNumber of output parameters and service SshortThe number of output parameters, | d | represents the difference value of the number of output parameters of two services, and OutSim is the maximum matching array of the similarity of the output parameters.
6. The dynamic evolution method of demand-oriented adaptive Web services according to any of claims 1 to 3, characterized in that in the fifth step, the process of the service clustering algorithm is as follows:
step (5.1) initializing an unvisited sample set into an original sample set T, dividing a cluster set C into empty sets, and performing step (5.2);
step (5.2) traversing the original sample set T, if the traversal is finished, ending, otherwise, taking out the next service S from the TiAnd removing it from T, proceeding to step (5.3);
step (5.3) combines the service function similarity measurement mode defined by step four to search service SiThe Eps neighborhood of (c);
step (5.4) creation of a New Cluster CkIf S isiIf the number of Eps neighborhood samples is not less than MinPts, then S is determinediAdding the mixture into the cluster, performing the step (5.5), and otherwise, returning to the step (5.2);
step (5.5) traversal service SiNeighborhood set N ofEps(Si) If the traversal is completed, the step (5.13) is carried out, otherwise the set N is taken outEps(Si) Of (2) next service S'kAnd (5.6) carrying out the step;
step (5.6) creating service S'kNeighborhood set N ofEps(S’k) Carrying out the step (5.7);
step (5.7) if the original sample set T contains service S'kThen service S'kRemoving from T, performing step (5.8), otherwise, returning to step (5.5);
step (5.8) traverses the original sample set T, if the traversal is finished, the step (5.11) is carried out, otherwise, the next service S 'is taken out from the T'lCarrying out the step (5.9);
step (5.9) adopts the service function similarity measurement mode defined in step four to calculate service S'kAnd service S'lFunctional similarity functional Sim (S'k,S’l) Go to step (5.10)
Step (5.10) if service S'kAnd service S'lFunctional similarity functional Sim (S'k,S’l) Is less than or equal to the search radius Eps, then service S'lAdd service S'kNeighborhood set N ofEps(S’k) Returning to the step (5.8), otherwise, directly returning to the step (5.8);
step (5.11) if service S'kIf the number of Eps neighborhood samples is not less than MinPts, the service in the neighborhood is added to the service SiEps neighborhood set NEps(Si) And (5.12) performing the step (5.12), otherwise, returning to the step (5.5);
step (5.12) if the cluster set C does not contain service S'kCluster of (2), then service S'kAdding the cluster C created in the step (5.4)kReturning to the step (5.5), otherwise, directly returning to the step (5.5);
step (5.13) clustering the clusters CkAnd adding the cluster set C and returning to the step (5.2).
7. The dynamic evolution method of demand-oriented adaptive Web services as claimed in claim 6, characterized in that in said step (5.3), said search service SiThe Eps neighborhood of (c) is as follows:
step (5.3.1) Create service SiNeighborhood set N ofEps(Si) Carrying out the step (5.3.2);
step (5.3.2) traverses the original sample set T, if the traversal is completed, the step (5.4) is carried out, otherwise, the next service S is taken out from the TjTo proceed withStep (5.3.3);
step (5.3.3) uses the functional similarity defined in step four to calculate service SiAnd service SjFunctional similarity functional sim (S)i,Sj) And (5.3.4) carrying out the step;
step (5.3.4) if service SiAnd service SjFunctional similarity functional sim (S)i,Sj) Less than or equal to the search radius Eps, the service S will be providedjJoining service SiNeighborhood set N ofEps(Si) And (5.3.2) returning, otherwise, directly returning to the step (5.3.2).
8. The dynamic evolution method of demand-oriented adaptive Web services according to any one of claims 1 to 3, characterized in that in the sixth step, the calculation process of the cluster center service is as follows:
step (6.1) creation of the list ScenterRecording the service of each cluster center, and performing the step (6.2);
step (6.2) traversing the cluster set C created in the fifth step, if the traversal is completed, ending the process, otherwise, taking out the next cluster C from the cluster set CkCarrying out the step (6.3);
step (6.3) of establishing a variable in.num and out.num pair cluster CkAll the input parameters and the output parameters are counted, initial values of the two variables are set to be 0, and a cluster center service S is establishedkcenterAnd (6.4) carrying out the step;
step (6.4) traverse clustering CkIf the traversal is completed, go to step (6.6), otherwise take out the next service SkAnd (6.5) carrying out the step;
step (6.5) statistical service SkNumber of input parameters SkInnum and the number of output parameters SkOutnum, and accumulating to the in.num and out.num respectively, and returning to the step (6.4);
step (6.6) traverse clustering CkIf traversal is complete, then SkcenterJoin list ScenterAnd returning to the step (6.2), otherwise, taking out the next service SkCarrying out step (6.7);
step (6.7) calculation service SkIn, num if p1 is greater than a given threshold, p1
Figure FDA0002969696320000081
The input parameter is considered to have higher importance in the current cluster and added to the input parameter list S of the cluster center servicekcenterInput, performing step (6.8);
step (6.8) calculation service SkOut. num if p2 is greater than a given threshold, p2
Figure FDA0002969696320000082
The output parameter is considered to have a higher importance in the current cluster and added to the output parameter list S of the cluster center servicekcenterOutput, return to step (6.6).
9. The dynamic evolution method of demand-oriented adaptive Web services according to any of claims 1 to 3, characterized in that in the eighth step, the QoS threshold based service filtering method comprises the following steps:
step (8.1) traverses the services in the candidate service set CandidateServices, if the traversal is completed, the operation is ended, otherwise, the next service S is taken out from the candidate service set CandidateServicescAnd (4) carrying out the step (8.2);
step (8.2) traversal service ScIf the traversal is completed, the step (8.1) is returned, otherwise, the slave service ScThe next QoS attribute QoSPropity is taken out, and the step (8.3) is carried out;
step (8.3), if the QoS constraint QoSProperty specified by the user comprises QoSProperty, the step (8.4) is carried out, otherwise, the step (8.2) is returned;
step (8.4) judging whether the Confidence coefficient Confidence of QoSconstruments to QoSproperty of QoS constraint QoSconstruments is not 0, wherein the Confidence coefficient represents the Confidence of a user to a specified threshold consValue, the value of the coefficient is in the range of [0,1], and 1 represents that a filtering algorithm must strictly adhere to the specified threshold; 0 represents that the filtering algorithm must ignore the threshold, if Confidence is not 0, then go to step (8.5), otherwise return to step (8.2);
step (8.5), if the Type of QoSProperty belongs to benefit Type benefit and the attribute Value of QoSProperty is less than the product of Confidence and consValue, performing step (8.6), otherwise, if the Type belongs to cost Type cost and the attribute Value of QoSProperty is greater than the result of the ConsValue divided by the Confidence, also performing step (8.6), otherwise, returning to step (8.2);
step (8.6) will serve ScFiltering out and removing from candidate service set CandidateServices, and returning to the step (8.2).
10. The dynamic evolution method of demand-oriented adaptive Web services according to any of claims 1 to 3, characterized in that the ninth step comprises the following steps:
step (9.1) weight calculation is carried out on the QoS attribute set by the user, here, a judgment matrix for pair comparison is constructed by combining the mechanism of an Analytic Hierarchy Process (AHP), wherein each element scores each other element through a predefined score, and the predefined score is from 1 to 9 and represents the relative importance of the elements; the scale method of 1-9 conforms to the psychological habits of people in making judgments, and table 1 gives the corresponding absolute scale:
Figure FDA0002969696320000083
Figure FDA0002969696320000091
TABLE 1
The steps of QoS attribute weight calculation are as follows:
step (9.1.1) determining an index to be used by the AHP method, and performing step (9.1.2);
step (9.1.2) establishing an n-order pairwise comparison matrix A [ n ] [ n ] based on user preference, and performing step (9.1.3);
step (9.1.3) calculates importance weight of each QoS attribute based on the pairwise comparison matrix a, specifically the calculation steps are as follows:
step (9.1.3.1) establishing vector W [ n ] and temporary vector M [ n ] recording importance weight of each QoS attribute and temporary matrix P [ n ] [ n ], and proceeding step (9.1.3.2);
step (9.1.3.2) sets up temporary variable j and initial value 0, proceed step (9.1.3.3);
step (9.1.3.3) if j is less than n, proceeding to step (9.1.3.4), otherwise proceeding to step (9.1.3.5);
step (9.1.3.4) the sum of jth column of the matrix A is assigned to M [ j ], the value of j plus 1 is assigned to j, and the step (9.1.3.3) is returned;
step (9.1.3.5) sets temporary variables k, l and initial value 0, and proceeds step (9.1.3.6);
step (9.1.3.6), if k is less than n, performing step (9.1.3.7), otherwise performing step (9.1.3.9);
step (9.1.3.7) if l is less than n, then step (9.1.3.8) is carried out, otherwise, the value of adding 1 to k is given to k, and the step (9.1.3.6) is returned;
step (9.1.3.8) assigning P [ l ] [ k ] the value obtained by dividing A [ l ] [ k ] by M [ k ], assigning l the value of l plus 1 to l, and returning to step (9.1.3.7);
step (9.1.3.9) sets temporary variable m and initial value 0, and proceeds step (9.1.3.10);
step (9.1.3.10), if m is smaller than n, performing step (9.1.3.11), otherwise performing step (9.1.3.12);
step (9.1.3.11) assigning the sum of the mth row of the matrix P to W [ m ], assigning the value of m plus 1 to m, and returning to step (9.1.3.10);
step (9.1.3.12) sets temporary variable i and initial value 0, and proceeds step (9.1.3.13);
step (9.1.3.13) if i is less than n, then step (5.3.14) is carried out, otherwise, the calculation is finished;
step (9.1.3.14) of dividing W [ i ] by n and then assigning W [ i ], and then assigning i with a value of i plus 1 and returning to step (9.1.3.13);
step (9.2) verifies the consistency of the user judgment according to the pair comparison matrix A constructed in step (9.1) and the weight vector W obtained in step (9.1), in the AHP method, if the corresponding consistency ratio CR is less than 0.1, the user judgment is considered to have satisfactory consistency, otherwise, the user judgment needs to be subjectively corrected until the consistency requirement is met, CR needs to be obtained by dividing the CI value by the average random consistency index RI, and the calculation steps are as follows:
step (9.2.1) of establishing a temporary vector M [ n ]]And a temporary matrix P [ n ]][n]Setting up the variable CI to represent the index of conformity, λmaxThe element with the largest median value in the vector M is represented, and the step (9.2.2) is carried out;
step (9.2.2) setting temporary variables i, j and setting initial values 0, and performing step (9.2.3);
step (9.2.3), if j is less than n, performing step (9.2.4), otherwise, performing step (9.2.6);
step (9.2.4) if i is less than n, then step (9.2.5) is carried out, otherwise, the value of adding 1 to i is given to i, and then step (9.2.3) is returned;
step (9.2.5) assigning the value obtained by multiplying A [ i ] [ j ] by W [ j ] to P [ i ] [ j ], then assigning the value obtained by adding 1 to j, and returning to the step (9.2.4);
step (9.2.6) sets temporary variable k and initial value 0, and proceeds step (9.2.7);
step (9.2.7), if k is less than n, performing step (9.2.8), otherwise performing step (9.2.9);
step (9.2.8) assigning the sum of the k-th row of the matrix P to M [ k ], assigning the value of k plus 1 to k, and returning to step (9.2.7);
step (9.2.9) sets temporary variable l and initial value 0, and proceeds step (9.2.10);
step (9.2.10), if l is less than n, performing step (9.2.11), otherwise performing step (9.2.12);
step (9.2.11) of assigning M [ l ] to a value obtained by dividing M [ l ] by W [ l ], assigning l to a value obtained by adding 1 to l, and returning to step (9.2.10);
step (9.2.12) assigns the element of the vector M with the largest median to λmaxCarrying out the step (9.2.13);
step (9.2.13) is based on the formula CI ═ λmaxCalculating a consistency index of-n)/(n-1), and carrying out the stepsA step (9.2.14);
step (9.2.14) dividing the CI value by the corresponding average random consistency index RI to obtain a consistency ratio CR, if CR is less than 0.1, the user is judged to have satisfactory consistency, otherwise, the user is judged to have no satisfactory consistency;
and (9.3) carrying out comprehensive scoring and ranking on the services, wherein the steps are as follows:
step (9.3.1), if the final result of step (9.2) is that the user is judged to have satisfactory consistency, step (9.3.2) is carried out, otherwise, the result that the QoS weight needs to be revised again by the user is fed back, and the calculation is finished;
step (9.3.2) of establishing a vector of service composite score, namely, compScore [ services.size ], QoS score vector, qossscore [ services.size ], and QoSMtx matrix recording standardized QoS values, wherein services.size represents the number of services of a candidate service set, rows in QoSMtx represent candidate Web services, and columns represent QoS attributes, and step (9.3.3) is carried out;
step (9.3.3) traverses candidate service sets CandidateServices, if the traversal is completed, step (9.3.8) is carried out, otherwise, the next service S of the candidate service sets CandidateServices is taken outiCarrying out the step (9.3.4);
step (9.3.4) traversal service SiQoS attribute set S in (1)iQsproperties, if traversal is complete, proceed to step (9.3.7), otherwise from SiThe next property S is fetched from the qsPropertiesi.PjPerforming step (9.3.5);
in the step (9.3.5), since the measurement intervals of each QoS attribute value are different, the QoS values need to be normalized to make the value range between 0 and 1, so as to ensure that each QoS attribute is evaluated by using the same span, and therefore, the QoS attribute S needs to be calculatedi.PjNormalized value of (n) v (p)ij) And assigns this value to QoSMtx [ i ]][j]The specific calculation steps are as follows:
step (9.3.5.1) if the attribute Si.PjIf the attribute is a profit type attribute, the step (9.3.5.2) is performed, and if the attribute S is the profit type attributei.PjIf the attribute is a cost attribute, the step (9.3.5.3) is performed;
and (9).3.5.2)nv(pij) The calculation formula of (a) is as follows:
Figure FDA0002969696320000111
wherein, v (p)ij) Presentation service SiIn the attribute Si.PjV is the original value ofmax(pj) Representation of candidate service set CandidateServices and S in each servicei.PjMaximum values, v, belonging to the same attributemin(pj) Representation of candidate service set CandidateServices and S in each servicei.PjA minimum value belonging to the same attribute, and a step (9.3.6) is performed;
step (9.3.5.3) nv (p)ij) The calculation formula of (a) is as follows:
Figure FDA0002969696320000112
performing step (9.3.6);
step (9.3.6) if the attribute Si.Pj(ii) satisfies the user-defined QoS constraints QoSContriants, then calculates the attribute Si.PjQoS score of (q) QoS score of [ i ]]And then, accumulating and recording the QoS scores, wherein a calculation formula in the whole process is as follows:
qosScore[i]+=(QoSMtx[i][j]×QoSConstraint[j].Weight)
wherein QoSConstratent [ j ]]Weight represents the user vs. attribute Si.PjReturning to the step (9.3.4) according to the defined weight, otherwise, directly returning to the step (9.3.4);
step (9.3.7) combines the function similarity calculation method of the fourth step to calculate the current RCT node requirement SRCTAnd service SiFunctional similarity functional sim (S) ofi,SRCT) And combining the QoS score qOSScore [ i ] obtained in the step (9.3.6)]To service SiThe composite score is weighted and the final result is assigned to the ComScore [ i ]]The calculation formula is as follows:
compScore[i]=w1*FunctionalSim(Si,SRCT)+w2*qosScore[i]
wherein w1 and w2 respectively represent the function similarity weight and the QoS scoring weight, and the step (9.3.3) is returned;
step (9.3.8) ranks the services that completed the composite score and returns the service with the highest score, i.e., the best service.
CN201810939197.3A 2018-08-17 2018-08-17 Demand-oriented adaptive dynamic evolution method for Web service Active CN109284086B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810939197.3A CN109284086B (en) 2018-08-17 2018-08-17 Demand-oriented adaptive dynamic evolution method for Web service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810939197.3A CN109284086B (en) 2018-08-17 2018-08-17 Demand-oriented adaptive dynamic evolution method for Web service

Publications (2)

Publication Number Publication Date
CN109284086A CN109284086A (en) 2019-01-29
CN109284086B true CN109284086B (en) 2021-05-18

Family

ID=65183137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810939197.3A Active CN109284086B (en) 2018-08-17 2018-08-17 Demand-oriented adaptive dynamic evolution method for Web service

Country Status (1)

Country Link
CN (1) CN109284086B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083350B (en) * 2019-03-20 2023-02-28 浙江工业大学 Micro-service self-adaptive evolution method based on RMAE (remote Markov experience) in cloud computing environment
CN110059880B (en) * 2019-04-17 2021-05-11 中国人民解放军国防科技大学 Service discovery method and device
CN111125541B (en) * 2019-12-13 2023-04-07 陕西师范大学 Method for acquiring sustainable multi-cloud service combination for multiple users
CN111476321B (en) * 2020-05-18 2022-05-17 哈尔滨工程大学 Air flyer identification method based on feature weighting Bayes optimization algorithm
CN112148999B (en) * 2020-09-09 2022-04-08 浙江工业大学 Web API recommendation method based on Mashup service neighborhood under Web open environment
CN112184303A (en) * 2020-09-25 2021-01-05 中国建设银行股份有限公司 Target information pushing method and device based on clustering algorithm and storage medium
CN113112881B (en) * 2021-03-10 2022-05-24 浙江工业大学 Remote experiment question answering system based on WebRTC

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317853A (en) * 2014-10-15 2015-01-28 山东科技大学 Service cluster constructing method based on semantic Web
CN106970938A (en) * 2017-02-13 2017-07-21 上海大学 Web page towards focusing is obtained and information extraction method
CN107135092A (en) * 2017-03-15 2017-09-05 浙江工业大学 A kind of Web service clustering method towards global social interaction server net
CN107133268A (en) * 2017-04-01 2017-09-05 南京邮电大学 A kind of collaborative filtering for Web service recommendation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9020840B2 (en) * 2012-10-19 2015-04-28 International Business Machines Corporation System and method for custom-fitting services to consumer requirements
US9383986B2 (en) * 2013-06-18 2016-07-05 Disney Enterprises, Inc. Safe low cost web services software deployments

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317853A (en) * 2014-10-15 2015-01-28 山东科技大学 Service cluster constructing method based on semantic Web
CN106970938A (en) * 2017-02-13 2017-07-21 上海大学 Web page towards focusing is obtained and information extraction method
CN107135092A (en) * 2017-03-15 2017-09-05 浙江工业大学 A kind of Web service clustering method towards global social interaction server net
CN107133268A (en) * 2017-04-01 2017-09-05 南京邮电大学 A kind of collaborative filtering for Web service recommendation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于全局依赖网的Web服务组合自动演化方法研究;张元鸣等;《电子学报》;20170228;第45卷(第2期);第267-277页 *

Also Published As

Publication number Publication date
CN109284086A (en) 2019-01-29

Similar Documents

Publication Publication Date Title
CN109284086B (en) Demand-oriented adaptive dynamic evolution method for Web service
Gao et al. Collaborative learning-based industrial IoT API recommendation for software-defined devices: the implicit knowledge discovery perspective
Qi et al. Finding all you need: web APIs recommendation in web of things through keywords search
Wu et al. A fuzzy tree matching-based personalized e-learning recommender system
US20180240043A1 (en) Model and pattern structure online unital learning: mapsoul
Qi et al. Compatibility-aware web API recommendation for mashup creation via textual description mining
Ouadah et al. SEFAP: an efficient approach for ranking skyline web services
JP2013536484A (en) Computerized Agent System and User Instruction Semantic Networking
Bok et al. Social group recommendation based on dynamic profiles and collaborative filtering
CN107808278A (en) A kind of Github open source projects based on sparse self-encoding encoder recommend method
Zapater et al. Semantic web service discovery system for road traffic information services
Sha et al. A user requirement oriented web service discovery approach based on logic and threshold petri net
CN109241278A (en) Scientific research knowledge management method and system
CN112000763A (en) Method, device, equipment and medium for determining competition relationship of interest points
JP2023530370A (en) PERSONALIZED SEARCH METHOD AND SEARCH SYSTEM INTEGRATED ATTENTION MECHANIC
Corella et al. A heuristic approach to semantic web services classification
CN114254615A (en) Volume assembling method and device, electronic equipment and storage medium
CN116823410B (en) Data processing method, object processing method, recommending method and computing device
CN111931069B (en) User interest determination method and device and computer equipment
Caschera et al. MONDE: a method for predicting social network dynamics and evolution
Kwon et al. MyMessage: Case-based reasoning and multicriteria decision making techniques for intelligent context-aware message filtering
Wang et al. Functional and structural fusion based web api recommendations in heterogeneous networks
Lu et al. A service composition evolution method that combines deep clustering and a service requirement context model
CN109919219B (en) Xgboost multi-view portrait construction method based on kernel computing ML-kNN
Ouadah et al. SkyAP-S3: a hybrid approach for efficient skyline services selection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant