技术领域technical field
本发明涉及软件演化领域,具体涉及一种基于微服务的Web分布式软件演化与监控方法。The invention relates to the field of software evolution, in particular to a micro-service-based Web distributed software evolution and monitoring method.
背景技术Background technique
软件演化是指软件持续变化,并达到人们期望形态的过程,其目标是为了提高软件生产力,增强可复用性。在面向服务架构(SOA)的软件演化研究中,其研究重点主要包括自适应建模、在线监控和服务组装等。自适应建模方面的研究主要是针对模型的优化;在线监控方面,则是通过自定义监控参数达到动态监控的目的;在服务组装方面,现有工作主要包括自定义服务描述语言,通过检索配置响应环境变化,以及基于本体的自适应组合等。Software evolution refers to the process in which software continuously changes and reaches people's desired form. Its goal is to improve software productivity and enhance reusability. In the software evolution research of Service Oriented Architecture (SOA), its research focuses mainly include adaptive modeling, online monitoring and service assembly. The research on adaptive modeling is mainly aimed at the optimization of the model; in the aspect of online monitoring, the purpose of dynamic monitoring is achieved by customizing the monitoring parameters; in the aspect of service assembly, the existing work mainly includes customizing the service description language, by retrieving the configuration Response to environmental changes, and ontology-based adaptive composition, etc.
在面向服务架构的软件演化研究中,中国科学院的吴国全等人提出了一种高效的,非侵入式的在线监控方法,通过引入一种Web服务的参数行为约束语言,来定义监控参数,用以动态监控SOA应用以数据为中心的属性;孙昌爱等人对标准BPEL进行扩展,开发了VxBPEL及其引擎VxBPELEngine,支持服务组装中的可变性设计;圣保罗大学的Marcos等人提出了一种基于集中式应用配置存储库的解决方案,将服务设计为RESTful架构风格,通过检索配置的方式响应环境变化;Haithem Mezni等人提出了一种基于本体的自主服务元数据分类策略用于Web服务的自适应组合。In the research on software evolution of service-oriented architecture, Wu Guoquan of Chinese Academy of Sciences and others proposed an efficient and non-intrusive online monitoring method. Dynamically monitor the data-centric attributes of SOA applications; Sun Changai et al. extended the standard BPEL and developed VxBPEL and its engine VxBPELEngine to support variable design in service assembly; Marcos et al. from the University of Sao Paulo proposed a centralized Apply the solution of configuration repository, design services as RESTful architectural style, and respond to environmental changes by retrieving configuration; Haithem Mezni et al. proposed an ontology-based autonomous service metadata classification strategy for adaptive composition of Web services .
随着互联网技术的不断发展与开发要求的不断提升,现代开发模式需要尽可能地实现一种“高内聚和低耦合”的目标。而现有的SOA解决方案通常将业务限制、消息路由和服务编制等操作全部集中在ESB企业服务总线中,无法有效解决分布式应用系统的复杂性。With the continuous development of Internet technology and the continuous improvement of development requirements, the modern development model needs to achieve the goal of "high cohesion and low coupling" as much as possible. However, the existing SOA solutions usually concentrate operations such as business restriction, message routing and service orchestration in the ESB enterprise service bus, which cannot effectively solve the complexity of the distributed application system.
因此,James Lewis等人指出微服务架构是解决分布式架构演化问题的有效方案。微服务架构定义为采用一套小型服务构建单个应用,即每个服务都运行在自己的进程中,并通过轻量级机制(通常是HTTP Resource API)进行通信。O’Connor等人基于微服务架构,关注上下文情境在软件过程定义和演化中的作用,提出的情境因素参考框架,适用于连续软件开发和交付的组织;Escobar等人提出了一种将已有应用程序现代化为微服务的方法,通过以模型为中心的过程来分析和可视化当前业务层和数据层之间的结构和依赖关系,并使用四种结构图将应用模块化到集群和微服务中。然而,他们并未过多地考虑微服务架构应用的自适应特性。Therefore, James Lewis et al. pointed out that the microservice architecture is an effective solution to the problem of distributed architecture evolution. A microservice architecture is defined as building a single application with a set of small services, each running in its own process and communicating through a lightweight mechanism (usually an HTTP Resource API). Based on the microservice architecture, O'Connor et al. focus on the role of context in the definition and evolution of software processes, and propose a reference framework for contextual factors, which is suitable for organizations in continuous software development and delivery; Escobar et al. An approach to application modernization to microservices, through a model-centric process to analyze and visualize the current structure and dependencies between business and data layers, and modularize applications into clusters and microservices using four structural diagrams . However, they did not think much about the adaptive nature of the application of the microservice architecture.
发明内容SUMMARY OF THE INVENTION
为了保证微服务环境下Web分布式软件能够动态地根据用户需求进行自适应演化,本发明提出一种微服务应用自适应演化框架RMAE(Requirements-DrivenMicroservices Adaptive Evolution)。此外,为了让自适应演化过程顺利执行,本发明还专门设计了微服务自适应监控算法感知上下文,确保RMAE框架可以对不断变化的Web任务需求进行有效管理,并面向需求驱动,相应地调整自身的适应和监控机制,以实现动态的反馈回路。In order to ensure that the Web distributed software in the micro-service environment can dynamically perform adaptive evolution according to user requirements, the present invention proposes a micro-service application adaptive evolution framework RMAE (Requirements-Driven Microservices Adaptive Evolution). In addition, in order to make the adaptive evolution process execute smoothly, the present invention also specially designs a micro-service adaptive monitoring algorithm to sense the context, so as to ensure that the RMAE framework can effectively manage the changing web task requirements, and adjust itself accordingly for demand-driven. adaptation and monitoring mechanisms to achieve dynamic feedback loops.
为了解决上述技术问题本发明所采用的技术方案是:In order to solve the above-mentioned technical problems, the technical scheme adopted in the present invention is:
一种基于微服务的Web分布式软件演化与监控方法,所述Web分布式软件演化与监控方法包括以下步骤:A microservice-based Web distributed software evolution and monitoring method, the Web distributed software evolution and monitoring method comprising the following steps:
第一步、在Web应用程序中,用户的需求和上下文决定了Web交互的决策和行为,为此,这些应用程序必须将用户的需求转化为可以代表用户自动执行的一系列Web任务,以提供更好的用户体验;Step 1. In web applications, the user's needs and context determine the decisions and behaviors of web interactions, and for this, these applications must translate the user's needs into a series of web tasks that can be automatically performed on the user's behalf to provide better user experience;
第二步、给出RMAE框架所需的关键组件模块;The second step is to give the key component modules required by the RMAE framework;
第三步、基于第二步提出的RMAE框架组件模块,给出RMAE整体架构及运作流程;The third step, based on the RMAE framework component module proposed in the second step, give the overall structure and operation process of RMAE;
第四步、将Villegas提出的DYNAMICO参考模型引入RMAE框架,DYNAMICO提供了实现SAS系统所需组件的结构和行为特征,该模型定义了三个因果连接的反馈回路子系统:控制目标反馈回路CO-FL、动态监控反馈回路M-FL和自适应反馈回路A-FL;The fourth step is to introduce the DYNAMICO reference model proposed by Villegas into the RMAE framework. DYNAMICO provides the structural and behavioral characteristics of the components required to implement the SAS system. The model defines three causally connected feedback loop subsystems: control target feedback loop CO- FL, dynamic monitoring feedback loop M-FL and adaptive feedback loop A-FL;
第五步、面向用户需求,进一步给出RMAE框架的路由委派方法;The fifth step, facing user needs, further gives the routing delegation method of the RMAE framework;
第六步、基于前五步,给出RMAE协作算法;The sixth step, based on the first five steps, give the RMAE collaboration algorithm;
第七步、结合微服务的特性和RMAE场景,给出相应的微服务自适应监控算法。The seventh step is to give the corresponding microservice adaptive monitoring algorithm based on the characteristics of the microservice and the RMAE scenario.
进一步,所述第一步中,RMAE的实现需要自适应软件(SAS)系统的实施,以在微服务架构下尽可能地支持自动化调整,因此,先构建微服务架构下需求交互模型,模型模块如下:Further, in the first step, the implementation of RMAE requires the implementation of an adaptive software (SAS) system to support automatic adjustment as much as possible under the microservice architecture. Therefore, first build a demand interaction model under the microservice architecture, and the model module as follows:
1.1用户需求解析(User Requirement Parsing):即系统必须能够将用户的需求转化为规范的需求描述信息;1.1 User Requirement Parsing: that is, the system must be able to convert the user's requirements into standardized requirement description information;
1.2任务委派(Task Delegation):即系统必须能够将用户的请求派发给具有相应功能的组件进行处理;1.2 Task Delegation: that is, the system must be able to dispatch the user's request to a component with corresponding functions for processing;
1.3微服务配置(Microservice Configuration):通过RMAE language配置文件描述微服务,并将用户需求与微服务进行映射;1.3 Microservice Configuration: Describe microservices through RMAE language configuration files, and map user requirements with microservices;
1.4微服务组装(Microservice Assembly):即系统必须定义满足用户需求所需微服务的有序序列,包括结构间关系,输入和输出规范;1.4 Microservice Assembly: That is, the system must define an ordered sequence of microservices required to meet user needs, including relationships between structures, input and output specifications;
1.5微服务执行(Microservice Execution):即系统必须能够在执行选定的微服务序列时,进行生命周期控制、自我修复等管理活动;1.5 Microservice Execution: that is, the system must be able to perform management activities such as life cycle control and self-repair when executing the selected sequence of microservices;
1.6上下文感知和自适应支持(Context Awareness and Self-AdaptionSupport):即系统必须能够通过感知上下文来发现用户需求变更,并做出相应的自适应调整。1.6 Context Awareness and Self-Adaption Support: That is, the system must be able to detect changes in user needs by sensing the context, and make corresponding adaptive adjustments.
再进一步,所述第二步的过程如下:Further, the process of the second step is as follows:
步骤(2.1)构建路由设施,以RCT模型的形式来表示用户需求,该模块中的组件主要执行从用户请求中解析出需求信息和运用RDM模型将需求转化为RCT模型实例这两个活动;Step (2.1) constructs the routing facility to represent the user requirements in the form of the RCT model, and the components in this module mainly perform the two activities of parsing the requirement information from the user request and using the RDM model to convert the requirement into an instance of the RCT model;
步骤(2.2)构建匹配树(Mapping Tree),该模块负责实例化RDF图中Web任务、用户需求与执行器之间的映射关系,并以一种树形结构进行存储,通过该结构,系统能够快速定位对应的执行器,提高任务委派效率;Step (2.2) Build a Mapping Tree. This module is responsible for instantiating the mapping relationship between Web tasks, user requirements and executors in the RDF graph, and stores it in a tree structure. Through this structure, the system can Quickly locate the corresponding actuator to improve task delegation efficiency;
一个匹配树T可表示为由其根节点和多个索引结构组成的二元组A matching tree T can be represented as a two-tuple consisting of its root node and multiple index structures
T=<v,{RS}>,T=<v,{RS}>,
其中,v为根节点(虚拟节点),代表所有用户请求的起点;RS为索引结构,表示用户请求的资源路径u、执行方法m和转发目标s之间的对应关系.RS的数目与系统所提供的微服务数量有关。Among them, v is the root node (virtual node), representing the starting point of all user requests; RS is the index structure, representing the correspondence between the resource path u requested by the user, the execution method m and the forwarding target s. The number of RSs is related to the system Depends on the number of microservices provided.
匹配树的性质如下:The properties of the matching tree are as follows:
给定用户请求r,在T中,对于资源路径节点u,仅当用户请求r的路径u'∈u时,访问u的所有子节点,并对于m∈RS,验证用户请求r的执行方法与m的匹配关系,其中用户请求r的执行方法与互联网的HTTP协议方法相对应,包括GET、POST、PUT、PATCH、DELETE;Given a user request r, in T, for the resource path node u, only when the user requests the path u'∈u of r, visit all the child nodes of u, and for m∈RS, verify that the execution method of the user request r is the same as The matching relationship of m, where the execution method of the user request r corresponds to the HTTP protocol method of the Internet, including GET, POST, PUT, PATCH, DELETE;
给定用户请求r,对于方法节点m,有且仅有一个子节点t符合条件;Given a user request r, for method node m, there is one and only one child node t that meets the condition;
给定匹配节点u的用户请求r,对于方法节点m,仅当用户请求r的执行方法m'∈m时,访问m的唯一子节点t,进一步,根据子节点t的值跳转至对应转发目标s中;Given a user request r matching node u, for method node m, only when the user requests the execution method m'∈m of r, access the only child node t of m, and further, jump to the corresponding forwarding according to the value of the child node t in target s;
进行步骤(2.3);Go to step (2.3);
步骤(2.3)采用RMAE language文件描述微服务,RMAE language描述的是一种基于RMAE的用户需求转换规则,选择XML文件作为RMAE language的载体,XML是一种标记语言,它的结构使其能具有良好的扩展性,便于直观阅读,也更利于RMAE体现出动态适应性;Step (2.3) uses the RMAE language file to describe the microservice. The RMAE language describes a user requirement transformation rule based on RMAE. The XML file is selected as the carrier of the RMAE language. XML is a markup language, and its structure enables it to have Good scalability, easy to read intuitively, and more conducive to RMAE to reflect dynamic adaptability;
基于RMAE language,把每个功能点的个性化需求映射到各个微服务的功能描述上,较大粒度的用户需求通过微服务间相互组合的结构关系映射出来。RMAE language把用户需求归为数据浏览(browse)、数据删除(delete)、数据增加(insert)、数据更新(update)、数据导入(import)、数据导出(export)和其他业务逻辑(other)这7个主要组成部分,并映射到相应的XML载体中,RMAE language的核心结构定义如下:Based on the RMAE language, the individual requirements of each function point are mapped to the functional description of each microservice, and the larger-grained user requirements are mapped out through the structural relationship between the microservices. RMAE language classifies user requirements into data browsing (browse), data deletion (delete), data addition (insert), data update (update), data import (import), data export (export) and other business logic (other). The 7 main components are mapped to the corresponding XML carrier. The core structure of RMAE language is defined as follows:
element元素代表一组微服务,一个微服务序列包含多组微服务,即多个element元素构成一个微服务序列。element元素使用半形式化方法来描述:The element element represents a group of microservices, and a microservice sequence contains multiple groups of microservices, that is, multiple element elements form a microservice sequence. The element element is described using semi-formal methods:
element=elementAttr,[ms]element=elementAttr,[ms]
elementAttr=mappingAttr,(description),nextMSelementAttr=mappingAttr,(description),nextMS
mappingAttr=key,URI,methodmappingAttr=key,URI,method
nextMS=(nextTag),(nextKey)nextMS=(nextTag),(nextKey)
method=‘GET’|‘POST’|‘PUT’|‘PATCH’|‘DELETE’method='GET'|'POST'|'PUT'|'PATCH'|'DELETE'
nextTag=‘browse’|‘delete’|‘insert’|‘update’|‘import’|‘export’|‘other’nextTag='browse'|'delete'|'insert'|'update'|'import'|'export'|'other'
其中,element元素由element属性elementAttr与若干微服务ms构成,elementAttr包括映射属性mappingAttr、该组微服务的描述信description与微服务序列中的下一个微服务nextMS,mappingAttr中的子属性URI、method、key分别映射为匹配树中的u、m、t节点,nextMS中的子属性nextTag与nextKey则分别表示微服务序列中下一个微服务所对应的执行器和RMAE language配置,nextTag中browse、delete、insert、update、import、export、other七种值代表用户需求对微服务七种操作逻辑的映射,属性method与互联网的HTTP协议方法相对应,包括GET、POST、PUT、PATCH、DELETE。Among them, the element element is composed of element attribute elementAttr and several microservices ms. elementAttr includes mapping attribute mappingAttr, the description letter description of the group of microservices and the next microservice nextMS in the microservice sequence, and the sub-attributes URI, method, The keys are mapped to the u, m, and t nodes in the matching tree, respectively. The sub-attributes nextTag and nextKey in nextMS represent the executor and RMAE language configuration corresponding to the next microservice in the microservice sequence, respectively. In nextTag, browse, delete, The seven values of insert, update, import, export, and other represent the mapping of user requirements to the seven operational logics of microservices. The attribute method corresponds to the HTTP protocol methods of the Internet, including GET, POST, PUT, PATCH, and DELETE.
同一element下的ms为同类微服务,其先后顺序决定了微服务执行的次序,ms元素半形式化方法描述如下:The ms under the same element is the same type of microservice, and its sequence determines the order of execution of the microservice. The semi-formal method of the ms element is described as follows:
ms=msAttr,{param},viewms=msAttr,{param},view
msAttr=type,value,(description)msAttr=type,value,(description)
view={title},{output}view={title},{output}
type=‘class’|‘service’|‘sql’type='class'|'service'|'sql'
其中,微服务ms由微服务属性msAttr、输入参数param以及返回给用户的可视化参数view组成,view包括标题title与输出参数output,msAttr包含微服务的描述信息description和子属性type、value,属性type表明了微服务的实现方式,若值为class表示通过反射机制执行对应本地程序类,属性value为执行类的名称;若值为service则表示调用外部服务来完成,属性value为该服务的调用接口;当值为sql时则表示对关系型数据库的动态执行,相应地,属性value为执行所需SQL语句,RMAE能提供对关系型数据库数据处理自动化的支持,包括SQL语句的参数注入、动态执行、返回对象自动封装及服务化等功能。Among them, the microservice ms consists of the microservice attribute msAttr, the input parameter param, and the visual parameter view returned to the user. The view includes the title title and the output parameter output. The msAttr contains the description information of the microservice and the sub-attributes type and value. The attribute type indicates Indicates the implementation of the microservice. If the value is class, it means that the corresponding local program class is executed through the reflection mechanism, and the attribute value is the name of the execution class; if the value is service, it means calling an external service to complete, and the attribute value is the calling interface of the service; When the value is sql, it means dynamic execution of relational database. Correspondingly, the attribute value is the SQL statement required for execution. RMAE can provide automatic support for relational database data processing, including parameter injection, dynamic execution, The return object is automatically encapsulated and serviced.
param元素代表微服务执行所需要的输入参数,这部分使用半形式化方法描述如下:The param element represents the input parameters required for the execution of the microservice. This part is described as follows using a semi-formal method:
param=(notNull),scopeparam=(notNull),scope
notNull=TRUE|FALSEnotNull=TRUE|FALSE
scope=(request),(session),(application)scope=(request),(session),(application)
session=TRUE|FALSEsession=TRUE|FALSE
request=TRUE|FALSErequest=TRUE|FALSE
application=TRUE|FALSEapplication=TRUE|FALSE
其中,param由属性notNull和scope组成,notNull表示param是否允许为空,scope代表请求作用域范围,其内部包含三个布尔型子属性request、session与application,它们分别表示请求作用域是否为request、session与application;Among them, param consists of attributes notNull and scope, notNull indicates whether param is allowed to be empty, scope represents the scope of the request scope, and it contains three Boolean sub-attributes request, session and application, which respectively indicate whether the request scope is request, session and application;
进行步骤(2.4);Proceed to step (2.4);
步骤(2.4)构建调度设施,单个微服务通常无法满足大多数用户需求,因此需要将多个具有单一功能的微服务组装成较大粒度的微服务序列,从而增强系统功能,满足用户需求,该模块通过RDF文件推理,基于用户请求r,根据步骤2.1.2的RCT模型所得出的RDF图实例,将RDF图的输入与需要的关键输出属性注入RMAE language配置文件中,并依据配置结果完成相应微服务的组装。在这一过程中,采用Villegas Machado等人提出的SmarterContext推理引擎来完成RDF的推理过程,最终自动推理出Web任务序列,并根据推理结果自适应调整微服务序列,进行步骤(2.5);Step (2.4) Build a scheduling facility. A single microservice usually cannot meet the needs of most users. Therefore, it is necessary to assemble multiple microservices with a single function into a sequence of microservices with a larger granularity, so as to enhance the system function and meet the needs of users. The module infers through the RDF file, based on the user request r, according to the RDF graph instance obtained by the RCT model in step 2.1.2, injects the input of the RDF graph and the required key output attributes into the RMAE language configuration file, and completes the corresponding configuration according to the configuration results. Assembly of microservices. In this process, the SmarterContext inference engine proposed by Villegas Machado et al is used to complete the RDF inference process, and finally the Web task sequence is automatically inferred, and the microservice sequence is adaptively adjusted according to the inference result, and proceed to step (2.5);
步骤(2.5)构建监控设施:在微服务序列执行过程中,实时监控用户上下文信息,监控每个微服务加载执行的过程,并实时更新反馈信息,自我修复设施负责处理微服务执行过程中的异常状态,用于提供更好的用户体验。Step (2.5) Build a monitoring facility: During the execution of the microservice sequence, monitor the user context information in real time, monitor the loading and execution process of each microservice, and update the feedback information in real time. The self-healing facility is responsible for handling exceptions during the execution of the microservice. Status, used to provide a better user experience.
优选的,所述步骤2.1的流程如下:基于第一步的需求交互模型,面向需求驱动,明确软件运行时模型建模需求,进而给出需求驱动的微服务(Requirements-DrivenMicroservices,RDM)本体模型和面向用户需求的上下文感知Web任务(Requirements-Oriented Context-Sensitive Tasking,RCT)模型的建模方法,过程如下:Preferably, the process of step 2.1 is as follows: based on the requirement interaction model of the first step, oriented towards requirement-driven, clarify the modeling requirements of the software runtime model, and then give a requirement-driven microservices (Requirements-DrivenMicroservices, RDM) ontology model And the modeling method of the user-oriented context-aware web task (Requirements-Oriented Context-Sensitive Tasking, RCT) model, the process is as follows:
步骤(2.1.1)构建RDM本体模型,其是定义基于微服务的Web交互概念的基本模型和本体,这些概念包括:Step (2.1.1) builds the RDM ontology model, which is the basic model and ontology that defines the web interaction concepts based on microservices, and these concepts include:
用户需求(User Requirements):用户服务需求的表示,可以被转化(transform)为Web任务,也可被表示(representedBy)为服务输出;User Requirements: The representation of user service requirements, which can be transformed (transformed) into Web tasks, or represented (representedBy) as service outputs;
API网关(API Gateway):负责拦截Web任务的请求(request),执行过滤、验证等相关操作;API Gateway: Responsible for intercepting requests for web tasks, performing filtering, verification and other related operations;
Web任务(Web Tasks):用户需求解析而成的各Web服务单元;Web Tasks: Web service units parsed from user requirements;
微服务序列(Microservices Sequence):微服务序列是由(builtBy)若干微服务按序组合而成,Web任务请求也需通过(achieveThrough)微服务序列的按序执行实现,执行过程受用户上下文规约(executionPolicies);Microservices Sequence (Microservices Sequence): Microservices sequence is composed of (builtBy) several microservices in sequence, and Web task requests also need to be implemented through (achieveThrough) the sequential execution of microservices sequence, and the execution process is subject to user context regulations ( executionPolicies);
微服务(Microservices):微服务是微服务序列的基本单元,它包含(contains)相关用户上下文信息,并与(connectsTo)服务资源保持连接。同时,注册表的相关注册信息也有登记(registers)在微服务的描述信息中,保证了不同微服务之间的相互调用(invokes);Microservices (Microservices): A microservice is the basic unit of a microservice sequence. It contains (contains) relevant user context information and maintains a connection with (connectsTo) service resources. At the same time, the relevant registration information of the registry is also registered in the description information of the microservice, which ensures the mutual calls (invokes) between different microservices;
注册表(Registry):注册表记录了各微服务的运行状态、所在服务器的IP地址等信息;Registry: The registry records the running status of each microservice, the IP address of the server where it is located, and other information;
活动(Activity):活动通过微服务的执行(performs),接收(hasParameters)服务输入,并产生(hasResult)相关的服务输出;Activity (Activity): Activity receives (hasParameters) service input through the execution of microservices (performs), and generates (hasResult) related service output;
资源(Resources):服务执行所需的相关软硬件支持,服务的输入有时也需要获取(obtained)资源作为输入的一部分;Resources: The relevant software and hardware support required for service execution, and the input of the service sometimes requires acquired resources as part of the input;
输入(Input):服务执行所需的输入参数及资源条件;Input: Input parameters and resource conditions required for service execution;
输出(Output):服务执行后产生的输出结果;Output: The output result generated after the service is executed;
用户上下文(User Context):表示服务执行过程中的执行环境,包含相关数据、规约信息。User Context: Indicates the execution environment during service execution, including relevant data and protocol information.
RDM本体可以作为RDF(Resource Description Framework)文件形式的运行时模型,并且可以根据用户需求演化来扩展,其中RDF即资源描述框架,其本质是一个数据模型,它提供了一个统一的标准,用于描述实体/资源;进行步骤(2.1.2);RDM ontology can be used as a runtime model in the form of an RDF (Resource Description Framework) file, and can be extended according to the evolution of user requirements. RDF is a resource description framework, which is essentially a data model. It provides a unified standard for describe the entity/resource; proceed to step (2.1.2);
步骤(2.1.2)构建RCT模型,RCT模型是对多伦多大学Eric YU教授等人提出的iStar框架的扩展和重定义,iStar框架在策略依赖模型中定义了四种依赖关系,分别是:目标依赖,表示一个角色依赖另一个角色来完成某一个目标;资源依赖,表示一个角色依赖另一个角色为它提供物理资源和信息;任务依赖,表示一个角色依赖另一个角色来完成某个任务;非功能需求有关的软目标依赖,类似于目标依赖,特别地,扩展了iStar的角色、目标、任务和资源的原子概念,以支持用户需求、Web任务、微服务以及微服务序列之间的映射关系和相关描述规范,RCT模型将以RDF图的形式进行实例化,进行步骤(2.2)。Step (2.1.2) Build the RCT model. The RCT model is an extension and redefinition of the iStar framework proposed by Professor Eric YU of the University of Toronto and others. The iStar framework defines four dependencies in the strategy dependency model, namely: target dependency , which means that a role depends on another role to complete a certain goal; resource dependence means that a role depends on another role to provide it with physical resources and information; task dependence means that a role relies on another role to complete a certain task; non-functional Requirements-related soft target dependencies, similar to target dependencies, in particular, extend iStar's atomic concepts of roles, goals, tasks, and resources to support user requirements, Web tasks, microservices, and the mapping relationship between microservice sequences and For the relevant description specification, the RCT model will be instantiated in the form of an RDF graph, and go to step (2.2).
所述步骤2.4的过程如下:The procedure described in step 2.4 is as follows:
步骤(2.4.1)结合第一步,将微服务架构下需求交互模型的主要概念抽象为需求解析层rLayer、任务委派层tLayer、微服务组装层mLayer和微服务配置层wLayer,分别包含用户需求、Web任务、微服务和RMAE language四种元素,各层间映射关系如下:Step (2.4.1) Combined with the first step, the main concepts of the requirement interaction model under the microservice architecture are abstracted into the requirement analysis layer rLayer, the task delegation layer tLayer, the microservice assembly layer mLayer and the microservice configuration layer wLayer, respectively including user requirements , Web tasks, microservices and RMAE language four elements, the mapping relationship between each layer is as follows:
rLayer-tLayer(多对多):需求解析层的每个用户需求为一次独立的用户请求,一个用户需求由多个Web任务协作完成,而每个Web任务又能参与满足多个用户需求;rLayer-tLayer (many-to-many): each user requirement of the requirement analysis layer is an independent user request, one user requirement is completed by multiple web tasks, and each web task can participate in meeting multiple user requirements;
tLayer-mLayer(一对一):每个Web任务由单个微服务完成,单个微服务也仅能完成一个Web任务;tLayer-mLayer (one-to-one): each web task is completed by a single microservice, and a single microservice can only complete one web task;
mLayer-wLayer(一对一):每个微服务都对应唯一的一个RMAE language配置片段;mLayer-wLayer (one-to-one): each microservice corresponds to a unique RMAE language configuration fragment;
进行步骤(2.4.2);Proceed to step (2.4.2);
步骤(2.4.2)结合步骤(2.1),路由设施通过处理RDM模型将用户需求转化为RCT模型,并生成(Generate)RDF图,该图由多个Web任务构成(Constitute),可满足特定的用户需求,进行步骤(2.4.3);In step (2.4.2) combined with step (2.1), the routing facility converts user requirements into RCT models by processing RDM models, and generates (Generate) RDF diagrams, which are composed of multiple Web tasks (Constitute), which can meet specific requirements. User requirements, go to step (2.4.3);
步骤(2.4.3),采用SmartContext推理引擎将RDF图进行推理,并根据推理得出的Web任务序列将结果值注入(Inject)到RMAE language的nextTag(序列中下一个微服务所对应的执行器)和nextKey(序列中下一个微服务所对应的RMAE language配置)属性中,进行步骤(2.4.4);Step (2.4.3), use the SmartContext inference engine to infer the RDF graph, and inject the result value into the nextTag of the RMAE language (the executor corresponding to the next microservice in the sequence) according to the inferred Web task sequence. ) and nextKey (RMAE language configuration corresponding to the next microservice in the sequence) properties, go to step (2.4.4);
步骤(2.4.4)根据步骤(2.4.3)更新后的RMAE language配置进行微服务序列的组装与调度。In step (2.4.4), the microservice sequence is assembled and scheduled according to the updated RMAE language configuration in step (2.4.3).
所述第三步的过程如下:The process of the third step is as follows:
步骤(3.1)构建需求层(Requirements Layer),RMAE框架面向用户需求进行设计,需求层是框架运行的驱动力所在。在系统运行时的需求发送与响应阶段,需求层负责向服务器发送用户请求,路由设施(Routing Facility)接收并根据用户需求进行任务委派,等待所有组件处理完毕后,执行设施(Execution Facility)将最终结果返回给需求层用户,并完成本次用户请求。进行步骤(3.2);Step (3.1) Build the Requirements Layer. The RMAE framework is designed for user requirements, and the requirements layer is the driving force for the operation of the framework. In the demand sending and response phase when the system is running, the demand layer is responsible for sending user requests to the server, and the Routing Facility receives and delegates tasks according to user needs. After all components are processed, the Execution Facility will finally The result is returned to the user at the demand layer, and the user request is completed. Go to step (3.2);
步骤(3.2)构建处理中枢层(Processing Layer),处理中枢层是框架的核心模块,同时也是微服务的API网关,保证不同用户需求能被正确处理并执行,是框架自适应功能的保障。在系统运行时的路由委派阶段与微服务调度阶段,中枢层先由路由设施(RoutingFacility)根据用户需求,把用户需求转换为RDF图(RDF Graph),搜索匹配树(MappingTree),依据搜索到的结果将Web任务委派给相应的执行器,并通知执行设施(ExecutionFacility)进行加载。当执行设施加载完毕后,执行器准备就绪,但由于此时微服务序列为空,执行器进入等待状态,并向调度设施(Scheduling Facility)发起调度请求。Step (3.2) Build the Processing Layer. The Processing Layer is the core module of the framework and also the API gateway for microservices. It ensures that different user requirements can be correctly processed and executed, which is the guarantee of the framework's adaptive function. In the routing delegation stage and the microservice scheduling stage when the system is running, the central layer first converts the user requirements into an RDF Graph (RDF Graph) by the Routing Facility according to the user's needs, and searches for the matching tree (MappingTree). The result delegates the web task to the corresponding executor and notifies the ExecutionFacility to load. When the execution facility is loaded, the executor is ready, but since the microservice sequence is empty at this time, the executor enters the waiting state and initiates a scheduling request to the Scheduling Facility.
若匹配树中查找结果为空,将用户需求转换的RDF图(RDF Graph)通过SmarterContext推理引擎自适应调整微服务序列,并由调度设施(Scheduling Facility)发起调度请求。If the search result in the matching tree is empty, the RDF Graph converted from the user's requirements is adapted to adjust the microservice sequence through the SmarterContext inference engine, and the Scheduling Facility initiates a scheduling request.
最后调度设施向公共服务器发起查询请求,根据得到的微服务功能及结构信息,前往微服务仓库选取匹配的微服务,组装成有序的微服务序列并返回至执行设施,其中公共服务器部署有RMAE language配置与注册表,并实时将配置信息缓存到内存池(MemoryPool)中,通过心跳模式与其他服务器维持长连接。Finally, the scheduling facility initiates a query request to the public server. According to the obtained microservice function and structure information, it goes to the microservice warehouse to select the matching microservice, assembles it into an orderly sequence of microservices, and returns it to the execution facility. The public server is deployed with RMAE. Language configuration and registry, and cache configuration information in the memory pool (MemoryPool) in real time, and maintain long-term connections with other servers through heartbeat mode.
进行步骤(3.3);Go to step (3.3);
步骤(3.3)构建微服务层(Microservices Layer),微服务层是满足用户需求真正的执行者,根据需求委派的Web任务通过一系列细粒度的微服务协作完成。在系统运行时的微服务调度阶段与监控执行阶段,微服务层负责维护微服务仓库(MicroservicesRepository)中的微服务(Microservice)及相关资源(Resources),并将微服务调度中所需的微服务序列进行组装,组装过程中,不同服务器上微服务之间的相互调用依赖于注册表(Registry)中的信息,该表记录了每个微服务的运行状态,以及所在服务器的IP地址。组装完毕的微服务序列(Microservices Sequence)将返回给中枢层的执行设施,执行设施激活等待中的执行器,并根据微服务调度的结果,将微服务序列逐个加载,加载完毕的微服务由执行器按序执行,直到序列中的所有微服务执行完毕。期间,监控设施(Monitor Facility)将监控每个微服务加载执行的过程,并实时更新反馈信息,自我修复设施负责处理微服务执行过程中的异常状态,用于提供更好的用户体验。Step (3.3) Build the Microservices Layer. The Microservices Layer is the real executor to meet the user's needs. The Web tasks delegated according to the requirements are completed through a series of fine-grained microservices. In the microservice scheduling phase and monitoring execution phase of the system runtime, the microservice layer is responsible for maintaining the microservices (Microservices) and related resources (Resources) in the microservices repository (MicroservicesRepository), and dispatching the microservices required in the microservice scheduling. The sequence is assembled. During the assembly process, the mutual calls between microservices on different servers depend on the information in the registry, which records the running status of each microservice and the IP address of the server where it is located. The assembled microservices sequence (Microservices Sequence) will be returned to the execution facility of the central layer, the execution facility will activate the waiting executor, and according to the result of the microservice scheduling, the microservice sequence will be loaded one by one, and the loaded microservice will be executed by The microservices are executed sequentially until all microservices in the sequence are executed. During this period, the Monitor Facility will monitor the loading and execution process of each microservice, and update the feedback information in real time. The self-healing facility is responsible for handling abnormal states during the execution of the microservice to provide a better user experience.
所述第四步中,控制目标反馈回路CO-FL、动态监控反馈回路M-FL和自适应反馈回路A-FL之间的作用关系是:In the fourth step, the function relationship between the control target feedback loop CO-FL, the dynamic monitoring feedback loop M-FL and the adaptive feedback loop A-FL is:
CO-FL主要负责接收外界的变化信息,以此触发M-FL或A-FL;CO-FL is mainly responsible for receiving external change information to trigger M-FL or A-FL;
M-FL主要负责感测上下文信息(Context Information)、A-FL与CO-FL反馈信息,并将感测信息反馈至CO-FL或A-FL;M-FL is mainly responsible for sensing context information (Context Information), A-FL and CO-FL feedback information, and feeding back the sensing information to CO-FL or A-FL;
A-FL:负责接收CO-FL与M-FL的触发信息,并将自身反馈信息发送至M-FL。A-FL: Responsible for receiving the trigger information of CO-FL and M-FL, and sending its own feedback information to M-FL.
将CO-FL、M-FL和A-FL分别映射到路由委派、监控执行和微服务调度过程中,进而满足变更的用户需求。其中,CO-FL对应于负责接收用户需求的路由委派过程;该层跟踪用户需求的变化,以触发微服务调度或监控执行的适配。路由委派的主要目标是解析用户请求,对Web任务进行委派,确保RMAE能精确处理不断演化的用户需求;M-FL对应监控执行过程,它由协作单元和运行单元共同完成,协作单元负责各单元间的协同。运行单元在执行微服务序列的过程中,时刻受到监控,监控设施会将反馈信息实时动态更新;微服务调度的基础设施由查询单元、装配单元和通知单元组成,对应于A-FL;收到调度请求后,调度设施通过查询单元匹配内存池中的微服务描述信息(包括功能及结构);装配单元根据已有描述信息,前往微服务仓库进行匹配并动态组装微服务序列,若配置的微服务未能成功匹配,则通知单元将请求注册表更新对应的微服务信息。Map CO-FL, M-FL, and A-FL to routing delegation, monitoring execution, and microservice scheduling, respectively, to meet changing user needs. Among them, CO-FL corresponds to the routing delegation process responsible for receiving user requirements; this layer tracks changes in user requirements to trigger microservice scheduling or monitor the execution of adaptations. The main goal of routing delegation is to parse user requests, delegate Web tasks, and ensure that RMAE can accurately handle evolving user needs; M-FL corresponds to monitoring the execution process, which is completed by the collaboration unit and the running unit, and the collaboration unit is responsible for each unit. collaboration between. In the process of executing the microservice sequence, the running unit is constantly monitored, and the monitoring facility will dynamically update the feedback information in real time; the infrastructure for microservice scheduling consists of a query unit, an assembly unit and a notification unit, corresponding to A-FL; After scheduling the request, the scheduling facility matches the microservice description information (including functions and structures) in the memory pool through the query unit; the assembly unit goes to the microservice warehouse for matching and dynamically assembles the microservice sequence according to the existing description information. If the service fails to match successfully, the notification unit will request the registry to update the corresponding microservice information.
所述第五步的过程如下:The process of the fifth step is as follows:
步骤(5.1)利用步骤(2.2)构建的匹配树来对用户需求与路由之间的关系进行预处理,匹配树加载的数据来源于内存池,在系统初始化阶段,框架会将RMAE language配置文件缓存至内存池中,以提高匹配树的执行速度,其中,匹配树节点与RMAE language配置文件的映射关系定义如下:Step (5.1) uses the matching tree constructed in step (2.2) to preprocess the relationship between user requirements and routing. The data loaded by the matching tree comes from the memory pool. During the system initialization phase, the framework will cache the RMAE language configuration file In order to improve the execution speed of the matching tree, the mapping relationship between the matching tree node and the RMAE language configuration file is defined as follows:
elements={element1,element2,element3,…,elementn};elements={element1 , element2 , element3 ,..., elementn };
对于所有element的属性URI,有且仅有一个节点u与URI对应;For all attribute URIs of element, there is one and only one node u corresponding to the URI;
对于所有element元素的属性method,有且仅有一个节点m与method对应,且m为u的子节点,u对应的URI和m对应的method为同一个element的属性;For the attribute method of all element elements, there is one and only one node m corresponding to method, and m is a child node of u, and the URI corresponding to u and the method corresponding to m are attributes of the same element;
对于所有element元素的属性key,有且仅有一个节点t与key对应,且t为m的子节点,m对应的method和t对应的key为同一个element的属性;For the attribute key of all element elements, there is only one node t corresponding to the key, and t is the child node of m, and the method corresponding to m and the key corresponding to t are attributes of the same element;
tag为当前配置片段所对应的路由,即微服务序列的首个执行器;The tag is the route corresponding to the current configuration fragment, that is, the first executor of the microservice sequence;
进行步骤(5.2);Go to step (5.2);
步骤(5.2)路由设施的解析单元根据接收到的Web请求,基于步骤(2.1)解析出有效的用户需求,并运用RDM模型将其转换为相应的RCT模型实现,得出相应的RDF图,进行步骤(5.3);Step (5.2) The parsing unit of the routing facility parses out the valid user requirements based on step (2.1) according to the received Web request, and uses the RDM model to convert it into the corresponding RCT model for realization, and obtains the corresponding RDF diagram. step (5.3);
步骤(5.3)基于步骤(5.1)预加载的匹配树结构,路由设施的转发单元将RDF图中的Web任务委派给相应的执行器,完成路由委派过程。In step (5.3), based on the matching tree structure preloaded in step (5.1), the forwarding unit of the routing facility delegates the Web task in the RDF graph to the corresponding executor to complete the routing delegation process.
所述第六步的过程如下:The process of the sixth step is as follows:
步骤(6.1)接收用户请求,程序执行器executor检索执行请求url,若结果为空,则结束,否则进行步骤(6.2);Step (6.1) receives the user request, the program executor executor retrieves the execution request url, if the result is empty, it ends, otherwise, go to step (6.2);
步骤(6.2)解析用户请求,获得请求参数profile,根据请求参数profile以及步骤(2.1)完成运行时模型构建(RDM模型和RCT模型),进行步骤(6.3);Step (6.2) parses the user request, obtains the request parameter profile, completes the runtime model construction (RDM model and RCT model) according to the request parameter profile and step (2.1), and proceeds to step (6.3);
步骤(6.3)基于第五步,结合RCT模型到内存池MemoryPool中获取对应的配置片段config,若配置片段config为空,则结束,否则进行步骤(6.4);Step (6.3) is based on the fifth step, combined with the RCT model to obtain the corresponding configuration segment config from the memory pool MemoryPool, if the configuration segment config is empty, end, otherwise go to step (6.4);
步骤(6.4)遍历配置片段config的微服务,若遍历完成,则进行步骤(6.7),否则取出下一个微服务Microservicei,由调度设施前往微服务仓库选取匹配的微服务Microservicei,进行步骤(6.5);Step (6.4) traverse the microservices of the configuration segment config, if the traversal is completed, go to step (6.7), otherwise take out the next microservice Microservicei , go to the microservice warehouse by the scheduling facility to select the matching microservice Microservicei , and perform step ( 6.5);
步骤(6.5)若微服务仓库MicroservicesRepository中包含微服务Microservicei,则将Microservicei加入微服务序列Microservices,返回步骤(6.4),否则进行步骤(6.6);Step (6.5) If the microservice repository MicroservicesRepository contains the microservice Microservicei , add Microservicei to the microservice sequence Microservices, and return to step (6.4), otherwise proceed to step (6.6);
步骤(6.6)调用注册表更新RMAE language配置文件,并将更新结果存入内存池MemoryPool,返回步骤(6.4);Step (6.6) calls the registry to update the RMAE language configuration file, and stores the update result in the memory pool MemoryPool, and returns to step (6.4);
步骤(6.7)将微服务序列Microservices返回至执行设施,执行设施激活等待中的执行器,将微服务序列Microservices按序加载执行,直到序列中的所有微服务执行完毕。Step (6.7) returns the microservice sequence Microservices to the execution facility, the execution facility activates the waiting executor, and loads and executes the microservice sequence Microservices in sequence until all the microservices in the sequence are executed.
所述第七步的过程如下:The process of the seventh step is as follows:
步骤(7.1)监控执行设施由协作单元和运行单元组成,运行单元又分为监控执行器MonitorExecutor和微服务序列Microservices两部分;Step (7.1) The monitoring execution facility is composed of a cooperation unit and an operation unit, and the operation unit is further divided into two parts: the monitoring executor MonitorExecutor and the microservice sequence Microservices;
步骤(7.1.1)MonitorExecutor监控每个微服务加载执行的过程,并实时更新反馈信息,MonitorExecutor将每个微服务的状态信息存储在内存中,名称为MonitorMS,其数据结构为一个HashMap,其中key表示各微服务的主键值,即由RMAE language配置文件中element元素中mappingAttr的子属性key以及element下ms的序数组成,确保每个微服务在RMAE中都只有一个唯一的主键值。MonitorMS的value表示微服务在所在服务器的正常运行指数,系统管理员会设置范围0到100之间的一个阈值来决定该微服务的执行状态,若value大于阈值,该微服务被判断为运行正常,若value小于阈值,则该微服务被判断为失效。微服务每一次被调用成功都会提升MonitorMS的value的值,最大为100,微服务每一次被调用失败都会降低MonitorMS的value的值,最小为0;Step (7.1.1) MonitorExecutor monitors the process of loading and executing each microservice, and updates the feedback information in real time. MonitorExecutor stores the status information of each microservice in memory, named MonitorMS, and its data structure is a HashMap, in which the key Indicates the primary key value of each microservice, which is composed of the sub-attribute key of mappingAttr in the element element in the RMAE language configuration file and the ordinal number of ms under the element, ensuring that each microservice has only one unique primary key value in RMAE. The value of MonitorMS represents the normal operation index of the microservice on the server where it is located. The system administrator will set a threshold between 0 and 100 to determine the execution status of the microservice. If the value is greater than the threshold, the microservice is judged to be running normally. , if the value is less than the threshold, the microservice is judged to be invalid. Each time the microservice is called successfully, the value of MonitorMS will be increased, the maximum is 100, and each time the microservice is called unsuccessfully, the value of MonitorMS will be reduced, and the minimum value is 0;
步骤(7.1.2)基于第五步,运行单元根据路由委派的结果加载MonitorExecutor,然后MonitorExecutor检查当前微服务序列Microservices的状态,包括Microservices的组成元素,执行顺序,个数信息。在微服务序列执行期间,为了保证微服务有序运行,MonitorExecutor在同一时刻只处理单个微服务;Step (7.1.2) is based on the fifth step, the running unit loads the MonitorExecutor according to the result of the routing delegation, and then the MonitorExecutor checks the status of the current microservice sequence Microservices, including the constituent elements, execution order, and number information of the Microservices. During the execution of the microservice sequence, in order to ensure the orderly operation of the microservice, the MonitorExecutor only processes a single microservice at the same time;
步骤(7.2)MonitorExecutor遍历微服务序列Microservices,若遍历完成则结束,否则取出下一个微服务Microservicei,进行步骤(7.3);Step (7.2) MonitorExecutor traverses the microservice sequence Microservices, if the traversal is completed, it ends, otherwise it takes out the next microservice Microservicei and goes to step (7.3);
步骤(7.3)考虑在RMAE框架中可能查找相似微服务也能完成用户需求,且性能更好,因此将微服务Microservicei配置、RMAE language的规则配置进行匹配,找出则返回步骤(7.2),否则进行步骤(7.4),匹配过程如下:In step (7.3), considering that it is possible to find similar microservices in the RMAE framework, the user's requirements can be fulfilled, and the performance is better. Therefore, the microservice Microservicei configuration and the RMAE language rule configuration are matched, and if found, return to step (7.2), Otherwise, go to step (7.4), the matching process is as follows:
步骤(7.3.1)在RMAE language的规则配置文件中找出所有与Microservicei相似的微服务,即取出Microservicei中的param,output,description元素,与RMAE language的规则配置文件中每个ms中的param,output,description元素进行匹配,规则为:Step (7.3.1) Find all microservices similar to Microservicei in the rule configuration file of RMAE language, that is, take out the param, output, description elements in Microservicei , which are the same as those in each ms in the rule configuration file of RMAE language The param, output, description elements are matched, the rules are:
match=w1*ms-param+w2*ms-output+w3*ms-descriptionmatch=w1*ms-param+w2*ms-output+w3*ms-description
其中,w1,w2与w3为每个元素相似度的权重值,且w1+w2+w3=1。match为匹配结果值,系统管理员根据经验设置阈值experience来决定是否匹配,如果match大于experience,则把该微服务的信息加入匹配状态集MatchReq中。Among them, w1, w2 and w3 are the weight values of the similarity of each element, and w1+w2+w3=1. match is the matching result value. The system administrator sets the threshold experience to determine whether to match. If the match is greater than experience, the information of the microservice is added to the matching state set MatchReq.
其中ms-param代表param参数的匹配情况,它是基于param参数个数一致的前提下,由每个参数的词汇相似度计算得出;结合WordNet计算词汇相似度,WordNet是由普林斯顿大学认识科学实验室在心理学教授米勒的指导下建立和维护的英语词典,是一个覆盖范围宽广的英语词汇语义网。Among them, ms-param represents the matching of param parameters. It is calculated from the lexical similarity of each parameter under the premise that the number of param parameters is the same. Combined with WordNet to calculate lexical similarity, WordNet was developed by Princeton University Cognitive Science The English dictionary established and maintained by the laboratory under the guidance of psychology professor Miller is a wide-ranging semantic web of English vocabulary.
同理,ms-output代表output参数的匹配情况,基于output元素个数一致且每个元素的词汇相似度计算得出。Similarly, ms-output represents the matching of output parameters, which is calculated based on the same number of output elements and the lexical similarity of each element.
ms-description代表微服务文本描述的匹配情况,对Microservicei和ms中的description进行文本相似度计算得出,基于TF-IDF方法与WordNet计算文本相似度,其中TF-IDF是一种统计方法,用以评估一字词对于一个文件集或一个语料库中的其中一份文件的重要程度。通过TF-IDF方法提取出Microservicei和ms中的特征性词汇(词汇个数是由描述文本规模乘以经验比例值所得),再结合WordNet对这些词汇逐一进行语义相似度计算并相加,最终得出微服务文本描述的匹配情况。ms-description represents the matching situation of the microservice text description. The text similarity is calculated by the description in Microservicei and ms. The text similarity is calculated based on the TF-IDF method and WordNet, where TF-IDF is a statistical method. Used to assess the importance of a word to one of the documents in a document set or corpus. The characteristic words in Microservicei and ms are extracted by the TF-IDF method (the number of words is obtained by multiplying the scale of the description text by the empirical scale value), and then combined with WordNet, the semantic similarity of these words is calculated and added one by one, and finally Find a match for the textual description of the microservice.
步骤(7.3.2)遍历完毕后,生成最终的匹配状态集MatchReq,MatchReq是一个有序集合,里面每一个元素都是和Microservicei相似的微服务;After step (7.3.2) is traversed, the final matching state set MatchReq is generated. MatchReq is an ordered set, and each element in it is a microservice similar to Microservicei ;
步骤(7.3.3)遍历匹配状态集MatchReq,对里面的元素进行重新排序,排序方法为:计算每个微服务在MonitorMS的value值,并根据value值从大到小进行排序,即把服务质量最好的微服务排在集合最前面,替换原来的Microservicei;Step (7.3.3) Traverse the matching state set MatchReq, and reorder the elements in it. The sorting method is: calculate the value of each microservice in MonitorMS, and sort it according to the value from large to small, that is, the quality of service The best microservice is at the top of the collection, replacing the original Microservicei ;
步骤(7.4)在没有找到其他相似微服务的情况下,监控执行器MonitorExecutor计算MonitorMS中key为Microservicei的value值,如果value高于正常的阈值,返回步骤(7.2),否则认为该微服务已经失效,触发自适应软件系统参考模型DYNAMICO的监控回馈机制,进行步骤(7.5);Step (7.4) If no other similar microservices are found, the monitoring executor MonitorExecutor calculates the value of the key Microservicei in MonitorMS. If the value is higher than the normal threshold, return to step (7.2), otherwise the microservice is considered to have been If it fails, trigger the monitoring feedback mechanism of the adaptive software system reference model DYNAMICO, and go to step (7.5);
步骤(7.5)为保障整个微服务序列Microservices的有效执行,需要修复当前失效的微服务,算法执行adaptiveMode方法,该方法将向系统管理员发放邮件与短信通知,请管理员对该微服务进行故障恢复或提供相似微服务,并设置方法返回值adaptiveModeRES的值为manual,同时设定计时,如果管理员在规定时间内执行了微服务进行故障恢复操作或提供相似微服务,则执行步骤(7.3)。重新进行微服务遍历匹配。如果超过时间故障未排除,则将adaptiveModeRES的值自动更新为assistant,执行步骤(7.6);Step (7.5) In order to ensure the effective execution of the entire microservice sequence Microservices, the currently invalid microservice needs to be repaired, and the algorithm executes the adaptiveMode method, which will send email and SMS notification to the system administrator, asking the administrator to troubleshoot the microservice Restore or provide similar microservices, and set the value of the method return value adaptiveModeRES to manual, and set the timing. If the administrator executes the microservices within the specified time to perform fault recovery operations or provide similar microservices, perform step (7.3) . Perform microservice traversal matching again. If the fault has not been eliminated over time, automatically update the value of adaptiveModeRES to assistant, and execute step (7.6);
步骤(7.6)基于用户上下文环境,执行第六步的RMAE协作算法,若程序执行至分支步骤(6.6),重新执行步骤(7.3)匹配相似微服务,若匹配失败,证明重新构建微服务序列失败,终止当前用户请求。Step (7.6) Based on the user context, execute the RMAE collaboration algorithm in step 6. If the program executes to branch step (6.6), re-execute step (7.3) to match similar microservices. If the match fails, it proves that the reconstruction of the microservice sequence failed. , terminates the current user request.
本发明的有益效果是,面向动态变更的用户需求以及复杂多变的分布式网络环境,提出了一种需求驱动的微服务应用自适应演化框架RMAE和相对应的微服务自适应监控算法,确保RMAE框架可以对不断变化的Web任务需求进行有效管理,进而保证微服务环境下Web分布式软件能够动态地根据用户需求进行自适应调整演化。The beneficial effect of the invention is that, facing the dynamically changing user requirements and the complex and changeable distributed network environment, a demand-driven micro-service application adaptive evolution framework RMAE and a corresponding micro-service adaptive monitoring algorithm are proposed to ensure that The RMAE framework can effectively manage the ever-changing web task requirements, thereby ensuring that the web distributed software in the microservice environment can dynamically adjust and evolve according to user needs.
附图说明Description of drawings
图1示出了微服务架构下需求交互模型概念图。Figure 1 shows a conceptual diagram of the demand interaction model under the microservice architecture.
图2示出了RDM本体模型图。Figure 2 shows the RDM ontology model diagram.
图3示出了RCT模型图。Figure 3 shows the RCT model diagram.
图4示出了微服务调度超网络图。Figure 4 shows a microservice scheduling hypernetwork diagram.
图5示出了RMAE架构图。Figure 5 shows an RMAE architecture diagram.
图6示出了上下文驱动的自适应软件系统参考模型DYNAMICO。Figure 6 shows the context-driven adaptive software system reference model DYNAMICO.
图7示出酒店预订场景下的RCT模型。Figure 7 shows the RCT model in the hotel reservation scenario.
具体实施方式Detailed ways
下面结合附图对本发明做进一步说明。The present invention will be further described below with reference to the accompanying drawings.
参照图1~图7,一种基于微服务的Web分布式软件演化与监控方法,所述Web分布式软件演化与监控方法包括以下步骤:1 to 7, a microservice-based Web distributed software evolution and monitoring method, the Web distributed software evolution and monitoring method includes the following steps:
第一步、在Web应用程序中,用户的需求和上下文决定了Web交互的决策和行为,为此,这些应用程序必须将用户的需求转化为可以代表用户自动执行的一系列Web任务,以提供更好的用户体验;Step 1. In web applications, the user's needs and context determine the decisions and behaviors of web interactions, and for this, these applications must translate the user's needs into a series of web tasks that can be automatically performed on the user's behalf to provide better user experience;
RMAE的实现需要SAS系统的实施,以在微服务架构下尽可能地支持自动化调整,因此,先构建如图1所示的微服务架构下需求交互模型,模型模块如下:The implementation of RMAE requires the implementation of the SAS system to support automatic adjustment as much as possible under the microservice architecture. Therefore, first build the demand interaction model under the microservice architecture as shown in Figure 1. The model modules are as follows:
1.1用户需求解析(User Requirement Parsing):即系统必须能够将用户的需求转化为规范的需求描述信息;1.1 User Requirement Parsing: that is, the system must be able to convert the user's requirements into standardized requirement description information;
1.2任务委派(Task Delegation):即系统必须能够将用户的请求派发给具有相应功能的组件进行处理;1.2 Task Delegation: that is, the system must be able to dispatch the user's request to a component with corresponding functions for processing;
1.3微服务配置(Microservice Configuration):通过RMAE language配置文件描述微服务,并将用户需求与微服务进行映射;1.3 Microservice Configuration: Describe microservices through RMAE language configuration files, and map user requirements with microservices;
1.4微服务组装(Microservice Assembly):即系统必须定义满足用户需求所需微服务的有序序列,包括结构间关系,输入和输出规范;1.4 Microservice Assembly: That is, the system must define an ordered sequence of microservices required to meet user needs, including relationships between structures, input and output specifications;
1.5微服务执行(Microservice Execution):即系统必须能够在执行选定的微服务序列时,进行生命周期控制、自我修复等管理活动;1.5 Microservice Execution: that is, the system must be able to perform management activities such as life cycle control and self-repair when executing the selected sequence of microservices;
1.6上下文感知和自适应支持(Context Awareness and Self-AdaptionSupport):即系统必须能够通过感知上下文来发现用户需求变更,并做出相应的自适应调整;1.6 Context Awareness and Self-Adaption Support: That is, the system must be able to detect changes in user needs by sensing the context, and make corresponding adaptive adjustments;
第二步、给出RMAE框架所需的关键组件模块,过程如下:The second step is to give the key component modules required by the RMAE framework. The process is as follows:
步骤(2.1)构建路由设施,以RCT模型的形式来表示用户需求,该模块中的组件主要执行从用户请求中解析出需求信息和运用RDM模型将需求转化为RCT模型实例这两个活动,流程如下:Step (2.1) Build a routing facility to represent user requirements in the form of an RCT model. The components in this module mainly perform two activities: parsing the requirement information from the user request and using the RDM model to convert the requirements into an RCT model instance. The process as follows:
基于第一步的需求交互模型,面向需求驱动,明确软件运行时模型建模需求,进而给出需求驱动的微服务(Requirements-Driven Microservices,RDM)本体模型和面向用户需求的上下文感知Web任务(Requirements-Oriented Context-Sensitive Tasking,RCT)模型的建模方法,过程如下:Based on the requirement interaction model of the first step, facing the requirement-driven, the software runtime model modeling requirements are clarified, and then the requirements-driven microservices (Requirements-Driven Microservices, RDM) ontology model and the context-aware Web tasks oriented to user requirements ( The modeling method of the Requirements-Oriented Context-Sensitive Tasking, RCT) model, the process is as follows:
步骤(2.1.1)结合图2,构建RDM本体模型,其是定义基于微服务的Web交互概念的基本模型和本体,这些概念包括:Step (2.1.1) In conjunction with Figure 2, construct the RDM ontology model, which is the basic model and ontology that defines the web interaction concepts based on microservices. These concepts include:
用户需求(User Requirements):用户服务需求的表示,可以被转化(transform)为Web任务,也可被表示(representedBy)为服务输出;User Requirements: The representation of user service requirements, which can be transformed (transformed) into Web tasks, or represented (representedBy) as service outputs;
API网关(API Gateway):负责拦截Web任务的请求(request),执行过滤、验证等相关操作;API Gateway: Responsible for intercepting requests for web tasks, performing filtering, verification and other related operations;
Web任务(Web Tasks):用户需求解析而成的各Web服务单元;Web Tasks: Web service units parsed from user requirements;
微服务序列(Microservices Sequence):微服务序列是由(builtBy)若干微服务按序组合而成,Web任务请求也需通过(achieveThrough)微服务序列的按序执行实现,执行过程受用户上下文规约(executionPolicies);Microservices Sequence (Microservices Sequence): Microservices sequence is composed of (builtBy) several microservices in sequence, and Web task requests also need to be implemented through (achieveThrough) the sequential execution of microservices sequence, and the execution process is subject to user context regulations ( executionPolicies);
微服务(Microservices):微服务是微服务序列的基本单元,它包含(contains)相关用户上下文信息,并与(connectsTo)服务资源保持连接。同时,注册表的相关注册信息也有登记(registers)在微服务的描述信息中,保证了不同微服务之间的相互调用(invokes);Microservices (Microservices): A microservice is the basic unit of a microservice sequence. It contains (contains) relevant user context information and maintains a connection with (connectsTo) service resources. At the same time, the relevant registration information of the registry is also registered in the description information of the microservice, which ensures the mutual calls (invokes) between different microservices;
注册表(Registry):注册表记录了各微服务的运行状态、所在服务器的IP地址等信息;Registry: The registry records the running status of each microservice, the IP address of the server where it is located, and other information;
活动(Activity):活动通过微服务的执行(performs),接收(hasParameters)服务输入,并产生(hasResult)相关的服务输出;Activity (Activity): Activity receives (hasParameters) service input through the execution of microservices (performs), and generates (hasResult) related service output;
资源(Resources):服务执行所需的相关软硬件支持,服务的输入有时也需要获取(obtained)资源作为输入的一部分;Resources: The relevant software and hardware support required for service execution, and the input of the service sometimes requires acquired resources as part of the input;
输入(Input):服务执行所需的输入参数及资源条件;Input: Input parameters and resource conditions required for service execution;
输出(Output):服务执行后产生的输出结果;Output: The output result generated after the service is executed;
用户上下文(User Context):表示服务执行过程中的执行环境,包含输入、输出、服务执行的前置规约、服务执行后的约束条件信息。User Context: Indicates the execution environment during service execution, including input, output, pre-stipulations for service execution, and constraint information after service execution.
RDM本体可以作为RDF(Resource Description Framework)文件形式的运行时模型,并且可以根据用户需求演化来扩展。其中RDF即资源描述框架,其本质是一个数据模型,它提供了一个统一的标准,用于描述实体/资源。进行步骤(2.1.2);RDM ontology can be used as a runtime model in the form of RDF (Resource Description Framework) files, and can be extended according to the evolution of user requirements. Among them, RDF is the resource description framework, and its essence is a data model, which provides a unified standard for describing entities/resources. Proceed to step (2.1.2);
步骤(2.1.2)构建RCT模型,RCT模型是本发明对多伦多大学Eric YU教授等人提出的iStar框架的扩展和重定义,iStar框架在策略依赖模型中定义了四种依赖关系,分别是:目标依赖,表示一个角色依赖另一个角色来完成某一个目标;资源依赖,表示一个角色依赖另一个角色为它提供物理资源和信息;任务依赖,表示一个角色依赖另一个角色来完成某个任务;非功能需求有关的软目标依赖,类似于目标依赖。特别地,本发明扩展了iStar的角色、目标、任务和资源的原子概念,以支持用户需求、Web任务、微服务以及微服务序列之间的映射关系和相关描述规范,RCT模型将以RDF图的形式进行实例化。图3是本发明给出的RCT模型图,椭圆形节点表示用户需求(RCT需求节点),六边形节点表示Web子任务,六边形节点左上方的井号表示Web子任务序号,圆形表示服务,矩形表示信息资源。进行步骤(2.2);Step (2.1.2) builds the RCT model, the RCT model is the expansion and redefinition of the iStar framework proposed by Professor Eric YU et al. of the University of Toronto in the present invention, and the iStar framework defines four kinds of dependencies in the strategy dependency model, which are respectively: Goal dependency means that a role depends on another role to complete a certain goal; resource dependency means that a role relies on another role to provide it with physical resources and information; task dependency means that a role relies on another role to complete a certain task; Soft target dependencies related to non-functional requirements, similar to target dependencies. In particular, the present invention expands the atomic concepts of iStar's roles, goals, tasks and resources to support user requirements, Web tasks, microservices, and the mapping relationship and related description specifications between microservice sequences. The RCT model will be represented by RDF diagrams. instantiated in the form of . Fig. 3 is the RCT model diagram that the present invention provides, the oval node represents the user's demand (RCT demand node), the hexagonal node represents the Web subtask, the pound sign on the upper left of the hexagonal node represents the Web subtask sequence number, the circle Represents services, and rectangles represent information resources. Proceed to step (2.2);
步骤(2.2)构建匹配树(Mapping Tree),该模块负责实例化RDF图中Web任务、用户需求与执行器之间的映射关系,并以一种树形结构进行存储,通过该结构,系统能够快速定位对应的执行器,提高任务委派效率。Step (2.2) Build a Mapping Tree. This module is responsible for instantiating the mapping relationship between Web tasks, user requirements and executors in the RDF graph, and stores it in a tree structure. Through this structure, the system can Quickly locate the corresponding executor to improve task delegation efficiency.
一个匹配树T可表示为由其根节点和多个索引结构组成的二元组A matching tree T can be represented as a two-tuple consisting of its root node and multiple index structures
T=<v,{RS}>,T=<v,{RS}>,
其中,v为根节点(虚拟节点),代表所有用户请求的起点;RS为索引结构,表示用户请求的资源路径u、执行方法m和转发目标s之间的对应关系.RS的数目与系统所提供的微服务数量有关。Among them, v is the root node (virtual node), representing the starting point of all user requests; RS is the index structure, representing the correspondence between the resource path u requested by the user, the execution method m and the forwarding target s. The number of RSs is related to the system Depends on the number of microservices provided.
匹配树的性质如下:The properties of the matching tree are as follows:
给定用户请求r,在T中,对于资源路径节点u,仅当用户请求r的路径u'∈u时,访问u的所有子节点,并对于m∈RS,验证用户请求r的执行方法与m的匹配关系,其中用户请求r的执行方法与互联网的HTTP协议方法相对应,包括GET、POST、PUT、PATCH、DELETE;Given a user request r, in T, for the resource path node u, only when the user requests the path u'∈u of r, visit all the child nodes of u, and for m∈RS, verify that the execution method of the user request r is the same as The matching relationship of m, where the execution method of the user request r corresponds to the HTTP protocol method of the Internet, including GET, POST, PUT, PATCH, DELETE;
给定用户请求r,对于方法节点m,有且仅有一个子节点t符合条件;Given a user request r, for method node m, there is one and only one child node t that meets the condition;
给定匹配节点u的用户请求r,对于方法节点m,仅当用户请求r的执行方法m'∈m时,访问m的唯一子节点t,进一步,根据子节点t的值跳转至对应转发目标s中。Given a user request r matching node u, for method node m, only when the user requests the execution method m'∈m of r, access the only child node t of m, and further, jump to the corresponding forwarding according to the value of the child node t target s.
进行步骤(2.3);Go to step (2.3);
步骤(2.3)采用RMAE language文件描述微服务,RMAE language描述的是一种基于RMAE的用户需求转换规则。本发明选择XML文件作为RMAE language的载体,XML是一种标记语言,它的结构使其能具有良好的扩展性,便于直观阅读,也更利于RMAE体现出动态适应性。Step (2.3) uses the RMAE language file to describe the microservice, and the RMAE language describes a user requirement transformation rule based on RMAE. The present invention selects XML file as the carrier of RMAE language. XML is a kind of markup language, and its structure enables it to have good expansibility, is convenient for intuitive reading, and is more conducive to RMAE to reflect dynamic adaptability.
基于RMAE language,本发明把每个功能点的个性化需求映射到各个微服务的功能描述上,较大粒度的用户需求通过微服务间相互组合的结构关系映射出来。RMAElanguage把用户需求归为数据浏览(browse)、数据删除(delete)、数据增加(insert)、数据更新(update)、数据导入(import)、数据导出(export)和其他业务逻辑(other)这7个主要组成部分,并映射到相应的XML载体中,RMAE language的核心结构定义如下:Based on the RMAE language, the present invention maps the individualized requirements of each function point to the functional description of each microservice, and the larger-grained user requirements are mapped out through the structural relationship of the microservices combined with each other. RMAElanguage categorizes user requirements into data browsing (browse), data deletion (delete), data addition (insert), data update (update), data import (import), data export (export) and other business logic (other). The main components are mapped to the corresponding XML carrier. The core structure of RMAE language is defined as follows:
element元素代表一组微服务,一个微服务序列包含多组微服务,即多个element元素构成一个微服务序列。element元素使用半形式化方法来描述:The element element represents a group of microservices, and a microservice sequence contains multiple groups of microservices, that is, multiple element elements form a microservice sequence. The element element is described using semi-formal methods:
element=elementAttr,[ms]element=elementAttr,[ms]
elementAttr=mappingAttr,(description),nextMSelementAttr=mappingAttr,(description),nextMS
mappingAttr=key,URI,methodmappingAttr=key,URI,method
nextMS=(nextTag),(nextKey)nextMS=(nextTag),(nextKey)
method=‘GET’|‘POST’|‘PUT’|‘PATCH’|‘DELETE’method='GET'|'POST'|'PUT'|'PATCH'|'DELETE'
nextTag=‘browse’|‘delete’|‘insert’|‘update’|‘import’|‘export’|‘other’nextTag='browse'|'delete'|'insert'|'update'|'import'|'export'|'other'
其中,element元素由element属性elementAttr与若干微服务ms构成,elementAttr包括映射属性mappingAttr、该组微服务的描述信description与微服务序列中的下一个微服务nextMS,mappingAttr中的子属性URI、method、key分别映射为匹配树中的u、m、t节点,nextMS中的子属性nextTag与nextKey则分别表示微服务序列中下一个微服务所对应的执行器和RMAE language配置,nextTag中browse、delete、insert、update、import、export、other七种值代表用户需求对微服务七种操作逻辑的映射,属性method与互联网的HTTP协议方法相对应,包括GET、POST、PUT、PATCH、DELETE。Among them, the element element is composed of element attribute elementAttr and several microservices ms. elementAttr includes mapping attribute mappingAttr, the description letter description of the group of microservices and the next microservice nextMS in the microservice sequence, and the sub-attributes URI, method, The keys are mapped to the u, m, and t nodes in the matching tree, respectively. The sub-attributes nextTag and nextKey in nextMS represent the executor and RMAE language configuration corresponding to the next microservice in the microservice sequence, respectively. In nextTag, browse, delete, The seven values of insert, update, import, export, and other represent the mapping of user requirements to the seven operational logics of microservices. The attribute method corresponds to the HTTP protocol methods of the Internet, including GET, POST, PUT, PATCH, and DELETE.
同一element下的ms为同类微服务,其先后顺序决定了微服务执行的次序。ms元素半形式化方法描述如下:The ms under the same element are microservices of the same type, and their order determines the order in which the microservices are executed. The ms element semi-formal method is described as follows:
ms=msAttr,{param},viewms=msAttr,{param},view
msAttr=type,value,(description)msAttr=type,value,(description)
view={title},{output}view={title},{output}
type=‘class’|‘service’|‘sql’type='class'|'service'|'sql'
其中,微服务ms由微服务属性msAttr、输入参数param以及返回给用户的可视化参数view组成,view包括标题title与输出参数output,msAttr包含微服务的描述信息description和子属性type、value,属性type表明了微服务的实现方式,若值为class表示通过反射机制执行对应本地程序类,属性value为执行类的名称;若值为service则表示调用外部服务来完成,属性value为该服务的调用接口;当值为sql时则表示对关系型数据库的动态执行,相应地,属性value为执行所需SQL语句,RMAE能提供对关系型数据库数据处理自动化的支持,包括SQL语句的参数注入、动态执行、返回对象自动封装及服务化等功能。Among them, the microservice ms consists of the microservice attribute msAttr, the input parameter param, and the visual parameter view returned to the user. The view includes the title title and the output parameter output. The msAttr contains the description information of the microservice and the sub-attributes type and value. The attribute type indicates Indicates the implementation of the microservice. If the value is class, it means that the corresponding local program class is executed through the reflection mechanism, and the attribute value is the name of the execution class; if the value is service, it means calling an external service to complete, and the attribute value is the calling interface of the service; When the value is sql, it means dynamic execution of relational database. Correspondingly, the attribute value is the SQL statement required for execution. RMAE can provide automatic support for relational database data processing, including parameter injection, dynamic execution, The return object is automatically encapsulated and serviced.
param元素代表微服务执行所需要的输入参数,这部分使用半形式化方法描述如下:The param element represents the input parameters required for the execution of the microservice. This part is described as follows using a semi-formal method:
param=(notNull),scopeparam=(notNull),scope
notNull=TRUE|FALSEnotNull=TRUE|FALSE
scope=(request),(session),(application)scope=(request),(session),(application)
session=TRUE|FALSEsession=TRUE|FALSE
request=TRUE|FALSErequest=TRUE|FALSE
application=TRUE|FALSEapplication=TRUE|FALSE
其中,param由属性notNull和scope组成,notNull表示param是否允许为空,scope代表请求作用域范围,其内部包含三个布尔型子属性request、session与application,它们分别表示请求作用域是否为request、session与application。Among them, param consists of attributes notNull and scope, notNull indicates whether param is allowed to be empty, scope represents the scope of the request scope, and it contains three Boolean sub-attributes request, session and application, which respectively indicate whether the request scope is request, session and application.
进行步骤(2.4);Proceed to step (2.4);
步骤(2.4)构建调度设施,单个微服务通常无法满足大多数用户需求,因此需要将多个具有单一功能的微服务组装成较大粒度的微服务序列,从而增强系统功能,满足用户需求。该模块通过RDF文件推理,基于用户请求r,根据步骤2.1.2的RCT模型所得出的RDF图实例,将RDF图的输入与需要的关键输出属性注入RMAE language配置文件中,并依据配置结果完成相应微服务的组装。在这一过程中,本发明采用Villegas Machado等人提出的SmarterContext推理引擎来完成RDF的推理过程,最终自动推理出Web任务序列,并根据推理结果自适应调整微服务序列,进行步骤(2.5);Step (2.4) Build scheduling facilities. A single microservice usually cannot meet the needs of most users, so it is necessary to assemble multiple microservices with a single function into a sequence of microservices with a larger granularity, so as to enhance system functions and meet user needs. This module infers through the RDF file, based on the user request r, according to the RDF graph instance obtained by the RCT model in step 2.1.2, injects the input of the RDF graph and the required key output attributes into the RMAE language configuration file, and completes it according to the configuration results. Assembly of the corresponding microservices. In this process, the present invention uses the SmarterContext inference engine proposed by Villegas Machado et al. to complete the RDF inference process, and finally automatically infers the Web task sequence, and adaptively adjusts the microservice sequence according to the inference result, and performs step (2.5);
结合图4,步骤2.4的详细过程如下:Combined with Figure 4, the detailed process of step 2.4 is as follows:
步骤(2.4.1)结合第一步,将微服务架构下需求交互模型的主要概念抽象为需求解析层rLayer、任务委派层tLayer、微服务组装层mLayer和微服务配置层wLayer,分别包含用户需求、Web任务、微服务和RMAE language四种元素,各层间映射关系如下:Step (2.4.1) Combined with the first step, the main concepts of the requirement interaction model under the microservice architecture are abstracted into the requirement analysis layer rLayer, the task delegation layer tLayer, the microservice assembly layer mLayer and the microservice configuration layer wLayer, respectively including user requirements , Web tasks, microservices and RMAE language four elements, the mapping relationship between each layer is as follows:
rLayer-tLayer(多对多):需求解析层的每个用户需求为一次独立的用户请求,一个用户需求由多个Web任务协作完成,而每个Web任务又能参与满足多个用户需求;rLayer-tLayer (many-to-many): each user requirement of the requirement analysis layer is an independent user request, one user requirement is completed by multiple web tasks, and each web task can participate in meeting multiple user requirements;
tLayer-mLayer(一对一):每个Web任务由单个微服务完成,单个微服务也仅能完成一个Web任务;tLayer-mLayer (one-to-one): each web task is completed by a single microservice, and a single microservice can only complete one web task;
mLayer-wLayer(一对一):每个微服务都对应唯一的一个RMAE language配置片段。mLayer-wLayer (one-to-one): Each microservice corresponds to a unique RMAE language configuration fragment.
进行步骤(2.4.2);Proceed to step (2.4.2);
步骤(2.4.2)结合步骤(2.1),路由设施通过处理RDM模型将用户需求转化为RCT模型,并生成(Generate)RDF图,该图由多个Web任务构成(Constitute),可满足特定的用户需求,进行步骤(2.4.3);In step (2.4.2) combined with step (2.1), the routing facility converts user requirements into RCT models by processing RDM models, and generates (Generate) RDF diagrams, which are composed of multiple Web tasks (Constitute), which can meet specific requirements. User requirements, go to step (2.4.3);
步骤(2.4.3),采用SmartContext推理引擎将RDF图进行推理,并根据推理得出的Web任务序列将结果值注入(Inject)到RMAE language的nextTag(序列中下一个微服务所对应的执行器)和nextKey(序列中下一个微服务所对应的RMAE language配置)属性中,进行步骤(2.4.4);Step (2.4.3), use the SmartContext inference engine to infer the RDF graph, and inject the result value into the nextTag of the RMAE language (the executor corresponding to the next microservice in the sequence) according to the inferred Web task sequence. ) and nextKey (RMAE language configuration corresponding to the next microservice in the sequence) properties, go to step (2.4.4);
步骤(2.4.4)根据步骤(2.4.3)更新后的RMAE language配置进行微服务序列的组装与调度。In step (2.4.4), the microservice sequence is assembled and scheduled according to the updated RMAE language configuration in step (2.4.3).
步骤(2.5)构建监控设施:在微服务序列执行过程中,实时监控用户上下文信息,监控每个微服务加载执行的过程,并实时更新反馈信息,自我修复设施负责处理微服务执行过程中的异常状态,用于提供更好的用户体验。Step (2.5) Build a monitoring facility: During the execution of the microservice sequence, monitor the user context information in real time, monitor the loading and execution process of each microservice, and update the feedback information in real time. The self-healing facility is responsible for handling exceptions during the execution of the microservice. Status, used to provide a better user experience.
第三步、基于第二步提出的RMAE框架组件模块,并结合图5给出RMAE整体架构及运作流程,过程如下:The third step is based on the RMAE framework component module proposed in the second step, and combined with Figure 5, the overall architecture and operation process of RMAE are given. The process is as follows:
步骤(3.1)构建需求层(Requirements Layer),RMAE框架面向用户需求进行设计,需求层是框架运行的驱动力所在。在系统运行时的需求发送与响应阶段,需求层负责向服务器发送用户请求,路由设施(Routing Facility)接收并根据用户需求进行任务委派,等待所有组件处理完毕后,执行设施(Execution Facility)将最终结果返回给需求层用户,并完成本次用户请求。进行步骤(3.2);Step (3.1) Build the Requirements Layer. The RMAE framework is designed for user requirements, and the requirements layer is the driving force for the operation of the framework. In the demand sending and response phase when the system is running, the demand layer is responsible for sending user requests to the server, and the Routing Facility receives and delegates tasks according to user needs. After all components are processed, the Execution Facility will finally The result is returned to the user at the demand layer, and the user request is completed. Go to step (3.2);
步骤(3.2)构建处理中枢层(Processing Layer),处理中枢层是框架的核心模块,同时也是微服务的API网关,保证不同用户需求能被正确处理并执行,是框架自适应功能的保障。在系统运行时的路由委派阶段与微服务调度阶段,中枢层先由路由设施(RoutingFacility)根据用户需求,把用户需求转换为RDF图(RDF Graph),搜索匹配树(MappingTree),依据搜索到的结果将Web任务委派给相应的执行器,并通知执行设施(ExecutionFacility)进行加载。当执行设施加载完毕后,执行器准备就绪,但由于此时微服务序列为空,执行器进入等待状态,并向调度设施(Scheduling Facility)发起调度请求。Step (3.2) Build the Processing Layer. The Processing Layer is the core module of the framework and also the API gateway for microservices. It ensures that different user requirements can be correctly processed and executed, which is the guarantee of the framework's adaptive function. In the routing delegation stage and the microservice scheduling stage when the system is running, the central layer first converts the user requirements into an RDF Graph (RDF Graph) by the Routing Facility according to the user's needs, and searches for the matching tree (MappingTree). The result delegates the web task to the corresponding executor and notifies the ExecutionFacility to load. When the execution facility is loaded, the executor is ready, but since the microservice sequence is empty at this time, the executor enters the waiting state and initiates a scheduling request to the Scheduling Facility.
若匹配树中查找结果为空,将用户需求转换的RDF图(RDF Graph)通过SmarterContext推理引擎自适应调整微服务序列,并由调度设施(Scheduling Facility)发起调度请求。If the search result in the matching tree is empty, the RDF Graph converted from the user's requirements is adapted to adjust the microservice sequence through the SmarterContext inference engine, and the Scheduling Facility initiates a scheduling request.
最后调度设施向公共服务器发起查询请求,根据得到的微服务功能及结构信息,前往微服务仓库选取匹配的微服务,组装成有序的微服务序列并返回至执行设施,其中公共服务器部署有RMAE language配置与注册表,并实时将配置信息缓存到内存池(MemoryPool)中,通过心跳模式与其他服务器维持长连接。Finally, the scheduling facility initiates a query request to the public server. According to the obtained microservice function and structure information, it goes to the microservice warehouse to select the matching microservice, assembles it into an orderly sequence of microservices, and returns it to the execution facility. The public server is deployed with RMAE. Language configuration and registry, and cache configuration information in the memory pool (MemoryPool) in real time, and maintain long-term connections with other servers through heartbeat mode.
进行步骤(3.3);Go to step (3.3);
步骤(3.3)构建微服务层(Microservices Layer),微服务层是满足用户需求真正的执行者,根据需求委派的Web任务通过一系列细粒度的微服务协作完成。在系统运行时的微服务调度阶段与监控执行阶段,微服务层负责维护微服务仓库(MicroservicesRepository)中的微服务(Microservice)及相关资源(Resources),并将微服务调度中所需的微服务序列进行组装,组装过程中,不同服务器上微服务之间的相互调用依赖于注册表(Registry)中的信息,该表记录了每个微服务的运行状态,以及所在服务器的IP地址。组装完毕的微服务序列(Microservices Sequence)将返回给中枢层的执行设施,执行设施激活等待中的执行器,并根据微服务调度的结果,将微服务序列逐个加载,加载完毕的微服务由执行器按序执行,直到序列中的所有微服务执行完毕。期间,监控设施(Monitor Facility)将监控每个微服务加载执行的过程,并实时更新反馈信息,自我修复设施负责处理微服务执行过程中的异常状态,用于提供更好的用户体验。Step (3.3) Build the Microservices Layer. The Microservices Layer is the real executor to meet the user's needs. The Web tasks delegated according to the requirements are completed through a series of fine-grained microservices. In the microservice scheduling phase and monitoring execution phase of the system runtime, the microservice layer is responsible for maintaining the microservices (Microservices) and related resources (Resources) in the microservices repository (MicroservicesRepository), and dispatching the microservices required in the microservice scheduling. The sequence is assembled. During the assembly process, the mutual calls between microservices on different servers depend on the information in the registry, which records the running status of each microservice and the IP address of the server where it is located. The assembled microservices sequence (Microservices Sequence) will be returned to the execution facility of the central layer, the execution facility will activate the waiting executor, and according to the result of the microservice scheduling, the microservice sequence will be loaded one by one, and the loaded microservice will be executed by The microservices are executed sequentially until all microservices in the sequence are executed. During this period, the Monitor Facility will monitor the loading and execution process of each microservice, and update the feedback information in real time. The self-healing facility is responsible for handling abnormal states during the execution of the microservice to provide a better user experience.
第四步、将Villegas提出的DYNAMICO参考模型引入RMAE框架,DYNAMICO提供了实现SAS系统所需组件的结构和行为特征,该模型定义了如图6所示的三个因果连接的反馈回路子系统:控制目标反馈回路(CO-FL)、动态监控反馈回路(M-FL)和自适应反馈回路(A-FL)。三者间的主要作用关系是:The fourth step is to introduce the DYNAMICO reference model proposed by Villegas into the RMAE framework. DYNAMICO provides the structural and behavioral characteristics of the components required to implement the SAS system. The model defines three causally connected feedback loop subsystems as shown in Figure 6: Control Objective Feedback Loop (CO-FL), Dynamic Supervisory Feedback Loop (M-FL), and Adaptive Feedback Loop (A-FL). The main relationship between the three is:
CO-FL负责接收外界的变化信息,以此触发M-FL或A-FL(如图6箭头A);The CO-FL is responsible for receiving the change information from the outside world, thereby triggering the M-FL or A-FL (see arrow A in Figure 6);
M-FL负责感测上下文信息(Context Information)、A-FL与CO-FL反馈信息,并将感测信息反馈至CO-FL或A-FL(如图6箭头B、箭头C);M-FL is responsible for sensing context information (Context Information), A-FL and CO-FL feedback information, and feeding back the sensing information to CO-FL or A-FL (see arrow B and arrow C in Figure 6 );
A-FL:负责接收CO-FL与M-FL的触发信息,并将自身反馈信息发送至M-FL(如图6箭头D)。A-FL: responsible for receiving the trigger information of CO-FL and M-FL, and sending its own feedback information to M-FL (see arrow D in Figure 6).
将CO-FL、M-FL和A-FL分别映射到路由委派、监控执行和微服务调度过程中,进而满足变更的用户需求。其中,CO-FL对应于负责接收用户需求的路由委派过程。该层跟踪用户需求的变化,以触发微服务调度或监控执行的适配。路由委派的主要目标是解析用户请求,对Web任务进行委派,确保RMAE能精确处理不断演化的用户需求;M-FL对应监控执行过程,它由协作单元和运行单元共同完成,协作单元负责各单元间的协同。运行单元在执行微服务序列的过程中,时刻受到监控,监控设施会将反馈信息实时动态更新;微服务调度的基础设施由查询单元、装配单元和通知单元组成,对应于A-FL。收到调度请求后,调度设施通过查询单元匹配内存池中的微服务描述信息(包括功能及结构).装配单元根据已有描述信息,前往微服务仓库进行匹配并动态组装微服务序列,若配置的微服务未能成功匹配,则通知单元将请求注册表更新对应的微服务信息。Map CO-FL, M-FL, and A-FL to routing delegation, monitoring execution, and microservice scheduling, respectively, to meet changing user needs. Among them, CO-FL corresponds to the routing delegation process responsible for receiving user requirements. This layer tracks changes in user requirements to trigger microservice scheduling or monitor execution of adaptations. The main goal of routing delegation is to parse user requests, delegate Web tasks, and ensure that RMAE can accurately handle evolving user needs; M-FL corresponds to monitoring the execution process, which is completed by the collaboration unit and the running unit, and the collaboration unit is responsible for each unit. collaboration between. In the process of executing the microservice sequence, the running unit is constantly monitored, and the monitoring facility will dynamically update the feedback information in real time; the infrastructure for microservice scheduling consists of a query unit, an assembly unit, and a notification unit, corresponding to A-FL. After receiving the scheduling request, the scheduling facility matches the microservice description information (including functions and structures) in the memory pool through the query unit. The assembly unit goes to the microservice warehouse for matching and dynamically assembles the microservice sequence according to the existing description information. If the microservice fails to match successfully, the notification unit will request the registry to update the corresponding microservice information.
第五步、面向用户需求,进一步给出RMAE框架的路由委派方法,过程如下:The fifth step is to further provide the routing delegation method of the RMAE framework for user needs. The process is as follows:
步骤(5.1)利用步骤(2.2)构建的匹配树来对用户需求与路由之间的关系进行预处理,匹配树加载的数据来源于内存池,在系统初始化阶段,框架会将RMAE language配置文件缓存至内存池中,以提高匹配树的执行速度,其中,匹配树节点与RMAE language配置文件的映射关系定义如下:Step (5.1) uses the matching tree constructed in step (2.2) to preprocess the relationship between user requirements and routing. The data loaded by the matching tree comes from the memory pool. During the system initialization phase, the framework will cache the RMAE language configuration file In order to improve the execution speed of the matching tree, the mapping relationship between the matching tree node and the RMAE language configuration file is defined as follows:
elements={element1,element2,element3,…,elementn};elements={element1 , element2 , element3 ,..., elementn };
对于所有element的属性URI,有且仅有一个节点u与URI对应;For all attribute URIs of element, there is one and only one node u corresponding to the URI;
对于所有element元素的属性method,有且仅有一个节点m与method对应,且m为u的子节点,u对应的URI和m对应的method为同一个element的属性;For the attribute method of all element elements, there is one and only one node m corresponding to method, and m is a child node of u, and the URI corresponding to u and the method corresponding to m are attributes of the same element;
对于所有element元素的属性key,有且仅有一个节点t与key对应,且t为m的子节点,m对应的method和t对应的key为同一个element的属性;For the attribute key of all element elements, there is only one node t corresponding to the key, and t is the child node of m, and the method corresponding to m and the key corresponding to t are attributes of the same element;
tag为当前配置片段所对应的路由,即微服务序列的首个执行器。The tag is the route corresponding to the current configuration fragment, that is, the first executor of the microservice sequence.
进行步骤(5.2);Go to step (5.2);
步骤(5.2)路由设施的解析单元根据接收到的Web请求,基于步骤(2.1)解析出有效的用户需求,并运用RDM模型将其转换为相应的RCT模型实现,得出相应的RDF图,进行步骤(5.3);Step (5.2) The parsing unit of the routing facility parses out the valid user requirements based on step (2.1) according to the received Web request, and uses the RDM model to convert it into the corresponding RCT model for realization, and obtains the corresponding RDF diagram. step (5.3);
步骤(5.3)基于步骤(5.1)预加载的匹配树结构,路由设施的转发单元将RDF图中的Web任务委派给相应的执行器,完成路由委派过程。In step (5.3), based on the matching tree structure preloaded in step (5.1), the forwarding unit of the routing facility delegates the Web task in the RDF graph to the corresponding executor to complete the routing delegation process.
第六步、给出RMAE协作算法,过程如下:The sixth step is to give the RMAE collaboration algorithm. The process is as follows:
步骤(6.1)接收用户请求,程序执行器executor检索执行请求url,若结果为空,则结束,否则进行步骤(6.2);Step (6.1) receives the user request, the program executor executor retrieves the execution request url, if the result is empty, it ends, otherwise, go to step (6.2);
步骤(6.2)解析用户请求,获得请求参数profile,根据请求参数profile以及步骤(2.1)完成运行时模型构建(RDM模型和RCT模型),进行步骤(6.3);Step (6.2) parses the user request, obtains the request parameter profile, completes the runtime model construction (RDM model and RCT model) according to the request parameter profile and step (2.1), and proceeds to step (6.3);
步骤(6.3)基于第五步,结合RCT模型到内存池MemoryPool中获取对应的配置片段config,若配置片段config为空,则结束,否则进行步骤(6.4);Step (6.3) is based on the fifth step, combined with the RCT model to obtain the corresponding configuration segment config from the memory pool MemoryPool, if the configuration segment config is empty, end, otherwise go to step (6.4);
步骤(6.4)遍历配置片段config的微服务,若遍历完成,则进行步骤(6.7),否则取出下一个微服务Microservicei,由调度设施前往微服务仓库选取匹配的微服务Microservicei,进行步骤(6.5);Step (6.4) traverse the microservices of the configuration segment config, if the traversal is completed, go to step (6.7), otherwise take out the next microservice Microservicei , go to the microservice warehouse by the scheduling facility to select the matching microservice Microservicei , and perform step ( 6.5);
步骤(6.5)若微服务仓库MicroservicesRepository中包含微服务Microservicei,则将Microservicei加入微服务序列Microservices,返回步骤(6.4),否则进行步骤(6.6);Step (6.5) If the microservice repository MicroservicesRepository contains the microservice Microservicei , add Microservicei to the microservice sequence Microservices, and return to step (6.4), otherwise proceed to step (6.6);
步骤(6.6)调用注册表更新RMAE language配置文件,并将更新结果存入内存池MemoryPool,返回步骤(6.4);Step (6.6) calls the registry to update the RMAE language configuration file, and stores the update result in the memory pool MemoryPool, and returns to step (6.4);
步骤(6.7)将微服务序列Microservices返回至执行设施,执行设施激活等待中的执行器,将微服务序列Microservices按序加载执行,直到序列中的所有微服务执行完毕。Step (6.7) returns the microservice sequence Microservices to the execution facility, the execution facility activates the waiting executor, and loads and executes the microservice sequence Microservices in sequence until all the microservices in the sequence are executed.
第七步、结合微服务的特性和RMAE场景,给出相应的微服务自适应监控算法,过程如下:Step 7: Combining the characteristics of microservices and RMAE scenarios, the corresponding microservice adaptive monitoring algorithm is given. The process is as follows:
步骤(7.1)监控执行设施由协作单元和运行单元组成,运行单元又分为监控执行器MonitorExecutor和微服务序列Microservices两部分。Step (7.1) The monitoring execution facility is composed of a cooperation unit and a running unit, and the running unit is further divided into two parts: the monitoring executor MonitorExecutor and the microservice sequence Microservices.
步骤(7.1.1)MonitorExecutor监控每个微服务加载执行的过程,并实时更新反馈信息,MonitorExecutor将每个微服务的状态信息存储在内存中,名称为MonitorMS,其数据结构为一个HashMap,其中key表示各微服务的主键值,即由RMAE language配置文件中element元素中mappingAttr的子属性key以及element下ms的序数组成,确保每个微服务在RMAE中都只有一个唯一的主键值。MonitorMS的value表示微服务在所在服务器的正常运行指数,系统管理员会设置范围0到100之间的一个阈值来决定该微服务的执行状态,若value大于阈值,该微服务被判断为运行正常,若value小于阈值,则该微服务被判断为失效。微服务每一次被调用成功都会提升MonitorMS的value的值,最大为100。微服务每一次被调用失败都会降低MonitorMS的value的值,最小为0。Step (7.1.1) MonitorExecutor monitors the process of loading and executing each microservice, and updates the feedback information in real time. MonitorExecutor stores the status information of each microservice in memory, named MonitorMS, and its data structure is a HashMap, in which the key Indicates the primary key value of each microservice, which is composed of the sub-attribute key of mappingAttr in the element element in the RMAE language configuration file and the ordinal number of ms under the element, ensuring that each microservice has only one unique primary key value in RMAE. The value of MonitorMS represents the normal operation index of the microservice on the server where it is located. The system administrator will set a threshold between 0 and 100 to determine the execution status of the microservice. If the value is greater than the threshold, the microservice is judged to be running normally. , if the value is less than the threshold, the microservice is judged to be invalid. Each time the microservice is successfully called, the value of MonitorMS will be increased, up to a maximum of 100. Every time the microservice fails to be called, the value of MonitorMS will be decreased, and the minimum value is 0.
步骤(7.1.2)基于第五步,运行单元根据路由委派的结果加载MonitorExecutor,然后MonitorExecutor检查当前微服务序列Microservices的状态,包括Microservices的组成元素,执行顺序,个数信息。在微服务序列执行期间,为了保证微服务有序运行,MonitorExecutor在同一时刻只处理单个微服务;Step (7.1.2) is based on the fifth step, the running unit loads the MonitorExecutor according to the result of the routing delegation, and then the MonitorExecutor checks the status of the current microservice sequence Microservices, including the constituent elements, execution order, and number information of the Microservices. During the execution of the microservice sequence, in order to ensure the orderly operation of the microservice, the MonitorExecutor only processes a single microservice at the same time;
步骤(7.2)MonitorExecutor遍历微服务序列Microservices,若遍历完成则结束,否则取出下一个微服务Microservicei,进行步骤(7.3);Step (7.2) MonitorExecutor traverses the microservice sequence Microservices, if the traversal is completed, it ends, otherwise it takes out the next microservice Microservicei and goes to step (7.3);
步骤(7.3)考虑在RMAE框架中可能查找相似微服务也能完成用户需求,且性能更好,因此将微服务Microservicei配置、RMAE language的规则配置进行匹配,找出则返回步骤(7.2),否则进行步骤(7.4),匹配过程如下:In step (7.3), considering that it is possible to find similar microservices in the RMAE framework, the user's requirements can be fulfilled, and the performance is better. Therefore, the microservice Microservicei configuration and the RMAE language rule configuration are matched, and if found, return to step (7.2), Otherwise, go to step (7.4), the matching process is as follows:
步骤(7.3.1)在RMAE language的规则配置文件中找出所有与Microservicei相似的微服务,即取出Microservicei中的param,output,description元素,与RMAE language的规则配置文件中每个ms中的param,output,description元素进行匹配,规则为:Step (7.3.1) Find all microservices similar to Microservicei in the rule configuration file of RMAE language, that is, take out the param, output, description elements in Microservicei , which are the same as those in each ms in the rule configuration file of RMAE language The param, output, description elements are matched, the rules are:
match=w1*ms-param+w2*ms-output+w3*ms-descriptionmatch=w1*ms-param+w2*ms-output+w3*ms-description
其中,w1,w2与w3为每个元素相似度的权重值,且w1+w2+w3=1。match为匹配结果值,系统管理员根据经验设置阈值experience来决定是否匹配,如果match大于experience,则把该微服务的信息加入匹配状态集MatchReq中。Among them, w1, w2 and w3 are the weight values of the similarity of each element, and w1+w2+w3=1. match is the matching result value. The system administrator sets the threshold experience to determine whether to match. If the match is greater than experience, the information of the microservice is added to the matching state set MatchReq.
其中ms-param代表param参数的匹配情况,它是基于param参数个数一致的前提下,由每个参数的词汇相似度计算得出。这里本发明结合WordNet计算词汇相似度,WordNet是由普林斯顿大学认识科学实验室在心理学教授米勒的指导下建立和维护的英语词典,是一个覆盖范围宽广的英语词汇语义网。Among them, ms-param represents the matching of param parameters, which is calculated from the lexical similarity of each parameter under the premise that the number of param parameters is consistent. Here, the present invention calculates word similarity in conjunction with WordNet. WordNet is an English dictionary established and maintained by the Cognitive Science Laboratory of Princeton University under the guidance of psychology professor Miller, and is a wide-coverage English word semantic network.
同理,ms-output代表output参数的匹配情况,基于output元素个数一致且每个元素的词汇相似度计算得出。Similarly, ms-output represents the matching of output parameters, which is calculated based on the same number of output elements and the lexical similarity of each element.
ms-description代表微服务文本描述的匹配情况,对Microservicei和ms中的description进行文本相似度计算得出,这里本发明基于TF-IDF方法与WordNet计算文本相似度,其中TF-IDF是一种统计方法,用以评估一字词对于一个文件集或一个语料库中的其中一份文件的重要程度。通过TF-IDF方法提取出Microservicei和ms中的特征性词汇(词汇个数是由描述文本规模乘以经验比例值所得),再结合WordNet对这些词汇逐一进行语义相似度计算并相加,最终得出微服务文本描述的匹配情况。ms-description represents the matching situation of the text description of the microservice, which is obtained by calculating the text similarity between the description in Microservicei and ms. Here, the present invention calculates the text similarity based on the TF-IDF method and WordNet, where TF-IDF is a kind of Statistical method for assessing the importance of a word to a document set or to one of the documents in a corpus. The characteristic words in Microservicei and ms are extracted by the TF-IDF method (the number of words is obtained by multiplying the scale of the description text by the empirical scale value), and then combined with WordNet, the semantic similarity of these words is calculated and added one by one, and finally Find a match for the textual description of the microservice.
步骤(7.3.2)遍历完毕后,生成最终的匹配状态集MatchReq,MatchReq是一个有序集合,里面每一个元素都是和Microservicei相似的微服务;After step (7.3.2) is traversed, the final matching state set MatchReq is generated. MatchReq is an ordered set, and each element in it is a microservice similar to Microservicei ;
步骤(7.3.3)遍历匹配状态集MatchReq,对里面的元素进行重新排序,排序方法为:计算每个微服务在MonitorMS的value值,并根据value值从大到小进行排序,即把服务质量最好的微服务排在集合最前面,替换原来的Microservicei;Step (7.3.3) Traverse the matching state set MatchReq, and reorder the elements in it. The sorting method is: calculate the value of each microservice in MonitorMS, and sort it according to the value from large to small, that is, the quality of service The best microservice is at the top of the collection, replacing the original Microservicei ;
步骤(7.4)在没有找到其他相似微服务的情况下,监控执行器MonitorExecutor计算MonitorMS中key为Microservicei的value值,如果value高于正常的阈值,返回步骤(7.2),否则认为该微服务已经失效,触发自适应软件系统参考模型DYNAMICO的监控回馈机制,进行步骤(7.5);Step (7.4) If no other similar microservices are found, the monitoring executor MonitorExecutor calculates the value of the key Microservicei in MonitorMS. If the value is higher than the normal threshold, return to step (7.2), otherwise the microservice is considered to have been If it fails, trigger the monitoring feedback mechanism of the adaptive software system reference model DYNAMICO, and go to step (7.5);
步骤(7.5)为保障整个微服务序列Microservices的有效执行,需要修复当前失效的微服务,算法执行adaptiveMode方法,该方法将向系统管理员发放邮件与短信通知,请管理员对该微服务进行故障恢复或提供相似微服务,并设置方法返回值adaptiveModeRES的值为manual,同时设定计时,如果管理员在规定时间内执行了微服务进行故障恢复操作或提供相似微服务,则执行步骤(7.3)。重新进行微服务遍历匹配。如果超过时间故障未排除,则将adaptiveModeRES的值自动更新为assistant,执行步骤(7.6);Step (7.5) In order to ensure the effective execution of the entire microservice sequence Microservices, the currently invalid microservice needs to be repaired, and the algorithm executes the adaptiveMode method, which will send email and SMS notification to the system administrator, asking the administrator to troubleshoot the microservice Restore or provide similar microservices, and set the value of the method return value adaptiveModeRES to manual, and set the timing. If the administrator executes the microservices within the specified time to perform fault recovery operations or provide similar microservices, perform step (7.3) . Perform microservice traversal matching again. If the fault has not been eliminated over time, automatically update the value of adaptiveModeRES to assistant, and execute step (7.6);
步骤(7.6)基于用户上下文环境,执行第六步的RMAE协作算法,若程序执行至分支步骤(6.6),重新执行步骤(7.3)匹配相似微服务,若匹配失败,证明重新构建微服务序列失败,终止当前用户请求。Step (7.6) Based on the user context, execute the RMAE collaboration algorithm in step 6. If the program executes to branch step (6.6), re-execute step (7.3) to match similar microservices. If the match fails, it proves that the reconstruction of the microservice sequence failed. , terminates the current user request.
为使本发明的上述特征和过程更加明显易懂,特举实施例(酒店在线预订场景)进行详细说明:In order to make the above-mentioned features and processes of the present invention more obvious and easy to understand, a special embodiment (hotel online booking scenario) is given for detailed description:
在常规酒店预订场景中,本发明确定了用户预订房间的五种主要交互需求:In a conventional hotel reservation scenario, the present invention determines five main interaction requirements for a user to book a room:
账号登录:用户使用网络浏览器或者移动APP登录酒店在线预订系统;Account login: the user uses a web browser or mobile APP to log in to the hotel online reservation system;
酒店选择:用户选择想要住宿的目的地、酒店类型、星级等,以找到附近所有符合条件的酒店;Hotel selection: The user selects the destination, hotel type, star rating, etc. they want to stay in to find all nearby eligible hotels;
房间选择:用户选择心仪的酒店,以及需要住宿的时间,来查询所有类别房间的可预订状态;Room selection: The user selects the desired hotel and the required stay time to check the availability of all types of rooms;
订单创建:用户选择想要住宿的房间类型后,填写个人资料以及订房数量等预订信息;Order creation: After the user selects the type of room he wants to stay, he fills in personal information and reservation information such as the number of reservations;
在线支付:用户选择付款方式后,支付相应金额便可成功预订。Online payment: After the user selects the payment method, the reservation can be made successfully by paying the corresponding amount.
基于RMAE框架以及上述需求,本发明搭建了酒店在线预订系统,RMAE框架采用JAVA语言开发,其中微服务架构的底层实现参考使用了Spring Cloud Netflix的开源组件,主要包括Zuul(API网关)、Eureka(注册表)、Hystrix(服务容错)、Ribbon(负载均衡)等技术,微服务部署在Docker容器中,系统基于JSON进行数据通信。同时为了验证建模方法的实际可行性,本发明结合使用了Apache JENA——一个用于构建语义Web应用的Java开源框架,来实现酒店在线预订场景所需的RDM运行时模型。Based on the RMAE framework and the above requirements, the present invention builds a hotel online reservation system. The RMAE framework is developed in JAVA language, and the underlying implementation of the micro-service architecture refers to the open source components of Spring Cloud Netflix, mainly including Zuul (API gateway), Eureka ( Registry), Hystrix (service fault tolerance), Ribbon (load balancing) and other technologies, microservices are deployed in Docker containers, and the system communicates data based on JSON. At the same time, in order to verify the practical feasibility of the modeling method, the present invention combines Apache JENA, a Java open source framework for building semantic Web applications, to realize the RDM runtime model required by the hotel online reservation scene.
本例生成的RDF图(图7)构成了用户Web任务的运行时实例,图中的酒店预订(Hotel Reservation)需求是由房间预定(Book Room)和支付(Payment Completed)两个子需求构成,其中房间预定又是由创建订单(Create Order)、目的地选择(SelectDestination)、酒店类型选择(Select Hotel Type)、邻近酒店查询(Query NearbyHotel)、酒店信息列表(Hotel List)、微服务连接(Connect Microservice)、酒店选择(Select Hotel)、时间选择(Select Time)、检测房间订购状态(Check Room Status)、房间信息列表(Room List)、房间类型选择(Select Room Type)、填写订单信息(Fill inInformation)、订单提交(Submit Order)、订单信息(Order)、更新房间信息列表(UpdatedList)这些Web子任务及信息资源组成;而支付需求是由订单提交延伸出的支付方式选择(Select Payment Method)、在线支付(Online Payment)两个Web子任务组成,其中支付方式选择需要订票费(booking fee)信息的支持。此外,整个酒店预定过程还需要酒店管理(Hotel Management)、房间管理(Room Management)以及在线支付(Online Payment)这三个微服务资源(Microservice Resources)的实时供应,保证用户需求任务能够被顺利解析执行。The RDF graph generated in this example (Fig. 7) constitutes the runtime instance of the user web task. The Hotel Reservation requirement in the graph is composed of two sub-requirements, Book Room and Payment Completed. Room reservation is made up of Create Order, SelectDestination, Select Hotel Type, Query NearbyHotel, Hotel List, Connect Microservice ), Select Hotel, Select Time, Check Room Status, Room List, Select Room Type, Fill inInformation , order submission (Submit Order), order information (Order), updated room information list (UpdatedList) these Web subtasks and information resources; and payment requirements are the payment method selection (Select Payment Method), online Payment (Online Payment) consists of two Web subtasks, in which payment method selection requires the support of booking fee information. In addition, the entire hotel reservation process also requires the real-time supply of three microservice resources (Hotel Management), Room Management (Room Management) and Online Payment (Online Payment) to ensure that user needs and tasks can be successfully analyzed. implement.
该场景下,用户需求是多变的(取决于用户所处的社交环境、行为习惯和消费能力等因素),例如,用户希望从多个信息源获取客房的比价信息(R1),用户希望酒店与客房介绍体验更丰富(如提供3D展示)(R2),用户希望提供多样的支付渠道(银联、微信、支付宝等)(R3),用户希望操作更加便捷(R4)。In this scenario, user needs are changeable (depending on factors such as the user's social environment, behavioral habits, and spending power). A richer experience with guest room introduction (such as 3D display) (R2), users want to provide a variety of payment channels (UnionPay, WeChat, Alipay, etc.) (R3), users want to operate more convenient (R4).
以R4为例,我们选取一个具体案例进行说明:用户在成功预订大床房后,由于住宿人员的变动,希望更换豪华套房。假若现有系统没有提供一键升级房型的功能,在传统模式下,用户需要进行退订、退款以及重新预订、付款等繁琐操作。Taking R4 as an example, we select a specific case to illustrate: after the user successfully booked a king-bed room, due to the change of the occupants, he wants to change to a luxury suite. If the existing system does not provide a one-click room upgrade function, in the traditional mode, users need to perform tedious operations such as unsubscribe, refund, rebooking, and payment.
通过将一键升级房型的需求进一步细粒度分解,可得:By further fine-grained decomposition of the one-click room upgrade requirements, we can get:
(i)添加一条用户A预订豪华套房的订单记录;(i) Add an order record for user A to book a luxury suite;
(ii)将豪华套房的剩余房间数量减1;(ii) reduce the number of remaining rooms in the Deluxe Suite by 1;
(iii)删除用户A预订大床房的订单记录;(iii) Delete the order record of User A's reservation of a double room;
(iv)将大床房的剩余房间数量加1;(iv) Add 1 to the remaining number of rooms in the double room;
(v)计算豪华套房与大床房之间的费用差价。(v) Calculate the cost difference between the Deluxe Suite and the Queen Room.
其中,每一项需求都可以转化为相应的微服务。Each of these requirements can be translated into corresponding microservices.
基于酒店在线预订系统,结合一键升级房型的功能需求,这里首先给出用户预订房间的需求实现:(1)添加订房记录;(2)将该类型房间数减1。下面是对应的RMAE language配置:Based on the hotel online reservation system, combined with the functional requirements of one-click room type upgrade, here is the realization of the user's room reservation requirements: (1) add a reservation record; (2) reduce the number of rooms of this type by 1. The following is the corresponding RMAE language configuration:
<InsertElements><InsertElements>
<element key="add_order"URI="/order"method="PUT"<element key="add_order" URI="/order" method="PUT"
description="添加订单"nextTag="update"description="Add order" nextTag="update"
nextKey="reduce_room_num">nextKey="reduce_room_num">
<ms type="sql"<ms type="sql"
value="insert into order values(null,?,?,?,?,?,‘未付款’)"value="insert into order values(null,?,?,?,?,?,'unpaid')"
description="对order表进行新增操作">description="Add new operations to the order table">
<param session="true">user_id</param><param session="true">user_id</param>
<param notNull="true">room_id</param><param notNull="true">room_id</param>
<param notNull="true">book_num</param><param notNull="true">book_num</param>
<param>guest</param><param>guest</param>
<param>phone</param><param>phone</param>
</ms></ms>
</element></element>
</InsertElements></InsertElements>
<UpdateElements><UpdateElements>
<element key="reduce_room_num"<element key="reduce_room_num"
URI="/room/reduceNum"method="POST"URI="/room/reduceNum" method="POST"
description="预订后更新房间状态">description="Update room status after booking">
<ms type="sql"<ms type="sql"
value="update room set left_num=left_num-?where type=?"value="update room set left_num=left_num-?where type=?"
description="特定类型的房间剩余数量相应减少">description="The remaining number of rooms of a specific type is reduced accordingly">
<param notNull="true">book_num</param><param notNull="true">book_num</param>
<param notNull="true">room_type</param><param notNull="true">room_type</param>
</ms></ms>
</element></element>
</UpdateElements></UpdateElements>
其中,添加订单微服务的nextTag和nextKey属性指向减少房间数量的微服务,从而组成微服务序列以满足预订房间的需求。Among them, the nextTag and nextKey attributes of the order microservice are added to point to the microservice that reduces the number of rooms, thereby forming a sequence of microservices to meet the needs of booking rooms.
配置完成后,框架解析RMAE language,将解析得到的服务发布到服务注册中心,服务的key值与服务发布者IP的映射关系将会被记录在注册表中,注册中心把注册表中的内容缓存到内存池。与此同时,服务发布者启动服务,将其部署在Docker容器中运行。After the configuration is completed, the framework parses the RMAE language and publishes the parsed service to the service registry. The mapping relationship between the service key value and the service publisher IP will be recorded in the registry, and the registry will cache the content in the registry. to the memory pool. At the same time, the service publisher starts the service, deploying it to run in a Docker container.
当系统收到用户请求时,微服务的调用过程如下:用户发送预订房间的需求,请求路径为http://www.domain.com/order,请求方法为POST,路由设施搜索匹配树得到t节点值为insert+add_order,执行设施加载执行器Insert,并通知调度设施根据key属性值add_order匹配注册表(缓存于内存池)中的服务发布者IP。执行器Insert尝试与该IP建立点对点socket连接,成功连接后即可调用微服务接口,服务发布者收到RPC调用请求后,依据RMAE language配置执行添加订单的微服务并将结果返回,然后由执行器Update连接并调用减少房间数量的微服务,进而满足用户预订房间的需求。当用户退订房间后,系统需要完成(1)删除订房记录;(2)将该类型房间数量加1。对应的RMAE language配置如下:When the system receives a user request, the calling process of the microservice is as follows: the user sends a request for booking a room, the request path is http://www.domain.com/order, the request method is POST, and the routing facility searches the matching tree to get the t node If the value is insert+add_order, the execution facility loads the executor Insert, and notifies the scheduling facility to match the service publisher IP in the registry (cached in the memory pool) according to the key attribute value add_order. The executor Insert attempts to establish a point-to-point socket connection with the IP. After the connection is successful, the microservice interface can be called. After the service publisher receives the RPC call request, it executes the microservice that adds the order according to the RMAE language configuration and returns the result, which is then executed by the executor. The Updater connects and calls the microservices that reduce the number of rooms, so as to meet the needs of users to book rooms. When the user cancels the room reservation, the system needs to complete (1) delete the reservation record; (2) add 1 to the number of rooms of this type. The corresponding RMAE language configuration is as follows:
<DeleteElements><DeleteElements>
<element key="delete_order"<element key="delete_order"
URI="/order/{id}"method="DELETE"description="删除订单"URI="/order/{id}" method="DELETE" description="Delete order"
nextTag="update"nextKey="add_room_num">nextTag="update" nextKey="add_room_num">
<ms type="sql"value="delete from order where id=?"<ms type="sql" value="delete from order where id=?"
description="对order表进行删除操作">description="Delete the order table">
<param notNull="true">id</param><param notNull="true">id</param>
</ms></ms>
</element></element>
</DeleteElements></DeleteElements>
<UpdateElements><UpdateElements>
<element key="add_room_num"<element key="add_room_num"
URI="/room/addNum"method="POST"URI="/room/addNum" method="POST"
description="退订后更新房间状态">description="Update room status after unsubscribe">
<ms type="sql"<ms type="sql"
value="update room set left_num=left_num+?where type=?"value="update room set left_num=left_num+?where type=?"
description="特定类型的房间剩余数量相应增加">description="The remaining number of rooms of a specific type increases accordingly">
<param notNull="true">book_num</param><param notNull="true">book_num</param>
<param notNull="true">room_type</param><param notNull="true">room_type</param>
</ms></ms>
</element></element>
</UpdateElements></UpdateElements>
假设系统运行时,需求发生变更,用户想要对已经预订的房型进行一键升级,系统需要先退订原有房间,然后预订新的房间,并计算房间差价。由于原系统中并无计算房间差价的微服务,因此需要添加如下RMAE language配置:Assuming that the demand changes when the system is running, and the user wants to upgrade the room type already booked with one click, the system needs to cancel the original room first, then book a new room, and calculate the room price difference. Since there is no microservice for calculating room price difference in the original system, the following RMAE language configuration needs to be added:
<BrowseElements><BrowseElements>
<element key="cal_price_diff"<element key="cal_price_diff"
URI="/room/calPrice"method="GET"description="计算差价">URI="/room/calPrice" method="GET" description="Calculate price difference">
<ms type="sql"value="select(select price from room where type=?)-(select price from room where type=?)"description="计算两个不同房间的价格差"><ms type="sql" value="select(select price from room where type=?)-(select price from room where type=?)"description="Calculate the price difference between two different rooms">
<param notNull="true">room_type</param><param notNull="true">room_type</param>
<param notNull="true">old_room_type</param><param notNull="true">old_room_type</param>
</ms></ms>
</element></element>
</BrowseElements></BrowseElements>
监控设施将用户需求发生变更反馈至路由设施,解析单元通过RDM模型将用户需求转化为RDF图,调度设施推导得出Web任务序列为:删除订单,增加房间数量,添加订单,减少房间数量,计算差价,RMAE language配置如下:The monitoring facility feeds back changes in user needs to the routing facility, the parsing unit converts the user needs into an RDF graph through the RDM model, and the scheduling facility derives the Web task sequence as: delete an order, increase the number of rooms, add an order, reduce the number of rooms, calculate The price difference, RMAE language configuration is as follows:
<DeleteElements><DeleteElements>
<element key="upgrade_room"<element key="upgrade_room"
URI="/order/{id}"method="DELETE"description="删除订单"URI="/order/{id}" method="DELETE" description="Delete order"
nextTag="update"nextKey="add_room_num">nextTag="update" nextKey="add_room_num">
</element></element>
</DeleteElements></DeleteElements>
<UpdateElements><UpdateElements>
<element key="add_room_num"<element key="add_room_num"
URI="/room/addNum"method="POST"URI="/room/addNum" method="POST"
description="退订后更新房间状态"nextTag="insert"description="Update room status after unsubscribe" nextTag="insert"
nextKey="add_order">nextKey="add_order">
</element></element>
</UpdateElements></UpdateElements>
<UpdateElements><UpdateElements>
<element key="reduce_room_num"URI="/room/reduceNum"<element key="reduce_room_num" URI="/room/reduceNum"
method="POST"description="预订后更新房间状态"method="POST" description="Update room status after booking"
nextTag="browse"nextKey="cal_price_diff">nextTag="browse" nextKey="cal_price_diff">
</element></element>
</UpdateElements></UpdateElements>
依据Web任务序列,调度设施首先复制一份删除订单的配置,并将key值与升级房型进行绑定,然后向增加房间数量和减少房间数量的微服务注入nextTag和nextKey属性,前者指向添加订单的微服务,后者指向计算差价的微服务。RMAE根据更新后的RMAElanguage配置完成微服务调度,进而满足了用户一键升级房型的新需求。According to the web task sequence, the scheduling facility first copies a configuration for deleting an order, and binds the key value to the upgraded room type, and then injects the nextTag and nextKey properties into the microservices that increase the number of rooms and decrease the number of rooms, the former points to the one that adds the order. Microservices, which point to microservices that compute the difference. RMAE completes microservice scheduling according to the updated RMAElanguage configuration, thus meeting the new requirements of users to upgrade room types with one click.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910210710.XACN110069380B (en) | 2019-03-20 | 2019-03-20 | Web distributed software evolution and monitoring method based on micro-service |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910210710.XACN110069380B (en) | 2019-03-20 | 2019-03-20 | Web distributed software evolution and monitoring method based on micro-service |
| Publication Number | Publication Date |
|---|---|
| CN110069380Atrue CN110069380A (en) | 2019-07-30 |
| CN110069380B CN110069380B (en) | 2024-01-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910210710.XAActiveCN110069380B (en) | 2019-03-20 | 2019-03-20 | Web distributed software evolution and monitoring method based on micro-service |
| Country | Link |
|---|---|
| CN (1) | CN110069380B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110825507A (en)* | 2019-10-31 | 2020-02-21 | 杭州米络星科技(集团)有限公司 | Scheduling method supporting multi-task re-running |
| CN110888783A (en)* | 2019-11-21 | 2020-03-17 | 望海康信(北京)科技股份公司 | Monitoring method and device of micro-service system and electronic equipment |
| CN110944039A (en)* | 2019-10-31 | 2020-03-31 | 上海无线通信研究中心 | Micro-service discovery method, system and device for 5G access network |
| CN111104103A (en)* | 2019-11-26 | 2020-05-05 | 武汉烽火信息集成技术有限公司 | Visualization method and system for software editing microservice |
| CN111107163A (en)* | 2019-12-31 | 2020-05-05 | 哈尔滨工业大学 | User demand change-oriented micro-service self-adaption method and system |
| CN111581036A (en)* | 2020-03-31 | 2020-08-25 | 西安电子科技大学 | Internet of things fault detection method, detection system and storage medium |
| CN111953562A (en)* | 2020-07-29 | 2020-11-17 | 新华三信息安全技术有限公司 | Equipment state monitoring method and device |
| CN112256408A (en)* | 2020-10-19 | 2021-01-22 | 北京神州数字科技有限公司 | Micro-service global context control method and system |
| WO2021044296A1 (en)* | 2019-09-06 | 2021-03-11 | International Business Machines Corporation | Deploying microservices across a service infrastructure |
| CN112579118A (en)* | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method, device, system, medium and equipment for updating configuration information of microservice |
| CN113112881A (en)* | 2021-03-10 | 2021-07-13 | 浙江工业大学 | Remote experiment question answering system based on WebRTC |
| CN113592471A (en)* | 2021-07-29 | 2021-11-02 | 中国人民银行清算总中心 | Payment transaction application system and method |
| CN113760693A (en)* | 2020-06-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Method and apparatus for local debugging of microservice systems |
| WO2022078117A1 (en)* | 2020-10-15 | 2022-04-21 | International Business Machines Corporation | Intrusion detection in micro-services through container telemetry and behavior modeling |
| CN115061663A (en)* | 2022-06-17 | 2022-09-16 | 中国兵器工业信息中心 | Micro-service dividing method and device based on customer demands, electronic equipment and medium |
| CN117057681A (en)* | 2023-10-12 | 2023-11-14 | 航天中认软件测评科技(北京)有限责任公司 | Software quality assessment method, device, equipment and storage medium |
| CN118075267A (en)* | 2024-04-22 | 2024-05-24 | 青岛青软晶尊微电子科技有限公司 | Digital back-end service platform construction method based on design circuit |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106528169A (en)* | 2016-11-25 | 2017-03-22 | 浙江工业大学 | Web system development reusable method based on AnGo dynamic evolution model |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106528169A (en)* | 2016-11-25 | 2017-03-22 | 浙江工业大学 | Web system development reusable method based on AnGo dynamic evolution model |
| Title |
|---|
| PASQUALINA POTENA: "Optimization of adaptation plans for a service-oriented architecture with cost,", 《DIPARTIMENTO DI INGEGNERIA, UNIVERSITÀ DEGLI STUDI DI BERGAMO, VIALE MARCONI, 5, DALMINE (BG) 24044, ITALY》* |
| 卢成炳: "需求驱动的微服务应用自适应演化框架研究与实现", 《中国知网》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2603340B (en)* | 2019-09-06 | 2023-04-26 | Ibm | Deploying microservices across a service infrastructure |
| GB2603340A (en)* | 2019-09-06 | 2022-08-03 | Ibm | Deploying microservices across a service infrastructure |
| WO2021044296A1 (en)* | 2019-09-06 | 2021-03-11 | International Business Machines Corporation | Deploying microservices across a service infrastructure |
| US11556321B2 (en) | 2019-09-06 | 2023-01-17 | International Business Machines Corporation | Deploying microservices across a service infrastructure |
| CN112579118A (en)* | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method, device, system, medium and equipment for updating configuration information of microservice |
| CN110944039A (en)* | 2019-10-31 | 2020-03-31 | 上海无线通信研究中心 | Micro-service discovery method, system and device for 5G access network |
| CN110825507B (en)* | 2019-10-31 | 2022-03-11 | 杭州米络星科技(集团)有限公司 | Scheduling method supporting multi-task re-running |
| CN110944039B (en)* | 2019-10-31 | 2022-10-28 | 上海无线通信研究中心 | Microservice discovery method, system and device for 5G access network |
| CN110825507A (en)* | 2019-10-31 | 2020-02-21 | 杭州米络星科技(集团)有限公司 | Scheduling method supporting multi-task re-running |
| CN110888783B (en)* | 2019-11-21 | 2023-07-07 | 望海康信(北京)科技股份公司 | Method and device for monitoring micro-service system and electronic equipment |
| CN110888783A (en)* | 2019-11-21 | 2020-03-17 | 望海康信(北京)科技股份公司 | Monitoring method and device of micro-service system and electronic equipment |
| CN111104103B (en)* | 2019-11-26 | 2023-09-15 | 武汉烽火信息集成技术有限公司 | Visualization method and system for software editing micro-service |
| CN111104103A (en)* | 2019-11-26 | 2020-05-05 | 武汉烽火信息集成技术有限公司 | Visualization method and system for software editing microservice |
| CN111107163B (en)* | 2019-12-31 | 2022-04-08 | 哈尔滨工业大学 | User demand change-oriented micro-service self-adaption method and system |
| CN111107163A (en)* | 2019-12-31 | 2020-05-05 | 哈尔滨工业大学 | User demand change-oriented micro-service self-adaption method and system |
| CN111581036B (en)* | 2020-03-31 | 2022-04-15 | 西安电子科技大学 | Internet of things fault detection method, detection system and storage medium |
| CN111581036A (en)* | 2020-03-31 | 2020-08-25 | 西安电子科技大学 | Internet of things fault detection method, detection system and storage medium |
| CN113760693A (en)* | 2020-06-29 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Method and apparatus for local debugging of microservice systems |
| CN111953562A (en)* | 2020-07-29 | 2020-11-17 | 新华三信息安全技术有限公司 | Equipment state monitoring method and device |
| US11748473B2 (en) | 2020-10-15 | 2023-09-05 | International Business Machines Corporation | Intrusion detection in micro-services through container telemetry and behavior modeling |
| WO2022078117A1 (en)* | 2020-10-15 | 2022-04-21 | International Business Machines Corporation | Intrusion detection in micro-services through container telemetry and behavior modeling |
| CN112256408A (en)* | 2020-10-19 | 2021-01-22 | 北京神州数字科技有限公司 | Micro-service global context control method and system |
| CN113112881B (en)* | 2021-03-10 | 2022-05-24 | 浙江工业大学 | Remote Experiment Answering System Based on WebRTC |
| CN113112881A (en)* | 2021-03-10 | 2021-07-13 | 浙江工业大学 | Remote experiment question answering system based on WebRTC |
| CN113592471A (en)* | 2021-07-29 | 2021-11-02 | 中国人民银行清算总中心 | Payment transaction application system and method |
| CN115061663A (en)* | 2022-06-17 | 2022-09-16 | 中国兵器工业信息中心 | Micro-service dividing method and device based on customer demands, electronic equipment and medium |
| CN117057681A (en)* | 2023-10-12 | 2023-11-14 | 航天中认软件测评科技(北京)有限责任公司 | Software quality assessment method, device, equipment and storage medium |
| CN117057681B (en)* | 2023-10-12 | 2024-01-16 | 航天中认软件测评科技(北京)有限责任公司 | Software quality assessment method, device, equipment and storage medium |
| CN118075267A (en)* | 2024-04-22 | 2024-05-24 | 青岛青软晶尊微电子科技有限公司 | Digital back-end service platform construction method based on design circuit |
| CN118075267B (en)* | 2024-04-22 | 2024-07-02 | 青岛青软晶尊微电子科技有限公司 | Digital back-end service platform construction method based on design circuit |
| Publication number | Publication date |
|---|---|
| CN110069380B (en) | 2024-01-16 |
| Publication | Publication Date | Title |
|---|---|---|
| CN110069380A (en) | A kind of evolution of Web distributed software and monitoring method based on micro services | |
| US11030281B2 (en) | Systems and methods for domain-driven design and execution of modular and dynamic services, applications and processes | |
| Bergenti et al. | The first twenty years of agent-based software development with JADE | |
| Sheng et al. | Configurable composition and adaptive provisioning of web services | |
| Tang et al. | Automatic Web service composition based on Horn clauses and Petri nets | |
| Rosenberg et al. | Towards composition as a service-a quality of service driven approach | |
| CN106528169B (en) | A Reusable Method for Web System Development Based on AnGo Dynamic Evolution Model | |
| Kaldeli et al. | Continual planning with sensing for web service composition | |
| Bidot et al. | Using ai planning and late binding for managing service workflows in intelligent environments | |
| CN110083350B (en) | A self-adaptive evolution method of microservices based on RMAE in cloud computing environment | |
| Pedrinaci et al. | Semantic web services | |
| Quenum et al. | Towards executable specifications for microservices | |
| Karakoc et al. | A workflow-based Web service composition system | |
| Medjahed et al. | On the composability of semantic web services | |
| CN110069276A (en) | A kind of micro services requirement drive method towards open dynamic internet environment | |
| Wang et al. | An automatic self‐adaptation framework for service‐based process based on exception handling | |
| Feng et al. | QoS-aware and multi-granularity service composition | |
| Poggi et al. | An application of semantic technologies to self adaptations | |
| Jalal et al. | A multiobjective discrete grey wolf optimization approach for transactional and qos-driven web services composition | |
| Cherif et al. | Adaptable web service registry for publishing context aware service composition | |
| Hristoskova et al. | The WTE+ framework: automated construction and runtime adaptation of service mashups | |
| Wang et al. | D3L-based service runtime self-adaptation using replanning | |
| Li et al. | Flows and views for scalable scientific process integration | |
| Ding et al. | SCAFE: A Service-Centered Cloud-Native Workflow Engine Architecture | |
| Wang et al. | Self‐adaptation and distributed knowledge‐based service ecosystem evolution |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right | Effective date of registration:20230803 Address after:No. B3-29, Fenghuo Hardware Building Materials and Plumbing Market, Baishazhou Avenue, Hongshan District, Wuhan City, Hubei Province, 430070 Applicant after:Wuhan Pengzhou Technology Co.,Ltd. Address before:The city Zhaohui six districts Chao Wang Road Hangzhou City, Zhejiang province 310014 18 Applicant before:JIANG University OF TECHNOLOGY Effective date of registration:20230803 Address after:Room 5-01, 5th Floor, Building 6, Headquarters Economic Park, No. 1309 Shangye Road, Fengxi New City, Xixian New District, Xi'an City, Shaanxi Province, 710100 Applicant after:SHAANXI HEYOU NETWORK TECHNOLOGY CO.,LTD. Address before:No. B3-29, Fenghuo Hardware Building Materials and Plumbing Market, Baishazhou Avenue, Hongshan District, Wuhan City, Hubei Province, 430070 Applicant before:Wuhan Pengzhou Technology Co.,Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |