[go: up one dir, main page]

CN104022970A - Web service QoS step control method and Web service container - Google Patents

Web service QoS step control method and Web service container Download PDF

Info

Publication number
CN104022970A
CN104022970A CN201410205478.8A CN201410205478A CN104022970A CN 104022970 A CN104022970 A CN 104022970A CN 201410205478 A CN201410205478 A CN 201410205478A CN 104022970 A CN104022970 A CN 104022970A
Authority
CN
China
Prior art keywords
service
resource
resource weight
hierarchical control
qos
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.)
Pending
Application number
CN201410205478.8A
Other languages
Chinese (zh)
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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201410205478.8A priority Critical patent/CN104022970A/en
Publication of CN104022970A publication Critical patent/CN104022970A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种Web服务QoS分级控制方法及Web服务容器,其中,方法包括:接收用户发送的服务请求;确定在各QoS分级控制策略下,为服务分配的资源数量;确定在各QoS分级控制策略下,服务获得的第一资源权值,第一资源权值为资源数量与资源总量的比值;确定服务获得的第二资源权值,第二资源权值为第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;根据第二资源权值对服务进行QoS分级控制。本发明支持多种QoS分级控制策略,能够根据不同的应用需求使用不同的QoS分级控制策略,有效地优化了服务容器的处理能力,保证了服务质量。

The invention discloses a Web service QoS hierarchical control method and a Web service container, wherein the method includes: receiving a service request sent by a user; determining the resource quantity allocated for the service under each QoS hierarchical control strategy; Under the control strategy, the first resource weight obtained by the service is the ratio of the resource quantity to the total resource; the second resource weight obtained by the service is determined, and the second resource weight is the first resource weight and The weighted sum of the influence proportions of each QoS hierarchical control strategy on the service; perform QoS hierarchical control on the service according to the second resource weight. The invention supports multiple QoS hierarchical control strategies, can use different QoS hierarchical control strategies according to different application requirements, effectively optimizes the processing capability of the service container, and ensures the service quality.

Description

Web服务QoS分级控制方法及Web服务容器Web service QoS hierarchical control method and Web service container

技术领域technical field

本发明涉及计算机网络技术领域,尤其涉及一种Web服务QoS分级控制方法及Web服务容器。The invention relates to the technical field of computer networks, in particular to a Web service QoS hierarchical control method and a Web service container.

背景技术Background technique

在面向服务的体系结构(Service Oriented Architecture,以下简称SOA)中,服务提供者需要为不同的服务消费者提供有差别的服务,同时尽可能多的满足服务消费者的需求以取得更高的收益。这就需要支持服务质量(QualityOf Service,以下简称QoS)分级控制的Web服务容器,在保障不同服务QoS指标的同时实现Web服务容器处理能力的优化。In the service-oriented architecture (Service Oriented Architecture, hereinafter referred to as SOA), service providers need to provide different services for different service consumers, and at the same time meet the needs of service consumers as much as possible to obtain higher benefits . This requires a Web service container that supports hierarchical control of Quality of Service (QoS) in order to optimize the processing capability of the Web service container while ensuring different service QoS indicators.

现有的Web服务容器基于单一QoS分级控制策略的服务容器处理能力优化方法,例如:有的QoS分级控制策略是基于性能优化角度的,利用响应时间等性能参数衡量服务容器处理能力,作为分级控制的依据;有的QoS分级控制策略是基于收益优化角度的,利用成功执行服务获得的收益值衡量服务容器处理能力,作为分级控制的依据;还有的QoS分级控制策略是基于资源优化角度的,利用处理服务请求过程中消耗的系统资源数量衡量服务容器处理能力,作为分级控制的依据。Existing Web service containers are based on a single QoS hierarchical control strategy to optimize the processing capacity of service containers. For example, some QoS hierarchical control strategies are based on performance optimization. Performance parameters such as response time are used to measure the processing capacity of service containers as a hierarchical control strategy. basis; some QoS hierarchical control strategies are based on the perspective of revenue optimization, and use the revenue value obtained by successfully executing services to measure the processing capacity of service containers as the basis for hierarchical control; some QoS hierarchical control strategies are based on the perspective of resource optimization. Use the amount of system resources consumed in the process of processing service requests to measure the processing capacity of service containers as the basis for hierarchical control.

但是,随着SOA应用的日益广泛以及Web服务研究的不断发展,基于单一QoS分级控制策略的服务容器处理能力优化方法的局限性越来越明显,例如,基于性能优化角度的QoS分级控制策略,由于仅依靠响应时间这样的单一性能指标对服务进行分级,无法对具有相同响应时间的服务加以区分;基于收益优化角度的QoS分级控制策略,由于该策略所需要的收益值和惩罚值等均是人为设定,以这样的指标作为服务分级的关键因素导致了QoS分级控制的实现效果将大幅的受到主观因素影响;基于资源优化角度的QoS分级控制策略,虽然能够减少QoS分级控制过程中的能源消耗,但无法同时兼顾资源节约与性能提升这两个方面。However, with the increasingly widespread application of SOA and the continuous development of Web service research, the limitations of the service container processing capacity optimization method based on a single QoS hierarchical control strategy are becoming more and more obvious. For example, the QoS hierarchical control strategy based on performance optimization, Since the service is graded only by a single performance index such as response time, it is impossible to distinguish services with the same response time; the QoS classification control strategy based on the revenue optimization perspective, because the revenue value and penalty value required by this strategy are both Artificial setting, using such indicators as the key factors of service classification leads to the realization effect of QoS hierarchical control will be greatly affected by subjective factors; QoS hierarchical control strategy based on resource optimization can reduce the energy consumption in the process of QoS hierarchical control consumption, but it is impossible to take into account both resource conservation and performance improvement at the same time.

