CN103209102B - Distributed Measuring System and Method for Web Service Quality - Google Patents

Distributed Measuring System and Method for Web Service Quality Download PDF

Info

Publication number
CN103209102B
CN103209102B CN201310076529.7A CN201310076529A CN103209102B CN 103209102 B CN103209102 B CN 103209102B CN 201310076529 A CN201310076529 A CN 201310076529A CN 103209102 B CN103209102 B CN 103209102B
Authority
CN
China
Prior art keywords
node
measurement
service
user
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310076529.7A
Other languages
Chinese (zh)
Other versions
CN103209102A (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201310076529.7A priority Critical patent/CN103209102B/en
Publication of CN103209102A publication Critical patent/CN103209102A/en
Application granted granted Critical
Publication of CN103209102B publication Critical patent/CN103209102B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The service quality QoS Distributed Measurement System of Web service and a method, system is provided with: Centroid and multiple measured node; It is according to Web service QoS estimation models, utilize network location technology to calculate subscriber's main station, multiple measured node and Web service respectively and dispose main frame, the i.e. service arrangement node network coordinate in abstract network coordinate system, calculate the similarity of subscriber's main station and measured node again, so that the QoS property value that estimating subscriber's can obtain.The present invention can estimate the Web service QoS comprising response time and reliability that user side under different geographical and/or different network environments can obtain quickly and accurately.Method of measurement real-time, does not rely on the history QoS data of user, does not increase added burden to user, and estimation transparent procedures.Innovative point is mapped in multidimensional coordinate system by network system, and in conjunction with the similitude of measured node and subscriber's main station, the response time of the Web service that estimating subscriber's end can obtain and reliability, data are true, credible.<pb pnum="1" />

Description

Web服务质量的分布式测量系统和方法Distributed Measuring System and Method for Web Service Quality

技术领域technical field

本发明涉及一种Web服务质量QoS的分布式测量系统和方法,特别是涉及一种基于分布式架构的Web服务质量测量的方法和系统,属于计算机和网络通信的技术领域。The invention relates to a distributed QoS measurement system and method for Web service quality, in particular to a method and system for Web service quality measurement based on a distributed architecture, and belongs to the technical field of computers and network communications.

背景技术Background technique

Web服务是一种面向服务架构(Service-Oriented Architecture)的技术,通过标准的Web协议提供服务,保证不同平台的应用服务可以互操作,其通信协议主要基于SOAP,通过UDDI来发现和获得服务的元数据。由于因特网的动态性和不可预知性,相同服务在不同的用户端的呈现结果差异较大,同时网络中功能相同或相似的Web服务众多,如何针对不同地域、不同网络环境的用户选择合适的服务已经成为一个关键问题。Web service is a service-oriented architecture (Service-Oriented Architecture) technology. It provides services through standard Web protocols to ensure that application services on different platforms can interoperate. Its communication protocol is mainly based on SOAP, and it uses UDDI to discover and obtain services. metadata. Due to the dynamics and unpredictability of the Internet, the rendering results of the same service on different clients are quite different. At the same time, there are many Web services with the same or similar functions in the network. How to choose the appropriate service for users in different regions and different network environments has become a key issue.

现有技术中,有关Web服务QoS测量或估测的主要有以下实现方式:In the prior art, there are mainly the following implementation methods related to Web service QoS measurement or estimation:

文献《Distributed QoS evaluation for real-world Web Services》(刊于:In Proc.8th IEEE International Conference on Web Services(ICWS2010),2010,)介绍了一种分布式的Web服务QoS自动测量方法,其设计目的是为基于QoS的Web服务技术和模型提供真实世界的QoS数据集。该方法对Web服务的可靠性、响应时间和吞吐量进行了测量。首先,通过分布在不同地域的用户调用Web服务,利用各个用户的测量结果计算Web服务的总体可靠性。其次,利用用户对服务的实际调用直接为QoS集提供数据。该技术方案中,用户需要参与实际的Web服务调用过程,增加了用户的负担;且提供的数据集属于原始数据,对于服务QoS属性的总体计算方法没有考虑到服务QoS与地域相关的特点,仅仅是综合所有用户的测量数据,而不是Web服务在用户端呈现的QoS,其结果对于用户的实际意义不大。The document "Distributed QoS evaluation for real-world Web Services" (published in: In Proc.8th IEEE International Conference on Web Services (ICWS2010), 2010,) introduces a distributed QoS automatic measurement method for Web services, and its design purpose is to provide real-world QoS datasets for QoS-based Web service technologies and models. The method measures the reliability, response time and throughput of web services. Firstly, users distributed in different regions call the Web service, and use the measurement results of each user to calculate the overall reliability of the Web service. Second, the actual invocation of the service by the user is used to directly provide data for the QoS set. In this technical solution, users need to participate in the actual Web service invocation process, which increases the user's burden; and the provided data set belongs to the original data, and the overall calculation method of the service QoS attribute does not take into account the characteristics of the service QoS and the region. It is the measurement data of all users, rather than the QoS presented by Web services on the user end, and the result has little practical significance for users.

文献《a scalable hybrid collaborative filtering algorithm for personalized WebService recommendation》(刊于:RegionKNN:In Proc.8th IEEE InternationalConference on Web Services(ICWS2010),2010)介绍的内容:用户端QoS估测技术主体是基于协同过滤算法实现的:先计算用户相似度和Web服务相似度,分析找出与被测用户具有一定相似度的用户,作为相似邻居。最后,通过相似Web服务的QoS属性和相似邻居的QoS历史记录来估算目标用户端能够获得的服务QoS属性值。该文献考虑了Web服务QoS地域的相关特性,并在此基础上改进了协同过滤算法:先依据用户的地理位置和用户历史QoS数据的相似度将用户按照地域进行分割,再利用协同过滤算法估测用户端能够获得的QoS属性值。该方法需要用户向系统提供个人调用Web服务获得的QoS数据历史记录。因此,其QoS数据集的来源是用户使用Web服务时获得的QoS历史数据。由于Web服务QoS属性值是动态变化的,因此依赖于用户的QoS历史数据会降低QoS估测的准确率。同时获取QoS数据的途径不可靠,获取的标准不统一,所以难以应用于实际系统当中。The document "a scalable hybrid collaborative filtering algorithm for personalized WebService recommendation" (published in: RegionKNN: In Proc.8th IEEE International Conference on Web Services (ICWS2010), 2010) introduces the content: the main body of client QoS estimation technology is based on collaborative filtering algorithm Realized: first calculate the user similarity and Web service similarity, analyze and find out the users who have a certain similarity with the tested user as similar neighbors. Finally, the QoS attribute value of the service that the target client can obtain is estimated by the QoS attribute of similar Web services and the QoS history records of similar neighbors. This paper considers the relevant characteristics of Web service QoS regions, and improves the collaborative filtering algorithm on this basis: firstly, users are segmented according to the geographical location and the similarity of the user's historical QoS data, and then the collaborative filtering algorithm is used to estimate Measure the QoS attribute values that can be obtained by the user end. This method requires the user to provide the system with the QoS data history records obtained by personally calling the Web service. Therefore, the source of its QoS data set is the QoS historical data obtained when users use Web services. Since the QoS attribute value of Web service changes dynamically, relying on the user's QoS historical data will reduce the accuracy of QoS estimation. At the same time, the way to obtain QoS data is unreliable, and the standards obtained are not uniform, so it is difficult to apply it to the actual system.

文献《WSP A Network Coordinate based Web Service Positioning Frameworkfor Response Time Prediction.》(刊于:In Proc.19th IEEE International Conferenceon Web Services(ICWS2012),2012)提出的系统与方法是一种基于网络坐标的分布式框架,用于估测用户端能够获得的服务响应时间:利用网络坐标距离与网络延时的对应关系计算用户端能够获得的服务响应时间。该方法中网络坐标的计算是基于一种集中式的网络坐标算法—GNP算法。该方法结合了网络坐标定位技术和传统的协同过滤方法,提高了响应时间计算的精确度。其采用的网络坐标算法是基于GNP方法,这种集中式坐标算法与其系统采用的分布式框架不一致,分布式部署的节点测量得到的网络延时都要传送给一个中心节点,由中心节点完成网络坐标的计算,这样影响了可扩展性以及计算结果的实时性。The system and method proposed in the document "WSP A Network Coordinate based Web Service Positioning Framework for Response Time Prediction." (published in: In Proc.19th IEEE International Conference on Web Services (ICWS2012), 2012) is a distributed framework based on network coordinates , used to estimate the service response time that the client can obtain: use the corresponding relationship between the network coordinate distance and the network delay to calculate the service response time that the client can obtain. The calculation of network coordinates in this method is based on a centralized network coordinate algorithm—GNP algorithm. This method combines the network coordinate positioning technology and the traditional collaborative filtering method to improve the accuracy of response time calculation. The network coordinate algorithm it adopts is based on the GNP method. This centralized coordinate algorithm is inconsistent with the distributed framework adopted by the system. The network delay measured by the distributed deployment nodes must be transmitted to a central node, and the central node completes the network. The calculation of coordinates affects the scalability and the real-time performance of the calculation results.

发明内容Contents of the invention

有鉴于此,本发明的目的是提供一种能够解决现有技术缺陷的Web服务质量的分布式测量系统和方法,用于为不同地域和/或不同网络环境下的用户快速、准确地提供各种Web服务在用户端呈现的QoS属性值(包括响应时间和可靠性);同时,该QoS的估测过程对用户透明,用户不需要安装任何客户端模块。且QoS估测所用数据不依赖用户历史数据,能够保证估测的准确度。In view of this, the purpose of the present invention is to provide a distributed measurement system and method of Web service quality that can solve the defects of the prior art, and is used to provide users in different regions and/or different network environments quickly and accurately. The QoS attribute value (including response time and reliability) presented by a Web service on the client side; at the same time, the QoS estimation process is transparent to the user, and the user does not need to install any client module. Moreover, the data used for QoS estimation does not depend on user historical data, which can ensure the accuracy of estimation.

为了达到上述目的,本发明提供了一种Web服务的服务质量QoS分布式测量系统,其特征在于:该系统根据Web服务QoS估测模型,利用网络定位技术分别计算用户主机、多个测量节点和Web服务部署主机、即服务部署节点在抽象的网络坐标系中的坐标,即网络坐标,再计算用户主机与测量节点的相似度,以便估测用户能够获得的QoS属性值;所述Web服务QoS估测模型是以欧几里得空间描述的多维坐标网络,其中包括中心节点、测量节点、服务部署节点和用户的每个节点分别与该多维坐标空间中的一个点相对应,且该多维坐标网络的维数与测量节点个数相同;所述网络坐标是一种用于预测具有可扩展性的互联网距离的坐标,其由节点的当前坐标值及当前误差所组成;在网络系统中,每个节点只需经过少量测量就能够得到该节点的网络坐标;再按照预设的计算方法,利用任意两个节点的网络坐标,就能够预测两者之间的网络距离;该系统设有:中心节点和多个测量节点,其中:In order to achieve the above object, the present invention provides a QoS distributed measurement system of Web service, which is characterized in that: the system calculates the user host, multiple measurement nodes and The coordinates of the Web service deployment host, that is, the service deployment node in the abstract network coordinate system, that is, the network coordinates, and then calculate the similarity between the user host and the measurement node, so as to estimate the QoS attribute value that the user can obtain; the Web service QoS The estimation model is a multi-dimensional coordinate network described in Euclidean space, in which each node including the central node, measurement node, service deployment node and user corresponds to a point in the multi-dimensional coordinate space, and the multi-dimensional coordinate The dimension of the network is the same as the number of measuring nodes; the network coordinate is a coordinate used to predict the distance of the Internet with scalability, which is composed of the current coordinate value of the node and the current error; in the network system, each A node can obtain the network coordinates of the node only after a small amount of measurement; then according to the preset calculation method, using the network coordinates of any two nodes, the network distance between the two can be predicted; the system is equipped with: node and multiple measurement nodes, where:

中心节点,负责接受和处理用户主机的请求、对各个测量节点分别执行测量任务的调度、用户主机与测量节点的相似度计算和测量结果分析;设有四个部件:任务调度模块、结果分析器、相似度计算模块和数据库;该中心节点的四个部件功能如下:The central node is responsible for accepting and processing the request of the user host, scheduling the measurement tasks for each measurement node, calculating the similarity between the user host and the measurement node, and analyzing the measurement results; it has four components: task scheduling module and result analyzer , similarity calculation module and database; the functions of the four parts of the central node are as follows:

任务调度模块,作为该中心节点的控制枢纽,负责各个测量节点的注册,接收用户主机、即用户QoS的估测请求并作出响应,以及整个系统测量任务的分配:接收到用户包括其IP地址,需要测量的Web服务在系统中的标识的QoS估测请求时,该任务调度模块就向测量节点发送测量命令,将该用户的IP地址分发给系统中所有测量节点,并分配测量任务;完成QoS估测后,将结果返回给用户;The task scheduling module, as the control hub of the central node, is responsible for the registration of each measurement node, receiving and responding to the estimation request of the user host, that is, user QoS, and the distribution of the measurement tasks of the entire system: receiving the user including its IP address, When the QoS estimation request of the identified Web service in the system needs to be measured, the task scheduling module sends a measurement command to the measurement node, distributes the user's IP address to all measurement nodes in the system, and assigns measurement tasks; completes the QoS After estimation, return the result to the user;

结果分析器,用于根据测量到的用户和服务部署节点的网络坐标,以及用户与各测量节点的相似度,计算用户能够得到的包括响应时间和可靠性的服务QoS属性值,并将计算结果存储于数据库;所述响应时间是结果分析器从数据库获取用户坐标和服务部署节点坐标,计算两者之间的网络距离、即简单对象访问协议SOAP消息在用户和服务部署主机之间的网络传输时延L,再加上该服务的处理时间,就是该服务的响应时间;所述可靠性是结果分析器根据数据库中存储的设定时段内的服务调用结果,计算该时段内每个测量节点调用该服务的成功次数与其总调用次数之比,就是每个测量节点获得该服务的可靠性数值,再利用各个测量节点与用户的相似度计算该用户能够获得该服务的可靠性数值;所述设定时段是由用户自行设定的;The result analyzer is used to calculate the service QoS attribute value that the user can obtain including response time and reliability according to the measured network coordinates of the user and the service deployment node, and the similarity between the user and each measurement node, and calculate the result Stored in the database; the response time is that the result analyzer obtains the user coordinates and the service deployment node coordinates from the database, and calculates the network distance between the two, that is, the network transmission of the Simple Object Access Protocol SOAP message between the user and the service deployment host The delay L, plus the processing time of the service, is the response time of the service; the reliability is that the result analyzer calculates each measurement node within the period according to the service call results stored in the database within the set period. The ratio of the number of successful calls to the service to the total number of calls is the reliability value of the service obtained by each measurement node, and then the reliability value of the service that the user can obtain by using the similarity between each measurement node and the user is calculated; The set time period is set by the user;

相似度计算模块,负责从数据库中获取用户和各测量节点的网络坐标,根据用户到每个测量节点之间的网络距离,计算用户与各个测量节点的相似度,以供任务调度模块和结果分析器分别利用该相似度值选择测量节点和计算用户能够获得的QoS属性值;该系统中用户与各测量节点的相似度取决于两者之间的网络距离:距离越近,相似度越高;反之,即距离越远,则相似度越低;The similarity calculation module is responsible for obtaining the network coordinates of the user and each measurement node from the database, and calculating the similarity between the user and each measurement node according to the network distance between the user and each measurement node for the task scheduling module and result analysis The device uses the similarity value to select the measurement node and calculate the QoS attribute value that the user can obtain; the similarity between the user and each measurement node in the system depends on the network distance between the two: the closer the distance, the higher the similarity; Conversely, the farther the distance, the lower the similarity;

数据库,用于存储包括用户、测量节点和服务部署节点的最近更新的网络坐标,以及各测量节点测量得到服务QoS历史数据;The database is used to store the latest updated network coordinates of users, measurement nodes and service deployment nodes, as well as the service QoS historical data measured by each measurement node;

多个测量节点,分布式部署于该系统,负责接收中心节点发送的命令,获取和解析描述Web服务与其接口信息、以及如何与Web服务通信的XML语言WSDL(Web Services Description Language)文件、进行自身和各测量节点的定位、测量用户主机及服务部署节点坐标和测量Web服务QoS;设有:测量节点控制模块、节点定位更新模块、WSDL文件解析模块、服务QoS测量模块和数据库连接模块共五个部件;该测量节点的五个部件功能如下:Multiple measurement nodes are deployed in the system in a distributed manner, responsible for receiving commands sent by the central node, obtaining and parsing XML language WSDL (Web Services Description Language) files describing Web services and their interface information, and how to communicate with Web services, and performing their own and the positioning of each measurement node, measurement of user host and service deployment node coordinates, and measurement of Web service QoS; there are five in total: measurement node control module, node location update module, WSDL file analysis module, service QoS measurement module and database connection module Components; the five components of this measurement node function as follows:

测量节点控制模块,用于接收中心节点的命令,与中心节点的任务调度模块交互通信,调用和控制测量节点的各个模块完成各项测量操作;The measurement node control module is used to receive commands from the central node, communicate interactively with the task scheduling module of the central node, call and control each module of the measurement node to complete various measurement operations;

节点定位更新模块,用于在测量Web服务QoS前,根据该测量节点与其他测量节点之间的网络传输时延,更新自身节点的网络坐标;并分别测量该测量节点到服务部署节点和用户的传输时延,以更新两者的网络坐标,保证测量结果的精准度;The node positioning update module is used to update the network coordinates of its own node according to the network transmission delay between the measurement node and other measurement nodes before measuring the Web service QoS; and measure the distance from the measurement node to the service deployment node and the user respectively. Transmission delay to update the network coordinates of the two to ensure the accuracy of the measurement results;

WSDL文件解析模块,用于对系统中已获得Web服务的WSDL文件进行解析,并生成调用服务所需的客户端代码,并将得到的包括服务名称、服务操作名称、操作参数名称与类型,以及服务地址的解析结果序列化处理后,存储在测量节点中,以供测量服务QoS时使用;The WSDL file parsing module is used to parse the WSDL file of the web service obtained in the system, and generate the client code required to call the service, and obtain the service name, service operation name, operation parameter name and type, and After the analysis result of the service address is serialized, it is stored in the measurement node for use when measuring the service QoS;

服务QoS测量模块,利用WSDL文件解析模块解析得到的服务信息和自动生成的客户端代码,得到Web服务操作的参数类型并赋值,再对Web服务进行实际调用,获取包括服务的响应时间与调用是否成功的服务QoS数值;The service QoS measurement module uses the service information obtained by parsing the WSDL file analysis module and the automatically generated client code to obtain the parameter type of the Web service operation and assign the value, and then actually calls the Web service to obtain information including the response time of the service and whether the call is Successful service QoS value;

数据库连接模块,用于连接数据库,以供测量节点控制模块、节点定位更新模块和服务QoS测量模块调用,完成对数据库中数据的读写、添加和更新。The database connection module is used to connect to the database for calling by the measurement node control module, node location update module and service QoS measurement module to complete reading, writing, adding and updating of data in the database.

为了达到上述目的,本发明还提供了一种采用本发明分布式测量系统的测量方法,其特征在于:所述方法包括下列操作步骤:In order to achieve the above object, the present invention also provides a measurement method using the distributed measurement system of the present invention, characterized in that: the method includes the following steps:

步骤1,周期测量阶段:每个测量节点的WSDL文件解析模块解析该Web服务部署节点的IP地址,节点定位更新模块向该IP地址周期发送ping消息和计算从自身节点和服务部署节点之间传递SOAP消息的网络时延;再以服务部署节点为目标节点,采用设定的节点坐标更新方法更新该服务部署节点的坐标;测量节点的服务QoS测量模块通过调用Web服务获取响应时间,并记录调用是否成功;在步骤1中,测量节点执行下述操作内容:Step 1, periodic measurement phase: the WSDL file parsing module of each measurement node parses the IP address of the Web service deployment node, and the node location update module periodically sends ping messages to the IP address and calculates the transmission between its own node and the service deployment node The network delay of the SOAP message; then take the service deployment node as the target node, and use the set node coordinate update method to update the coordinates of the service deployment node; the service QoS measurement module of the measurement node obtains the response time by calling the Web service, and records the call Whether it is successful; in step 1, the measurement node performs the following operations:

(11)WSDL文件解析模块获取Web服务部署节点的IP地址;(11) The WSDL file parsing module obtains the IP address of the Web service deployment node;

(12)节点定位更新模块向该IP地址周期发送ping消息,并记录该消息在网络中的往返时间,再将该往返时间作为SOAP消息在测量节点和服务部署节点之间的往返传输时间;(12) The node positioning update module sends a ping message periodically to the IP address, and records the round-trip time of the message in the network, and then uses the round-trip time as the round-trip transmission time of the SOAP message between the measurement node and the service deployment node;

(13)节点定位更新模块以服务部署节点为目标节点,采用系统设定的节点坐标更新方法,即根据实测的测量节点和目标节点间的网络时延和测量节点的当前坐标值进行迭代运算,更新该服务部署节点的坐标;该步骤(13)中,节点定位更新模块采用的节点坐标更新方法包括下述具体操作内容:(13) The node positioning update module takes the service deployment node as the target node, adopts the node coordinate update method set by the system, that is, performs iterative calculations according to the measured network delay between the measurement node and the target node and the current coordinate value of the measurement node, Update the coordinates of the service deployment node; in this step (13), the node coordinate update method adopted by the node location update module includes the following specific operations:

(13a)计算目标节点当前坐标在误差和计算时的权重再由该目标节点和测量节点的当前坐标,采用计算欧几里得空间距离的方法计算两者的当前距离distance;式中,e和en分别为目标节点和测量节点的当前坐标的当前误差;(13a) Calculate the weight of the current coordinates of the target node in the error and calculation Then, from the current coordinates of the target node and the measurement node, the current distance distance between the two is calculated by the method of calculating the distance in Euclidean space; where e and e n are the current errors of the current coordinates of the target node and the measurement node respectively ;

(13b)根据计算的两者当前距离和实测的网络距离数值计算该目标节点坐标的相对误差并据此更新该目标节点的坐标误差:e=relativeError×Ce×weight+e×(1-Ce×weight),式中,latency为实测的从测量节点到目标节点间的网络时延,即实测的两者当前距离,Ce是计算过程中控制收敛速度的系数;(13b) Calculate the relative error of the target node coordinates according to the calculated current distance between the two and the measured network distance value And update the coordinate error of the target node accordingly: e=relativeError×Ce×weight+e×(1-Ce×weight), where latency is the measured network delay from the measurement node to the target node, that is, the measured The current distance between the two, Ce is the coefficient that controls the convergence rate during the calculation process;

(13c)利用该目标节点和测量节点的坐标,计算该目标节点坐标的移动方向,该移动方向应与该目标节点和测量节点的坐标连线方向平行,且使es数值减小;再计算该目标节点坐标的移动值ratio=Cc×weight×|distance-latency|,式中,Cc为控制算法的收敛参数;(13c) Utilize the coordinates of the target node and the measuring node to calculate the moving direction of the target node coordinates, the moving direction should be parallel to the direction of the line connecting the coordinates of the target node and the measuring node, and make the value of e s decrease; then calculate The moving value ratio of the target node coordinates=Cc×weight×|distance-latency|, where Cc is the convergence parameter of the control algorithm;

(13d)利用步骤(13c)的计算结果更新该目标节点的当前坐标;(13d) Utilize the calculation result of step (13c) to update the current coordinates of the target node;

(13e)判断该目标节点当前坐标的误差值是否小于设定阈值,若否,则返回步骤(13a)执行相应操作;若是,则停止对该目标节点坐标的更新;(13e) judging whether the error value of the current coordinates of the target node is less than the set threshold, if not, then return to step (13a) to perform the corresponding operation; if so, stop updating the coordinates of the target node;

(14)服务部署节点的网络坐标更新完成后,服务QoS测量模块通过调用Web服务获取响应时间,并记录调用是否成功,为估测用户端的服务响应时间和可靠性做好数据准备;(14) After the network coordinate update of the service deployment node is completed, the service QoS measurement module obtains the response time by calling the Web service, and records whether the call is successful, and prepares data for estimating the service response time and reliability of the client;

步骤2,实时测量阶段:Step 2, real-time measurement phase:

中心节点接收到用户的服务QoS估测请求时,向各个测量节点转发该请求;各个测量节点收到请求后,分别更新自身的网络坐标和用户坐标;When the central node receives the user's service QoS estimation request, it forwards the request to each measurement node; each measurement node updates its own network coordinates and user coordinates after receiving the request;

中心节点的相似度计算模块再计算用户与各测量节点的相似度,以供任务调度模块选取与用户相似度最大的K个测量节点;The similarity calculation module of the central node calculates the similarity between the user and each measurement node, so that the task scheduling module can select K measurement nodes with the largest similarity with the user;

该K个测量节点再次更新用户和服务部署节点坐标,并测量服务的响应时间和计算当前服务部署节点的处理时间;The K measurement nodes update the user and service deployment node coordinates again, measure the response time of the service and calculate the processing time of the current service deployment node;

中心节点的结果分析器计算用户能够获得的服务响应时间和可靠性;The result analyzer of the central node calculates the service response time and reliability that users can obtain;

该步骤2包括下述操作内容:This step 2 includes the following operations:

(21)用户向中心节点发送包括该用户的IP地址、其需要测量的Web服务在系统中标识的Web服务QoS估测请求;(21) The user sends to the central node a Web service QoS estimation request including the user's IP address and the Web service that needs to be measured in the system;

(22)中心节点的任务调度模块将接收到的该用户请求中的用户IP地址分发给系统中的所有测量节点;(22) The task scheduling module of the central node distributes the user IP address in the received user request to all measurement nodes in the system;

(23)每个测量节点的节点定位更新模块分别更新自身坐标和用户坐标:(23) The node positioning update module of each measurement node updates its own coordinates and user coordinates respectively:

每个测量节点收到该测量命令后,在其系统控制模块控制下,先在各个测量节点之间相互发送ping消息,进行自身定位而完成自身坐标更新;所有测量节点都完成自身网络坐标的更新后,每个测量节点分别向该用户发送ping消息,并测量其自身节点与该用户之间的往返网络时延,同样根据所述节点坐标更新方法法完成对该用户坐标的估测;再将该用户坐标更新到数据库中;After each measurement node receives the measurement command, under the control of its system control module, it first sends ping messages between each measurement node to perform its own positioning and complete its own coordinate update; all measurement nodes complete their own network coordinate update Afterwards, each measurement node sends a ping message to the user respectively, and measures the round-trip network delay between its own node and the user, and also completes the estimation of the user coordinates according to the node coordinate update method; then The user coordinates are updated to the database;

该步骤(23)包括下述具体操作内容:This step (23) includes the following specific operations:

(23a)由当前需要更新自身坐标的测量节点通过节点定位更新模块向系统中所有其它测量节点分别发送ping消息,并记录该消息在网络中的往返时间,再将该往返时间作为两个测量节点之间的网络时延;(23a) The measurement node that currently needs to update its own coordinates sends ping messages to all other measurement nodes in the system through the node positioning update module, and records the round-trip time of the message in the network, and then uses the round-trip time as two measurement nodes The network delay between;

(23b)从数据库中获取所有测量节点的网络坐标,然后将这些网络坐标和步骤(23a)得到的网络时延作为节点坐标更新算法的输入数据,然后,以当前测量节点为目标节点,利用所述节点坐标更新方法计算得到当前每个测量节点的新网络坐标;(23b) Obtain the network coordinates of all measuring nodes from the database, and then use these network coordinates and the network time delay obtained in step (23a) as the input data of the node coordinate update algorithm, and then use the current measuring node as the target node, using the The above-mentioned node coordinate updating method calculates and obtains the new network coordinate of each current measuring node;

(23c)用该新网络坐标更新数据库中测量节点原来存储的网络坐标;(23c) updating the original stored network coordinates of the measuring node in the database with the new network coordinates;

(23d)节点定位更新模块采用上述步骤(23a)~(23c)同样方法更新该用户的坐标;(23d) The node positioning update module updates the user's coordinates in the same way as above steps (23a)-(23c);

(24)中心节点的相似度计算模块计算相似度:(24) The similarity calculation module of the central node calculates the similarity:

所有测量节点都完成步骤(23)后,中心节点的相似度计算模块从数据库中分别取出该用户和各测量节点的更新后的坐标,计算该用户与各个测量节点之间网络距离,用于计算该用户与各个测量节点的相似度;After all measurement nodes have completed step (23), the similarity calculation module of the central node takes out the updated coordinates of the user and each measurement node from the database, calculates the network distance between the user and each measurement node, and is used for calculating The similarity between the user and each measurement node;

(25)中心节点的任务调度模块选取测量节点,并发送测量命令:根据计算的相似度,任务调度模块选取与该用户相似度最大的K个节点,向该K个测量节点发送继续测量的命令;(25) The task scheduling module of the central node selects the measurement node and sends a measurement command: according to the calculated similarity, the task scheduling module selects K nodes with the largest similarity with the user, and sends an order to continue measurement to the K measurement nodes ;

(26)测量节点的节点定位更新模块更新用户和服务部署节点的坐标:当该K个测量节点接收到测量命令后,分别更新用户和服务部署节点的坐标,以保证QoS估测的实时性和准确性;(26) The node positioning update module of the measurement node updates the coordinates of the user and the service deployment node: when the K measurement nodes receive the measurement command, they update the coordinates of the user and the service deployment node respectively, so as to ensure the real-time performance and quality of QoS estimation. accuracy;

(27)测量节点的服务QoS测量模块测量服务的响应时间:根据WSDL文件解析模块获取的解析服务操作名称和参数名称与类型,服务QoS测量模块自动调用Web服务操作,并记录服务调用是否成功,同时记录该测量节点调用该服务的响应时间Tr;再根据公式Tr=Tl+Tp计算服务处理时间Tp,并存储于数据库,以供结果分析时使用;式中,Tl为SOAP消息在该测量节点和该服务部署节点之间的传输时间,即由测量节点和服务部署节点的坐标计算得到的网络距离;(27) The service QoS measurement module of the measurement node measures the response time of the service: according to the analysis service operation name and parameter name and type obtained by the WSDL file analysis module, the service QoS measurement module automatically calls the Web service operation, and records whether the service call is successful, At the same time, record the response time T r of the measurement node calling the service; then calculate the service processing time T p according to the formula T r = T l + T p , and store it in the database for use in result analysis; where T l is The transmission time of the SOAP message between the measurement node and the service deployment node, that is, the network distance calculated from the coordinates of the measurement node and the service deployment node;

(28)中心节点的结果分析器分别估算该服务的响应时间和可靠性:(28) The result analyzer of the central node estimates the response time and reliability of the service respectively:

根据数据库中的用户坐标和服务部署节点坐标,通过欧几里得空间中的距离计算方法计算两者之间的网络距离,即SOAP消息在该用户和该Web服务之间的传输时间Tl,再根据Tr=Tl+Tp计算用户能够获得服务的响应时间;According to the user coordinates in the database and the service deployment node coordinates, the network distance between the two is calculated by the distance calculation method in Euclidean space, that is, the transmission time T l of the SOAP message between the user and the Web service, Then calculate the response time for the user to obtain the service according to T r =T l +T p ;

根据数据库中的存储的设定时间段内的服务调用结果,计算每个测量节点k获取该服务的可靠性Pk,该Pk的数值是设定时间段内测量节点k调用该服务的成功次数与总调用次数之比;再利用该用户与该K个测量节点的相似度,依据公式计算用户能够获得的服务的可靠性,式中,Wk为测量节点k与该用户的相似度在所有K个测量节点与该用户相似度之和中占的比重;According to the service call results stored in the database within the set time period, calculate the reliability P k of each measurement node k to obtain the service, and the value of this P k is the success of the measurement node k calling the service within the set time period The ratio of the number of calls to the total number of calls; then using the similarity between the user and the K measurement nodes, according to the formula Calculate the reliability of the service that the user can obtain, where W k is the proportion of the similarity between the measurement node k and the user in the sum of the similarities between all K measurement nodes and the user;

(29)将估算结果,包括响应时间和可靠性,返回给用户。(29) Return the estimated results, including response time and reliability, to the user.

本发明的关键技术是:基于分布式架构的Web服务质量的测量系统及其测量方法能够快速地、准确地估测不同地域和/或不同网络环境下用户端可以获得的Web服务QoS(包括响应时间和可靠性),本发明方法的实时性强,不依赖用户的历史QoS数据,又不给用户增加额外的负担,且估测过程全透明。本发明方法的创新点是将网络系统映射到多维坐标系中,结合测量节点与用户主机的相似性,推测在用户端呈现的Web服务的响应时间和可靠性,数据真实、可信。The key technology of the present invention is: the measuring system and measuring method thereof based on the Web service quality of distributed architecture can quickly and accurately estimate the Web service QoS (including response QoS) that the client can obtain under different regions and/or different network environments. time and reliability), the method of the present invention has strong real-time performance, does not depend on the user's historical QoS data, does not add additional burden to the user, and the estimation process is completely transparent. The innovative point of the method of the present invention is to map the network system into a multi-dimensional coordinate system, combine the similarity between the measurement node and the user host, and estimate the response time and reliability of the Web service presented on the user end, so that the data is true and credible.

