CN102857571B - Combined service simulation method and device thereof - Google Patents
Combined service simulation method and device thereof Download PDFInfo
- Publication number
- CN102857571B CN102857571B CN201210340202.1A CN201210340202A CN102857571B CN 102857571 B CN102857571 B CN 102857571B CN 201210340202 A CN201210340202 A CN 201210340202A CN 102857571 B CN102857571 B CN 102857571B
- Authority
- CN
- China
- Prior art keywords
- function execution
- simulation
- node
- service
- execution node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明提供一种组合服务仿真方法及装置,所述方法包括:获取组合服务流程模型,组合服务流程模型中包括至少两个功能执行节点和至少两个功能执行节点的交互方式;根据组合服务流程模型中各功能执行节点的功能指标生成各功能执行节点对应的仿真原子服务集;按照预设的算法从各功能执行节点对应的仿真原子服务集中确定本次仿真中与各功能执行节点对应的仿真原子服务;根据组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务;输出仿真执行结果。本发明通过仿真执行组合服务,降低了组合服务正式执行的错误率,进而降低了组合服务的花销。
The present invention provides a combined service simulation method and device. The method includes: obtaining a combined service process model, which includes at least two function execution nodes and interaction modes of at least two function execution nodes; according to the combined service process The function indicators of each function execution node in the model generate the simulation atomic service set corresponding to each function execution node; determine the simulation corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to the preset algorithm Atomic service: Execute the simulation atomic service corresponding to each function execution node according to the interaction mode of at least two function execution nodes in the combined service process model; output the simulation execution result. The invention reduces the error rate of the formal execution of the combined service by simulating and executing the combined service, thereby reducing the cost of the combined service.
Description
技术领域 technical field
本发明涉及WEB应用技术,尤其涉及一种组合服务仿真方法及装置。The invention relates to WEB application technology, in particular to a combined service simulation method and device.
背景技术 Background technique
近年来,随着信息技术和互联网的飞速发展,社会各部门信息化程度越来越高,因此,Web服务提出了一种面向服务的分布式计算模型,即组合服务。组合服务是将多个服务组合为一个新服务的过程,以增加服务的功能和性能。如果已知组合的目标、相关服务及其交互方式,则只需要找到对应的服务,建立相应的组合脚本并执行。In recent years, with the rapid development of information technology and the Internet, the degree of informatization in various sectors of society is getting higher and higher. Therefore, Web services propose a service-oriented distributed computing model, namely composite services. Composing services is the process of combining multiple services into a new service to increase the functionality and performance of the service. If the combined target, related services and their interaction methods are known, you only need to find the corresponding service, create and execute the corresponding combined script.
但是,多个服务组合起来之后很难发现这个组合服务在实际执行过程中所存在的瓶颈,可能会在执行了很多次之后才发现组合服务的效果不如人意,然后再进行修改,这样就会导致时间和花销的浪费。However, after multiple services are combined, it is difficult to find the bottleneck in the actual execution process of the combined service. It may be found that the effect of the combined service is not satisfactory after many times of execution, and then modified, which will lead to Waste of time and money.
发明内容 Contents of the invention
本发明的目的在于提供一种组合服务仿真方法及装置,以实现对组合服务的仿真。The purpose of the present invention is to provide a composite service simulation method and device to realize the simulation of composite services.
本发明的第一个方面是提供一种组合服务仿真方法,包括:The first aspect of the present invention is to provide a composite service simulation method, including:
获取组合服务流程模型,所述组合服务流程模型中包括至少两个功能执行节点和所述至少两个功能执行节点的交互方式;Acquiring a combined service process model, the combined service process model including at least two function execution nodes and the interaction modes of the at least two function execution nodes;
根据所述组合服务流程模型中各功能执行节点的功能指标生成各功能执行节点对应的仿真原子服务集;Generate a simulation atomic service set corresponding to each function execution node according to the function index of each function execution node in the combined service process model;
按照预设的算法从各功能执行节点对应的仿真原子服务集中确定本次仿真中与各功能执行节点对应的仿真原子服务;Determine the simulation atomic service corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to a preset algorithm;
根据所述组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务;Execute the simulation atomic service corresponding to each function execution node according to the interaction mode of at least two function execution nodes in the combined service process model;
输出仿真执行结果。Output the simulation execution result.
本发明的另一个方面是提供一种组合服务仿真装置,包括:Another aspect of the present invention is to provide a composite service simulation device, comprising:
接收模块,用于获取组合服务流程模型,所述组合服务流程模型中包括至少两个功能执行节点和所述至少两个功能执行节点的交互方式;A receiving module, configured to acquire a combined service process model, the combined service process model including at least two function execution nodes and an interaction mode of the at least two function execution nodes;
仿真原子服务生成模块,用于根据所述组合服务流程模型中各功能执行节点的功能指标生成各功能执行节点对应的仿真原子服务集;A simulation atomic service generation module, configured to generate a simulation atomic service set corresponding to each function execution node according to the function indicators of each function execution node in the combined service process model;
仿真原子服务选择模块,用于按照预设的算法从各功能执行节点对应的仿真原子服务集中确定本次仿真中与各功能执行节点对应的仿真原子服务;The simulation atomic service selection module is used to determine the simulation atomic service corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to a preset algorithm;
仿真执行模块,用于根据所述组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务;A simulation execution module, configured to execute the simulation atomic service corresponding to each function execution node according to the interaction mode of at least two function execution nodes in the combined service process model;
输出模块,用于输出仿真执行结果。The output module is used to output the simulation execution result.
采用上述本发明技术方案的有益效果是:根据组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务,可以清楚的知道与所述组合服务流程模型对应的组合服务的各项性能,以使用户在组合服务的性能不太理想的情况下对其进行修改,从而降低了组合服务正式运行的错误率,进而降低了组合服务的花销。The beneficial effect of adopting the above-mentioned technical solution of the present invention is: according to the interaction mode of at least two function execution nodes in the combined service process model, the simulated atomic service corresponding to each function execution node can be clearly known. Combining various performances of the service enables users to modify it when the performance of the combined service is not ideal, thereby reducing the error rate of the formal operation of the combined service, thereby reducing the cost of the combined service.
附图说明 Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明组合服务仿真方法实施例的流程图;Fig. 1 is the flow chart of the embodiment of the combined service simulation method of the present invention;
图2为本发明组合服务仿真方法中选择节点选择下游功能执行节点的实施例一的示意图;2 is a schematic diagram of Embodiment 1 in which a selection node selects a downstream function execution node in the combined service simulation method of the present invention;
图3为本发明组合服务仿真方法中选择节点选择下游功能执行节点的实施例二的示意图;3 is a schematic diagram of Embodiment 2 in which a selection node selects a downstream function execution node in the combined service simulation method of the present invention;
图4为本发明组合服务仿真装置实施例的结构示意图。Fig. 4 is a schematic structural diagram of an embodiment of a combined service simulation device according to 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.
图1为本发明组合服务仿真方法实施例的流程图,如图1所示,所述组合服务仿真方法可以包括如下步骤:Fig. 1 is a flow chart of an embodiment of the composite service simulation method of the present invention, as shown in Fig. 1, the composite service simulation method may include the following steps:
步骤101,获取组合服务流程模型,所述组合服务流程模型中包括至少两个功能执行节点和所述至少两个功能执行节点的交互方式;Step 101, obtaining a composite service process model, the composite service process model including at least two function execution nodes and the interaction modes of the at least two function execution nodes;
需要说明的是,本实施例的执行主体可以是组合服务仿真装置。所述组合服务流程模型是指用户根据预期的服务功能所构建的业务流程,包括至少两个功能执行节点和所述至少两个功能执行节点的交互方式。用户可以将系统提供的现有的业务流程直接导入到仿真装置中,也可以自定义组合服务的业务流程,例如,用户自定义组合服务的流程时可以使用基于超文本标记语言(Hypertext Markup Language 5,简称HTML5)或者可扩展开发平台Eclipse插件的可视化界面对流程进行定义,定义的过程可以是以拖拽方式进行的,也可以是其他的方式,如微软绘图软件Visio的方式,并同时给出流程中每一个功能执行节点的节点编号、每一个功能执行节点的功能指标、至少两个功能执行节点的交互方式的权重等信息。It should be noted that the execution subject of this embodiment may be a composite service simulation device. The composite service process model refers to a business process constructed by users according to expected service functions, including at least two function execution nodes and the interaction modes of the at least two function execution nodes. Users can directly import the existing business processes provided by the system into the simulation device, and can also customize the business processes of combined services. For example, users can use Hypertext Markup Language (Hypertext Markup Language 5 , referred to as HTML5) or the visual interface of the extensible development platform Eclipse plug-in to define the process. The definition process can be carried out in a drag-and-drop manner, or in other ways, such as Microsoft’s drawing software Visio, and at the same time give The node number of each function execution node in the process, the function index of each function execution node, the weight of the interaction mode of at least two function execution nodes, and other information.
步骤102,根据所述组合服务流程模型中各功能执行节点的功能指标生成各功能执行节点对应的仿真原子服务集;Step 102, generating a simulated atomic service set corresponding to each function execution node according to the function index of each function execution node in the combined service process model;
本实施例中,可以根据组合服务流程模型中各功能执行节点的功能指标分别生成与各功能执行节点的功能指标相对应的一个或多个仿真原子服务,以构成各功能执行节点对应的仿真原子服务集,所述功能执行节点的功能指标可以包括该功能执行节点的执行时间、该功能执行节点的执行耗费信息以及该功能执行节点的执行可靠性信息等。In this embodiment, one or more simulation atomic services corresponding to the function indicators of each function execution node can be generated respectively according to the function indicators of each function execution node in the combined service process model, so as to form the simulation atoms corresponding to each function execution node In the service set, the function index of the function execution node may include the execution time of the function execution node, the execution cost information of the function execution node, the execution reliability information of the function execution node, and the like.
步骤103,按照预设的算法从各功能执行节点对应的仿真原子服务集中确定本次仿真中与各功能执行节点对应的仿真原子服务;Step 103: Determine the simulation atomic service corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to a preset algorithm;
由于每个功能执行节点的功能指标所对应的仿真原子服务集中可能存在多个仿真原子服务,因此,在每次仿真前,要从每个功能执行节点中挑选一个仿真原子服务作为本次仿真的仿真原子服务。这个挑选过程可以是通过预先编写的算法进行选择,进一步的,也可以是根据用户的指令进行选择。Since there may be multiple simulation atomic services in the simulation atomic service set corresponding to the functional index of each function execution node, before each simulation, one simulation atomic service should be selected from each function execution node as the simulation atomic service for this simulation. Simulate atomic services. This selection process can be selected through a pre-written algorithm, and further, can also be selected according to a user's instruction.
步骤104,根据所述组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务;Step 104, execute the simulation atomic service corresponding to each function execution node according to the interaction mode of at least two function execution nodes in the combined service process model;
在本实施例中,所述至少两个功能执行节点的交互方式包括各功能执行节点执行的先后顺序、逻辑关系等,因此,可以按照这种交互方式执行组合服务流程模型中各功能执行节点对应的仿真原子服务,以对与所述组合服务流程模型对应的组合服务进行仿真。In this embodiment, the interaction mode of the at least two function execution nodes includes the order of execution of each function execution node, logical relationship, etc. The simulated atomic service is used to simulate the composite service corresponding to the composite service process model.
步骤105,输出仿真执行结果。Step 105, outputting the simulation execution result.
根据上述步骤对组合服务进行仿真后,还可以输出仿真执行结果,用户可以利用输出的仿真结果数据或通过统计和数据挖掘等手段评价和进一步分析该组合服务的各项性能。After the combined service is simulated according to the above steps, the simulation execution results can also be output, and the user can use the output simulation result data or use statistical and data mining methods to evaluate and further analyze the various performances of the combined service.
在上述实施例中,根据组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务,可以清楚的知道与所述组合服务流程模型对应的组合服务的各项性能,以使用户在组合服务的性能不太理想的情况下对其进行修改,从而降低了组合服务正式执行的错误率,进而降低了组合服务的花销。In the above-mentioned embodiment, the simulated atomic service corresponding to each function execution node is executed according to the interaction mode of at least two function execution nodes in the composite service process model, and the items of the composite service corresponding to the composite service process model can be clearly known Performance, so that users can modify it when the performance of the composite service is not ideal, thereby reducing the error rate of the formal execution of the composite service, thereby reducing the cost of the composite service.
具体地,在上述实施例中,所述根据所述组合服务流程模型中各功能执行节点的功能指标生成各功能执行节点对应的仿真原子服务集,可以是:Specifically, in the above embodiment, the generation of the simulated atomic service set corresponding to each function execution node according to the function indicators of each function execution node in the combined service process model may be:
根据所述功能执行节点的功能指标确定所述功能执行节点对应的仿真原子服务的属性对象、各属性对象的属性分布以及各属性对象中各参数的取值范围。在本实施例中,仿真原子服务的属性对象可以包括仿真原子服务的时间属性、耗费属性以及可靠性属性,其中,时间属性是指执行该仿真原子服务所需要花费的时间,在时间属性中,又包括执行该仿真原子服务所需要花费的时间上限值和时间下限值以及执行时间的分布情况,如可以是常数分布或正态分布等。Determine the attribute object of the simulation atomic service corresponding to the function execution node, the attribute distribution of each attribute object, and the value range of each parameter in each attribute object according to the function index of the function execution node. In this embodiment, the attribute object of the simulated atomic service may include a time attribute, a cost attribute, and a reliability attribute of the simulated atomic service, wherein the time attribute refers to the time required to execute the simulated atomic service. In the time attribute, It also includes the upper limit and lower limit of the time required to execute the simulation atomic service and the distribution of the execution time, such as constant distribution or normal distribution.
耗费属性是指执行该仿真原子服务所消耗的费用,在耗费属性中,又包括执行该仿真原子服务所消耗费用的费用上限值和费用下限值以及执行耗费的分布情况,如可以是常数分布或正态分布等。The cost attribute refers to the cost of executing the simulation atomic service. In the cost attribute, it also includes the cost upper limit and cost lower limit of the cost of executing the simulation atomic service and the distribution of execution costs. For example, it can be a constant distribution or normal distribution, etc.
可靠性属性是指执行该仿真原子服务后的可靠度,在可靠性属性中,又包括执行该仿真原子服务的可靠度的上限值和下限值以及执行可靠度分布情况,如可以是常数分布或正态分布等。The reliability attribute refers to the reliability after the execution of the simulation atomic service. The reliability attribute also includes the upper limit and lower limit of the reliability of the execution of the simulation atomic service and the distribution of the execution reliability. For example, it can be a constant distribution or normal distribution, etc.
根据仿真原子服务的属性对象、各属性对象的属性分布以及各属性对象中各参数的取值范围,随机生成包含所述属性对象且各属性对象中各参数在对应的取值范围内的至少一个仿真原子服务,以使执行所述至少一个仿真原子服务时各属性对象满足对应的属性分布。According to the attribute object of the simulation atomic service, the attribute distribution of each attribute object, and the value range of each parameter in each attribute object, randomly generate at least one that contains the attribute object and each parameter in each attribute object is within the corresponding value range Simulating the atomic service, so that each attribute object satisfies a corresponding attribute distribution when the at least one simulated atomic service is executed.
例如,当要在某功能执行节点生成大量的仿真原子服务时,可以使用与该功能执行节点对应的服务生成器来生成,服务生成器也包括时间属性、耗费属性以及可靠性属性,其中每个属性(即时间属性、耗费属性以及可靠性属性)中还分别包括参数1、参数2和分布情况,现以时间属性为例进行说明,在本实施例中,所述分布情况是指多次执行该仿真原子服务的时间分布,如以正态分布为例,则时间属性中的参数1表示多次执行该仿真原子服务的执行时间的均值,参数2表示多次执行该仿真原子服务的执行时间的方差,而时间属性中的参数1又与参数生成器PGa进行绑定,用于生成仿真原子服务时间属性的参数1,时间属性中的参数2则与参数生成器PGb进行绑定,用于生成仿真原子服务时间属性的参数2。现假设要在某功能执行节点生成三个仿真原子服务,则首先根据该功能执行节点的功能指标确定待生成的仿真原子服务的分布情况,在本实施例中以正态分布为例进行说明;然后根据该功能执行节点的功能指标分别对参数生成器PGa和参数生成器PGb指定上限值和下限值,如指定对参数生成器PGa的下限值为3、上限值为5,则表示待生成的仿真原子服务的时间属性中的参数1是在3至5的范围内;指定对参数生成器PGb的下限值为1、上限值为2时,则表示待生成的仿真原子服务的时间属性中的参数2是在1至2的范围内。若根据上述参数生成器PGa和参数生成器PGb指定的上限值和下限值分别生成三个仿真原子服务即S1、S2、S3,且参数生成器PGa生成S1、S2、S3的参数1分别为3.2、4.1、4.7,参数生成器PGb生成S1、S2、S3的参数2分别为1.1、1.3、1.7,因此,在多次执行仿真原子服务S1时,其执行时间表现为以3.2为均值,1.1为方差的正态分布,在多次执行仿真原子服务S2时,其执行时间表现为以4.1为均值,1.3为方差的正态分布,在多次执行仿真原子服务S3时,其执行时间表现为以4.7为均值,1.7为方差的正态分布。For example, when a large number of simulation atomic services are to be generated on a function execution node, the service generator corresponding to the function execution node can be used to generate them. The service generator also includes time attributes, cost attributes and reliability attributes, each of which Attributes (i.e., time attribute, cost attribute, and reliability attribute) also include parameter 1, parameter 2, and distribution respectively. The time attribute is used as an example for illustration. In this embodiment, the distribution refers to multiple executions For the time distribution of the simulation atomic service, if the normal distribution is taken as an example, parameter 1 in the time attribute indicates the average value of the execution time of the simulation atomic service for multiple executions, and parameter 2 indicates the execution time of the simulation atomic service for multiple executions , and parameter 1 in the time attribute is bound with the parameter generator PGa to generate parameter 1 of the time attribute of the simulated atomic service, and parameter 2 in the time attribute is bound with the parameter generator PGb for Generate parameter 2 of the simulation atomic service time attribute. Assuming that three simulated atomic services are to be generated on a certain function execution node, first determine the distribution of the simulated atomic services to be generated according to the functional indicators of the function execution node. In this embodiment, the normal distribution is taken as an example for illustration; Then, according to the function index of the function execution node, specify the upper limit value and the lower limit value respectively for the parameter generator PGa and the parameter generator PGb, such as specifying the lower limit value 3 and the upper limit value 5 for the parameter generator PGa, then Indicates that the parameter 1 in the time attribute of the simulation atom service to be generated is in the range of 3 to 5; when the lower limit value of the parameter generator PGb is specified as 1 and the upper limit value is 2, it means the simulation atom to be generated Parameter 2 in the time attribute of the service is in the range 1 to 2. If three simulated atomic services, namely S1, S2, and S3 are generated respectively according to the upper and lower limits specified by the parameter generator PGa and parameter generator PGb above, and parameter generator PGa generates parameters 1 of S1, S2, and S3 respectively are 3.2, 4.1, and 4.7, and parameter generator PGb generates parameters 2 of S1, S2, and S3 as 1.1, 1.3, and 1.7 respectively. Therefore, when the simulation atomic service S1 is executed multiple times, its execution time is shown as 3.2 as the average value, 1.1 is a normal distribution of variance. When the simulation atomic service S2 is executed multiple times, its execution time is shown as a normal distribution with a mean value of 4.1 and a variance of 1.3. When the simulation atomic service S3 is executed multiple times, its execution time performance is It is a normal distribution with a mean of 4.7 and a variance of 1.7.
在本实施例中,以常数分布为例说明根据功能执行节点的功能指标生成仿真原子服务的耗费属性参数,由于在常数分布中只需要用到一个参数,表示执行该待生成的仿真原子服务所消耗的费用,因此,在本实施例中,只需要生成一个参数即可,与上述实施例相类似的,耗费属性的参数也是由与其绑定的参数生成器生成。若耗费属性的参数所绑定的参数生成器为参数生成器PGc,则根据功能执行节点的功能指标指定参数生成器PGc的上限值与下限值,如指定参数生成器PGc的下限值为10、上限值为15,根据参数生成器PGc指定的范围分别生成三个仿真原子服务S1、S2、S3的耗费属性的参数为11.2、13.3、14.7,则表示每次执行仿真原子服务S1的执行耗费均为11.2,每次执行仿真原子服务S2的执行耗费均为13.3,每次仿真原子服务S3的执行耗费均为14.7。In this embodiment, the constant distribution is taken as an example to illustrate the generation of the cost attribute parameters of the simulation atomic service according to the function index of the function execution node. Since only one parameter is needed in the constant distribution, it means that the execution of the simulated atomic service to be generated is Therefore, in this embodiment, only one parameter needs to be generated. Similar to the above embodiment, the parameter of the consumption attribute is also generated by the parameter generator bound to it. If the parameter generator bound to the parameter of the consumption property is the parameter generator PGc, specify the upper limit value and the lower limit value of the parameter generator PGc according to the function index of the function execution node, such as specifying the lower limit value of the parameter generator PGc is 10, and the upper limit value is 15. According to the range specified by the parameter generator PGc, the parameters of the consumption attributes of three simulated atomic services S1, S2, and S3 are 11.2, 13.3, and 14.7, which means that the simulated atomic service S1 is executed each time. The execution cost of each simulation atomic service S2 is 11.2, the execution cost of each simulation atomic service S2 is 13.3, and the execution cost of each simulation atomic service S3 is 14.7.
类似的,仿真原子服务的可靠性属性参数也可以根据上述时间属性参数或耗费属性参数的生成方法生成,此处不再赘述。Similarly, the reliability attribute parameters of the simulated atomic service may also be generated according to the above-mentioned generation method of the time attribute parameter or the cost attribute parameter, which will not be repeated here.
当根据现有的原子服务而生成一个仿真原子服务时,可以将现有原子服务的时间属性参数、耗费属性参数以及可靠性属性参数,直接作为仿真原子服务的时间属性参数、耗费属性参数和可靠性属性参数,并将现有原子服务的分布属性作为仿真原子服务的分布属性,这些参数值具体可以由服务提供商提供,或是通过现有原子服务的执行日志获得。When generating a simulated atomic service based on an existing atomic service, the time attribute parameters, cost attribute parameters, and reliability attribute parameters of the existing atomic service can be directly used as the time attribute parameters, cost attribute parameters, and reliability of the simulated atomic service. property parameters, and use the distribution properties of the existing atomic services as the distribution properties of the simulated atomic services. These parameter values can be provided by the service provider or obtained through the execution logs of the existing atomic services.
进一步地,在上述实施例中,所述按照预设的算法从各功能执行节点对应的仿真原子服务集中确定本次仿真中与各功能执行节点对应的仿真原子服务,可以是:Further, in the above embodiment, the determination of the simulation atomic service corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to a preset algorithm may be:
根据一个预设的算法从各功能执行节点对应的仿真原子服务集中联合确定本次仿真中与各功能执行节点对应的仿真原子服务;具体地,例如设定的算法为执行本次仿真的耗费小于400元,因此,在选择功能执行节点相对应的仿真原子服务时,需要考虑该仿真原子服务的耗费,并且各功能执行节点相对应的仿真原子服务总的耗费也需要考虑,而不是单考虑执行某一个功能执行节点的仿真原子服务的耗费。再例如,有两个功能执行节点A和B并行执行时,如果已经知道功能执行节点B的执行时间会很长(比A长),那么在选择功能执行节点A的仿真原子服务时就不应该考虑优化功能执行节点A的执行时间,而应该更多的考虑一些其他的服务质量属性,例如执行耗费等;这种方法基于组合服务的整体服务质量考虑,因此,在服务质量上占有一定的优势;According to a preset algorithm, the simulation atomic service corresponding to each function execution node in this simulation is jointly determined from the simulation atomic service set corresponding to each function execution node; specifically, for example, the set algorithm is such that the cost of executing this simulation is less than 400 yuan. Therefore, when selecting the simulation atomic service corresponding to the function execution node, the cost of the simulation atomic service needs to be considered, and the total cost of the simulation atomic service corresponding to each function execution node also needs to be considered, rather than simply considering the execution The consumption of the simulated atomic service of a function execution node. For another example, when there are two function execution nodes A and B executing in parallel, if it is already known that the execution time of function execution node B will be very long (longer than A), then it should not be used when selecting the simulation atomic service of function execution node A Consider optimizing the execution time of function execution node A, but should consider some other quality of service attributes, such as execution cost, etc.; this method is based on the overall service quality of composite services, so it has certain advantages in service quality ;
还可以是:按照与各功能执行节点对应的各预设的算法分别确定与该功能执行节点相对应的仿真原子服务。具体地,即在每个功能执行节点上分别设制不同的算法,从而按照各功能执行节点上设制的算法独立的从各功能执行节点上挑选对应的仿真原子服务。由于这种方式是将各功能执行节点看作独立的执行节点,而对单个功能执行节点设制的算法通常比较简单,因此,采用这种方法选择各功能执行节点对应的仿真原子服务,通常花费时间更短。It may also be: respectively determine the simulation atomic service corresponding to each function execution node according to each preset algorithm corresponding to each function execution node. Specifically, different algorithms are configured on each function execution node, so that corresponding simulation atomic services are independently selected from each function execution node according to the algorithm configured on each function execution node. Because this method regards each function execution node as an independent execution node, and the algorithm for setting up a single function execution node is usually relatively simple, therefore, using this method to select the simulation atomic service corresponding to each function execution node usually costs The time is shorter.
在实际应用时,可以根据需求选择上述任一种方法选择与功能执行节点相对应的仿真原子服务。In actual application, any one of the above methods can be selected according to requirements to select the simulation atomic service corresponding to the function execution node.
进一步地,在上述实施例中,所述组合服务流程模型中还可以包括选择节点,所述选择节点用于在一个功能执行节点后选择所述一个功能执行节点的下游功能执行节点中的一个或多个;所述根据所述组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务,具体包括:Further, in the above embodiment, the combined service process model may further include a selection node, the selection node is used to select one or more of the downstream function execution nodes of the one function execution node after one function execution node. multiple; the execution of the simulated atomic service corresponding to each function execution node according to the interactive mode of at least two function execution nodes in the combined service process model specifically includes:
在执行所述一个功能执行节点后,由选择节点生成预设范围内的随机数,并根据所述随机数和各下游功能执行节点的预设的权重上限和权重下限,选择所述下游功能执行节点中的一个或多个,若所述随机数在一个下游功能执行节点的权重下限和权重上限限定的范围内,则选择该下游功能执行节点,若所述随机数在多个下游功能执行节点的权重下限和权重上限限定的范围内,则选择所述多个下游功能执行节点;执行所述选择节点后,执行所述选择节点选择的下游功能执行节点中的一个或多个。After executing the one function execution node, the selection node generates a random number within a preset range, and selects the downstream function execution according to the random number and the preset weight upper limit and weight lower limit of each downstream function execution node One or more of the nodes, if the random number is within the range defined by the weight lower limit and weight upper limit of a downstream function execution node, then select the downstream function execution node, if the random number is in multiple downstream function execution nodes Within the range defined by the weight lower limit and weight upper limit, select the plurality of downstream function execution nodes; after executing the selection node, execute one or more of the downstream function execution nodes selected by the selection node.
例如,图2为本发明组合服务仿真方法中选择节点选择下游功能执行节点的实施例一的示意图,如图2所示,选择节点202的第一下游功能执行节点203的权重下限为0,权重上限为50,而选择节点202的第二下游功能执行节点204的权重下限为50,权重上限为100,在仿真执行过程中,执行完选择节点202的上游功能执行节点201后,执行选择节点202,由选择节点202生成0至100之间的随机数,因此,选择节点202的第一下游功能执行节点203和第二下游功能执行节点204被选中的概率分别为50%,若选择节点202生成的随机数为60,由于随机数60在选择节点202的第二下游功能执行节点204的权重下限50和权重上限100限定的范围内,因此,执行完所述选择节点202后,由选择节点202选择第二下游功能执行节点204执行。For example, FIG. 2 is a schematic diagram of Embodiment 1 in which a selection node selects a downstream function execution node in the combined service simulation method of the present invention. As shown in FIG. 2 , the lower limit of the weight of the first downstream function execution node 203 of the selection node 202 is 0, and the weight The upper limit is 50, and the lower limit of the weight of the second downstream function execution node 204 of the selected node 202 is 50, and the upper limit of the weight is 100. During the simulation execution process, after the upstream function execution node 201 of the selected node 202 is executed, the selected node 202 is executed. , the random number between 0 and 100 is generated by the selection node 202. Therefore, the probability that the first downstream function execution node 203 and the second downstream function execution node 204 of the selection node 202 are selected are respectively 50%. If the selection node 202 generates The random number is 60, because the random number 60 is within the range defined by the weight lower limit 50 and the weight upper limit 100 of the second downstream function execution node 204 of the selection node 202, therefore, after the selection node 202 is executed, the selection node 202 The second downstream function execution node 204 is selected for execution.
图3为本发明组合服务仿真方法中选择节点选择下游功能执行节点的实施例二的示意图,如图3所示,选择节点202的第一下游功能执行节点203的权重下限为0,权重上限为100,而选择节点202的第二下游功能执行节点204的权重下限为0,权重上限为100,在仿真执行过程中,执行完选择节点202的上游功能执行节点201后,执行选择节点202,由选择节点202生成0至100之间的随机数,因此,选择节点202的第一下游功能执行节点203和第二下游功能执行节点204被选中的概率均为100%,由于选择节点202可能生成0至100之间任意的随机数,又由于该范围内的随机数均在选择节点202的第一下游功能执行节点203和第二下游功能执行节点204的权重下限0和权重上限100限定的范围内,因此,执行完所述选择节点202后,并行执行第一下游功能执行节点203和第二下游功能执行节点204。FIG. 3 is a schematic diagram of Embodiment 2 in which a selection node selects a downstream function execution node in the combined service simulation method of the present invention. As shown in FIG. 3 , the lower limit of the weight of the first downstream function execution node 203 of the selection node 202 is 0, and the upper limit of the weight is 100, and the lower limit of the weight of the second downstream function execution node 204 of the selected node 202 is 0, and the upper limit of the weight is 100. During the simulation execution process, after the upstream function execution node 201 of the selected node 202 is executed, the selected node 202 is executed, by The selection node 202 generates a random number between 0 and 100. Therefore, the probability that the first downstream function execution node 203 and the second downstream function execution node 204 of the selection node 202 are selected is 100%, since the selection node 202 may generate 0 Any random number between 100 and 100, and because the random numbers within this range are all within the range defined by the weight lower limit 0 and the weight upper limit 100 of the first downstream function execution node 203 and the second downstream function execution node 204 of the selection node 202 , therefore, after the selection node 202 is executed, the first downstream function execution node 203 and the second downstream function execution node 204 are executed in parallel.
优选的,在根据组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务时,还可以包括:Preferably, when performing the simulation atomic service corresponding to each function execution node according to the interaction mode of at least two function execution nodes in the combined service process model, it may also include:
监控执行过程,生成监控信息,所述监控信息可以包括所述组合服务的整体服务质量信息和所述组合服务流程模型中各功能执行节点的服务质量信息。在本实施例中,所述组合服务的整体服务质量信息可以是组合服务的整体执行时间信息、耗费信息以及可靠性信息等;所述组合服务流程模型中各功能执行节点的服务质量信息可以是组合服务流程模型中各功能执行节点的执行时间信息、耗费信息以及可靠性信息等。进一步的,上述监控信息也可以作为仿真执行结果输出,以便于用户可以利用输出的仿真执行结果数据或通过统计和数据挖掘等手段评价和进一步分析组合服务的各项性能。The execution process is monitored, and monitoring information is generated, and the monitoring information may include the overall service quality information of the combined service and the service quality information of each function execution node in the combined service process model. In this embodiment, the overall service quality information of the composite service may be the overall execution time information, cost information, and reliability information of the composite service; the service quality information of each function execution node in the composite service process model may be The execution time information, cost information and reliability information of each function execution node in the combined service process model. Furthermore, the above monitoring information can also be output as a simulation execution result, so that the user can use the output simulation execution result data or use statistical and data mining methods to evaluate and further analyze various performances of the composite service.
图4为本发明组合服务仿真装置实施例的结构示意图,如图4所示,所述组合服务仿真装置可以包括:Fig. 4 is a schematic structural diagram of an embodiment of a composite service simulation device according to the present invention. As shown in Fig. 4, the composite service simulation device may include:
接收模块401,用于获取组合服务流程模型,所述组合服务流程模型中包括至少两个功能执行节点和所述至少两个功能执行节点的交互方式;The receiving module 401 is configured to acquire a combined service process model, the combined service process model including at least two function execution nodes and the interaction modes of the at least two function execution nodes;
仿真原子服务生成模块402,用于根据所述组合服务流程模型中各功能执行节点的功能指标生成各功能执行节点对应的仿真原子服务集;A simulation atomic service generation module 402, configured to generate a simulation atomic service set corresponding to each function execution node according to the function indicators of each function execution node in the combined service process model;
仿真原子服务选择模块403,用于按照预设的算法从各功能执行节点对应的仿真原子服务集中确定本次仿真中与各功能执行节点对应的仿真原子服务;The simulation atomic service selection module 403 is used to determine the simulation atomic service corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to a preset algorithm;
仿真执行模块404,用于根据所述组合服务流程模型中至少两个功能执行节点的交互方式执行各功能执行节点对应的仿真原子服务;The simulation execution module 404 is configured to execute the simulation atomic service corresponding to each function execution node according to the interaction mode of at least two function execution nodes in the combined service process model;
输出模块405,用于输出仿真执行结果。An output module 405, configured to output simulation execution results.
进一步的,所述仿真原子服务生成模块402可以包括:Further, the simulation atomic service generating module 402 may include:
仿真原子服务参数确定单元406,用于根据所述功能执行节点的功能指标确定所述功能执行节点对应的仿真原子服务的属性对象、各属性对象的属性分布以及各属性对象中各参数的取值范围;The simulation atomic service parameter determination unit 406 is configured to determine the attribute object of the simulation atomic service corresponding to the function execution node, the attribute distribution of each attribute object, and the value of each parameter in each attribute object according to the function index of the function execution node scope;
仿真原子服务生成单元407,用于根据仿真原子服务的属性对象、各属性对象的属性分布以及各属性对象中各参数的取值范围,随机生成包含所述属性对象且各属性对象中各参数在对应的取值范围内的至少一个仿真原子服务,以使执行所述至少一个仿真原子服务时各属性对象满足对应的属性分布。The simulation atomic service generation unit 407 is used to randomly generate the attribute object containing the attribute object and each parameter in each attribute object according to the attribute object of the simulation atomic service, the attribute distribution of each attribute object, and the value range of each parameter in each attribute object. At least one simulated atomic service within a corresponding value range, so that each attribute object satisfies a corresponding attribute distribution when the at least one simulated atomic service is executed.
进一步的,所述仿真原子服务选择模块403具体可以用于:Further, the simulation atomic service selection module 403 can be specifically used for:
根据一个预设的算法从各功能执行节点对应的仿真原子服务集中联合确定本次仿真中与各功能执行节点对应的仿真原子服务;或,按照与各功能执行节点对应的各预设的算法分别确定与该功能执行节点相对应的仿真原子服务。Jointly determine the simulation atomic service corresponding to each function execution node in this simulation from the simulation atomic service set corresponding to each function execution node according to a preset algorithm; or, according to each preset algorithm corresponding to each function execution node respectively Determine the simulation atomic service corresponding to the function execution node.
优选地,所述组合服务流程模型中还包括选择节点,所述选择节点用于在一个功能执行节点后选择所述一个功能执行节点的下游功能执行节点中的一个或多个;Preferably, the combined service process model further includes a selection node, the selection node is used to select one or more downstream function execution nodes of the one function execution node after one function execution node;
所述仿真执行模块404可以包括:The simulation execution module 404 may include:
功能执行节点执行单元408,用于执行所述一个功能执行节点;a function execution node execution unit 408, configured to execute the one function execution node;
选择节点执行单元409,用于在所述功能执行节点执行单元408执行所述一个功能执行节点后,执行所述选择节点;A selection node execution unit 409, configured to execute the selection node after the function execution node execution unit 408 executes the one function execution node;
功能执行节点执行单元408具体还用于在所述选择节点执行单元409执行所述选择节点后,执行所述选择节点选择的下游功能执行节点中的一个或多个。The function execution node execution unit 408 is further configured to execute one or more of the downstream function execution nodes selected by the selection node after the selection node execution unit 409 executes the selection node.
进一步的,所述选择节点执行单元409还可以包括:Further, the selecting node execution unit 409 may also include:
随机数生成子单元410,用于生成预设范围内的随机数;A random number generation subunit 410, configured to generate a random number within a preset range;
下游功能执行节点选择子单元411,用于根据所述随机数和各下游功能执行节点的预设权重值,选择所述下游功能执行节点中的一个或多个。The downstream function execution node selection subunit 411 is configured to select one or more of the downstream function execution nodes according to the random number and the preset weight value of each downstream function execution node.
具体的,所述预设权重值包括权重下限和权重上限,所述下游功能执行节点选择子单元411具体还可以用于:Specifically, the preset weight value includes a weight lower limit and a weight upper limit, and the downstream function execution node selection subunit 411 can also be specifically configured to:
若所述随机数在一个下游功能执行节点的权重下限和权重上限限定的范围内,则选择所述一个下游功能执行节点。If the random number is within the range defined by the lower weight limit and upper weight limit of a downstream function execution node, the one downstream function execution node is selected.
进一步的,所述组合服务仿真装置还可以包括:Further, the combined service simulation device may also include:
监控模块412,用于监控执行过程,生成监控信息,所述监控信息包括所述组合服务的整体服务质量信息和所述组合服务流程模型中各功能执行节点的服务质量信息;A monitoring module 412, configured to monitor the execution process and generate monitoring information, where the monitoring information includes the overall service quality information of the combined service and the service quality information of each function execution node in the combined service process model;
所述输出模块405具体还可以用于:输出所述监控信息。Specifically, the output module 405 may also be configured to: output the monitoring information.
本实施例的原子服务仿真装置可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The atomic service simulation device of this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 1 , and its implementation principle and technical effect are similar, and will not be repeated here.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions and related hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above-mentioned 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 limiting 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 is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210340202.1A CN102857571B (en) | 2012-09-13 | 2012-09-13 | Combined service simulation method and device thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210340202.1A CN102857571B (en) | 2012-09-13 | 2012-09-13 | Combined service simulation method and device thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102857571A CN102857571A (en) | 2013-01-02 |
CN102857571B true CN102857571B (en) | 2015-02-18 |
Family
ID=47403759
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210340202.1A Active CN102857571B (en) | 2012-09-13 | 2012-09-13 | Combined service simulation method and device thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102857571B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103678834B (en) * | 2014-01-07 | 2017-05-24 | 苏州大学 | Modeling method and modeling device for cyber-physical system (CPS) |
CN109039760B (en) * | 2018-08-24 | 2021-06-29 | 烽火通信科技股份有限公司 | A layered simulation business single-disk application software design method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909078A (en) * | 2010-07-19 | 2010-12-08 | 东南大学 | A Dynamic Service Selection Method Based on New Service Set Construction |
CN102143084A (en) * | 2011-04-15 | 2011-08-03 | 东南大学 | Tiered service aggregation model under open network environment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8250521B2 (en) * | 2007-12-14 | 2012-08-21 | International Business Machines Corporation | Method and apparatus for the design and development of service-oriented architecture (SOA) solutions |
-
2012
- 2012-09-13 CN CN201210340202.1A patent/CN102857571B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909078A (en) * | 2010-07-19 | 2010-12-08 | 东南大学 | A Dynamic Service Selection Method Based on New Service Set Construction |
CN102143084A (en) * | 2011-04-15 | 2011-08-03 | 东南大学 | Tiered service aggregation model under open network environment |
Non-Patent Citations (2)
Title |
---|
《SOArTester:一个基于精简用例的组合服务自动化测试系统》;金若凡 等;《电子学报》;20100228;第38卷(第2A期);全文 * |
Zicheng Huang et al.《BestRec:A Behavior Similarity based Approach to Services Recommendation》.《2009 Congress on Services- I》.2009,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN102857571A (en) | 2013-01-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11769065B2 (en) | Distributed system generating rule compiler engine by determining a best matching rule based on concrete parameterization with declarative rules syntax | |
CN108984712B (en) | Service scene-based number making method and device and readable storage medium | |
KR102532658B1 (en) | Neural architecture search | |
US20170262363A1 (en) | Application experiment system | |
CN103677913B (en) | Business processing method and device based on business process management BPM | |
CN106886434A (en) | A kind of Distributed Application installation method and device | |
CN104750731A (en) | Method and device for obtaining complete user portrait | |
Skydanienko et al. | A tool for generating event logs from multi-perspective declare models | |
JP2018195298A (en) | Interaction scenario display control program, interaction scenario display control method, and information processing apparatus | |
US10303444B2 (en) | Composable application session parameters | |
CN111399941A (en) | Batch configuration method, device and equipment for BMC (baseboard management controller) functions | |
CN101236494A (en) | A Coverage Density Based Test Portfolio Generation Method for Information Systems | |
US20170300405A1 (en) | Method, apparatus, and computer-readable medium for performing functional testing of software | |
CN102857571B (en) | Combined service simulation method and device thereof | |
CN106371994B (en) | Dynamic mobile APP test methods based on natural language processing | |
CN111966880A (en) | Visual website content acquisition method and system | |
KR101212497B1 (en) | Method of monitoring resource and apparatus performing the same | |
CN112559335B (en) | Test method, device, equipment and storage medium | |
CN102004951B (en) | Role group dividing method based on role correlation | |
CN103631588B (en) | A kind of menu configuration method based on modular instrument | |
CN111562982B (en) | Method and device for processing request data, computer readable storage medium and electronic equipment | |
CN114817379A (en) | Qunee-based configuration item relation visualization method, system, equipment and medium | |
CN102902521A (en) | Composite service credibility evolution influence analyzing method based on XCFG | |
KR102378038B1 (en) | Graph generating device and method for obtaining synthetic graphs having properties of target network | |
CN114253664A (en) | Method, device, equipment and storage medium for generating configuration template of virtualization system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220126 Address after: 215488 No. 301, building 11, phase II, Taicang University Science Park, No. 27, Zigang Road, science and education new town, Taicang City, Suzhou City, Jiangsu Province Patentee after: Tianhang Changying (Jiangsu) Technology Co.,Ltd. Address before: 100191 Beihang University, Haidian District, Xueyuan Road, 37, Beijing Patentee before: BEIHANG University |