发明内容Contents of the invention

本发明提供一种Web服务QoS分级控制方法及Web服务容器,用以解决现有技术中基于单一QoS分级控制策略的服务容器处理能力优化方法的局限性越来越明显的问题。The present invention provides a Web service QoS hierarchical control method and a Web service container, which are used to solve the problem in the prior art that the limitation of the service container processing capability optimization method based on a single QoS hierarchical control strategy becomes more and more obvious.

本发明提供一种Web服务QoS分级控制方法,包括:The present invention provides a Web service QoS hierarchical control method, including:

接收用户发送的服务请求;Receive service requests sent by users;

确定在各QoS分级控制策略下,为服务分配的资源数量;Determine the number of resources allocated for services under each QoS hierarchical control strategy;

确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;Determine the first resource weight obtained by the service under each QoS hierarchical control strategy, where the first resource weight is the ratio of the number of resources to the total amount of resources;

确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;Determining a second resource weight obtained by the service, where the second resource weight is a weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control policy on the service;

根据所述第二资源权值对所述服务进行QoS分级控制。Perform hierarchical QoS control on the service according to the second resource weight.

本发明还提供一种Web服务容器,包括:The present invention also provides a Web service container, including:

接收模块,用于接收用户发送的服务请求;The receiving module is used to receive the service request sent by the user;

确定模块,用于确定在各QoS分级控制策略下,为服务分配的资源数量;确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;A determining module, configured to determine the amount of resources allocated for the service under each QoS hierarchical control strategy; determine the first resource weight value obtained by the service under each QoS hierarchical control strategy, and the first resource weight value is determined by The ratio of the number of resources to the total amount of resources; determine the second resource weight obtained by the service, and the second resource weight is the proportion of the impact of the first resource weight and each QoS hierarchical control strategy on the service The weighted sum of;

控制模块,用于根据所述第二资源权值对所述服务进行QoS分级控制。A control module, configured to perform QoS hierarchical control on the service according to the second resource weight.

本发明首先确定在各QoS分级控制策略下,为服务分配的资源数量,并确定在各QoS分级控制策略下,所述第一资源权值为所述资源数量与资源总量的比值,然后确定所述服务获得的第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和,最后根据所述第二资源权值对所述服务进行QoS分级控制。这样使得该方案支持多种QoS分级控制策略,并能够根据不同的应用需求使用不同的QoS分级控制策略,有效地优化了服务容器的处理能力,保证了服务质量。The present invention firstly determines the resource quantity allocated for the service under each QoS hierarchical control strategy, and determines that under each QoS hierarchical control strategy, the first resource weight is the ratio of the resource quantity to the total amount of resources, and then determines The second resource weight obtained by the service is the weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control policy on the service, and finally QoS is performed on the service according to the second resource weight Hierarchical control. In this way, the solution supports multiple QoS hierarchical control strategies, and can use different QoS hierarchical control strategies according to different application requirements, effectively optimizing the processing capacity of the service container and ensuring the quality of service.

附图说明Description of drawings

图1为本发明提供的Web服务QoS分级控制方法实施例一流程示意图;Fig. 1 is a schematic flow chart of Embodiment 1 of the Web service QoS hierarchical control method provided by the present invention;

图2为本发明提供的Web服务QoS分级控制方法实施例二流程示意图;FIG. 2 is a schematic flow chart of Embodiment 2 of the Web service QoS hierarchical control method provided by the present invention;

图3为本发明提供的Web服务容器实施例结构示意图。Fig. 3 is a schematic structural diagram of an embodiment of a Web service container provided by the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

实施例一Embodiment one

如图1所示,为本发明提供的Web服务QoS分级控制方法实施例一流程示意图,具体包括如下步骤:As shown in Figure 1, it is a schematic flow chart of Embodiment 1 of the Web service QoS hierarchical control method provided by the present invention, which specifically includes the following steps:

S101、接收用户发送的服务请求;S101. Receive a service request sent by a user;

需要说明的是,本实施例的执行主体可以为Web服务容器,在Web服务容器中部署了各种服务,用户可以通过用户设备向Web服务容器发送服务请求,以得到所需的服务。It should be noted that the execution subject of this embodiment may be a Web service container, in which various services are deployed, and a user may send a service request to the Web service container through a user equipment to obtain required services.

S102、确定在各QoS分级控制策略下,为服务分配的资源数量;S102. Determine the number of resources allocated for the service under each QoS hierarchical control strategy;

需要说明的是,所述各QoS分级控制策略包含以下策略中的至少二种:性能优化策略、收益优化策略和资源优化策略,确定在各QoS分级控制策略下,为所述服务分配的资源数量,具体来说,可以在下述约束条件下,采用动态规划算法,确定为所述服务分配的资源数量;所述约束条件为:若总共部署了n个服务,C是常数,则分配给各个服务的资源数量Wi需要满足 Σ i = 1 n W i = C . It should be noted that each of the QoS hierarchical control strategies includes at least two of the following strategies: performance optimization strategy, revenue optimization strategy and resource optimization strategy, to determine the amount of resources allocated for the service under each QoS hierarchical control strategy , specifically, under the following constraint conditions, a dynamic programming algorithm can be used to determine the number of resources allocated for the service; the constraint condition is: if a total of n services are deployed, and C is a constant, then each service The resource quantity W i needs to satisfy Σ i = 1 no W i = C .