与现有技术相比较,本发明的优点是:提出一种基于网络坐标模型以及节点之间相似度的QoS估测方法,本发明系统与方法利用分布式的测量节点对基于WSDL的Web服务QoS进行测量,然后根据测量数据对Web服务在用户端呈现的服务质量进行实时估测,即在实际测量数据的基础上进行QoS估测,估测过程对用户透明,也不依赖于用户的QoS历史数据,且用户没有增加任何负担,对用户的唯一要求是能接收和响应ping消息,提高了测量系统的可扩展性。Compared with the prior art, the present invention has the advantages of: proposing a QoS estimation method based on the network coordinate model and the similarity between nodes, and the system and method of the present invention use distributed measurement nodes to measure the QoS of Web services based on WSDL. Carry out measurement, and then perform real-time estimation of the service quality presented by the Web service on the user end according to the measurement data, that is, perform QoS estimation on the basis of the actual measurement data. The estimation process is transparent to the user and does not depend on the user's QoS history Data, and the user does not increase any burden, the only requirement for the user is to be able to receive and respond to ping messages, which improves the scalability of the measurement system.

本发明还考虑了服务QoS动态变化的特性,同时解决了获取QoS数据的途径不可靠,获取的标准不统一的问题,保证了QoS估测的准确度。再者,本发明采用的网络坐标算法是一种分布式算法,各测量节点的测量过程独立、互不影响,易于添加新的测量节点;并且,网络坐标根据网络距离的实时测量值而发生相应变化,实时性强,能够满足用户对获取服务实时质量属性的需求。此外,本发明引入的节点之间相似度概念,用于选取测量节点和计算结果,节省了系统开销,保证测量的准确性。因此,本发明具有很好的推广应用前景。The present invention also considers the characteristics of dynamic change of service QoS, solves the problems of unreliable access to QoS data and inconsistent acquisition standards, and ensures the accuracy of QoS estimation. Furthermore, the network coordinate algorithm adopted in the present invention is a distributed algorithm, the measurement process of each measurement node is independent and does not affect each other, and it is easy to add new measurement nodes; Changes, strong real-time performance, and can meet the needs of users for obtaining real-time quality attributes of services. In addition, the concept of similarity between nodes introduced by the present invention is used to select measurement nodes and calculate results, which saves system overhead and ensures measurement accuracy. Therefore, the present invention has very good application prospects.