具体来说,在约束条件下,通过使用动态规划算法,计算出Web服务容器在应用每种QoS分级控制策略时,为各服务分配的资源数量,计算过程中使用的目标函数如公式(1)所示:Specifically, under the constraints Next, by using the dynamic programming algorithm, the number of resources allocated to each service by the Web service container when applying each QoS hierarchical control strategy is calculated. The objective function used in the calculation process is shown in formula (1):

Uu (( ii ,, jj )) == uu ii (( ww )) maxmax {{ Uu (( ii -- 11 ,, jj -- cc )) ++ uu ii (( cc )) }} -- -- -- (( 11 ))

其中,U(i,j)表示在计算为第i个服务分配的资源数量且总共已经分配了j个资源时,Web服务容器的处理能力。ui(c)表示为第i个服务分配c个资源时,Web服务容器对第i个服务的处理能力,W为Web服务容器资源总量。n为Web服务容器中部署的服务数量。上述公式中的动态规划算法的目标函数对于不同的QoS分级控制策略是通用的。但不同的QoS分级控制策略在应用公式(1)时,ui(c)函数有所不同。此外,由于公式(1)中的动态规划算法是以最大化取值为目标的,在处理以最小化取值为目标的策略时,需要对ui(c)的函数取值取倒数后扩大倍数,如在资源优化策略中,QoS分级控制策略是以最小化资源消耗为目标的,在计算U(i,j)时可以将ui(c)的值取倒数后乘以100000。以QoS分级控制策略同时包含性能优化策略、收益优化策略和资源优化策略为例,通过使用上述动态规划算法分别计算出在性能优化策略下为所述服务分配的资源数量、在收益优化策略下为所述服务分配的资源数量以及在资源优化策略下为所述服务分配的资源数量。另外,对于同一个Web服务容器,在部署同样服务的情况下,应用不同QoS分级控制策略时Web服务容器能够分配的资源数量是相同的。Among them, U(i,j) represents the processing capability of the Web service container when calculating the number of resources allocated for the i-th service and a total of j resources have been allocated. u i (c) represents the processing capability of the Web service container for the i-th service when c resources are allocated to the i-th service, and W is the total amount of Web service container resources. n is the number of services deployed in the web service container. The objective function of the dynamic programming algorithm in the above formula is common to different QoS hierarchical control strategies. However, different QoS hierarchical control strategies have different u i (c) functions when formula (1) is applied. In addition, since the dynamic programming algorithm in formula (1) is aimed at maximizing the value, when dealing with the strategy aiming at minimizing the value, it is necessary to take the reciprocal of the function value of u i (c) and expand Multiple, such as in the resource optimization strategy, the QoS hierarchical control strategy is aimed at minimizing resource consumption. When calculating U(i,j), the value of u i (c) can be reciprocated and multiplied by 100000. Taking the QoS hierarchical control strategy including performance optimization strategy, revenue optimization strategy and resource optimization strategy as an example, the number of resources allocated for the service under the performance optimization strategy is calculated by using the above dynamic programming algorithm, and under the revenue optimization strategy is The resource quantity allocated to the service and the resource quantity allocated to the service under the resource optimization strategy. In addition, for the same Web service container, in the case of deploying the same service, the amount of resources that the Web service container can allocate is the same when different QoS hierarchical control policies are applied.

S103、确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;S103. Determine the first resource weight obtained by the service under each QoS hierarchical control strategy, where the first resource weight is a ratio of the resource quantity to the total resource quantity;

需要说明的是,所述资源总量为常量,可以设定为部署服务的总数乘以服务优先级队列中元素的总数。具体来说,Web服务容器中能够分配的资源总量可以用Web服务容器中部署的服务数量衡量,表示为:W=n×K。It should be noted that the total amount of resources is a constant, which can be set as the total number of deployed services multiplied by the total number of elements in the service priority queue. Specifically, the total amount of resources that can be allocated in the Web service container can be measured by the number of services deployed in the Web service container, expressed as: W=n×K.

其中,W表示能够分配的资源总量;n是Web服务容器中部署的服务数量;K是一个常数,当使用优先级队列实现QoS分级控制时,建议设置K值为优先级的数量。同样以QoS分级控制策略同时包含性能优化策略、收益优化策略和资源优化策略为例,计算出在性能优化策略下服务获得的第一资源权值为在性能优化策略下为所述服务分配的资源数量与资源总量的比值与资源总量的比值、在收益优化策略下服务获得的第一资源权值为在收益优化策略下为所述服务分配的资源数量与资源总量的比值以及在资源优化策略下服务获得的第一资源权值为在资源优化策略下为所述服务分配的资源数量与资源总量的比值。Among them, W represents the total amount of resources that can be allocated; n is the number of services deployed in the Web service container; K is a constant. When using priority queues to implement QoS hierarchical control, it is recommended to set K as the number of priorities. Taking the QoS hierarchical control strategy as an example that includes performance optimization strategy, revenue optimization strategy, and resource optimization strategy at the same time, it is calculated that the first resource weight obtained by a service under the performance optimization strategy is the resource allocated for the service under the performance optimization strategy The ratio of the quantity to the total amount of resources and the ratio of the total amount of resources, the first resource weight obtained by the service under the revenue optimization strategy is the ratio of the number of resources allocated to the service under the revenue optimization strategy to the total amount of resources and the resource The first resource weight obtained by the service under the optimization strategy is the ratio of the amount of resources allocated to the service under the resource optimization strategy to the total amount of resources.

S104、确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;S104. Determine a second resource weight obtained by the service, where the second resource weight is a weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control policy on the service;

需要说明的是,对于同一种服务,不同QoS分级控制策略的影响比重之和为1,同样以QoS分级控制策略同时包含性能优化策略、收益优化策略和资源优化策略为例,假设性能优化策略对所述服务的影响比重为q1、收益优化策略对所述服务的影响比重为q2、资源优化策略对所述服务的影响比重为q3,则q1+q2+q3=1,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和,假设在性能优化策略下服务获得的第一资源权值为w1、在收益优化策略下服务获得的第一资源权值为w2、在资源优化策略下服务获得的第一资源权值为w3,则该服务所对应的第二资源权值为w1×q1+w2×q2+w3×q3。It should be noted that for the same service, the sum of the impact ratios of different QoS hierarchical control strategies is 1. Also, taking the QoS hierarchical control strategy including performance optimization strategy, revenue optimization strategy and resource optimization strategy as an example, assuming that the performance optimization strategy has a significant impact on The influence proportion of the service is q1, the influence proportion of the revenue optimization strategy on the service is q2, and the influence proportion of the resource optimization strategy on the service is q3, then q1+q2+q3=1, and the second resource right The value is the weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control strategy on the service, assuming that the first resource weight obtained by the service under the performance optimization strategy is w1, and the service obtains under the revenue optimization strategy The first resource weight of the service is w2, and the first resource weight obtained by the service under the resource optimization strategy is w3, then the second resource weight corresponding to the service is w1×q1+w2×q2+w3×q3.

另外,如果在用户发送的服务请求中包含预设响应时间,若确定所述服务的平均响应时间超过所述预设响应时间,则确定所述服务获得的第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和乘以2,即为(w1×q1+w2×q2+w3×q3)×2。其中,服务响应时间是从服务请求被接收起到服务被执行并返回结果的时间间隔。服务的平均响应时间通过计算该服务每次调用的响应时间平均值取得。对于服务i,若Web服务容器成功处理了mi个对该服务的请求,每次请求的响应时间为tsi,则该服务的平均响应时间Ti采用下述公式(2)来计算:In addition, if the service request sent by the user includes a preset response time, if it is determined that the average response time of the service exceeds the preset response time, then it is determined that the second resource weight obtained by the service is the first The weighted sum of the resource weight and the proportion of impact of each QoS hierarchical control strategy on the service is multiplied by 2, which is (w1×q1+w2×q2+w3×q3)×2. Wherein, the service response time is the time interval from when the service request is received to when the service is executed and the result is returned. The average response time of a service is obtained by calculating the average response time of each invocation of the service. For service i, if the Web service container has successfully processed m i requests for the service, and the response time of each request is t si , then the average response time T i of the service is calculated using the following formula (2):

TT ii == ΣΣ sithe si == 11 mm ii tt sithe si -- -- -- (( 22 ))

或者,如果在用户发送的服务请求中包含预设QoS满足率,若确定若所述服务的实际QoS满足率小于所述预设QoS满足率,则确定所述服务获得的第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和乘以2,即为(w1×q1+w2×q2+w3×q3)×2。其中,Web服务的服务QoS满足率通过统计在服务调用过程中,服务成功执行并满足服务QoS需求的服务调用的百分比来衡量。对于服务i,若Web服务容器处理了mi次对该服务的请求,其中ki次成功执行并满足该服务约定的QoS需求,则该服务的QoS满足率Ri采用下述公式(3)来计算:Or, if the service request sent by the user includes a preset QoS satisfaction rate, if it is determined that the actual QoS satisfaction rate of the service is less than the preset QoS satisfaction rate, then determine that the second resource weight obtained by the service is The weighted sum of the first resource weight and the proportion of influence of each QoS hierarchical control policy on the service is multiplied by 2, which is (w1×q1+w2×q2+w3×q3)×2. Wherein, the service QoS satisfaction rate of the Web service is measured by counting the percentage of service calls that are successfully executed and meet the service QoS requirements during the service call process. For service i, if the Web service container has processed m i requests for the service, among which k i requests are successfully executed and meet the agreed QoS requirements of the service, then the QoS satisfaction rate R i of the service uses the following formula (3) to calculate:

RR ii == kk ii mm ii -- -- -- (( 33 ))

或者,如果在用户发送的服务请求中包含预设响应时间和预设QoS满足率,若确定所述服务的平均响应时间超过所述预设响应时间且所述服务的实际QoS满足率小于所述预设QoS满足率,则确定所述服务获得的第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和乘以2,即为(w1×q1+w2×q2+w3×q3)×2。Or, if the service request sent by the user includes the preset response time and the preset QoS satisfaction rate, if it is determined that the average response time of the service exceeds the preset response time and the actual QoS satisfaction rate of the service is less than the If the QoS satisfaction rate is preset, then it is determined that the second resource weight obtained by the service is the weighted sum of the first resource weight and the impact of each QoS hierarchical control strategy on the service multiplied by 2, which is (w1 ×q1+w2×q2+w3×q3)×2.