附图说明Description of drawings

图1是Web服务QoS的分布式测量系统结构组成示意图。Figure 1 is a schematic diagram of the composition of the distributed measurement system for Web service QoS.

图2是Web服务QoS的估测模型示意图(其中Web服务部署节点代表服务部署主机在几何空间中的位置)。Fig. 2 is a schematic diagram of an estimation model of Web service QoS (the Web service deployment node represents the position of the service deployment host in the geometric space).

图3是Web服务QoS估测方法操作步骤流程图。FIG. 3 is a flow chart of the operation steps of the method for estimating the QoS of a Web service.

图4是Web服务QoS实时估测阶段时序图;Fig. 4 is a sequence diagram of the stage of real-time estimation of Web service QoS;

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明作进一步的详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings.

参见图1,介绍本发明Web服务QoS分布式测量系统的结构组成:Referring to Fig. 1, the structural composition of Web service QoS distributed measuring system of the present invention is introduced:

该系统是根据Web服务QoS估测模型,利用网络定位技术分别计算用户主机、多个测量节点和Web服务部署主机(即服务部署节点)在抽象的网络坐标系中的坐标,再计算用户主机与测量节点的相似度,以便估测用户能够获得的QoS属性值。系统设有:中心节点和多个测量节点。其中:According to the Web service QoS estimation model, the system uses network positioning technology to calculate the coordinates of the user host, multiple measurement nodes and Web service deployment hosts (service deployment nodes) in the abstract network coordinate system, and then calculates the coordinates of the user host and Measure the similarity of nodes in order to estimate the QoS attribute value that users can obtain. The system is equipped with: a central node and multiple measurement nodes. in:

中心节点,负责接受和处理用户主机的请求、对各个测量节点分别执行测量任务的调度、用户主机与测量节点的相似度计算和测量结果分析;设有四个部件:任务调度模块、结果分析器、相似度计算模块和数据库。各个部件功能简介如下:The central node is responsible for accepting and processing the request of the user host, scheduling the measurement tasks for each measurement node, calculating the similarity between the user host and the measurement node, and analyzing the measurement results; it has four components: task scheduling module and result analyzer , a similarity calculation module and a database. The function of each component is introduced as follows:

任务调度模块:作为该中心节点的控制枢纽,负责各个测量节点的注册,接收用户主机、即用户QoS的估测请求并作出响应,以及整个系统测量任务的分配:接收到用户包括其IP地址,需要测量的Web服务在系统中的标识的QoS估测请求时,该任务调度模块就向测量节点发送测量命令,将该用户的IP地址分发给系统中所有测量节点,并分配测量任务;完成QoS估测后,将结果返回给用户。Task scheduling module: As the control hub of the central node, it is responsible for the registration of each measurement node, receiving and responding to the estimation request of the user host, that is, user QoS, and the distribution of measurement tasks for the entire system: receiving users including their IP addresses, When the QoS estimation request of the identified Web service in the system needs to be measured, the task scheduling module sends a measurement command to the measurement node, distributes the user's IP address to all measurement nodes in the system, and assigns measurement tasks; completes the QoS After estimation, the result is returned to the user.

结果分析器:用于根据测量到的用户和服务部署节点的网络坐标,以及用户与各测量节点的相似度,计算用户能够得到的包括响应时间和可靠性的服务QoS属性值,并将计算结果存储于数据库;Result Analyzer: It is used to calculate the service QoS attribute values that users can obtain including response time and reliability according to the measured network coordinates of users and service deployment nodes, and the similarity between users and each measurement node, and calculate the results stored in the database;

相似度计算模块:负责从数据库中获取用户和各测量节点的网络坐标,根据用户到每个测量节点之间的网络距离,计算用户与各个测量节点的相似度,以供任务调度模块和结果分析器分别利用该相似度值选择测量节点和计算用户能够获得的QoS属性值;该系统中用户与各测量节点的相似度取决于两者之间的网络距离:距离越近,相似度越高;反之,即距离越远,则相似度越低;Similarity calculation module: responsible for obtaining the network coordinates of the user and each measurement node from the database, and calculating the similarity between the user and each measurement node according to the network distance between the user and each measurement node, for the task scheduling module and result analysis The device uses the similarity value to select the measurement node and calculate the QoS attribute value that the user can obtain; the similarity between the user and each measurement node in the system depends on the network distance between the two: the closer the distance, the higher the similarity; Conversely, the farther the distance, the lower the similarity;

数据库:用于存储包括用户、测量节点和服务部署节点的最近更新的网络坐标,以及各测量节点测量得到服务QoS历史数据。Database: used to store the latest updated network coordinates of users, measurement nodes and service deployment nodes, and service QoS historical data measured by each measurement node.

多个测量节点,分布式部署于该系统,负责接收中心节点发送的命令,获取和解析描述Web服务与其接口信息、以及如何与Web服务通信的XML语言WSDL(Web Services Description Language)文件、进行自身和各测量节点的定位、测量用户主机及服务部署节点坐标和测量Web服务QoS;设有:测量节点控制模块、节点定位更新模块、WSDL文件解析模块、服务QoS测量模块和数据库连接模块共五个部件。各个部件功能说明如下:Multiple measurement nodes are deployed in the system in a distributed manner, responsible for receiving commands sent by the central node, obtaining and parsing XML language WSDL (Web Services Description Language) files describing Web services and their interface information, and how to communicate with Web services, and performing their own and the positioning of each measurement node, measurement of user host and service deployment node coordinates, and measurement of Web service QoS; there are five in total: measurement node control module, node location update module, WSDL file analysis module, service QoS measurement module and database connection module part. The function description of each part is as follows:

测量节点控制模块:用于接收中心节点的命令,与中心节点的任务调度模块交互通信,调用和控制测量节点的各个模块完成各项测量操作。Measurement node control module: used to receive commands from the central node, interact with the task scheduling module of the central node, call and control each module of the measurement node to complete various measurement operations.

节点定位更新模块:用于在测量Web服务QoS前,根据该测量节点与其他测量节点之间的网络传输时延,更新自身节点的网络坐标;并分别测量该测量节点到服务部署节点和用户的传输时延,以更新两者的网络坐标,保证测量结果的精准度。Node positioning update module: used to update the network coordinates of its own node according to the network transmission delay between the measurement node and other measurement nodes before measuring the Web service QoS; and measure the distance from the measurement node to the service deployment node and the user respectively Transmission delay to update the network coordinates of the two to ensure the accuracy of the measurement results.

WSDL文件解析模块:用于对系统中已获得Web服务的WSDL文件进行解析,并生成调用服务所需的客户端代码,并将得到的包括服务名称、服务操作名称、操作参数名称与类型,以及服务地址的解析结果序列化处理后,存储在测量节点中,以供测量服务QoS时使用。WSDL file parsing module: used to parse the WSDL file of the web service obtained in the system, and generate the client code needed to call the service, and obtain the service name, service operation name, operation parameter name and type, and After the analysis result of the service address is serialized, it is stored in the measurement node for use when measuring the service QoS.

服务QoS测量模块:利用WSDL文件解析模块解析得到的服务信息和自动生成的客户端代码,得到Web服务操作的参数类型并赋值,再对Web服务进行实际调用,获取包括服务的响应时间与调用是否成功的服务QoS数值。Service QoS measurement module: Use the service information obtained by parsing the WSDL file analysis module and the automatically generated client code to obtain the parameter type of the Web service operation and assign the value, and then make an actual call to the Web service to obtain information including the response time of the service and whether the call is Successful service QoS value.

数据库连接模块:用于连接数据库,以供测量节点控制模块、节点定位更新模块和服务QoS测量模块调用,完成对数据库中数据的读写、添加和更新。Database connection module: used to connect to the database for calling by the measurement node control module, node location update module and service QoS measurement module to complete reading, writing, adding and updating of data in the database.

本发明系统的网络坐标是一种用于预测具有可扩展性的互联网距离的坐标,该网络坐标是由节点的当前坐标值及当前误差所组成。在网络系统中,每个节点只需经过少量测量就能够得到该节点的网络坐标;再按照预设的计算方法,利用任意两个节点的网络坐标,就能够预测两者之间的网络距离。The network coordinate of the system of the present invention is a coordinate used for predicting the Internet distance with scalability, and the network coordinate is composed of the current coordinate value of the node and the current error. In the network system, each node only needs a small amount of measurement to obtain the network coordinates of the node; then according to the preset calculation method, using the network coordinates of any two nodes, the network distance between the two can be predicted.

参见图2,介绍本发明系统的Web服务QoS估测模型所选取的以欧几里得空间描述的多维坐标网络的简况(图示为三维坐标系统)。整个系统设有:中心节点、测量节点、服务部署节点和用户,其中每个节点分别与该多维坐标空间中的一个坐标点相对应,且该多维坐标网络的维数与测量节点个数相同。对系统中的全部N个测量节点分别按照顺序逐个编号,并设定其中第k个测量节点的第k维坐标初始值为0,其余各维坐标初始值均为随机值,且其各个坐标值都随着网络状态的变化而动态更新(其中,N和k都为自然数,且k小于等于N)。如上所述建立的该网络坐标系,能够通过目标用户节点、服务部署节点、测量节点的不同坐标,计算用户与各测量节点的相似度,并对目标用户能够获得的Web服务QoS属性值(用户最关注的是服务响应时间和可靠性)进行估测,本发明就是用于测量和估测这两个Web服务QoS属性数值,下面简要说明这两个参数:Referring to FIG. 2 , a brief introduction of the multi-dimensional coordinate network described in Euclidean space (shown as a three-dimensional coordinate system) selected by the Web service QoS estimation model of the system of the present invention is introduced. The whole system is equipped with: central node, measurement node, service deployment node and user, where each node corresponds to a coordinate point in the multi-dimensional coordinate space, and the dimension of the multi-dimensional coordinate network is the same as the number of measurement nodes. Number all the N measurement nodes in the system one by one in sequence, and set the initial value of the k-th dimension coordinate of the k-th measurement node to 0, and the initial values of the coordinates of other dimensions are random values, and each coordinate value Both are dynamically updated as the network status changes (wherein, both N and k are natural numbers, and k is less than or equal to N). The network coordinate system established as above can calculate the similarity between the user and each measurement node through the different coordinates of the target user node, service deployment node, and measurement node, and calculate the Web service QoS attribute value (user The most concerned about is the service response time and reliability) to estimate, the present invention is used for measuring and estimating these two Web service QoS attribute values, briefly explain these two parameters below:

(A)响应时间:它是衡量服务性能的最重要指标,且具有与地域相关和端到端等特点。Web服务调用需要经由网络传递SOAP消息来完成服务请求和响应的传送,而SOAP消息的传递时间则和网络时延相关;同时,服务响应时间还与服务端的负载有关。所以,对服务调用的响应时间进行了分解:响应时间Tr=Tl+Tp,式中,Tl是用户调用服务传递SOAP消息的网络往返传输时间,Tp是服务的处理执行时间。也就是说,响应时间是结果分析器从数据库获取用户坐标和服务部署节点坐标,计算两者之间的网络距离、即简单对象访问协议SOAP(Simple Object Access Protocol)消息在用户和服务部署主机之间的网络传输时延Tl,再加上该服务的处理时间Tp之和。(A) Response time: It is the most important indicator to measure service performance, and it has the characteristics of being geographically related and end-to-end. Web service calls need to transmit SOAP messages through the network to complete the transmission of service requests and responses, and the delivery time of SOAP messages is related to network delay; at the same time, service response time is also related to the load of the server. Therefore, the response time of service invocation is decomposed: response time T r =T l +T p , where T l is the network round-trip transmission time for the user to invoke the service to deliver the SOAP message, and T p is the processing execution time of the service. That is to say, the response time is that the result analyzer obtains the user coordinates and the service deployment node coordinates from the database, and calculates the network distance between the two, that is, the simple object access protocol SOAP (Simple Object Access Protocol) message between the user and the service deployment host. The sum of the network transmission delay T l between and the processing time T p of this service.