S105、根据所述第二资源权值对所述服务进行QoS分级控制。S105. Perform hierarchical QoS control on the service according to the second resource weight.

具体来说,可以根据所述第二资源权值确定所述服务的优先级顺序,根据所述服务的优先级顺序完成所述服务对应的操作,即将所述第二资源权值作为QoS分级控制策略的控制参数,使用该控制参数对所述服务进行QoS分级控制,完成所述服务对应的操作,并将结果返回给用户。Specifically, the priority order of the services may be determined according to the second resource weight, and the operation corresponding to the service may be completed according to the priority order of the services, that is, the second resource weight may be used as a QoS hierarchical control The control parameter of the policy, using the control parameter to perform QoS hierarchical control on the service, complete the operation corresponding to the service, and return the result to the user.

本实施例通过确定在各QoS分级控制策略下,为服务分配的资源数量,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值,确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和,根据所述第二资源权值对所述服务进行QoS分级控制。这样使得该方案支持多种QoS分级控制策略,能够根据不同的应用需求使用不同的QoS分级控制策略,有效地优化了Web服务容器的处理能力,保证了服务质量。In this embodiment, by determining the number of resources allocated to the service under each QoS hierarchical control policy, the first resource weight obtained by the service, the first resource weight is the ratio of the number of resources to the total amount of resources, Determine the second resource weight obtained by the service, where the second resource weight is the weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control policy on the service, according to the second resource The weight performs QoS hierarchical control on the service. In this way, the solution supports multiple QoS hierarchical control strategies, and can use different QoS hierarchical control strategies according to different application requirements, effectively optimizing the processing capacity of the Web service container and ensuring the quality of service.

实施例二Embodiment two

如图2所示,为本发明实提供的Web服务QoS分级控制方法实施例二流程示意图,本实施例在上述实施例一的基础上,在所述确定所述服务获得的第二资源权值之后,进一步增加了对所述服务获得的第二资源权值进行归一化处理。具体包括如下步骤:As shown in FIG. 2 , it is a schematic flow chart of Embodiment 2 of the Web service QoS hierarchical control method provided by the present invention. On the basis of the above Embodiment 1, this embodiment determines the second resource weight obtained by the service. Afterwards, the normalization processing of the second resource weight obtained by the service is further added. Specifically include the following steps:

S201、接收用户发送的服务请求;S201. Receive a service request sent by a user;

S202、确定在各QoS分级控制策略下,为服务分配的资源数量;S202. Determine the number of resources allocated for the service under each QoS hierarchical control strategy;

S203、确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;S203. Determine the first resource weight obtained by the service under each QoS hierarchical control strategy, where the first resource weight is a ratio of the resource quantity to the total resource quantity;

S204、确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;S204. Determine a second resource weight obtained by the service, where the second resource weight is a weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control policy on the service;

S205、对所述服务获得的第二资源权值进行归一化处理,得到所述服务的归一化资源权值;S205. Perform normalization processing on the second resource weight obtained by the service to obtain a normalized resource weight of the service;

具体来说,所述服务的归一化资源权值可以采用如下公式(4)来计算:Specifically, the normalized resource weight of the service may be calculated using the following formula (4):

WW ii ′′ ′′ == WW ii ′′ ΣΣ ii == 11 ii == nno WW ii ′′ -- -- -- (( 44 ))

其中,Wi″为第i种服务所获得的归一化资源权值,Wi'为第i种服务所获得的第二资源权值,是未归一化的第二资源权值;n为Web服务容器中部署的服务数量。Among them, W i ″ is the normalized resource weight obtained by the i-th service, and W i ' is the second resource weight obtained by the i-th service, which is an unnormalized second resource weight; n The number of services deployed in the web service container.

S206、根据所述服务的归一化资源权值对所述服务进行QoS分级控制。S206. Perform QoS hierarchical control on the service according to the normalized resource weight of the service.

对Web服务容器中各服务第二资源权值进行归一化,得到Web服务容器中所述服务所获得的归一化资源权值,根据所述服务的归一化资源权值对所述服务进行QoS分级控制。具体来说,可以根据所述服务的归一化资源权值确定所述服务的优先级顺序,根据所述服务的优先级顺序完成所述服务对应的操作,即将所述服务的归一化资源权值作为QoS分级控制策略的控制参数,使用该控制参数对所述服务进行QoS分级控制,完成所述服务对应的操作,并将结果返回给用户。Normalize the second resource weights of each service in the Web service container to obtain the normalized resource weights obtained by the services in the Web service container, and calculate the normalized resource weights of the services according to the normalized resource weights of the services Perform hierarchical QoS control. Specifically, the priority order of the service may be determined according to the normalized resource weight of the service, and the operation corresponding to the service may be completed according to the priority order of the service, that is, the normalized resource weight of the service The weight is used as a control parameter of the QoS hierarchical control strategy, and the control parameter is used to perform QoS hierarchical control on the service, complete the operation corresponding to the service, and return the result to the user.

另外,对于本实施例中步骤S201~步骤S204的详细描述参见实施例1中相关步骤的描述,这里不再累述。In addition, for the detailed description of steps S201 to S204 in this embodiment, refer to the description of the relevant steps in Embodiment 1, which will not be repeated here.

本实施例通过确定在各QoS分级控制策略下,为服务分配的资源数量,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值,确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和,并且将所述第二资源权值进行归一化,根据归一化后的资源权值对所述服务进行QoS分级控制。这样使得该方案支持多种QoS分级控制策略,能够根据不同的应用需求使用不同的QoS分级控制策略,有效地优化了Web服务容器的处理能力,保证了服务质量。In this embodiment, by determining the number of resources allocated to the service under each QoS hierarchical control policy, the first resource weight obtained by the service, the first resource weight is the ratio of the number of resources to the total amount of resources, Determining a second resource weight obtained by the service, where the second resource weight is the weighted sum of the first resource weight and the proportion of impact of each QoS hierarchical control policy on the service, and calculating the second The resource weight is normalized, and QoS hierarchical control is performed on the service according to the normalized resource weight. In this way, the solution supports multiple QoS hierarchical control strategies, and can use different QoS hierarchical control strategies according to different application requirements, effectively optimizing the processing capacity of the Web service container and ensuring the quality of service.

实施例三Embodiment Three

如图3所示,为本发明提供的Web服务容器实施例结构示意图,具体结构如下:接收模块301、确定模块302、控制模块303和归一化模块304。As shown in FIG. 3 , it is a schematic structural diagram of an embodiment of a Web service container provided by the present invention. The specific structure is as follows: a receiving module 301 , a determining module 302 , a controlling module 303 and a normalizing module 304 .

其中,接收模块301,用于接收用户发送的服务请求;Wherein, the receiving module 301 is used to receive the service request sent by the user;

确定模块302,用于确定在各QoS分级控制策略下,为服务分配的资源数量;确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;The determining module 302 is configured to determine the amount of resources allocated for the service under each QoS hierarchical control strategy; determine the first resource weight obtained by the service under each QoS hierarchical control strategy, and the first resource weight is The ratio of the number of resources to the total amount of resources; determine the second resource weight obtained by the service, and the second resource weight is the impact of the first resource weight and each QoS hierarchical control strategy on the service weighted sum of proportions;

控制模块303,用于根据所述第二资源权值对所述服务进行QoS分级控制。The control module 303 is configured to perform QoS hierarchical control on the service according to the second resource weight.

进一步地,所述各QoS分级控制策略包含以下策略中的至少二种:性能优化策略、收益优化策略和资源优化策略。Further, each QoS hierarchical control strategy includes at least two of the following strategies: performance optimization strategy, revenue optimization strategy and resource optimization strategy.

进一步地,所述确定模块302,具体用于在约束条件下,采用动态规划算法,确定为所述服务分配的资源数量;所述约束条件为:若总共部署了n个服务,C是常数,则分配给各个服务的资源数量Wi需要满足 Further, the determining module 302 is specifically configured to use a dynamic programming algorithm to determine the number of resources allocated for the service under constraints; the constraints are: if a total of n services are deployed, C is a constant, Then the resource quantity Wi allocated to each service needs to satisfy

进一步地,所述资源总量为部署服务的总数乘以服务优先级队列中元素的总数。Further, the total amount of resources is the total number of deployed services multiplied by the total number of elements in the service priority queue.

进一步地,所述服务请求中包含预设响应时间和/或预设QoS满足率;Further, the service request includes a preset response time and/or a preset QoS satisfaction rate;

相应的,所述确定模块,具体用于若所述服务的平均响应时间超过所述预设响应时间,和/或若所述服务的实际QoS满足率小于所述预设QoS满足率,则确定所述服务获得的第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和乘以2。Correspondingly, the determining module is specifically configured to determine if the average response time of the service exceeds the preset response time, and/or if the actual QoS satisfaction rate of the service is less than the preset QoS satisfaction rate The second resource weight obtained by the service is a weighted sum of the first resource weight and the impact proportion of each QoS hierarchical control policy on the service multiplied by 2.

进一步地,所述Web服务容器,还包括:Further, the Web service container also includes:

归一化模块304,用于在所述确定所述服务获得的第二资源权值之后,对所述服务获得的第二资源权值进行归一化处理,得到所述服务的归一化资源权值;A normalization module 304, configured to perform normalization processing on the second resource weight obtained by the service after the determination of the second resource weight obtained by the service, to obtain a normalized resource of the service Weight;

相应的,所述控制模块303,具体用于根据所述服务的归一化资源权值对所述服务进行QoS分级控制。Correspondingly, the control module 303 is specifically configured to perform QoS hierarchical control on the service according to the normalized resource weight of the service.

进一步地,所述控制模块303,具体用于根据所述第二资源权值确定所述服务的优先级顺序;根据所述服务的优先级顺序完成所述服务对应的操作,并将结果返回给用户。Further, the control module 303 is specifically configured to determine the priority order of the service according to the second resource weight; complete the operation corresponding to the service according to the priority order of the service, and return the result to user.

本实施例所述的Web服务容器用于执行实施例一和实施例二所述的方法步骤,其技术原理和产生的技术效果类似,这里不再累述。The Web service container described in this embodiment is used to execute the method steps described in Embodiment 1 and Embodiment 2, and its technical principles and technical effects are similar and will not be repeated here.

需要说明的是:对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because of the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (10)