分析发现,测量节点和用户主机调用服务的过程是完全相同的,也就是说,它们之间具有相似性,当用户与测量节点的距离越近,相似度越高;两者越远,则相似度越低。首先对系统中的全部N个测量节点分别编号为{1,2,...,N},通过计算某个测量节点a(a∈{1,2,...,N})到其他测量节点i(i∈{1,2,...,N}且i≠a,即除去a的其余测量节点)的网络距离La,i和用户u到测量节点i的网络距离Lu,i,就可以计算出测量节点a和用户u的相似度。例如,采用皮尔逊相关系数计算相似度的公式:计算两者相似度;其中,Sim(u,a)是节点a和用户u的相似度,是Lu,i的平均值,是La,i的平均值。要说明的是,利用网络距离计算相似度的公式并不限于皮尔逊相关系数,此处只是举例说明。The analysis found that the process of invoking services between the measurement node and the user host is exactly the same, that is to say, there is similarity between them. When the distance between the user and the measurement node is closer, the similarity is higher; the farther the two are, the similarity the lower the degree. First, all the N measurement nodes in the system are respectively numbered as {1,2,...,N}, by calculating a measurement node a(a∈{1,2,...,N}) to other measurement nodes The network distance L a,i of node i (i∈{1,2,...,N} and i≠a, that is, the remaining measurement nodes except a) and the network distance L u,i of user u to measurement node i , the similarity between measurement node a and user u can be calculated. For example, the formula for calculating similarity using Pearson correlation coefficient: Calculate the similarity between the two; where Sim(u,a) is the similarity between node a and user u, is the mean value of Lu u,i , is the average value of L a,i . It should be noted that the formula for calculating the similarity by using the network distance is not limited to the Pearson correlation coefficient, which is just an example here.

相似度在用户的Web服务QoS估测中起到非常重要的作用。本发明系统是根据计算得到的相似度对所有测量节点排序,从所有测量节点中选取与用户相似度最高的K个节点,用于对用户和服务部署节点的坐标进行更新。这样既节省了系统资源的消耗,也保证了测量得到的用户和服务部署节点坐标的准确性。Similarity plays a very important role in user's Web service QoS estimation. The system of the present invention sorts all measurement nodes according to the calculated similarity, and selects K nodes with the highest similarity with users from all measurement nodes to update the coordinates of users and service deployment nodes. This not only saves the consumption of system resources, but also ensures the accuracy of measured user and service deployment node coordinates.

根据更新后的用户坐标和服务部署节点坐标,通过欧几里得空间中的距离计算方法计算两者之间的网络距离,即SOAP消息在该用户和该Web服务之间的传输时间Tl,再根据Tr=Tl+Tp计算用户能够获得服务的响应时间。According to the updated user coordinates and service deployment node coordinates, the network distance between the two is calculated by the distance calculation method in Euclidean space, that is, the transmission time T l of the SOAP message between the user and the Web service, Then calculate the response time for the user to obtain the service according to T r =T l +T p .

(B)可靠性:Web服务的可靠性是用户成功调用Web服务的概率。由于不同网络环境、不同地域的用户可能获得的服务可靠性不同,所以某个测量节点测量得到的可靠性,或者所有测量节点得到的总体的可靠性都不能代表用户可以获得的服务可靠性。本发明系统依然利用用户与服务测量节点的相似度对可靠性进行估测。(B) Reliability: The reliability of a Web service is the probability that a user successfully invokes a Web service. Since users in different network environments and regions may obtain different service reliability, the reliability measured by a certain measurement node or the overall reliability obtained by all measurement nodes cannot represent the service reliability that users can obtain. The system of the present invention still uses the similarity between the user and the service measurement node to estimate the reliability.

可靠性是结果分析器根据数据库中存储的设定时段内的服务调用结果,计算该时段内每个测量节点调用该服务的成功次数与其总调用次数之比,就是每个测量节点获得该服务的可靠性数值,再利用各个测量节点与用户的相似度计算该用户能够获得该服务的可靠性数值。Reliability is the ratio of the number of times each measurement node calls the service to the total number of times the service is called by the result analyzer according to the service call results stored in the database within the set period of time, which is the number of times each measurement node obtains the service. Reliability value, and then use the similarity between each measurement node and the user to calculate the reliability value that the user can obtain the service.

假设测量节点k获取服务的可靠性为Pk,则该用户获取该服务的可靠性P的计算公式为:式中,Wk为测量节点k与该用户的相似度在所有K个测量节点与该用户相似度之和中占的比重。Assuming that the reliability of the service obtained by the measurement node k is P k , the calculation formula for the reliability P of the service obtained by the user is: In the formula, W k is the proportion of the similarity between the measurement node k and the user in the sum of the similarities between all K measurement nodes and the user.

参见图3,介绍本发明分布式测量系统估测QoS方法流程的两个操作步骤:Referring to Fig. 3, two operation steps of the process flow of the method for estimating QoS in the distributed measurement system of the present invention are introduced:

步骤1,周期测量阶段:每个测量节点的WSDL文件解析模块解析该Web服务部署节点的IP地址,节点定位更新模块向该IP地址周期发送ping消息和计算从自身节点和服务部署节点之间传递SOAP消息的网络时延;再以服务部署节点为目标节点,采用设定的节点坐标更新方法更新该服务部署节点的坐标(该坐标更新算法不仅用于更新服务部署节点的网络坐标,还用于更新某个用户和某个测量节点的网络坐标);测量节点的服务QoS测量模块通过调用Web服务获取响应时间,并记录调用是否成功。Step 1, periodic measurement phase: the WSDL file parsing module of each measurement node parses the IP address of the Web service deployment node, and the node location update module periodically sends ping messages to the IP address and calculates the transmission between its own node and the service deployment node The network time delay of SOAP message; then take the service deployment node as the target node, and update the coordinates of the service deployment node by using the set node coordinate update method (the coordinate update algorithm is not only used to update the network coordinates of the service deployment node, but also used for Update the network coordinates of a user and a measurement node); the service QoS measurement module of the measurement node obtains the response time by calling the Web service, and records whether the call is successful.

该步骤1中,测量节点执行下述具体操作内容:In step 1, the measurement node performs the following specific operations:

(11)WSDL文件解析模块获取Web服务部署节点的IP地址。(11) The WSDL file parsing module obtains the IP address of the Web service deployment node.

(12)节点定位更新模块向该IP地址周期发送ping消息,并记录该消息在网络中的往返时间,再将该往返时间作为SOAP消息在测量节点和服务部署节点之间的往返传输时间。(12) The node location update module periodically sends a ping message to the IP address, and records the round-trip time of the message in the network, and then uses the round-trip time as the round-trip transmission time of the SOAP message between the measurement node and the service deployment node.

(13)节点定位更新模块以服务部署节点为目标节点,采用系统设定的节点坐标更新方法,即根据实测的测量节点和目标节点间的网络时延和测量节点的当前坐标值进行迭代运算,更新该服务部署节点的坐标。(13) The node positioning update module takes the service deployment node as the target node, adopts the node coordinate update method set by the system, that is, performs iterative calculations according to the measured network delay between the measurement node and the target node and the current coordinate value of the measurement node, Update the coordinates of the service deployment node.

其中,节点定位更新模块采用的节点坐标更新方法包括下述具体内容:Wherein, the node coordinate update method adopted by the node location update module includes the following specific contents:

(13a)计算目标节点当前坐标在误差和计算时的权重再由该目标节点和测量节点的当前坐标,采用计算欧几里得空间距离的方法计算两者的当前距离distance;式中,e和en分别为目标节点和测量节点的当前坐标的当前误差。(13a) Calculate the weight of the current coordinates of the target node in the error and calculation Then, from the current coordinates of the target node and the measurement node, the current distance distance between the two is calculated by the method of calculating the distance in Euclidean space; where e and e n are the current errors of the current coordinates of the target node and the measurement node respectively .

(13b)根据计算的两者当前距离和实测的网络距离数值计算该目标节点坐标的相对误差并据此更新该目标节点的坐标误差:e=relativeError×Ce×weight+e×(1-Ce×weight),式中,latency为实测的从测量节点到目标节点间的网络时延,即实测的两者当前距离,Ce是计算过程中控制收敛速度的系数。(13b) Calculate the relative error of the target node coordinates according to the calculated current distance between the two and the measured network distance value And update the coordinate error of the target node accordingly: e=relativeError×Ce×weight+e×(1-Ce×weight), where latency is the measured network delay from the measurement node to the target node, that is, the measured The current distance between the two, Ce is the coefficient that controls the convergence rate during the calculation.

(13c)利用该目标节点和测量节点的坐标,计算该目标节点坐标的移动方向,该移动方向应与该目标节点和测量节点的坐标连线方向平行,且使es数值减小;再计算该目标节点坐标的移动值ratio=Cc×weight×|distance-latency|,式中,Cc为控制算法的收敛参数。(13c) Utilize the coordinates of the target node and the measuring node to calculate the moving direction of the target node coordinates, the moving direction should be parallel to the direction of the line connecting the coordinates of the target node and the measuring node, and make the value of e s decrease; then calculate The moving value ratio of the target node coordinates=Cc×weight×|distance-latency|, where Cc is the convergence parameter of the control algorithm.

(13d)利用步骤(13c)的计算结果更新该目标节点的当前坐标。(13d) Update the current coordinates of the target node by using the calculation result of step (13c).

(13e)判断该目标节点当前坐标的误差值是否小于设定阈值,若否,则返回步骤(13a)执行相应操作;若是,则停止对该目标节点坐标的更新。(13e) Judging whether the error value of the current coordinates of the target node is less than the set threshold, if not, then return to step (13a) to perform the corresponding operation; if so, stop updating the coordinates of the target node.

(14)服务部署节点的网络坐标更新完成后,服务QoS测量模块通过调用Web服务获取响应时间,并记录调用是否成功,为估测用户端的服务响应时间和可靠性做好数据准备。(14) After the update of the network coordinates of the service deployment node is completed, the service QoS measurement module obtains the response time by calling the Web service, and records whether the call is successful, and prepares data for estimating the service response time and reliability of the client.

步骤2,实时测量阶段:Step 2, real-time measurement phase:

中心节点接收到用户的服务QoS估测请求时,向各个测量节点转发该请求;各个测量节点收到请求后,分别更新自身的网络坐标和用户坐标;When the central node receives the user's service QoS estimation request, it forwards the request to each measurement node; each measurement node updates its own network coordinates and user coordinates after receiving the request;

中心节点的相似度计算模块再计算用户与各测量节点的相似度,以供任务调度模块选取与用户相似度最大的K个测量节点;The similarity calculation module of the central node calculates the similarity between the user and each measurement node, so that the task scheduling module can select K measurement nodes with the largest similarity with the user;

该K个测量节点再次更新用户和服务部署节点坐标,并测量服务的响应时间和计算当前服务部署节点的处理时间;The K measurement nodes update the user and service deployment node coordinates again, measure the response time of the service and calculate the processing time of the current service deployment node;

中心节点的结果分析器计算用户能够获得的服务响应时间和可靠性。The result analyzer of the central node calculates the service response time and reliability that the user can obtain.

参见图4,介绍步骤2的具体操作内容:See Figure 4 to introduce the specific operation content of step 2:

(21)用户向中心节点发送包括该用户的IP地址、其需要测量的Web服务在系统中标识的Web服务QoS估测请求。(21) The user sends to the central node a Web service QoS estimation request including the IP address of the user and the identification of the Web service to be measured in the system.