1.一种Web服务QoS分级控制方法,其特征在于,包括:1. A Web service QoS hierarchical control method, characterized in that, comprising: 接收用户发送的服务请求;Receive service requests sent by users; 确定在各QoS分级控制策略下,为服务分配的资源数量;Determine the number of resources allocated for services under each QoS hierarchical control strategy; 确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;Determine the first resource weight obtained by the service under each QoS hierarchical control strategy, where the first resource weight is the ratio of the number of resources to the total amount of resources; 确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;Determining a second resource weight obtained by the service, where the second resource weight is a weighted sum of the first resource weight and the impact ratio of each QoS hierarchical control policy on the service; 根据所述第二资源权值对所述服务进行QoS分级控制。Perform hierarchical QoS control on the service according to the second resource weight. 2.根据权利要求1所述的方法,其特征在于,所述各QoS分级控制策略包含以下策略中的至少二种:性能优化策略、收益优化策略和资源优化策略。2. The method according to claim 1, wherein each QoS hierarchical control strategy includes at least two of the following strategies: performance optimization strategy, revenue optimization strategy and resource optimization strategy. 3.根据权利要求1或2所述的方法,其特征在于,所述确定在各QoS分级控制策略下,为所述服务分配的资源数量,包括:3. The method according to claim 1 or 2, wherein the determining the amount of resources allocated for the service under each QoS hierarchical control strategy includes: 在约束条件下,采用动态规划算法,确定为所述服务分配的资源数量;Under the constraints, using a dynamic programming algorithm to determine the amount of resources allocated for the service; 所述约束条件为:若总共部署了n个服务,C是常数,则分配给各个服务的资源数量Wi需要满足 The constraint condition is: if a total of n services are deployed and C is a constant, the resource quantity W i allocated to each service needs to satisfy 4.根据权利要求1或2所述的方法,其特征在于,在所述确定所述服务获得的第二资源权值之后,还包括:4. The method according to claim 1 or 2, further comprising: after said determining the second resource weight obtained by said service: 对所述服务获得的第二资源权值进行归一化处理,得到所述服务的归一化资源权值;performing normalization processing on the second resource weight obtained by the service to obtain the normalized resource weight of the service; 相应的,所述根据所述第二资源权值对所述服务进行QoS分级控制,包括:Correspondingly, performing QoS hierarchical control on the service according to the second resource weight includes: 根据所述服务的归一化资源权值对所述服务进行QoS分级控制。Perform QoS hierarchical control on the service according to the normalized resource weight of the service. 5.根据权利要求1或2所述的方法,其特征在于,所述根据所述第二资源权值对所述服务进行QoS分级控制,包括:5. The method according to claim 1 or 2, wherein the performing QoS hierarchical control on the service according to the second resource weight comprises: 根据所述第二资源权值确定所述服务的优先级顺序;determining the priority order of the services according to the second resource weight; 根据所述服务的优先级顺序完成所述服务对应的操作,并将结果返回给用户。The operations corresponding to the services are completed according to the priority order of the services, and the results are returned to the user. 6.一种Web服务容器,其特征在于,包括:6. A web service container, characterized in that it comprises: 接收模块,用于接收用户发送的服务请求;The receiving module is used to receive the service request sent by the user; 确定模块,用于确定在各QoS分级控制策略下,为服务分配的资源数量;确定在各QoS分级控制策略下,所述服务获得的第一资源权值,所述第一资源权值为所述资源数量与资源总量的比值;确定所述服务获得的第二资源权值,所述第二资源权值为所述第一资源权值与各QoS分级控制策略对所述服务的影响比重的加权和;A determining module, configured to determine the amount of resources allocated for the service under each QoS hierarchical control strategy; determine the first resource weight value obtained by the service under each QoS hierarchical control strategy, and the first resource weight value is determined by The ratio of the number of resources to the total amount of resources; determine the second resource weight obtained by the service, and the second resource weight is the proportion of the impact of the first resource weight and each QoS hierarchical control strategy on the service weighted sum of 控制模块,用于根据所述第二资源权值对所述服务进行QoS分级控制。A control module, configured to perform QoS hierarchical control on the service according to the second resource weight. 7.根据权利要求6所述的Web服务容器,其特征在于,所述各QoS分级控制策略包含以下策略中的至少二种:性能优化策略、收益优化策略和资源优化策略。7. The Web service container according to claim 6, wherein each QoS hierarchical control strategy includes at least two of the following strategies: performance optimization strategy, revenue optimization strategy and resource optimization strategy. 8.根据权利要求6或7所述的Web服务容器,其特征在于,所述确定模块,具体用于在约束条件下,采用动态规划算法,确定为所述服务分配的资源数量;所述约束条件为:若总共部署了n个服务,C是常数,则分配给各个服务的资源数量Wi需要满足 8. The Web service container according to claim 6 or 7, wherein the determining module is specifically configured to use a dynamic programming algorithm to determine the number of resources allocated for the service under constraints; the constraints The condition is: if a total of n services are deployed and C is a constant, the resource quantity W i allocated to each service needs to satisfy 9.根据权利要求6或7所述的Web服务容器,其特征在于,还包括:9. The Web service container according to claim 6 or 7, further comprising: 归一化模块,用于在所述确定所述服务获得的第二资源权值之后,对所述服务获得的第二资源权值进行归一化处理,得到所述服务的归一化资源权值;A normalization module, configured to perform normalization processing on the second resource weight obtained by the service after the determination of the second resource weight obtained by the service, to obtain the normalized resource weight of the service value; 相应的,所述控制模块,具体用于根据所述服务的归一化资源权值对所述服务进行QoS分级控制。Correspondingly, the control module is specifically configured to perform QoS hierarchical control on the service according to the normalized resource weight of the service. 10.根据权利要求6或7所述的Web服务容器,其特征在于,所述控制模块,具体用于根据所述第二资源权值确定所述服务的优先级顺序;根据所述服务的优先级顺序完成所述服务对应的操作,并将结果返回给用户。10. The Web service container according to claim 6 or 7, wherein the control module is specifically configured to determine the priority order of the services according to the second resource weight value; The corresponding operations of the service are completed in sequence, and the results are returned to the user.
CN201410205478.8A 2014-05-15 2014-05-15 Web service QoS step control method and Web service container Pending CN104022970A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410205478.8A CN104022970A (en) 2014-05-15 2014-05-15 Web service QoS step control method and Web service container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410205478.8A CN104022970A (en) 2014-05-15 2014-05-15 Web service QoS step control method and Web service container

Publications (1)

Publication Number Publication Date
CN104022970A true CN104022970A (en) 2014-09-03

Family

ID=51439543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410205478.8A Pending CN104022970A (en) 2014-05-15 2014-05-15 Web service QoS step control method and Web service container

Country Status (1)

Country Link
CN (1) CN104022970A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033369A1 (en) * 2001-08-09 2003-02-13 Bernhard Benjamin Karb Donovan Web services container
CN1523844A (en) * 2003-02-20 2004-08-25 国际商业机器公司 Method and system for creating service instance in computational grid
CN1805365A (en) * 2005-01-12 2006-07-19 北京航空航天大学 Web service QoS processor and handling method
US20070263650A1 (en) * 2006-05-09 2007-11-15 Srivatsa Sivan Subramania Method for prioritizing web service requests
CN101369976A (en) * 2008-09-27 2009-02-18 上海华为技术有限公司 Multi-service quality graded access control method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033369A1 (en) * 2001-08-09 2003-02-13 Bernhard Benjamin Karb Donovan Web services container
CN1523844A (en) * 2003-02-20 2004-08-25 国际商业机器公司 Method and system for creating service instance in computational grid
CN1805365A (en) * 2005-01-12 2006-07-19 北京航空航天大学 Web service QoS processor and handling method
US20070263650A1 (en) * 2006-05-09 2007-11-15 Srivatsa Sivan Subramania Method for prioritizing web service requests
CN101369976A (en) * 2008-09-27 2009-02-18 上海华为技术有限公司 Multi-service quality graded access control method, apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHE WANG等: "A Web Services Container Supporting QoS Hierarchical Control with Multiple Measurements for Utilization", 《DEPENDABLE,AUTONOMIC AND SECURE COMPUTING(DASC),2013 IEEE 11TH INTERNATIONAL CONFERENCE ON》 *

Similar Documents

Publication Publication Date Title
US9218213B2 (en) Dynamic placement of heterogeneous workloads
CN106793133A (en) The dispatching method of multi-service QoS is ensured in a kind of electric power wireless communication system
Kim et al. Dynamic bandwidth provisioning using ARIMA-based traffic forecasting for Mobile WiMAX
CN109002358A (en) Mobile terminal software adaptive optimization dispatching method based on deeply study
CN111176840B (en) Distributed task allocation optimization method and device, storage medium and electronic device
CN108345501A (en) A kind of distributed resource scheduling method and system
CN103699445A (en) Task scheduling method, device and system
CN111614754B (en) A Dynamic Adaptive Task Scheduling Method for Cost Efficiency Optimization for Fog Computing
CN104023042B (en) Cloud platform resource scheduling method
CN110602747A (en) Method for scheduling wide-band and narrow-band mixed service channel resources of power wireless communication system
CN108428051B (en) MapReduce job scheduling method and device facing big data platform and based on maximized benefits
CN105846885A (en) GEO satellite channel distribution strategy based on flow prediction
CN103078914B (en) Service providing method and device
CN105373426A (en) Method for memory ware real-time job scheduling of car networking based on Hadoop
CN104811467B (en) The data processing method of aggreggate utility
CN103455375A (en) Load-monitoring-based hybrid scheduling method under Hadoop cloud platform
Bensalem et al. Scaling serverless functions in edge networks: A reinforcement learning approach
CN118803859A (en) A wireless network resource scheduling method, device, medium and product
CN111611076B (en) Fair distribution method for mobile edge computing shared resources under task deployment constraint
CN104378412A (en) Dynamic load balancing method taking user periodical resource demand into account in cloud environment
CN118535304A (en) O-RAN-oriented multi-stage heterogeneous resource scheduling method
CN104811466B (en) The method and device of cloud media resource allocation
CN106407007B (en) Cloud resource configuration optimization method for elastic analysis process
CN110012507B (en) Internet of vehicles resource allocation method and system with priority of user experience
CN107528914B (en) Resource requisition scheduling method for data fragmentation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Zhao Yongwang

Inventor after: Ma Dianfu

Inventor after: Li Songyang

Inventor after: Zeng Hao

Inventor before: Zhao Yongwang

Inventor before: Ma Dianfu

Inventor before: Li Gaoyang

Inventor before: Zeng Hao

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: ZHAO YONGWANG MA DIANFU LI HAOYANG CENG HAO TO: ZHAO YONGWANG MA DIANFU LI SONGYANG CENG HAO

WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140903

WD01 Invention patent application deemed withdrawn after publication