(22)中心节点的任务调度模块将接收到的该用户请求中的用户IP地址分发给系统中的所有测量节点。(22) The task scheduling module of the central node distributes the user IP address in the received user request to all the measurement nodes in the system.

(23)每个测量节点的节点定位更新模块分别更新自身坐标和用户坐标:(23) The node positioning update module of each measurement node updates its own coordinates and user coordinates respectively:

每个测量节点收到该测量命令后,在其系统控制模块控制下,先在各个测量节点之间相互发送ping消息,进行自身定位而完成自身坐标更新;所有测量节点都完成自身网络坐标的更新后,每个测量节点分别向该用户发送ping消息,并测量其自身节点与该用户之间的往返网络时延,同样根据所述节点坐标更新方法法完成对该用户坐标的估测;再将该用户坐标更新到数据库中。该步骤包括下述具体操作内容:After each measurement node receives the measurement command, under the control of its system control module, it first sends ping messages between each measurement node to perform its own positioning and complete its own coordinate update; all measurement nodes complete their own network coordinate update Afterwards, each measurement node sends a ping message to the user respectively, and measures the round-trip network delay between its own node and the user, and also completes the estimation of the user coordinates according to the node coordinate update method; then The user coordinates are updated to the database. This step includes the following specific operations:

(23a)由当前需要更新自身坐标的测量节点通过节点定位更新模块向系统中所有其它测量节点分别发送ping消息,并记录该消息在网络中的往返时间,再将该往返时间作为两个测量节点之间的网络时延;(23a) The measurement node that currently needs to update its own coordinates sends ping messages to all other measurement nodes in the system through the node positioning update module, and records the round-trip time of the message in the network, and then uses the round-trip time as two measurement nodes The network delay between;

(23b)从数据库中获取所有测量节点的网络坐标,然后将这些网络坐标和步骤(23a)得到的网络时延作为节点坐标更新算法的输入数据,然后,以当前测量节点为目标节点,利用节点坐标更新方法计算得到当前每个测量节点的新网络坐标;(23b) Obtain the network coordinates of all measurement nodes from the database, and then use these network coordinates and the network time delay obtained in step (23a) as the input data of the node coordinate update algorithm, and then, with the current measurement node as the target node, use node The coordinate update method calculates the new network coordinates of each current measurement node;

(23c)用该新网络坐标更新数据库中测量节点原来存储的网络坐标;(23c) updating the original stored network coordinates of the measuring node in the database with the new network coordinates;

(23d)节点定位更新模块采用上述步骤(23a)~(23c)同样方法更新该用户的坐标。(23d) The node location update module updates the user's coordinates in the same way as the above steps (23a)-(23c).

(24)中心节点的相似度计算模块计算相似度:(24) The similarity calculation module of the central node calculates the similarity:

所有测量节点都完成步骤(23)后,中心节点的相似度计算模块从数据库中分别取出该用户和各测量节点的更新后的坐标,计算该用户与各个测量节点之间网络距离,用于计算该用户与各个测量节点的相似度;After all measurement nodes have completed step (23), the similarity calculation module of the central node takes out the updated coordinates of the user and each measurement node from the database, calculates the network distance between the user and each measurement node, and is used for calculating The similarity between the user and each measurement node;

(25)中心节点的任务调度模块选取测量节点,并发送测量命令:根据计算的相似度,任务调度模块选取与该用户相似度最大的K个节点,向该K个测量节点发送继续测量的命令;(25) The task scheduling module of the central node selects the measurement node and sends a measurement command: according to the calculated similarity, the task scheduling module selects K nodes with the largest similarity with the user, and sends an order to continue measurement to the K measurement nodes ;

(26)测量节点的节点定位更新模块更新用户和服务部署节点的坐标:当该K个测量节点接收到测量命令后,分别更新用户和服务部署节点的坐标,以保证QoS估测的实时性和准确性;(26) The node positioning update module of the measurement node updates the coordinates of the user and the service deployment node: when the K measurement nodes receive the measurement command, they update the coordinates of the user and the service deployment node respectively, so as to ensure the real-time performance and quality of QoS estimation. accuracy;

(27)测量节点的服务QoS测量模块测量服务的响应时间:根据WSDL文件解析模块获取的解析服务操作名称和参数名称与类型,服务QoS测量模块自动调用Web服务操作,并记录服务调用是否成功,同时记录该测量节点调用该服务的响应时间Tr;再根据公式Tr=Tl+Tp计算服务处理时间Tp,并存储于数据库,以供结果分析时使用;式中,Tl为SOAP消息在该测量节点和该服务部署节点之间的传输时间,即由测量节点和服务部署节点的坐标计算得到的网络距离;(27) The service QoS measurement module of the measurement node measures the response time of the service: according to the analysis service operation name and parameter name and type obtained by the WSDL file analysis module, the service QoS measurement module automatically calls the Web service operation, and records whether the service call is successful, At the same time, record the response time T r of the measurement node calling the service; then calculate the service processing time T p according to the formula T r = T l + T p , and store it in the database for use in result analysis; where T l is The transmission time of the SOAP message between the measurement node and the service deployment node, that is, the network distance calculated from the coordinates of the measurement node and the service deployment node;

(28)中心节点的结果分析器分别估算该服务的响应时间和可靠性:(28) The result analyzer of the central node estimates the response time and reliability of the service respectively:

根据数据库中的用户坐标和服务部署节点坐标,通过欧几里得空间中的距离计算方法计算两者之间的网络距离,即SOAP消息在该用户和该Web服务之间的传输时间Tl,再根据Tr=Tl+Tp计算用户能够获得服务的响应时间;According to the user coordinates in the database and the service deployment node coordinates, the network distance between the two is calculated by the distance calculation method in Euclidean space, that is, the transmission time T l of the SOAP message between the user and the Web service, Then calculate the response time for the user to obtain the service according to T r =T l +T p ;

根据数据库中的存储的设定时间段内的服务调用结果,计算每个测量节点k获取该服务的可靠性Pk,该Pk的数值是设定时间段内测量节点k调用该服务的成功次数与总调用次数之比;再利用该用户与该K个测量节点的相似度,依据公式计算用户能够获得的服务的可靠性,式中,Wk为测量节点k与该用户的相似度在所有K个测量节点与该用户相似度之和中占的比重;According to the service call results stored in the database within the set time period, calculate the reliability P k of each measurement node k to obtain the service, and the value of this P k is the success of the measurement node k calling the service within the set time period The ratio of the number of calls to the total number of calls; then using the similarity between the user and the K measurement nodes, according to the formula Calculate the reliability of the service that the user can obtain, where W k is the proportion of the similarity between the measurement node k and the user in the sum of the similarities between all K measurement nodes and the user;

(29)将估算结果,包括响应时间和可靠性,返回给用户。(29) Return the estimated results, including response time and reliability, to the user.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the present invention. within the scope of protection.

Claims (3)

1.一种Web服务的服务质量QoS分布式测量系统,其特征在于:该系统根据Web服务QoS估测模型,利用网络定位技术分别计算用户主机、多个测量节点和Web服务部署主机、即服务部署节点在抽象的网络坐标系中的坐标,即网络坐标,再计算用户主机与测量节点的相似度,以便估测用户能够获得的QoS属性值;所述Web服务QoS估测模型是以欧几里得空间描述的多维坐标网络,其中包括中心节点、测量节点、服务部署节点和用户的每个节点分别与该多维坐标空间中的一个点相对应,且该多维坐标网络的维数与测量节点个数相同;所述网络坐标是一种用于预测具有可扩展性的互联网距离的坐标,其由节点的当前坐标值及当前误差所组成;在网络系统中,每个节点只需经过少量测量就能够得到该节点的网络坐标;再按照预设的计算方法,利用任意两个节点的网络坐标,就能够预测两者之间的网络距离;该系统设有:中心节点和多个测量节点,其中:1. A quality of service QoS distributed measurement system of Web service, it is characterized in that: this system utilizes network location technology to calculate respectively user host computer, a plurality of measurement nodes and Web service deployment host computer, namely service according to Web service QoS estimation model Deploy the coordinates of the nodes in the abstract network coordinate system, that is, the network coordinates, and then calculate the similarity between the user host and the measurement node, so as to estimate the QoS attribute value that the user can obtain; the Web service QoS estimation model is based on Euclidean The multi-dimensional coordinate network described by Reed space, each node including the central node, measurement node, service deployment node and user corresponds to a point in the multi-dimensional coordinate space, and the dimension of the multi-dimensional coordinate network is the same as that of the measurement node The number is the same; the network coordinate is a coordinate used to predict the distance of the Internet with scalability, which is composed of the current coordinate value of the node and the current error; in the network system, each node only needs a small amount of measurement The network coordinates of the node can be obtained; then according to the preset calculation method, using the network coordinates of any two nodes, the network distance between the two can be predicted; the system is equipped with: a central node and multiple measurement nodes, in: 中心节点,负责接受和处理用户主机的请求、对各个测量节点分别执行测量任务的调度、用户主机与测量节点的相似度计算和测量结果分析;设有四个部件:任务调度模块、结果分析器、相似度计算模块和数据库;该中心节点的四个部件功能如下:The central node is responsible for accepting and processing the request of the user host, scheduling the measurement tasks for each measurement node, calculating the similarity between the user host and the measurement node, and analyzing the measurement results; it has four components: task scheduling module and result analyzer , similarity calculation module and database; the functions of the four parts of the central node are as follows: 任务调度模块,作为该中心节点的控制枢纽,负责各个测量节点的注册,接收用户主机、即用户QoS的估测请求并作出响应,以及整个系统测量任务的分配:接收到用户包括其IP地址,需要测量的Web服务在系统中的标识的QoS估测请求时,该任务调度模块就向测量节点发送测量命令,将该用户的IP地址分发给系统中所有测量节点,并分配测量任务;完成QoS估测后,将结果返回给用户;The task scheduling module, as the control hub of the central node, is responsible for the registration of each measurement node, receiving and responding to the estimation request of the user host, that is, user QoS, and the distribution of the measurement tasks of the entire system: receiving the user including its IP address, When the QoS estimation request of the identified Web service in the system needs to be measured, the task scheduling module sends a measurement command to the measurement node, distributes the user's IP address to all measurement nodes in the system, and assigns measurement tasks; completes the QoS After estimation, return the result to the user; 结果分析器,用于根据测量到的用户和服务部署节点的网络坐标,以及用户与各测量节点的相似度,计算用户能够得到的包括响应时间和可靠性的服务QoS属性值,并将计算结果存储于数据库;所述响应时间是结果分析器从数据库获取用户坐标和服务部署节点坐标,计算两者之间的网络距离、即简单对象访问协议SOAP消息在用户和服务部署主机之间的网络传输时延L,再加上该服务的处理时间,就是该服务的响应时间;所述可靠性是结果分析器根据数据库中存储的设定时段内的服务调用结果,计算该时段内每个测量节点调用该服务的成功次数与其总调用次数之比,就是每个测量节点获得该服务的可靠性数值,再利用各个测量节点与用户的相似度计算该用户能够获得该服务的可靠性数值;所述设定时段是由用户自行设定的;The result analyzer is used to calculate the service QoS attribute value that the user can obtain including response time and reliability according to the measured network coordinates of the user and the service deployment node, and the similarity between the user and each measurement node, and calculate the result Stored in the database; the response time is that the result analyzer obtains the user coordinates and the service deployment node coordinates from the database, and calculates the network distance between the two, that is, the network transmission of the Simple Object Access Protocol SOAP message between the user and the service deployment host The delay L, plus the processing time of the service, is the response time of the service; the reliability is that the result analyzer calculates each measurement node within the period according to the service call results stored in the database within the set period. The ratio of the number of successful calls to the service to the total number of calls is the reliability value of the service obtained by each measurement node, and then the reliability value of the service that the user can obtain by using the similarity between each measurement node and the user is calculated; The set time period is set by the user; 相似度计算模块,负责从数据库中获取用户和各测量节点的网络坐标,根据用户到每个测量节点之间的网络距离,计算用户与各个测量节点的相似度,以供任务调度模块和结果分析器分别利用该相似度值选择测量节点和计算用户能够获得的QoS属性值;该系统中用户与各测量节点的相似度取决于两者之间的网络距离:距离越近,相似度越高;反之,即距离越远,则相似度越低;The similarity calculation module is responsible for obtaining the network coordinates of the user and each measurement node from the database, and calculating the similarity between the user and each measurement node according to the network distance between the user and each measurement node for the task scheduling module and result analysis The device uses the similarity value to select the measurement node and calculate the QoS attribute value that the user can obtain; the similarity between the user and each measurement node in the system depends on the network distance between the two: the closer the distance, the higher the similarity; Conversely, the farther the distance, the lower the similarity; 数据库,用于存储包括用户、测量节点和服务部署节点的最近更新的网络坐标,以及各测量节点测量得到服务QoS历史数据;The database is used to store the latest updated network coordinates of users, measurement nodes and service deployment nodes, as well as the service QoS historical data measured by each measurement node; 多个测量节点,分布式部署于该系统,负责接收中心节点发送的命令,获取和解析描述Web服务与其接口信息、以及如何与Web服务通信的XML语言WSDL文件、进行自身和各测量节点的定位、测量用户主机及服务部署节点坐标和测量Web服务QoS;设有:测量节点控制模块、节点定位更新模块、WSDL文件解析模块、服务QoS测量模块和数据库连接模块共五个部件;该测量节点的五个部件功能如下:Multiple measurement nodes are deployed in the system in a distributed manner, responsible for receiving commands sent by the central node, obtaining and parsing XML language WSDL files describing Web services and their interface information, and how to communicate with Web services, and positioning themselves and each measurement node , measure user host and service deployment node coordinates, and measure Web service QoS; there are five components: a measurement node control module, a node location update module, a WSDL file analysis module, a service QoS measurement module, and a database connection module; the measurement node The functions of the five components are as follows: 测量节点控制模块,用于接收中心节点的命令,与中心节点的任务调度模块交互通信,调用和控制测量节点的各个模块完成各项测量操作;The measurement node control module is used to receive commands from the central node, communicate interactively with the task scheduling module of the central node, call and control each module of the measurement node to complete various measurement operations; 节点定位更新模块,用于在测量Web服务QoS前,根据该测量节点与其他测量节点之间的网络传输时延,更新自身节点的网络坐标;并分别测量该测量节点到服务部署节点和用户的传输时延,以更新两者的网络坐标,保证测量结果的精准度;The node positioning update module is used to update the network coordinates of its own node according to the network transmission delay between the measurement node and other measurement nodes before measuring the Web service QoS; and measure the distance from the measurement node to the service deployment node and the user respectively. Transmission delay to update the network coordinates of the two to ensure the accuracy of the measurement results; WSDL文件解析模块,用于对系统中已获得Web服务的WSDL文件进行解析,并生成调用服务所需的客户端代码,并将得到的包括服务名称、服务操作名称、操作参数名称与类型,以及服务地址的解析结果序列化处理后,存储在测量节点中,以供测量服务QoS时使用;The WSDL file parsing module is used to parse the WSDL file of the web service obtained in the system, and generate the client code required to call the service, and obtain the service name, service operation name, operation parameter name and type, and After the analysis result of the service address is serialized, it is stored in the measurement node for use when measuring the service QoS; 服务QoS测量模块,利用WSDL文件解析模块解析得到的服务信息和自动生成的客户端代码,得到Web服务操作的参数类型并赋值,再对Web服务进行实际调用,获取包括服务的响应时间与调用是否成功的服务QoS数值;The service QoS measurement module uses the service information obtained by parsing the WSDL file analysis module and the automatically generated client code to obtain the parameter type of the Web service operation and assign the value, and then actually calls the Web service to obtain information including the response time of the service and whether the call is Successful service QoS value; 数据库连接模块,用于连接数据库,以供测量节点控制模块、节点定位更新模块和服务QoS测量模块调用,完成对数据库中数据的读写、添加和更新。The database connection module is used to connect to the database for calling by the measurement node control module, node location update module and service QoS measurement module to complete reading, writing, adding and updating of data in the database. 2.根据权利要求1所述的分布式测量系统,其特征在于:所述Web服务QoS估测模型中,对该系统中的全部N个测量节点分别按照顺序逐个编号,并设定其中第k个测量节点的第k维坐标初始值为0,其余各维坐标初始值均为随机值,且其各个坐标值都随着网络状态的变化而动态更新,如此建立的该网络坐标系,能够通过目标用户节点、服务部署节点、测量节点的不同坐标,计算用户与各测量节点的相似度,并对目标用户能够获得的包括服务响应时间和可靠性的服务QoS属性值进行估测,其中,N和k都为自然数,且k小于等于N。2. The distributed measurement system according to claim 1, characterized in that: in the Web service QoS estimation model, all N measurement nodes in the system are numbered one by one in sequence, and the kth The initial value of the k-th dimension coordinate of a measurement node is 0, and the initial values of the other dimension coordinates are random values, and each coordinate value is dynamically updated as the network status changes. The network coordinate system thus established can be obtained by The different coordinates of the target user node, service deployment node, and measurement node, calculate the similarity between the user and each measurement node, and estimate the service QoS attribute value that the target user can obtain, including service response time and reliability, where N and k are both natural numbers, and k is less than or equal to N. 3.一种根据权利要求1所述的分布式测量系统的测量方法,其特征在于:所述方法包括下列操作步骤:3. A measurement method of the distributed measurement system according to claim 1, characterized in that: the method comprises the following steps: 步骤1,周期测量阶段:每个测量节点的WSDL文件解析模块解析该Web服务部署节点的IP地址,节点定位更新模块向该IP地址周期发送ping消息和计算从自身节点和服务部署节点之间传递SOAP消息的网络时延;再以服务部署节点为目标节点,采用设定的节点坐标更新方法更新该服务部署节点的坐标;测量节点的服务QoS测量模块通过调用Web服务获取响应时间,并记录调用是否成功;在步骤1中,测量节点执行下述操作内容:Step 1, periodic measurement phase: the WSDL file parsing module of each measurement node parses the IP address of the Web service deployment node, and the node location update module periodically sends ping messages to the IP address and calculates the transmission between its own node and the service deployment node The network delay of the SOAP message; then take the service deployment node as the target node, and use the set node coordinate update method to update the coordinates of the service deployment node; the service QoS measurement module of the measurement node obtains the response time by calling the Web service, and records the call Whether it is successful; in step 1, the measurement node performs the following operations: (11)WSDL文件解析模块获取Web服务部署节点的IP地址;(11) The WSDL file parsing module obtains the IP address of the Web service deployment node; (12)节点定位更新模块向该IP地址周期发送ping消息,并记录该消息在网络中的往返时间,再将该往返时间作为SOAP消息在测量节点和服务部署节点之间的往返传输时间;(12) The node positioning update module sends a ping message periodically to the IP address, and records the round-trip time of the message in the network, and then uses the round-trip time as the round-trip transmission time of the SOAP message between the measurement node and the service deployment node; (13)节点定位更新模块以服务部署节点为目标节点,采用系统设定的节点坐标更新方法,即根据实测的测量节点和目标节点间的网络时延和测量节点的当前坐标值进行迭代运算,更新该服务部署节点的坐标;该步骤(13)中,节点定位更新模块采用的节点坐标更新方法包括下述具体操作内容:(13) The node positioning update module takes the service deployment node as the target node, adopts the node coordinate update method set by the system, that is, performs iterative calculations according to the measured network delay between the measurement node and the target node and the current coordinate value of the measurement node, Update the coordinates of the service deployment node; in this step (13), the node coordinate update method adopted by the node location update module includes the following specific operations: (13a)计算目标节点当前坐标在误差和计算时的权重再由该目标节点和测量节点的当前坐标,采用计算欧几里得空间距离的方法计算两者的当前距离distance;式中,e和en分别为目标节点和测量节点的当前坐标的当前误差;(13a) Calculate the weight of the current coordinates of the target node in the error and calculation Then, from the current coordinates of the target node and the measurement node, the current distance distance between the two is calculated by the method of calculating the distance in Euclidean space; where e and e n are the current errors of the current coordinates of the target node and the measurement node respectively ; (13b)根据计算的两者当前距离和实测的网络距离数值计算该目标节点坐标的相对误差并据此更新该目标节点的坐标误差:e=relativeError×Ce×weight+e×(1-Ce×weight),式中,latency为实测的从测量节点到目标节点间的网络时延,即实测的两者当前距离,Ce是计算过程中控制收敛速度的系数;(13b) Calculate the relative error of the target node coordinates according to the calculated current distance between the two and the measured network distance value And update the coordinate error of the target node accordingly: e=relativeError×Ce×weight+e×(1-Ce×weight), where latency is the measured network delay from the measurement node to the target node, that is, the measured The current distance between the two, Ce is the coefficient that controls the convergence rate during the calculation process; (13c)利用该目标节点和测量节点的坐标,计算该目标节点坐标的移动方向,该移动方向应与该目标节点和测量节点的坐标连线方向平行,且使es数值减小;再计算该目标节点坐标的移动值ratio=Cc×weight×|distance-latency|,式中,Cc为控制算法的收敛参数;(13c) Utilize the coordinates of the target node and the measuring node to calculate the moving direction of the target node coordinates, the moving direction should be parallel to the direction of the line connecting the coordinates of the target node and the measuring node, and make the value of e s decrease; then calculate The moving value ratio of the target node coordinates=Cc×weight×|distance-latency|, where Cc is the convergence parameter of the control algorithm; (13d)利用步骤(13c)的计算结果更新该目标节点的当前坐标;(13d) Utilize the calculation result of step (13c) to update the current coordinates of the target node; (13e)判断该目标节点当前坐标的误差值是否小于设定阈值,若否,则返回步骤(13a)执行相应操作;若是,则停止对该目标节点坐标的更新;(13e) judging whether the error value of the current coordinates of the target node is less than the set threshold, if not, then return to step (13a) to perform the corresponding operation; if so, stop updating the coordinates of the target node; (14)服务部署节点的网络坐标更新完成后,服务QoS测量模块通过调用Web服务获取响应时间,并记录调用是否成功,为估测用户端的服务响应时间和可靠性做好数据准备;(14) After the network coordinate update of the service deployment node is completed, the service QoS measurement module obtains the response time by calling the Web service, and records whether the call is successful, and prepares data for estimating the service response time and reliability of the client; 步骤2,实时测量阶段:Step 2, real-time measurement phase: 中心节点接收到用户的服务QoS估测请求时,向各个测量节点转发该请求;各个测量节点收到请求后,分别更新自身的网络坐标和用户坐标;When the central node receives the user's service QoS estimation request, it forwards the request to each measurement node; each measurement node updates its own network coordinates and user coordinates after receiving the request; 中心节点的相似度计算模块再计算用户与各测量节点的相似度,以供任务调度模块选取与用户相似度最大的K个测量节点;The similarity calculation module of the central node calculates the similarity between the user and each measurement node, so that the task scheduling module can select K measurement nodes with the largest similarity with the user; 该K个测量节点再次更新用户和服务部署节点坐标,并测量服务的响应时间和计算当前服务部署节点的处理时间;The K measurement nodes update the user and service deployment node coordinates again, measure the response time of the service and calculate the processing time of the current service deployment node; 中心节点的结果分析器计算用户能够获得的服务响应时间和可靠性;The result analyzer of the central node calculates the service response time and reliability that users can obtain; 该步骤2包括下述操作内容:This step 2 includes the following operations: (21)用户向中心节点发送包括该用户的IP地址、其需要测量的Web服务在系统中标识的Web服务QoS估测请求;(21) The user sends to the central node a Web service QoS estimation request including the user's IP address and the Web service that needs to be measured in the system; (22)中心节点的任务调度模块将接收到的该用户请求中的用户IP地址分发给系统中的所有测量节点;(22) The task scheduling module of the central node distributes the user IP address in the received user request to all measurement nodes in the system; (23)每个测量节点的节点定位更新模块分别更新自身坐标和用户坐标:(23) The node positioning update module of each measurement node updates its own coordinates and user coordinates respectively: 每个测量节点收到该测量命令后,在其系统控制模块控制下,先在各个测量节点之间相互发送ping消息,进行自身定位而完成自身坐标更新;所有测量节点都完成自身网络坐标的更新后,每个测量节点分别向该用户发送ping消息,并测量其自身节点与该用户之间的往返网络时延,同样根据所述节点坐标更新方法法完成对该用户坐标的估测;再将该用户坐标更新到数据库中;After each measurement node receives the measurement command, under the control of its system control module, it first sends ping messages between each measurement node to perform its own positioning and complete its own coordinate update; all measurement nodes complete their own network coordinate update Afterwards, each measurement node sends a ping message to the user respectively, and measures the round-trip network delay between its own node and the user, and also completes the estimation of the user coordinates according to the node coordinate update method; then The user coordinates are updated to the database; 该步骤(23)包括下述具体操作步骤:This step (23) comprises following specific operation steps: (23a)由当前需要更新自身坐标的测量节点通过节点定位更新模块向系统中所有其它测量节点分别发送ping消息,并记录该消息在网络中的往返时间,再将该往返时间作为两个测量节点之间的网络时延;(23a) The measurement node that currently needs to update its own coordinates sends ping messages to all other measurement nodes in the system through the node positioning update module, and records the round-trip time of the message in the network, and then uses the round-trip time as two measurement nodes The network delay between; (23b)从数据库中获取所有测量节点的网络坐标,然后将这些网络坐标和步骤(23a)得到的网络时延作为节点坐标更新算法的输入数据,然后,以当前测量节点为目标节点,利用所述节点坐标更新方法计算得到当前每个测量节点的新网络坐标;(23b) Obtain the network coordinates of all measuring nodes from the database, and then use these network coordinates and the network time delay obtained in step (23a) as the input data of the node coordinate update algorithm, and then use the current measuring node as the target node, using the The above-mentioned node coordinate updating method calculates and obtains the new network coordinate of each current measurement node; (23c)用该新网络坐标更新数据库中测量节点原来存储的网络坐标;(23c) updating the original stored network coordinates of the measuring node in the database with the new network coordinates; (23d)节点定位更新模块采用上述步骤(23a)~(23c)同样方法更新该用户的坐标;(23d) The node positioning update module updates the user's coordinates in the same way as above steps (23a)-(23c); (24)中心节点的相似度计算模块计算相似度:(24) The similarity calculation module of the central node calculates the similarity: 所有测量节点都完成步骤(23)后,中心节点的相似度计算模块从数据库中分别取出该用户和各测量节点的更新后的坐标,计算该用户与各个测量节点之间网络距离,用于计算该用户与各个测量节点的相似度;After all measurement nodes have completed step (23), the similarity calculation module of the central node takes out the updated coordinates of the user and each measurement node from the database, calculates the network distance between the user and each measurement node, and is used for calculating The similarity between the user and each measurement node; (25)中心节点的任务调度模块选取测量节点,并发送测量命令:根据计算的相似度,任务调度模块选取与该用户相似度最大的K个节点,向该K个测量节点发送继续测量的命令;(25) The task scheduling module of the central node selects the measurement node and sends a measurement command: according to the calculated similarity, the task scheduling module selects K nodes with the largest similarity with the user, and sends an order to continue measurement to the K measurement nodes ; (26)测量节点的节点定位更新模块更新用户和服务部署节点的坐标:当该K个测量节点接收到测量命令后,分别更新用户和服务部署节点的坐标,以保证QoS估测的实时性和准确性;(26) The node positioning update module of the measurement node updates the coordinates of the user and the service deployment node: when the K measurement nodes receive the measurement command, they update the coordinates of the user and the service deployment node respectively, so as to ensure the real-time performance and quality of QoS estimation. accuracy; (27)测量节点的服务QoS测量模块测量服务的响应时间:根据WSDL文件解析模块获取的解析服务操作名称和参数名称与类型,服务QoS测量模块自动调用Web服务操作,并记录服务调用是否成功,同时记录该测量节点调用该服务的响应时间Tr;再根据公式Tr=Tl+Tp计算服务处理时间Tp,并存储于数据库,以供结果分析时使用;式中,Tl为SOAP消息在该测量节点和该服务部署节点之间的传输时间,即由测量节点和服务部署节点的坐标计算得到的网络距离;(27) The service QoS measurement module of the measurement node measures the response time of the service: according to the analysis service operation name and parameter name and type obtained by the WSDL file analysis module, the service QoS measurement module automatically calls the Web service operation, and records whether the service call is successful, At the same time, record the response time T r of the measurement node calling the service; then calculate the service processing time T p according to the formula T r = T l + T p , and store it in the database for use in result analysis; where T l is The transmission time of the SOAP message between the measurement node and the service deployment node, that is, the network distance calculated from the coordinates of the measurement node and the service deployment node; (28)中心节点的结果分析器分别估算该服务的响应时间和可靠性:(28) The result analyzer of the central node estimates the response time and reliability of the service respectively: 根据数据库中的用户坐标和服务部署节点坐标,通过欧几里得空间中的距离计算方法计算两者之间的网络距离,即SOAP消息在该用户和该Web服务之间的传输时间Tl,再根据Tr=Tl+Tp计算用户能够获得服务的响应时间;According to the user coordinates in the database and the service deployment node coordinates, the network distance between the two is calculated by the distance calculation method in Euclidean space, that is, the transmission time T l of the SOAP message between the user and the Web service, Then calculate the response time for the user to obtain the service according to T r =T l +T p ; 根据数据库中的存储的设定时间段内的服务调用结果,计算每个测量节点k获取该服务的可靠性Pk,该Pk的数值是设定时间段内测量节点k调用该服务的成功次数与总调用次数之比;再利用该用户与该K个测量节点的相似度,依据公式计算用户能够获得的服务的可靠性,式中,Wk为测量节点k与该用户的相似度在所有K个测量节点与该用户相似度之和中占的比重;According to the service call results stored in the database within the set time period, calculate the reliability P k of each measurement node k to obtain the service, and the value of this P k is the success of the measurement node k calling the service within the set time period The ratio of the number of calls to the total number of calls; then using the similarity between the user and the K measurement nodes, according to the formula Calculate the reliability of the service that the user can obtain, where W k is the proportion of the similarity between the measurement node k and the user in the sum of the similarities between all K measurement nodes and the user; (29)将估算结果,包括响应时间和可靠性,返回给用户。(29) Return the estimated results, including response time and reliability, to the user.
CN201310076529.7A 2013-03-11 2013-03-11 Distributed Measuring System and Method for Web Service Quality Expired - Fee Related CN103209102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310076529.7A CN103209102B (en) 2013-03-11 2013-03-11 Distributed Measuring System and Method for Web Service Quality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310076529.7A CN103209102B (en) 2013-03-11 2013-03-11 Distributed Measuring System and Method for Web Service Quality

Publications (2)

Publication Number Publication Date
CN103209102A CN103209102A (en) 2013-07-17
CN103209102B true CN103209102B (en) 2015-11-04

Family

ID=48756194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310076529.7A Expired - Fee Related CN103209102B (en) 2013-03-11 2013-03-11 Distributed Measuring System and Method for Web Service Quality

Country Status (1)

Country Link
CN (1) CN103209102B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103840985A (en) * 2014-02-28 2014-06-04 浙江大学 Web service quality prediction method and device based on user neighborhoods
CN104579850A (en) * 2015-01-27 2015-04-29 北京邮电大学 Quality of service (QoS) prediction method for Web service under mobile Internet environment
CN104811477B (en) * 2015-03-26 2019-02-22 广东睿江云计算股份有限公司 Method and device for automatic measurement of network distance
CN106972986B (en) * 2017-04-14 2019-09-03 福建省天晴互动娱乐有限公司 The detection method and its system of IDC network of computer room quality
CN110445652A (en) * 2019-08-08 2019-11-12 北京众享比特科技有限公司 Network distance prediction method, apparatus, end host and medium
CN113949646B (en) * 2021-10-15 2023-06-13 安徽大学 Web service QoS prediction method based on deep learning

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557395A (en) * 2009-02-19 2009-10-14 李艳丽 Web service searching method based on QoS
CN102158533A (en) * 2011-01-28 2011-08-17 浙江大学 Distributed web service selection method based on QoS (Quality of Service)
CN102170449A (en) * 2011-04-28 2011-08-31 浙江大学 Web service QoS prediction method based on collaborative filtering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201118767A (en) * 2009-11-17 2011-06-01 Inst Information Industry Service workflow generation apparatus and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557395A (en) * 2009-02-19 2009-10-14 李艳丽 Web service searching method based on QoS
CN102158533A (en) * 2011-01-28 2011-08-17 浙江大学 Distributed web service selection method based on QoS (Quality of Service)
CN102170449A (en) * 2011-04-28 2011-08-31 浙江大学 Web service QoS prediction method based on collaborative filtering

Also Published As

Publication number Publication date
CN103209102A (en) 2013-07-17

Similar Documents

Publication Publication Date Title
CN103209102B (en) Distributed Measuring System and Method for Web Service Quality
US10257678B2 (en) Scalable data discovery in an internet of things (IoT) system
CN104995870B (en) Multiple target server arrangement determines method and apparatus
US9462051B2 (en) Dynamic cache selection method and system
US9769248B1 (en) Performance-based content delivery
WO2021169294A1 (en) Application recognition model updating method and apparatus, and storage medium
CN113515545B (en) Data query method, device, system, electronic equipment and storage medium
TWI505682B (en) Remote management system with highly adaptive chat management mechanism
CN112367684B (en) Flow control method, device, storage medium and computer equipment
Li et al. Data collection and node counting by opportunistic communication
CN114513488B (en) Resource access methods, devices, computer equipment and storage media
CN102546793B (en) Self-adaption method and system of mobile terminal based on cloud computing
CN110402567A (en) Centrality-Based Caching in Information-Centric Networks
CN108390775A (en) A kind of user experience quality evaluation method and system based on SPICE
CN115840623A (en) General calculation and memory integration system
Rawadi et al. Providing local cloud services to mobile devices with inter-cloudlet communication
CN106713353A (en) Intelligent seamless aggregation method and system for geographic information service
Qi et al. Toward distributively build time-sensitive-service coverage in compute first networking
CN115348251B (en) File downloading method, device, computer equipment and storage medium
CN110932913B (en) A method and device for adaptive service migration based on case base matching
Wang et al. An OPC UA multi-server aggregator with cache management
CN117221325A (en) Custom load balancing device, method, equipment and storage medium based on gateway
CN103024091B (en) Obtain method and the device of networking client actual physical address
CN109617960A (en) A web AR data presentation method based on attribute separation
CN102843424B (en) A kind of heterogeneous distributed cloud computing system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
CB03 Change of inventor or designer information

Inventor after: Zhao Yao

Inventor after: Zhou Shundong

Inventor after: Li Jun

Inventor after: Yang Fangchun

Inventor after: Zou Hua

Inventor after: Zhang Wentao

Inventor after: Niu Kun

Inventor after: Wan Neng

Inventor after: Sun Qibo

Inventor after: Lin Rongheng

Inventor before: Zhao Yao

Inventor before: Li Jun

Inventor before: Zhou Shundong

Inventor before: Yang Fangchun

Inventor before: Zou Hua

Inventor before: Sun Qibo

Inventor before: Lin Rongheng

COR Change of bibliographic data
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151104

Termination date: 20170311

CF01 Termination of patent right due to non-payment of annual fee