CN114816375A - Service orchestration method, apparatus, device and storage medium - Google Patents
Service orchestration method, apparatus, device and storage medium Download PDFInfo
- Publication number
- CN114816375A CN114816375A CN202110132787.7A CN202110132787A CN114816375A CN 114816375 A CN114816375 A CN 114816375A CN 202110132787 A CN202110132787 A CN 202110132787A CN 114816375 A CN114816375 A CN 114816375A
- Authority
- CN
- China
- Prior art keywords
- service
- file
- node
- target
- target node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种服务编排方法、装置、设备及存储介质。The present application relates to the field of computer technologies, and in particular, to a service orchestration method, apparatus, device, and storage medium.
背景技术Background technique
随着数字化转型的迅速发展,传统的单体服务已经无法满足当前互联产品的技术需求,因此,服务编排应运而生。服务编排,即将各种服务有序地编织起来完成某一业务,将各个服务聚合成一条特定的执行链,用户通过一个调用请求便可以实现对后端一个或者多个微服务的调用。With the rapid development of digital transformation, traditional monolithic services can no longer meet the technical requirements of current interconnected products. Therefore, service orchestration emerges as the times require. Service orchestration is to weave various services in an orderly manner to complete a certain business, aggregate each service into a specific execution chain, and users can call one or more backend microservices through a single call request.
目前,大多数服务编排的实现方法都是通过代码编写,因此,对于开发人员来说,开发周期长,效率较低,因此,怎样高效率地实现服务编排的开发成为亟待解决的技术问题。At present, most of the implementation methods of service orchestration are written by code. Therefore, for developers, the development cycle is long and the efficiency is low. Therefore, how to efficiently realize the development of service orchestration has become a technical problem that needs to be solved urgently.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种服务编排方法、装置、设备及存储介质,可以提升开发人员对服务编排的开发效率。The embodiments of the present application provide a service orchestration method, apparatus, device, and storage medium, which can improve the development efficiency of service orchestration by developers.
本申请实施一方面公开了一种服务编排方法,该方法包括:In one aspect of the implementation of the present application, a service orchestration method is disclosed, and the method includes:
显示主界面,所述主界面包括N个节点,N是正整数;Displaying a main interface, the main interface includes N nodes, and N is a positive integer;
当存在针对目标节点的配置操作时,显示所述目标节点的配置界面,所述目标节点的配置界面用于获取所述目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是所述N个节点中的任一节点;When there is a configuration operation for the target node, the configuration interface of the target node is displayed. The configuration interface of the target node is used to obtain the configuration information of the target node. The configured target node corresponds to a service, and the target node is the target node. any node in the N nodes;
当存在针对所述N个节点的连接操作时,显示包含所述N个节点的节点链,所述节点链用于生成服务编排文件,所述服务编排文件包含一个或多个服务的执行顺序。When there is a connection operation for the N nodes, a node chain including the N nodes is displayed, and the node chain is used to generate a service orchestration file containing the execution order of one or more services.
本申请实施一方面公开了一种服务编排装置,该装置包括:An aspect of the implementation of the present application discloses a service orchestration device, the device comprising:
显示单元,用于显示主界面,所述主界面包括N个节点,N是正整数;a display unit for displaying a main interface, the main interface includes N nodes, and N is a positive integer;
所述显示单元,还用于当存在针对目标节点的配置操作时,显示所述目标节点的配置界面,所述目标节点的配置界面用于获取所述目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是所述N个节点中的任一节点;The display unit is further configured to display a configuration interface of the target node when there is a configuration operation for the target node, where the configuration interface of the target node is used to obtain configuration information of the target node, and the configured target node Corresponding to a service, the target node is any node in the N nodes;
所述显示单元,还用于当存在针对所述N个节点的连接操作时,显示包含所述N个节点的节点链,所述节点链用于生成服务编排文件,所述服务编排文件包含一个或多个服务的执行顺序。The display unit is further configured to display a node chain including the N nodes when there is a connection operation for the N nodes, the node chain is used to generate a service arrangement file, and the service arrangement file includes a or the order of execution of multiple services.
本申请实施一方面公开了一种服务编排设备,该设备包括:In one aspect of the implementation of the present application, a service orchestration device is disclosed, and the device includes:
处理器,适于实现一条或多条指令;以及,计算机存储介质,所述计算机存储介质存储有一条或多条指令,所述一条或多条指令适于由所述处理器加载并执行上述的服务编排方法。a processor adapted to implement one or more instructions; and a computer storage medium having stored one or more instructions adapted to be loaded by the processor and execute the above Service Orchestration Method.
本申请实施一方面公开了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行上述的服务编排方法。An aspect of an embodiment of the present application discloses a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions that, when executed by a processor, cause the processor to Execute the service orchestration method described above.
本申请实施例一方面公开了一种计算机产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。服务编排设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该服务编排设备执行上述的服务编排方法。In one aspect, embodiments of the present application disclose a computer product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the service orchestration device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the service orchestration device executes the above-mentioned service orchestration method.
本申请实施例,显示主界面,该主界面包括N个节点,N是正整数;当存在针对目标节点的配置操作时,显示目标节点的配置界面,该目标节点的配置界面用于获取目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是N个节点中的任一节点;当存在针对N个节点的连接操作时,显示包含N个节点的节点链,节点链用于生成服务编排文件,该服务编排文件包含一个或多个服务的执行顺序。开发人员可以在可视化界面上通过拖拉的形式放置节点,并进行节点信息配置,从而得到服务编排文件,不需要开发人员以代码的形式进行开发,学习成本低,可以减少开发人员的工作量,也可以节省开发时间,从而提升开发人员对服务编排的开发效率。In this embodiment of the present application, a main interface is displayed, and the main interface includes N nodes, where N is a positive integer; when there is a configuration operation for the target node, the configuration interface of the target node is displayed, and the configuration interface of the target node is used to obtain the information of the target node. Configuration information, the configured target node corresponds to a service, and the target node is any node among N nodes; when there is a connection operation for N nodes, the node chain containing N nodes is displayed, and the node chain is used to generate services An orchestration file that contains the execution order for one or more services. Developers can place nodes in the form of drag and drop on the visual interface, and configure node information to obtain service orchestration files, which do not require developers to develop in the form of code, and the learning cost is low, which can reduce the workload of developers. It can save development time, thereby improving developers' development efficiency for service orchestration.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请实施例公开的一种服务编排系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of a service orchestration system disclosed in an embodiment of the present application;
图2是本申请实施例公开的一种服务编排方法的流程示意图;FIG. 2 is a schematic flowchart of a service orchestration method disclosed in an embodiment of the present application;
图3是本申请实施例公开的一种服务编排方法主界面的示意图;3 is a schematic diagram of a main interface of a service orchestration method disclosed in an embodiment of the present application;
图4是本申请实施例公开的一种配置界面的示意图;4 is a schematic diagram of a configuration interface disclosed in an embodiment of the present application;
图5是本申请实施例公开的服务编排连接方式的示意图;FIG. 5 is a schematic diagram of a service orchestration connection mode disclosed in an embodiment of the present application;
图6是本申请实施例公开的另一种服务编排方法的流程示意图;6 is a schematic flowchart of another service orchestration method disclosed in an embodiment of the present application;
图7是本申请实施例公开的一种服务编排装置的结构示意图;FIG. 7 is a schematic structural diagram of a service orchestration apparatus disclosed in an embodiment of the present application;
图8是本申请实施例公开的一种服务编排设备的结构示意图。FIG. 8 is a schematic structural diagram of a service orchestration device disclosed in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在对本申请提供的服务编排方法进行阐述之前,先介绍一下和本申请相关技术术语:Before explaining the service orchestration method provided by this application, first introduce the technical terms related to this application:
1、领域特定语言(Domain Specific Language,DSL):一种为特定领域设计的,具有受限表达性的编程语言。通过限定问题边界,从而锁定复杂度,提高编程效率,使用DSL作为服务编排的声明配置有以下优点:一、可以降低语言表述出错率;二、可以让不熟悉如何实现技术的开发人员甚至商业人员能够了解模型;三、特定领域语言提供特定领域的应用程序接口(Application Programming Interface,API)来操作模型,可以提高开发效率;四、模型中具备了重要的业务知识,将解决方案从一种技术迁移到另一种技术,或者是同一种技术的不同版本之间迁移,使其变得相对容易。一般通过适当修改生成器或解释器就可以做到。五、可以使用模型配置一个包含多种不同技术的实现过程,从而降低使用这些技术实现一个解决方案的技术难度和工作量。在本申请实施例中,DSL主要使用yaml格式文件来描述服务编排文件。可选的,还可以使用诸如json、hcl等格式的文件来描述服务编排文件。其中,yaml、json、hcl均是标记性语言。1. Domain Specific Language (DSL): A programming language with limited expressiveness designed for a specific domain. By limiting the problem boundary, so as to lock the complexity and improve the programming efficiency, using DSL as the declarative configuration of service orchestration has the following advantages: First, it can reduce the error rate of language expression; Able to understand the model; 3. The domain-specific language provides a domain-specific Application Programming Interface (API) to operate the model, which can improve development efficiency; 4. The model has important business knowledge, and the solution is transformed from a technology Migrating to another technology, or between versions of the same technology, makes it relatively easy. This can usually be done by modifying the generator or interpreter appropriately. 5. You can use the model to configure an implementation process that includes a variety of different technologies, thereby reducing the technical difficulty and workload of implementing a solution using these technologies. In the embodiment of the present application, the DSL mainly uses a yaml format file to describe the service orchestration file. Optionally, a file in a format such as json and hcl can also be used to describe the service orchestration file. Among them, yaml, json, and hcl are all markup languages.
2、低代码(lowcode):一种可视化应用开发的方法,通过低代码开发,不同经验水平的开发人员能够通过图形用户界面,使用拖放式组件和模型驱动逻辑来创建Web和移动应用。使用lowcode方式来承载本方案的编排配置具有以下优点:一、更直观地构建应用,可以使用可视化的方法定义用户逻辑,抹平不同开发人员开发API层的经验。二、开发人员可以使用自己编码的增强功能拓展应用,需要自定义代码时可以将相关代码封装到共享模块中,以便整个开发团队拖进他们的应用中。三、内置自动测试,主动质量监控和实时性能管理,降低项目开发风险。四、充分利用公有云,通过简单配置自动管理应用的可靠性与可拓展性,从而降低基础设施的维护成本与工作量。五、充分体现devops(过程、方法与系统的统称)理念,完成配置后自动构建系统,并在部署钱构建测试和验证分支。在申请实施例中,便是通过拖拉形式在图形界面上构建服务编排文件,不需要开发人员逐行写代码来构建服务编排文件,从而实现了前端开发人员的开发效率。2. Lowcode: A method of visual application development through which developers of different experience levels can create web and mobile applications through a graphical user interface, using drag-and-drop components and model-driven logic. Using the lowcode method to carry the orchestration configuration of this solution has the following advantages: 1. Building applications more intuitively, you can use a visual method to define user logic, and smooth out the experience of different developers in developing the API layer. Second, developers can use their own coding enhancements to expand the application, and when they need to customize the code, they can encapsulate the relevant code into a shared module, so that the entire development team can drag it into their application. 3. Built-in automatic testing, active quality monitoring and real-time performance management, reduce project development risks. Fourth, make full use of the public cloud, and automatically manage the reliability and scalability of applications through simple configuration, thereby reducing the maintenance cost and workload of the infrastructure. 5. Fully embody the concept of devops (the collective term for processes, methods and systems), automatically build the system after completing the configuration, and build the test and verification branches during deployment. In the application embodiment, the service orchestration file is constructed on the graphical interface by dragging and dropping, and developers are not required to write code line by line to construct the service orchestration file, thereby realizing the development efficiency of front-end developers.
3、服务编排:使用各种能力进行编排以完成某一业务,各个能力有序地编织起来,聚合成一条特定的执行链。单次调用会引发对后端服务的一个或者多个请求。3. Service orchestration: Use various capabilities to orchestrate to complete a certain business, and each capability is woven in an orderly manner and aggregated into a specific execution chain. A single call will cause one or more requests to the backend service.
4、Node.js:一个基于ChromeV8引擎的JavaScript运行环境。Node.js使用事件驱动、非阻塞I/O模型,非常适合I/O密集型应用。在申请实施例中,Node.js主要完成以下工作:一、编写Node.js版本的服务编排器核心功能,提供微服务聚合能力与编排能力,使得客户端请求能够通过一次请求就能获取多个后端微服务数据,并且能够使用强定制的编排逻辑来编排微服务的调用顺序。二、提供DSL解析引擎,对DSL描述进行解析后按照一定逻辑进行对后端微服务链式调用。三、编写代码生成器,能够使用模板引擎利用抽象语法树生成可部署的服务代码,支持二次开发,进一步提升开发效率。可选的,还可以是使用Golang(一种静态强类型编译型语言)、Java、PHP、Python等语言。4. Node.js: A JavaScript runtime environment based on the Chrome V8 engine. Node.js uses an event-driven, non-blocking I/O model that is ideal for I/O-intensive applications. In the application example, Node.js mainly completes the following tasks: 1. Writing the core functions of the service orchestrator of the Node.js version, providing micro-service aggregation capabilities and orchestration capabilities, so that client requests can obtain multiple Back-end microservice data, and the ability to use strongly customized orchestration logic to orchestrate the call sequence of microservices. 2. Provide a DSL parsing engine, which parses the DSL description and makes chained calls to the back-end microservices according to certain logic. 3. Write a code generator, which can use a template engine to generate deployable service code using abstract syntax trees, support secondary development, and further improve development efficiency. Optionally, languages such as Golang (a static strongly typed compiled language), Java, PHP, and Python can also be used.
结合上述相关介绍,请参见图1,图1为本申请实施例公开的一种服务编排系统的架构示意图,如图1所示,该服务编排系统的架构图100包括了用户终端110、服务编排设备120以及服务器130,其中,服务编排设备120包括服务编排前端121和服务编排服务器122,用户终端110、服务编排设备120以及服务器端130之间可以进行通信连接。具体的,用户终端110主要用于向服务编排设备120发送服务调用请求,或者直接向服务器130发送服务调用请求;服务编排设备120主要是用于实现本申请的服务编排方法,响应服务调用请求依次调用存储于服务器130中的各类服务,进而将执行结果返回给用户终端110;相较于用户终端110直接向服务器130发送服务调用请求,本申请所示出的架构中服务编排设备实现了服务的聚合功能,当用户终端110发起包括多个服务的服务调用请求后,可由服务编排设备120实现对服务的调用,相比由用户终端110根据上述服务调用请求,依次去调用对应的服务,可以有效减少用户终端多次调用服务所耗费的网路传输成本。服务器130主要用于存储有各种功能的服务,服务还包括各类微服务。With reference to the above related introduction, please refer to FIG. 1 , which is a schematic diagram of the architecture of a service orchestration system disclosed in an embodiment of the present application. As shown in FIG. 1 , the architecture diagram 100 of the service orchestration system includes a
基于该服务编排系统,本申请提供了一种服务编排方法,具体的:Based on the service orchestration system, the present application provides a service orchestration method, specifically:
在一种可能的实现方式中,服务编排方法主要由服务编排前端121执行:显示主界面,该主界面包括N个节点,N是正整数;当存在针对目标节点的配置操作时,显示目标节点的配置界面,该目标节点的配置界面用于获取目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是N个节点中的任一节点;当存在针对N个节点的连接操作时,显示包含N个节点的节点链,节点链用于生成服务编排文件,该服务编排文件包含一个或多个服务的执行顺序。该方法主要是通过在服务编排前端121对节点对应的信息进行配置,从而高效地实现服务编排,不需要开发人员以代码的形式进行开发,可以节省开发时间,减少工作量,更好地顺应了云时代的开发理念。In a possible implementation manner, the service orchestration method is mainly performed by the service orchestration front end 121: displaying a main interface, the main interface includes N nodes, where N is a positive integer; when there is a configuration operation for the target node, displaying the target node's Configuration interface, the configuration interface of the target node is used to obtain the configuration information of the target node, the configured target node corresponds to a service, and the target node is any node among N nodes; when there is a connection operation for N nodes, Displays a node chain containing N nodes, the node chain is used to generate a service orchestration file that contains the execution order of one or more services. This method mainly configures the information corresponding to the nodes in the service orchestration front-
在一种可能的实现方式中,服务编排方法主要由服务编排服务器122执行:解析由服务编排前端121完成的服务编排文件,得到可执行代码文件,可执行代码文件包括服务编排文件对应的一个或多个服务的执行顺序,以及每个服务的配置信息;部署可执行代码文件,部署后的可执行代码文件用于响应用户终端的服务调用请求;获取服务调用请求,服务调用请求包括所述服务编排文件的文件标识;执行服务编排文件对应的可执行代码文件,按照服务编排文件包含的一个或多个服务的执行顺序,以及每个服务的配置信息依次调用服务,得到服务调用请求的执行结果;将服务调用请求的执行结果返回至服务调用请求对应的用户终端。通过服务编排服务器122直接执行服务编排文件对应的可执行代码,不需要根据每个服务去重复调用返回的步骤,最后返回调用请求的执行结果即可,可以有效减少用户终端的调用次数,减少调用接口的网络传输成本。In a possible implementation manner, the service orchestration method is mainly executed by the service orchestration server 122: parsing the service orchestration file completed by the service orchestration
在一种可能的实现方式中,用户终端110包括但不限于具有无线通信功能的手持式设备、车载设备、可穿戴设备或计算设备。示例性地,用户终端110可以是手机(mobilephone)、平板电脑或带无线收发功能的电脑。还可以是虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制中的无线终端设备、无人驾驶中的无线终端设备、远程医疗中的无线终端设备、智能电网中的无线终端设备、智慧城市(smart city)中的无线终端设备、智慧家庭(smart home)中的无线终端设备等等。服务编排服务器122和服务器130可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。In a possible implementation manner, the
基于上述的服务编排系统,本申请提供了一种服务编排方法,如图2所示,是本申请实施公开的一种服务编排方法的流程示意图,该服务编排方法可以由服务编排设置120中的服务编排前端121执行,该服务编排方法具体可以包括以下步骤:Based on the above service orchestration system, the present application provides a service orchestration method, as shown in FIG. The service orchestration
S201、显示主界面,主界面包括N个节点,N是正整数。S201. Display a main interface, where the main interface includes N nodes, where N is a positive integer.
其中,主界面为配置服务编排文件对应节点的可视化界,主界面可以指的是一种可视化应用开发的方法,如lowcode(低代码)开发界面,通过该界面,不同经验水平的开发人员都能够通过图形用户界面,使用拖放式组件和模型驱动逻辑来创建Web和移动应用。在本申请实施例中,主界面就是用于通过拖拉方式实现服务编排的界面,开发人员可以根据需求选择不同类型的节点,放置在该主界面中,可以降低开发人员的学习成本与学习负担。Among them, the main interface is the visual boundary of the node corresponding to the configuration service orchestration file. The main interface can refer to a method of visual application development, such as the lowcode (low code) development interface. Through this interface, developers of different experience levels can Create web and mobile applications using drag-and-drop components and model-driven logic through a graphical user interface. In the embodiment of the present application, the main interface is an interface used to implement service orchestration by dragging and dropping. Developers can select different types of nodes according to their needs and place them in the main interface, which can reduce the learning cost and learning burden of developers.
在一种可能的实现方式中,当需要进行服务编排时,则开发人员则在服务编排前端上点击主界面,从而显示主界面。主界面中包括添加控件,开发人员可以通过添加控件进行节点的添加,开发人员可以对每个节点的节点类型进行选择,在开发人员进行添加后,显示的主界面中便会包括用户点击添加的节点。其中,节点类型根据节点对应服务的功能划分的,比如说,服务的功能可以是数据库(如增、删、改等功能)、redis,甚至各类应用服务(如微信),节点类型还可以根据节点对应服务的传输协议划分的。具体的,服务可以是当下流行的微服务,以网上超市为例,则网上超市可以有多个服务,如用户管理、商品管理以及订单管理,每一个管理对应一个微服务,也可以理解成一个功能对应一个微服务。In a possible implementation manner, when service orchestration needs to be performed, the developer clicks on the main interface on the front end of the service orchestration, thereby displaying the main interface. The main interface includes adding controls. The developer can add nodes by adding controls. The developer can select the node type of each node. After the developer adds, the displayed main interface will include the user click to add. node. Among them, the node type is divided according to the function of the corresponding service of the node. For example, the function of the service can be database (such as adding, deleting, modifying and other functions), redis, and even various application services (such as WeChat), and the node type can also be based on Nodes are divided by the transport protocol of the corresponding service. Specifically, a service can be a popular microservice. Taking an online supermarket as an example, an online supermarket can have multiple services, such as user management, commodity management, and order management. Each management corresponds to a microservice, which can also be understood as a A function corresponds to a microservice.
例如,主界面可以如图3所示,是本申请实施例公开的一种服务编排方法主界面的示意图,界面上有一个“添加”控件301,开发人员点击“添加”控件301就会显示界面302,开发人员可以根据想要选择的服务在302界面中进行节点类型的输入操作,当节点类型被确定后,就会得到类似于节点1这样的节点,可以看到,在图3所示的主界面中,显示了三个节点,即N=3。可选的,主界面中还包括“查看”控件,当每个节点的信息被配置好之后,开发人员可以点击“查看”控件查看每个节点的配置信息。可选的,该主界面中还包括“调试”控件,当开发人员点击该“调试”控件,就会得到对应的执行结果。For example, the main interface may be as shown in FIG. 3 , which is a schematic diagram of the main interface of a service orchestration method disclosed in the embodiment of the present application. There is an “add”
S202、当存在针对目标节点的配置操作时,显示目标节点的配置界面,该目标节点的配置界面用于获取目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是N个节点中的任一节点。S202. When there is a configuration operation for the target node, display the configuration interface of the target node, where the configuration interface of the target node is used to obtain the configuration information of the target node, the configured target node corresponds to a service, and the target node is one of the N nodes. of any node.
其中,主界面中有开发人员拖拽的节点,每个节点都对应有节点类型,有可能几个节点的节点类型相同,也可能不同的节点对应不同的节点类型,具体需要根据开发人员配置时所需要调用的服务相关。如果调用服务是基于rpc协议实现的,则对应的节点类型可以是rpc类型,其中,rpc为远程过程调用(Remote Procedure Call)。Among them, there are nodes dragged by developers in the main interface, and each node corresponds to a node type. It is possible that several nodes have the same node type, or different nodes may correspond to different node types. The service that needs to be called is related. If the calling service is implemented based on the rpc protocol, the corresponding node type may be the rpc type, where the rpc is a remote procedure call (Remote Procedure Call).
在一种可能的实现方式中,当存在针对目标节点的配置操作时,服务编排设备会根据获取目标节点的节点类型所对应的预配置文件,然后在主界面上显示目标节点的配置界面,对应的,目标节点的配置界面包括预配置文件的多个文件内容,当存在针对目标文件内容的选择操作时,将目标文件内容作为目标节点的配置信息,目标文内容件也是预配置文件的多个文件内容中的。可选的,目标节点的配置界面可以显示在主界面的任意位置。其中,目标节点是N个节点中的任意一个节点,例如,可以是图3所示的三个节点中的任意一个;配置操作具体可以是开发人员点击目标节点。其中,预配置文件是和节点类型相关的,例如,trpc协议类型的节点,则对应的预配置文件即为“北极星配置”(该名称是自定义的,用于区分不同的配置),ilive协议类型节点对应的预配置文件是“l5配置”。In a possible implementation manner, when there is a configuration operation for the target node, the service orchestration device will obtain the pre-configuration file corresponding to the node type of the target node, and then display the configuration interface of the target node on the main interface, corresponding to The configuration interface of the target node includes multiple file contents of the pre-configured file. When there is a selection operation for the target file content, the target file content is used as the configuration information of the target node, and the target file content file is also a plurality of pre-configured files. in the file content. Optionally, the configuration interface of the target node can be displayed anywhere on the main interface. The target node is any one of the N nodes, for example, it may be any one of the three nodes shown in FIG. 3 ; the configuration operation may specifically be that the developer clicks on the target node. Among them, the pre-configuration file is related to the node type. For example, for a node of the trpc protocol type, the corresponding pre-configuration file is "North Star Configuration" (the name is customized and used to distinguish different configurations), ilive protocol The corresponding preconfiguration file for the type node is "l5 configuration".
例如,图4所示,是申请实施例公开的一种目标节点的配置界面示意图,目标节点的配置界面401位于主界面的右边。For example, as shown in FIG. 4 , it is a schematic diagram of a configuration interface of a target node disclosed in an embodiment of the application, and a
在一种可能的实现方式中,预配置文件的多个文件内容包括多个服务的服务标识、每个服务包含的多个方法的方法标识以及每个方法的多个方法参数,其中,一个服务可能有多个方法,每个方法对应的方法参数不一样,则当存在针对目标节点的配置操作时,显示目标节点的配置界面(具体怎么对目标节点进行配置),包括:当存在针对目标服务的服务标识的选择操作时,显示目标服务包含的多个方法的方法标识列表;当存在针对目标方法的方法标识的选择操作时,显示目标方法的多个方法参数列表;当存在针对目标方法参数的选择操作时,将目标服务的服务标识、目标方法的方法标识以及目标方法参数均作为目标节点的配置信息,这里的目标节点就对应目标服务。其中,每个服务对应一个服务标识,一个服务标识可以对应一个服务名称,同理,每个方法对应一个方法标识,每个方法标识也可以对应一个方法名称。In a possible implementation manner, the multiple file contents of the pre-configuration file include service identifiers of multiple services, method identifiers of multiple methods included in each service, and multiple method parameters of each method, wherein one service There may be multiple methods, and the method parameters corresponding to each method are different. When there is a configuration operation for the target node, the configuration interface of the target node (specifically how to configure the target node) is displayed, including: when there is a configuration operation for the target node When there is a selection operation for the service identifier of the target service, a list of method identifiers of multiple methods included in the target service is displayed; when there is a selection operation for the method identifier of the target method, multiple method parameter lists of the target method are displayed; when there are parameters for the target method During the selection operation, the service identifier of the target service, the method identifier of the target method, and the parameters of the target method are all used as the configuration information of the target node, and the target node here corresponds to the target service. Among them, each service corresponds to a service ID, and a service ID can correspond to a service name. Similarly, each method corresponds to a method ID, and each method ID can also correspond to a method name.
例如,具体可以如图4所示,是申请实施例公开的一种目标节点的配置界面示意图,其中,401是节点1的配置界面,界面中包括对服务pb文件设置(pb文件是表示模型结构的二进制文件,不带有源代码)、服务路由设置、命名空间设置,其中,服务路由可以根据解析服务pb文件得到,命名空间则是和节点类型相对应的,开发人员可以动态地对命名空间进行选择。在图4中,配置界面中还包括服务名称设置、方法名称设置和方法参数设置,由于服务名称、方法名称和方法参数具有依赖关系,因此开发人员在进行配置时是有先后顺序的,服务名称、方法名称和方法参数都是以下拉框的形式展示给开发人员进行选择的,所展示的服务名称、方法名称和方法参数均是根据节点类型对应的预配置文件得到的。目标服务的服务名称被选中时,方法名称的下拉框中包含目标服务包含的方法的方法名称,即当目标服务的服务名称被选中,则方法名称的下拉框中包含的方法名称是和选中的服务名称关联的方法名称;当目标方法被选中时,方法参数的下拉框中包含目标方法包含的方法参数,即方法参数的下拉框中包含的方法参数是和选中的方法名称关联的参数。For example, as shown in FIG. 4 , which is a schematic diagram of a configuration interface of a target node disclosed in the embodiment of the application, wherein 401 is the configuration interface of node 1, and the interface includes the settings for the service pb file (the pb file represents the model structure The binary file (without source code), service routing settings, and namespace settings, where the service routing can be obtained by parsing the service pb file, and the namespace corresponds to the node type. Developers can dynamically configure the namespace to make a selection. In Figure 4, the configuration interface also includes service name settings, method name settings, and method parameter settings. Since the service name, method name, and method parameters have dependencies, developers have a sequence in the configuration. The service name , method names and method parameters are displayed to the developer in the form of a drop-down box for selection. The displayed service name, method name and method parameters are obtained according to the pre-configured file corresponding to the node type. When the service name of the target service is selected, the drop-down box of the method name contains the method name of the method contained in the target service, that is, when the service name of the target service is selected, the method name contained in the drop-down box of the method name is the same as the selected one. The method name associated with the service name; when the target method is selected, the drop-down box of method parameters contains the method parameters included in the target method, that is, the method parameters included in the drop-down box of method parameters are the parameters associated with the selected method name.
S203、当存在针对N个节点的连接操作时,显示包含N个节点的节点链,该节点链用于生成服务编排文件,该服务编排文件包含一个或多个服务的执行顺序。S203. When there is a connection operation for N nodes, display a node chain including N nodes, where the node chain is used to generate a service arrangement file, where the service arrangement file includes the execution sequence of one or more services.
在一种可能的实现方式中,经过步骤S201~步骤S202,可以得到N个已经被配置好了的节点,当存在针对N个节点的连接操作时,显示包含N个节点的节点链,即开发人员通过连接线将这N个节点连接起来,得到一条连接好的节点链,该节点链可以是有向无环图,具体的:可以是单节点,也可以多节点,多节点可以是从节点a流向节点b,再从节点b流向节点c;也可以是从节点a流向节点b,从节点b流向节点c,同时,节点b也流向节点d。In a possible implementation manner, through steps S201 to S202, N nodes that have been configured can be obtained, and when there is a connection operation for N nodes, a node chain containing N nodes is displayed, that is, the development of Personnel connect these N nodes through connecting lines to obtain a connected node chain. The node chain can be a directed acyclic graph. Specifically: it can be a single node or multiple nodes, and multiple nodes can be slave nodes. a flows to node b, and then from node b to node c; it can also flow from node a to node b, from node b to node c, and at the same time, node b also flows to node d.
具体的,可以如图5所示,是本申请实施例公开的一种服务编排连接方式的示意图,可以看到,图2中的501是一种节点链的连接方式,502是另一种节点链的连接方式。Specifically, as shown in FIG. 5 , which is a schematic diagram of a service orchestration connection method disclosed in an embodiment of the present application, it can be seen that 501 in FIG. 2 is a connection method of a node chain, and 502 is another kind of node How the chain is connected.
在一种可能的实现方式中,当开发人员连接好配置好的N个节点后,当点击主界面上的调试控件时,对应的,会生成一个服务编排文件,生成的服务编排文件是标记性语言的文件,如前述的yaml格式的文件、json格式的文件、hcl格式的文件。同时,会在界面上显示节点链(即服务编排文件)的测试结果。其中,服务编排文件还包括每个服务的配置信息,每个服务的配置信息是由每个服务对应的节点的配置信息确定的;测试结果包括第一单位测试结果和第二单位测试结果,第一单位测试结果是关于节点链生成的服务编排文件包含的一个或多个服务的执行顺序的测试结果,第二单位测试结果是关于服务编排文件的业务执行结果的测试结果。具体的,第一单位测试结果是用于检测服务编排文件中的多个服务的执行顺序是否和预设的执行顺序相同,若是相同,则证明顺序是没有问题的,反之,若出现报错,则开发人员需要对顺序进行调整,可以通过拖拉的方式直接在主界面中进行修改。第二单位测试结果是用于检测服务编排的业务执行结果是否和预设的相同,若是相同,则证明该服务编排成功,反之,若出现报错,则开发人员需要对服务编排文件对用的各个节点进行调整。可选的,测试结果还包括第三单元测试结果,第三单元测试结果是关于服务编排文件对应的每一个节点的业务执行结果,可以检测出每个节点配置的服务是否可以成功执行,若是不能成功执行,则前端开发人员再对节点的配置信息进行更改。In a possible implementation, after the developer has connected the configured N nodes, and clicks the debug control on the main interface, a corresponding service orchestration file will be generated, and the generated service orchestration file is marked Language files, such as the aforementioned yaml format files, json format files, and hcl format files. At the same time, the test results of the node chain (that is, the service orchestration file) will be displayed on the interface. The service arrangement file also includes configuration information of each service, and the configuration information of each service is determined by the configuration information of the node corresponding to each service; the test results include the first unit test result and the second unit test result, and the first unit test result and the second unit test result. The first unit test result is the test result about the execution order of one or more services included in the service orchestration file generated by the node chain, and the second unit test result is the test result about the service execution result of the service orchestration file. Specifically, the first unit test result is used to detect whether the execution order of multiple services in the service orchestration file is the same as the preset execution order. Developers need to adjust the order, which can be modified directly in the main interface by dragging and dropping. The second unit test result is used to detect whether the service execution result of the service orchestration is the same as the preset one. If it is the same, it proves that the service orchestration is successful. On the contrary, if an error occurs, the developer needs to match the service orchestration files node to adjust. Optionally, the test result further includes a third unit test result, and the third unit test result is the business execution result of each node corresponding to the service orchestration file. It can be detected whether the service configured by each node can be successfully executed. If the execution is successful, the front-end developer will change the configuration information of the node.
综上所述,服务编排前端121的工作可以概括为:第一步、开发人员在可视化界面上(如前述的lowcode开发界面)拖拽出自己需要的数量的节点,并根据预配置文件配置每个节点应有的配置(图4示出的配置界面中进行配置),配置的信息包括服务名称、方法名称以及方法参数;第二步、开发人员在可视化界面将各个节点按照一定的次序进行排列,例如,第一个节点是配置的节点A,第二个节点是配置的节点C,最后一个节点是配置的节点B,将三个节点连接后,点击保存后得到一个工作流(对应前述的节点链)和一个对应的工作流id(服务编排文件标识),该id可以用于调用执行工作流接口时的参数;第三步:在平台提供的调试界面中,使用得到的工作流id,便可得到服务编排文件得到聚合的数据以及测试结果。To sum up, the work of the service orchestration front-
在一种可能的实现方式中,在主界面中生成的节点链对应的服务编排文件可用于直接实现对服务编排文件的调用,对于服务编排文件,有一个对应的触发动作,触发动作可以接收到用户终端发起的服务调用请求,则直接向用户返回服务编排文件的执行结果,触发动作还可以是开发人员触发的,也可以得到服务编排文件的执行结果。该情况对应平台即服务(Platform as a Service,PaaS),是指。可以理解成,用户只需要调用开发这个服务编排的平台,就可以得到服务调用请求的执行结果。In a possible implementation, the service orchestration file corresponding to the node chain generated in the main interface can be used to directly implement the invocation of the service orchestration file. For the service orchestration file, there is a corresponding trigger action, and the trigger action can be received The service invocation request initiated by the user terminal directly returns the execution result of the service orchestration file to the user, and the triggering action can also be triggered by the developer, and the execution result of the service orchestration file can also be obtained. This situation corresponds to a platform as a service (Platform as a Service, PaaS), which means. It can be understood that the user only needs to call the platform that develops the service orchestration to get the execution result of the service invocation request.
本申请实施中,显示主界面,该主界面包括N个节点,N是正整数;当存在针对目标节点的配置操作时,显示目标节点的配置界面,该目标节点的配置界面用于获取目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是N个节点中的任一节点;当存在针对N个节点的连接操作时,显示包含N个节点的节点链,节点链用于生成服务编排文件,该服务编排文件包含一个或多个服务的执行顺序。该方法主要是开发人员通过在服务编排前端121的可视化界面中拖放节点,并进行节点信息的行配置,从而高效地实现服务编排,不需要开发人员以代码的形式进行开发,可以节省开发时间,减少工作量,更好地顺应了云时代的开发理念。In the implementation of this application, the main interface is displayed, the main interface includes N nodes, and N is a positive integer; when there is a configuration operation for the target node, the configuration interface of the target node is displayed, and the configuration interface of the target node is used to obtain the target node's configuration interface. Configuration information, the configured target node corresponds to a service, and the target node is any node among N nodes; when there is a connection operation for N nodes, the node chain containing N nodes is displayed, and the node chain is used to generate services An orchestration file that contains the execution order for one or more services. This method is mainly that developers can efficiently implement service orchestration by dragging and dropping nodes in the visual interface of the service orchestration front-
基于上述服务编排系统和服务编排方法,本申请提供了另一种服务编排方法,如图6所示,是本申请实施公开的另一种服务编排方法的流程示意图,该服务编排方法可以由服务编排设置120中的服务编排服务器122执行,该服务编排方法具体可以包括以下步骤:Based on the above-mentioned service orchestration system and service orchestration method, the present application provides another service orchestration method, as shown in FIG. Executed by the
S601、解析服务编排文件,生成可执行代码文件,可执行代码文件包括服务编排文件对应的一个或多个服务的执行顺序,以及每个服务的配置信息。S601. Parse the service orchestration file to generate an executable code file, where the executable code file includes an execution sequence of one or more services corresponding to the service orchestration file, and configuration information of each service.
在一种可能的实现方式中,当在服务编排前端121配置好服务编排文件对应的各个节点之后,就会生成对应的服务编排文件。在本申请实施例中,生成的服务编排文件是DSL(Domain Specific Language,领域特定语言)来描述的,具体可以是yaml格式的文件,还可以是json、hcl等格式的文件。进一步的,服务编排前端121将服务编排文件发送给服务编排服务器122。In a possible implementation manner, after each node corresponding to the service orchestration file is configured in the service orchestration front-
进一步的,服务编排服务器包括的注册节点接口接收服务编排前端发送服务编排文件以及各个节点的配置信息,接收的服务编排文件包括的一个或多个服务的执行顺序,服务编排服务器包括的获知节点信息接口解析服务编排文件,以生成可执行代码文件,并将可执行代码文件封装为一个工作流接口。其中,可执行代码文件包括服务编排文件对应的一个或多个服务的执行顺序,以及每个服务的配置信息。其中,解析生成的可执行代码文件可以分为两种,其中一种称为带运行时的可执行代码文件,另一种称为不带运行时的可执行代码文件。Further, the registered node interface included in the service orchestration server receives the service orchestration file and the configuration information of each node sent by the service orchestration front end, the execution sequence of one or more services included in the received service orchestration file, and the learned node information included in the service orchestration server. The interface parses the service orchestration file to generate an executable code file and encapsulates the executable code file as a workflow interface. The executable code file includes the execution sequence of one or more services corresponding to the service orchestration file, and configuration information of each service. Among them, the executable code files generated by parsing can be divided into two types, one of which is called an executable code file with runtime, and the other is called an executable code file without runtime.
带运行时的可执行代码文件的生成过程为:解析器根据服务编排文件直接自动生成可执行代码文件。带运行时的可执行代码文件可以保证得到的可执行代码文件和服务编排文件的一致性,以降低出错率。The generating process of the executable code file with runtime is as follows: the parser directly and automatically generates the executable code file according to the service orchestration file. The executable code file with runtime can ensure the consistency of the obtained executable code file and the service arrangement file, so as to reduce the error rate.
不带运行时的可执行代码文件的生成过程为:解析器根据服务编排文件自动生成辅助可执行代码文件,由开发人员人工编辑辅助可执行代码文件,得到不带运行时的可执行代码文件。不带运行时的可执行代码文件对于开发人员来说,自主性更强,开发人员可以根据需求进行自定义编写。The generation process of the executable code file without runtime is as follows: the parser automatically generates the auxiliary executable code file according to the service arrangement file, and the developer manually edits the auxiliary executable code file to obtain the executable code file without runtime. Executable code files without runtime are more autonomous for developers, who can customize and write according to their needs.
可选的,服务编排服务器还可以将服务编排文件转化成适应开发平台的任意一种可执行代码文件,如Node、Golang语言,这两种语言可以更好的切合前端开发人员的语言使用习惯与性能,还可以如Java、PHP、Python等编译语言。Optionally, the service orchestration server can also convert the service orchestration file into any executable code file suitable for the development platform, such as Node and Golang languages. These two languages can better suit the language usage habits and language usage of front-end developers. performance, but also compiled languages such as Java, PHP, Python, etc.
S602、部署可执行代码文件,部署后的可执行代码文件用于响应用户终端的服务调用请求。S602. Deploy an executable code file, where the deployed executable code file is used to respond to a service invocation request of a user terminal.
在一种可能的实现方式中,服务编排服务器还可以将解析得到的可执行代码文件进行部署,其目的是用于响应用户终端发起的服务调用请求。每个部署的可执行代码文件和服务编排文件都存在一个对应的关系,可以是用标识用于区分的。如一个服务编排文件对应一个id,每个id对应一个可执行代码文件。具体可以如表一所示,服务编排文件的文件标识和可执行代码文件有一个相同的标识信息,以便于服务编排服务器对服务编排文件进行更好的管理。In a possible implementation manner, the service orchestration server may also deploy the executable code file obtained by parsing, the purpose of which is to respond to the service invocation request initiated by the user terminal. Each deployed executable code file and service orchestration file have a corresponding relationship, which can be distinguished by an identifier. For example, a service orchestration file corresponds to an id, and each id corresponds to an executable code file. Specifically, as shown in Table 1, the file identifier of the service orchestration file and the executable code file have the same identification information, so that the service orchestration server can better manage the service orchestration file.
表一Table I
可选的,可执行代码文件可以由开发人员进行部署,在用户理解到服务编排的逻辑的情况下,也可以由用户终端进行部署。不在此对其进行限定。得到的可执行代码可以部署到各类云部署平台,如腾讯云容器、云服务、云函数等,也可以部署在各个企业的内的部署平台。Optionally, the executable code file can be deployed by a developer, and can also be deployed by a user terminal if the user understands the logic of service orchestration. It is not limited here. The obtained executable code can be deployed to various cloud deployment platforms, such as Tencent Cloud containers, cloud services, cloud functions, etc., as well as deployment platforms within each enterprise.
S603、获取服务调用请求,该服务调用请求包括服务编排文件的文件标识。S603. Obtain a service invocation request, where the service invocation request includes a file identifier of the service arrangement file.
在一种可能的实现方式中,当用户终端发起服务调用请求后,对应的,服务编排服务器就可以获取到该服务调用请求,以快速的实现服务编排服务器对服务的调用,并向用户终端返回执行结果。其中,服务调用请求包括服务编排文件的文件标识,如表一所示的标识信息,如id=1。In a possible implementation manner, after the user terminal initiates a service invocation request, correspondingly, the service orchestration server can obtain the service invocation request, so as to quickly realize the service invocation by the service orchestration server, and return to the user terminal. Results of the. The service invocation request includes the file identifier of the service arrangement file, such as the identifier information shown in Table 1, for example, id=1.
在一种可能的实现方式中,服务编排服务器在接收到服务调用请求后,还涉及到网络传输协议的转换,具体可以解释为:首先,服务编排服务器接收用户终端发送的原始调用请求,该原始调用请求是基于第一传输协议生成的请求,而服务编排服务器能解析的是第二传输协议的调用请求,因此,当原始调用请求发送到服务编排服务器后,会判断第一传输协议和第二传输协议是否一致,若是一致,则可以直接执行服务调用请求所对应的调用请求,若是不一致,则服务编排服务器会先将原始调用请求转换为第二传输协议对应的服务调用请求,然后再对该服务调用请求进行处理。In a possible implementation manner, after the service orchestration server receives the service invocation request, it also involves the conversion of the network transmission protocol, which can be specifically explained as: first, the service orchestration server receives the original invocation request sent by the user terminal, the original The invocation request is a request generated based on the first transmission protocol, and the service orchestration server can parse the invocation request of the second transmission protocol. Therefore, when the original invocation request is sent to the service orchestration server, the first transmission protocol and the second transmission protocol Whether the transmission protocol is consistent, if it is consistent, the call request corresponding to the service call request can be directly executed. If it is inconsistent, the service orchestration server will first convert the original call request into the service call request corresponding to the second transmission protocol, and then execute the corresponding service call request. The service call request is processed.
例如,用户终端发送的原始调用请求是基于第一传输协议生成的请求,如第一传输协议是超文本传输协议(Hypertext Transfer Protocol,HTTP),而服务编排服务器能解析的是第二传输协议的调用请求,如第二传输协议是TRPC协议,则此时需要将HTTP协议转换成TRPC协议,服务编排服务器将执行结果返回给用户终端时,同样需要将TRPC协议转换成HTTP协议,以便于用户终端接收执行结果。其中,TRPC协议是基于RPC协议生成的。For example, the original invocation request sent by the user terminal is a request generated based on the first transmission protocol. For example, the first transmission protocol is Hypertext Transfer Protocol (Hypertext Transfer Protocol, HTTP), and the service orchestration server can parse the second transmission protocol. For the call request, if the second transmission protocol is the TRPC protocol, then the HTTP protocol needs to be converted into the TRPC protocol. When the service orchestration server returns the execution result to the user terminal, it also needs to convert the TRPC protocol into the HTTP protocol, so that the user terminal can Receive the execution result. Among them, the TRPC protocol is generated based on the RPC protocol.
S604、执行服务编排文件对应的可执行代码文件,按照服务编排文件包含的一个或多个服务的执行顺序,以及每个服务的配置信息依次调用服务,得到服务调用请求的执行结果。S604. Execute the executable code file corresponding to the service orchestration file, and sequentially call the services according to the execution sequence of one or more services contained in the service orchestration file and the configuration information of each service, to obtain the execution result of the service invocation request.
在一种可能的实现方式中,当服务编排服务器获取到服务调用请求以及服务调用请求携带的服务编排文件的文件标识后,则服务编排服务器包括的执行工作流接口可以根据该服务编排文件的文件标识调用封装好的工作流接口,并执行工作流接口封装好的可执行代码文件。具体的,执行工作流接口按照服务编排文件包含的一个或多个服务的执行顺序,以及每个服务的配置信息依次调用服务,即执行服务编排文件对应的可执行代码文件,得到服务调用请求的执行结果。通过对工作流接口的调用从而实现了服务的聚合,可以有效减少用户终端多次调用不同接口的网络传输成本。In a possible implementation manner, after the service orchestration server obtains the service invocation request and the file identifier of the service orchestration file carried in the service invocation request, the execution workflow interface included in the service orchestration server can orchestrate the file according to the service orchestration file. Identifies invoking the encapsulated workflow interface, and executes the executable code file encapsulated by the workflow interface. Specifically, the execution workflow interface invokes the services in sequence according to the execution order of one or more services contained in the service orchestration file and the configuration information of each service, that is, executes the executable code file corresponding to the service orchestration file, and obtains the service invocation request. Results of the. The aggregation of services is realized by calling the workflow interface, which can effectively reduce the network transmission cost of the user terminal calling different interfaces multiple times.
S605、将服务调用请求的执行结果返回至服务调取请求对应的用户终端。S605. Return the execution result of the service invocation request to the user terminal corresponding to the service invocation request.
在一种可能的实现方式中,服务编排服务器得到了服务调用请求的执行结果后,会将该执行结果返回给用户终端,以满足用户的对服务的调用需求。In a possible implementation manner, after obtaining the execution result of the service invocation request, the service orchestration server will return the execution result to the user terminal to meet the user's invocation requirement for the service.
在一种可能的实现方式中,服务调用请求的执行结果可以是通过上述的执行接口返回给用户终端的。In a possible implementation manner, the execution result of the service invocation request may be returned to the user terminal through the foregoing execution interface.
可选的,服务编排服务器还提供了自定义插件机制,支持开发人员自定义拓展逻辑,前端开发人员可以插件规则编写自定义逻辑插入到该服务编排服务器中,以拓展编排能力。具体的,可以是服务编排服务器通过Plugin(Plug-in,addin,add-in,addon或add-on)插件机制,通过依赖注入与生命周期钩子,让前端开发者非常轻便地编写自定义逻辑,可以将插件机制理解成一个其他的插入接口,例如,开发人员自定义一个具有“日志”或者“监测”功能的代码,代码中定义了执行时间,将该段代码封装成插入接口,则调用工作流接口以执行工作流接口封装的可执行代码时并行执行插入接口封装的自定义代码,即可同时实现服务的调用,又实现了在该过程中对执行日志的记录。Optionally, the service orchestration server also provides a custom plug-in mechanism to support developers' custom expansion logic. Front-end developers can write custom logic for plug-in rules and insert them into the service orchestration server to expand the orchestration capability. Specifically, the service orchestration server can use the Plugin (Plug-in, addin, add-in, addon or add-on) plug-in mechanism, through dependency injection and life cycle hooks, so that front-end developers can write custom logic very easily, The plug-in mechanism can be understood as another plug-in interface. For example, a developer customizes a code with a "log" or "monitoring" function, and the execution time is defined in the code, and the code is encapsulated into an plug-in interface, and the work is called. When the flow interface executes the executable code encapsulated by the workflow interface, the custom code inserted into the interface encapsulation can be executed in parallel, so as to realize the invocation of the service and the recording of the execution log in the process.
在一种可能的实现方式中,开发人员还可以在主界面中拉取其他类型的节点,如web hook节点、graphql节点、merge节点等,开发人员可以通过对这些节点的配置实现与服务编排不同的功能,即上述每个节点就不会对应一个服务。其中,web hook节点一个API概念,是微服务API的使用范式之一,也被称为反向API,即前端不主动发送请求,完全由后端推送;graphql节点是用于API的声明性数据获取规范和查询语言,用户可通过调用该节点查询执行结果;merge节点通俗的理解就是一个合成节点,在对数据进行聚合的过程中,需要一个合成节点来实现聚合。In a possible implementation, developers can also pull other types of nodes in the main interface, such as web hook nodes, graphql nodes, merge nodes, etc., developers can configure these nodes to achieve different from service orchestration function, that is, each of the above nodes will not correspond to a service. Among them, the web hook node is an API concept, which is one of the usage paradigms of microservice API, also known as reverse API, that is, the front end does not actively send requests, but is completely pushed by the back end; the graphql node is the declarative data used for the API To obtain the specification and query language, the user can query the execution result by calling this node; the common understanding of the merge node is a synthesis node. In the process of aggregating data, a synthesis node is needed to realize the aggregation.
根据以上实施例,在一种可能的实现方法中,在实现本申请服务编排方法的基础上,还可以通过调用不同的节点对应的接口实现不同的功能,比如,通过调用web hook节点对应的接口实现持续集成(Continuous Integration,CI)/持续部署(ContinuousDeployment,CD))。CI/CD中的“CI”属于开发人员的自动化流程。成功的CI意味着应用代码的新更改会定期构建、测试并合并到共享存储库中,CI/CD中的“CD”指的是持续交付和/或持续部署。再比如,可以通过JSON节点实现MOCK测试,其中JSON(JavaScript ObjectNotation,JS)是一种轻量级的数据交换格式,也就是通过JSON传递的数据,来模拟实现MOCK测试,Mock测试就是在测试过程中,对于某些不容易构造(如HttpServletRequest必须在Servlet容器中才能构造出来)或者不容易获取的比较复杂的对象(如JDBC中的ResultSet对象),用一个虚拟的对象(Mock对象)来创建以便测试的测试方法;再比如,还可以通过活动配置节点实现低代码配置活动页面,即配置一个活动配置节点,通过调用该活动配置节点可以得到一个可视化界面(即低代码配置活动页面)。According to the above embodiment, in a possible implementation method, on the basis of implementing the service orchestration method of the present application, different functions can also be implemented by calling interfaces corresponding to different nodes, for example, by calling interfaces corresponding to web hook nodes Implement continuous integration (Continuous Integration, CI)/continuous deployment (Continuous Deployment, CD)). The "CI" in CI/CD belongs to the automated process of developers. Successful CI means that new changes to application code are regularly built, tested, and merged into a shared repository. The "CD" in CI/CD refers to continuous delivery and/or continuous deployment. For another example, the MOCK test can be implemented through the JSON node, in which JSON (JavaScript ObjectNotation, JS) is a lightweight data exchange format, that is, the data passed through JSON, to simulate the implementation of the MOCK test, and the Mock test is in the testing process. For some complex objects that are not easy to construct (such as HttpServletRequest must be constructed in the servlet container) or difficult to obtain (such as the ResultSet object in JDBC), a virtual object (Mock object) is used to create a The test method of the test; for another example, the low-code configuration activity page can also be implemented through the activity configuration node, that is, an activity configuration node is configured, and a visual interface (ie, the low-code configuration activity page) can be obtained by calling the activity configuration node.
本申请实施例中,服务编排服务器解析服务编排文件,得到可执行代码文件,可执行代码文件包括服务编排文件对应的一个或多个服务的执行顺序,以及每个服务的配置信息;部署所述可执行代码文件,部署后的可执行代码文件用于响应用户终端的服务调用请求;获取服务调用请求,该服务调用请求包括服务编排文件的文件标识;执行服务编排文件对应的可执行代码文件,按照服务编排文件包含的一个或多个服务的执行顺序,以及每个服务的配置信息依次调用服务,得到服务调用请求的执行结果;将服务调用请求的执行结果返回至服务调用请求对应的用户终端。通过服务编排服务器直接执行服务编排文件对应的可执行代码,不需要根据每个服务去重复调用返回的步骤,最后返回调用请求的执行结果即可,可以有效减少用户终端的调用次数,减少调用接口网络传输成本。In this embodiment of the present application, the service orchestration server parses the service orchestration file to obtain an executable code file, where the executable code file includes the execution sequence of one or more services corresponding to the service orchestration file, and the configuration information of each service; Executable code file, the deployed executable code file is used to respond to the service invocation request of the user terminal; obtain the service invocation request, the service invocation request includes the file identifier of the service arrangement file; execute the executable code file corresponding to the service arrangement file, According to the execution sequence of one or more services contained in the service orchestration file and the configuration information of each service, the services are called in sequence to obtain the execution result of the service invocation request; the execution result of the service invocation request is returned to the user terminal corresponding to the service invocation request . The executable code corresponding to the service orchestration file is directly executed by the service orchestration server. It is not necessary to repeat the call and return steps according to each service, and finally return the execution result of the call request, which can effectively reduce the number of calls by the user terminal and the call interface. network transmission costs.
根据图2以及图6所阐述的实施例,可以知道,本申请提供的服务编排方法可以在不影响已有服务的情况下,在可视化界面上依靠DSL平滑地将已有服务进行迁移(即在可视化界面上以拖放的形式构建服务编排文件),从而让后端开发人员专注于服务的管理与开发,顺应云时代开发理念;本申请的服务编排方法是通过拖放的形式构建服务编排文件,无需开发人员换以代码的形式进行开发,因此降低了用户的学习成本与心智负担,可以提升开发者的开发效率,减少产品开发中的工程人力投入,也可以为后续平台产品化提供了可能性;本申请的服务编排方法是可以在可视化界面上进行服务编排文件的调试,无需依次在API网关层进行测试,因此,工作量极大减少且更容易进行测试,数据安全也更容易得到保证;本申请的服务编排方法可以通过对可执行代码的封装实现服务聚合,用户终端在调用多个服务时只需要调用一个接口便可以得到调用请求的执行结果,可以有效减少客户端多次调用接口的网络传输成本。According to the embodiments illustrated in FIG. 2 and FIG. 6 , it can be known that the service orchestration method provided by the present application can smoothly migrate the existing services by relying on DSL on the visual interface without affecting the existing services (that is, in the The service orchestration file is constructed in the form of drag and drop on the visual interface), so that the back-end developers can focus on the management and development of services, and conform to the development concept in the cloud era; the service orchestration method of this application is to construct the service orchestration file by dragging and dropping. , there is no need for developers to develop in the form of code, thus reducing the learning cost and mental burden of users, improving the development efficiency of developers, reducing engineering manpower input in product development, and providing the possibility for subsequent platform productization The service orchestration method of the present application can debug the service orchestration file on the visual interface, and does not need to test at the API gateway layer in turn. Therefore, the workload is greatly reduced, it is easier to test, and data security is also easier to be guaranteed. ; The service orchestration method of the present application can realize service aggregation by encapsulating executable codes, and the user terminal only needs to call one interface to obtain the execution result of the call request when calling multiple services, which can effectively reduce the number of calls by the client to the interface. network transmission costs.
基于上述服务编排系统和服务编排方法,本申请实施例公开了一种服编排装置,如图7所示,是本申请实施例公开了一种服编排装置的结构是示意图,图7所示的服编排装置70可运行如下单元:Based on the above service orchestration system and service orchestration method, an embodiment of the present application discloses a service orchestration apparatus, as shown in FIG. The
显示单元701,用于显示主界面,所述主界面包括N个节点,N是正整数;A
所述显示单元701,还用于当存在针对目标节点的配置操作时,显示所述目标节点的配置界面,所述目标节点的配置界面用于获取所述目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是所述N个节点中的任一节点;The
所述显示单元701,还用于当存在针对所述N个节点的连接操作时,显示包含所述N个节点的节点链,所述节点链用于生成服务编排文件,所述服务编排文件包含一个或多个服务的执行顺序。The
在一种可能的实现方式中,每个节点对应有节点类型,节点类型是根据节点对应服务的功能划分的;所述当存在针对目标节点的配置操作时,显示单元所述目标节点的配置界面,包括:In a possible implementation manner, each node corresponds to a node type, and the node type is divided according to the function of the service corresponding to the node; when there is a configuration operation for the target node, the display unit displays the configuration interface of the target node ,include:
收发单元702,用于当存在针对所述目标节点的配置操作时,获取所述目标节点的节点类型对应的预配置文件;A
所述显示单元701,还用于根据所述预配置文件显示所述目标节点的配置界面,所述目标节点的配置界面包括所述预配置文件的多个文件内容;The
确定单元703,用于当存在针对所述多个文件内容中的目标文件内容的选择操作时,将所述目标文件内容作为所述目标节点的配置信息。The determining
在一种可能的实现方式中,所述预配置文件的多个文件内容包括多个服务的服务标识、每个服务包含的多个方法的方法标识以及每个方法的多个方法参数;所述当存在针对所述多个文件内容中的目标文件内容的选择操作时,将所述目标文件内容作为所述目标节点的配置信息,包括:In a possible implementation manner, the multiple file contents of the pre-configuration file include service identifiers of multiple services, method identifiers of multiple methods included in each service, and multiple method parameters of each method; the When there is a selection operation for the target file content in the multiple file contents, the target file content is used as the configuration information of the target node, including:
显示单元701,用于当存在针对所述多个服务的服务标识中的目标服务的服务标识的选择操作时,显示所述目标服务包含的多个方法的方法标识;A
所述显示单元701,还用于当存在针对所述目标服务包含的目标方法的方法标识的选择操作时,显示所述目标方法包含的多个方法参数;The
所述确定单元703,还用于当存在针对所述目标方法包含的多个方法参数中的目标方法参数的选择操作时,将所述目标服务的服务标识、所述目标方法的方法标识以及所述目标方法参数均作为所述目标节点的配置信息,所述目标节点对应所述目标服务。The determining
在一种可能的实现方式中,所述服务编排文件是标记性语言的文件;处理单元704,用于:In a possible implementation manner, the service orchestration file is a markup language file; the
根据所述N个节点的节点链以及每个节点的配置信息,生成服务编排文件,所述服务编排文件还包括每个服务的配置信息,所述每个服务的配置信息是由每个服务对应的节点的配置信息确定的;According to the node chain of the N nodes and the configuration information of each node, a service orchestration file is generated, and the service orchestration file also includes the configuration information of each service, and the configuration information of each service is corresponding to each service. The configuration information of the node is determined;
解析所述服务编排文件,得到可执行代码文件,所述可执行代码文件包括所述服务编排文件对应的一个或多个服务的执行顺序,以及每个服务的配置信息;Parsing the service orchestration file to obtain an executable code file, where the executable code file includes the execution sequence of one or more services corresponding to the service orchestration file, and configuration information of each service;
部署所述可执行代码文件,部署后的可执行代码文件用于响应用户终端的服务调用请求。The executable code file is deployed, and the deployed executable code file is used to respond to a service invocation request of the user terminal.
在一种可能的实现方式中,所述处理单元704,用于当所述调试控件被选择时,对所述服务编排文件进行测试,得到测试结果,所述测试结果包括第一单位测试结果和第二单位测试结果,所述第一单位测试结果是关于所述服务编排文件包含的一个或多个服务的执行顺序的测试结果,所述第二单位测试结果是关于所述服务编排文件的业务执行结果的测试结果。In a possible implementation manner, the
在一种可能的实现方式中,所述收发单元702,还用于获取服务调用请求,所述服务调用请求包括所述服务编排文件的文件标识;In a possible implementation manner, the
所述处理单元704执行所述服务编排文件对应的可执行代码文件,按照所述服务编排文件包含的一个或多个服务的执行顺序,以及每个服务的配置信息依次调用服务,得到所述服务调用请求的执行结果;The
所述收发单元702,用于将所述服务调用请求的执行结果返回至所述服务调用请求对应的用户终端。The
在一种可能的实现方式中,服务调用请求对应的传输协议是第二传输协议;所述获取服务调用请求,包括:In a possible implementation manner, the transmission protocol corresponding to the service invocation request is the second transmission protocol; the acquiring the service invocation request includes:
所述收发单元702,用于接收所述用户终端发送的原始调用请求,所述原始调用请求是基于第一传输协议生成的请求;The
所述处理单元704,用于将所述原始调用请求转换为第二传输协议对应的服务调用请求,所述第一传输协议和所述第二传输协议不同。The
根据本申请的一个实施例,图2以及图6所示的服务编排方法所涉及各个步骤可以是由图7所示的服务编排装置70中的各个单元来执行的。例如,图2所示的服务编排方法中步骤S201~步骤S203可由图7所示的服务编排装置70中的显示单元701来执行;再如,图6所示的服务编排方法中步骤S601~步骤S602、步骤S604可由图7所示的服务编排装置70中处理单元704来执行、步骤S603以及步骤S605可由图7所示的服务编排装置70中收发单元702来执行。According to an embodiment of the present application, each step involved in the service orchestration method shown in FIG. 2 and FIG. 6 may be performed by each unit in the
根据本申请的另一个实施例,图7所示的服务编排装置70中的各个单元可以分别或全部合并为一个或若干个另外的单元来构成,或者其中的某个(些)单元还可以再拆分为功能上更小的多个单元来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述单元是基于逻辑功能划分的,在实际应用中,一个单元的功能也可以由多个单元来实现,或者多个单元的功能由一个单元实现。在本申请的其它实施例中,服务编排装置70也可以包括其它单元,在实际应用中,这些功能也可以由其它单元协助实现,并且可以由多个单元协作实现。According to another embodiment of the present application, each unit in the
根据本申请的另一个实施例,可以通过在包括中央处理单元(CPU)、随机存取存储介质(RAM)、只读存储介质(ROM)等处理元件和存储元件的例如计算机的通用计算设备上运行能够执行如图2以及图6所示的相应方法所涉及的各步骤的计算机程序(包括程序代码),来构造如图7中所示的服务编排装置70,以及来实现本申请实施例服务编排方法。所述计算机程序可以记载于例如计算机可读存储介质上,并通过计算机可读存储介质装载于上述计算设备中,并在其中运行。According to another embodiment of the present application, a general-purpose computing device, such as a computer, may be implemented on a general-purpose computing device including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and other processing elements and storage elements. Run a computer program (including program code) capable of executing the steps involved in the corresponding methods as shown in FIG. 2 and FIG. 6 to construct the
本申请实施中,显示主界面,该主界面包括N个节点,N是正整数;当存在针对目标节点的配置操作时,显示目标节点的配置界面,该目标节点的配置界面用于获取目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是N个节点中的任一节点;当存在针对N个节点的连接操作时,显示包含N个节点的节点链,节点链用于生成服务编排文件,该服务编排文件包含一个或多个服务的执行顺序。该方法主要是开发人员通过在服务编排前端121的可视化界面中拖放节点,并进行节点信息的行配置,从而高效地实现服务编排,不需要开发人员以代码的形式进行开发,可以节省开发时间,减少工作量,更好地顺应了云时代的开发理念。In the implementation of this application, the main interface is displayed, the main interface includes N nodes, and N is a positive integer; when there is a configuration operation for the target node, the configuration interface of the target node is displayed, and the configuration interface of the target node is used to obtain the target node's configuration interface. Configuration information, the configured target node corresponds to a service, and the target node is any node among N nodes; when there is a connection operation for N nodes, the node chain containing N nodes is displayed, and the node chain is used to generate services An orchestration file that contains the execution order for one or more services. This method is mainly that developers can efficiently implement service orchestration by dragging and dropping nodes in the visual interface of the service orchestration front-
基于上述方法以及装置实施例,本申请实施例提供了一种服务编排设备。参见图8,为本申请实施例提供的一种服务编排设备的结构示意图。图8所示的服务编排设备80至少包括处理器801、输入接口802、输出接口803以及计算机存储介质804,其中,处理器801、输入接口802、输出接口803以及计算机存储介质804可通过总线或其他方式连接。Based on the foregoing method and apparatus embodiments, the embodiments of the present application provide a service orchestration device. Referring to FIG. 8 , it is a schematic structural diagram of a service orchestration device according to an embodiment of the present application. The
计算机存储介质804可以存储在服务编排设备80的存储器805中,所述计算机存储介质804用于存储计算机程序,所述计算机程序包括程序指令,所述处理器801用于执行所述计算机存储介质804存储的程序指令。处理器801(或称CPU(Central Processing Unit,中央处理器))是服务编排设备80的计算核心以及控制核心,其适于实现一条或多条指令,具体适于加载并执行一条或多条计算机指令从而实现相应方法流程或相应功能。A
本申请实施例还提供了一种计算机存储介质(Memory),所述计算机存储介质是服务编排设备80中的记忆设备,用于存放程序和数据。可以理解的是,此处的计算机存储介质既可以包括服务编排设备80中的内置存储介质,当然也可以包括服务编排设备80支持的扩展存储介质。计算机存储介质提供存储空间,该存储空间存储了服务编排设备80的操作系统。并且,在该存储空间中还存放了适于被处理器801加载并执行的一条或多条的指令,这些指令可以是一个或一个以上的计算机程序(包括程序代码)。需要说明的是,此处的计算机存储介质可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器;可选的还可以是至少一个位于远离前述处理器的计算机存储介质。Embodiments of the present application further provide a computer storage medium (Memory), where the computer storage medium is a memory device in the
在一个实施例中,所述计算机存储介质可由处理器801加载并执行计算机存储介质中存放的一条或多条指令,以实现上述有关图2以及图6所示的服务编排方法的相应步骤。具体实现中,计算机存储介质中的一条或多条指令由处理器801加载并执行如下步骤:In one embodiment, the computer storage medium can be loaded by the
显示主界面,所述主界面包括N个节点,N是正整数;Displaying a main interface, the main interface includes N nodes, and N is a positive integer;
当存在针对目标节点的配置操作时,显示所述目标节点的配置界面,所述目标节点的配置界面用于获取所述目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是所述N个节点中的任一节点;When there is a configuration operation for the target node, the configuration interface of the target node is displayed. The configuration interface of the target node is used to obtain the configuration information of the target node. The configured target node corresponds to a service, and the target node is the target node. any node in the N nodes;
当存在针对所述N个节点的连接操作时,显示包含所述N个节点的节点链,所述节点链用于生成服务编排文件,所述服务编排文件包含一个或多个服务的执行顺序。When there is a connection operation for the N nodes, a node chain including the N nodes is displayed, and the node chain is used to generate a service orchestration file containing the execution order of one or more services.
在一种可能的实现方式中,每个节点对应有节点类型,节点类型是根据节点对应服务的功能划分的;所述处理器801当存在针对目标节点的配置操作时,显示单元所述目标节点的配置界面,用于:In a possible implementation manner, each node corresponds to a node type, and the node type is divided according to the function of the corresponding service of the node; when the
当存在针对所述目标节点的配置操作时,获取所述目标节点的节点类型对应的预配置文件;When there is a configuration operation for the target node, obtain a pre-configuration file corresponding to the node type of the target node;
根据所述预配置文件显示所述目标节点的配置界面,所述目标节点的配置界面包括所述预配置文件的多个文件内容;Displaying a configuration interface of the target node according to the pre-configuration file, where the configuration interface of the target node includes multiple file contents of the pre-configuration file;
当存在针对所述多个文件内容中的目标文件内容的选择操作时,将所述目标文件内容作为所述目标节点的配置信息。When there is a selection operation on the target file content among the plurality of file contents, the target file content is used as the configuration information of the target node.
在一种可能的实现方式中,所述预配置文件的多个文件内容包括多个服务的服务标识、每个服务包含的多个方法的方法标识以及每个方法的多个方法参数;所述当存在针对所述多个文件内容中的目标文件内容的选择操作时,所述处理器801将所述目标文件内容作为所述目标节点的配置信息,包括:In a possible implementation manner, the multiple file contents of the pre-configuration file include service identifiers of multiple services, method identifiers of multiple methods included in each service, and multiple method parameters of each method; the When there is a selection operation for the target file content in the multiple file contents, the
当存在针对所述多个服务的服务标识中的目标服务的服务标识的选择操作时,显示所述目标服务包含的多个方法的方法标识;When there is a selection operation for the service identifier of the target service in the service identifiers of the multiple services, displaying the method identifiers of the multiple methods included in the target service;
当存在针对所述目标服务包含的目标方法的方法标识的选择操作时,显示所述目标方法包含的多个方法参数;When there is a selection operation for the method identifier of the target method included in the target service, displaying a plurality of method parameters included in the target method;
当存在针对所述目标方法包含的多个方法参数中的目标方法参数的选择操作时,将所述目标服务的服务标识、所述目标方法的方法标识以及所述目标方法参数均作为所述目标节点的配置信息,所述目标节点对应所述目标服务。When there is a selection operation for a target method parameter among multiple method parameters included in the target method, the service identifier of the target service, the method identifier of the target method, and the target method parameter are all used as the target The configuration information of the node, the target node corresponds to the target service.
在一种可能的实现方式中,所述服务编排文件是标记性语言的文件;所述处理器801,还用于:In a possible implementation manner, the service orchestration file is a markup language file; the
根据所述N个节点的节点链以及每个节点的配置信息,生成服务编排文件,所述服务编排文件还包括每个服务的配置信息,所述每个服务的配置信息是由每个服务对应的节点的配置信息确定的;According to the node chain of the N nodes and the configuration information of each node, a service orchestration file is generated, and the service orchestration file also includes the configuration information of each service, and the configuration information of each service is corresponding to each service. The configuration information of the node is determined;
解析所述服务编排文件,得到可执行代码文件,所述可执行代码文件包括所述服务编排文件对应的一个或多个服务的执行顺序,以及每个服务的配置信息;Parsing the service orchestration file to obtain an executable code file, where the executable code file includes the execution sequence of one or more services corresponding to the service orchestration file, and configuration information of each service;
部署所述可执行代码文件,部署后的可执行代码文件用于响应用户终端的服务调用请求。The executable code file is deployed, and the deployed executable code file is used to respond to a service invocation request of the user terminal.
在一种可能的实现方式中,所述处理器801,还用于:In a possible implementation manner, the
当所述调试控件被选择时,对所述服务编排文件进行测试,得到测试结果,所述测试结果包括第一单位测试结果和第二单位测试结果,所述第一单位测试结果是关于所述服务编排文件包含的一个或多个服务的执行顺序的测试结果,所述第二单位测试结果是关于所述服务编排文件的业务执行结果的测试结果。When the debugging control is selected, the service orchestration file is tested to obtain a test result, the test result includes a first unit test result and a second unit test result, and the first unit test result is related to the A test result of the execution sequence of one or more services contained in the service orchestration file, and the second unit test result is a test result of the service execution result of the service orchestration file.
在一种可能的实现方式中,所述处理器801,还用于:In a possible implementation manner, the
获取服务调用请求,所述服务调用请求包括所述服务编排文件的文件标识;obtaining a service invocation request, where the service invocation request includes a file identifier of the service orchestration file;
执行所述服务编排文件对应的可执行代码文件,按照所述服务编排文件包含的一个或多个服务的执行顺序,以及每个服务的配置信息依次调用服务,得到所述服务调用请求的执行结果;Execute the executable code file corresponding to the service orchestration file, call services in sequence according to the execution order of one or more services contained in the service orchestration file and the configuration information of each service, and obtain the execution result of the service invocation request ;
将所述服务调用请求的执行结果返回至所述服务调用请求对应的用户终端。The execution result of the service invocation request is returned to the user terminal corresponding to the service invocation request.
在一种可能的实现方式中,服务调用请求对应的传输协议是第二传输协议;所述处理器801获取服务调用请求,包括:In a possible implementation manner, the transmission protocol corresponding to the service invocation request is the second transmission protocol; the
接收所述用户终端发送的原始调用请求,所述原始调用请求是基于第一传输协议生成的请求;receiving an original invocation request sent by the user terminal, where the original invocation request is a request generated based on a first transmission protocol;
将所述原始调用请求转换为第二传输协议对应的服务调用请求,所述第一传输协议和所述第二传输协议不同。Converting the original invocation request into a service invocation request corresponding to a second transmission protocol, where the first transmission protocol and the second transmission protocol are different.
本申请实施中,显示主界面,该主界面包括N节点,N是正整数;当存在针对目标节点的配置操作时,显示目标节点的配置界面,该目标节点的配置界面用于获取目标节点的配置信息,配置后的目标节点对应一个服务,目标节点是N个节点中的任一节点;当存在针对N个节点的连接操作时,显示包含N个节点的节点链,节点链用于生成服务编排文件,该服务编排文件包含一个或多个服务的执行顺序。该方法主要是开发人员通过在服务编排前端121的可视化界面中拖放节点,并进行节点信息的行配置,从而高效地实现服务编排,不需要开发人员以代码的形式进行开发,可以节省开发时间,减少工作量,更好地顺应了云时代的开发理念。In the implementation of this application, the main interface is displayed, and the main interface includes N nodes, where N is a positive integer; when there is a configuration operation for the target node, the configuration interface of the target node is displayed, and the configuration interface of the target node is used to obtain the configuration of the target node. Information, the configured target node corresponds to a service, and the target node is any node among N nodes; when there is a connection operation for N nodes, the node chain containing N nodes is displayed, and the node chain is used to generate service orchestration file, the service orchestration file contains the execution order of one or more services. This method is mainly that developers can efficiently implement service orchestration by dragging and dropping nodes in the visual interface of the service orchestration
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可能可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110132787.7A CN114816375A (en) | 2021-01-29 | 2021-01-29 | Service orchestration method, apparatus, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110132787.7A CN114816375A (en) | 2021-01-29 | 2021-01-29 | Service orchestration method, apparatus, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114816375A true CN114816375A (en) | 2022-07-29 |
Family
ID=82526458
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110132787.7A Pending CN114816375A (en) | 2021-01-29 | 2021-01-29 | Service orchestration method, apparatus, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114816375A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115145560A (en) * | 2022-09-06 | 2022-10-04 | 北京国电通网络技术有限公司 | Business orchestration method, device, equipment, computer readable medium and program product |
CN115412606A (en) * | 2022-08-31 | 2022-11-29 | 上海得帆信息技术有限公司 | iPaaS service arranging method and system based on open source mule integrated platform |
CN115550425A (en) * | 2022-09-21 | 2022-12-30 | 中国电子科技集团公司第二十八研究所 | Business process arrangement method facing microservice |
CN116185579A (en) * | 2022-12-19 | 2023-05-30 | 天闻数媒科技(北京)有限公司 | Data processing method, device and equipment applied to big data platform |
CN118502992A (en) * | 2024-07-22 | 2024-08-16 | 国网信息通信产业集团有限公司 | Service orchestration method and related equipment |
CN118689473A (en) * | 2024-08-27 | 2024-09-24 | 浙江口碑网络技术有限公司 | Multi-terminal application development system, method, medium and equipment |
CN119938484A (en) * | 2025-04-09 | 2025-05-06 | 湖南亚信软件有限公司 | Online debugging method, device, electronic device and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050256882A1 (en) * | 2004-05-14 | 2005-11-17 | Able Steve L | Systems and methods for web service function, definition, implementation, and/or execution |
CN106775617A (en) * | 2016-11-09 | 2017-05-31 | 深圳市中润四方信息技术有限公司 | The service logic collocation method and configuration system of a kind of application software |
CN110286884A (en) * | 2019-06-21 | 2019-09-27 | 北京百度网讯科技有限公司 | Micro services method of combination, device, equipment and computer readable storage medium |
CN110944048A (en) * | 2019-11-29 | 2020-03-31 | 腾讯科技(深圳)有限公司 | Service logic configuration method and device |
CN111401849A (en) * | 2020-03-18 | 2020-07-10 | 浩云科技股份有限公司 | Flow tool self-defined node configuration method |
-
2021
- 2021-01-29 CN CN202110132787.7A patent/CN114816375A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050256882A1 (en) * | 2004-05-14 | 2005-11-17 | Able Steve L | Systems and methods for web service function, definition, implementation, and/or execution |
CN106775617A (en) * | 2016-11-09 | 2017-05-31 | 深圳市中润四方信息技术有限公司 | The service logic collocation method and configuration system of a kind of application software |
CN110286884A (en) * | 2019-06-21 | 2019-09-27 | 北京百度网讯科技有限公司 | Micro services method of combination, device, equipment and computer readable storage medium |
CN110944048A (en) * | 2019-11-29 | 2020-03-31 | 腾讯科技(深圳)有限公司 | Service logic configuration method and device |
CN111401849A (en) * | 2020-03-18 | 2020-07-10 | 浩云科技股份有限公司 | Flow tool self-defined node configuration method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115412606A (en) * | 2022-08-31 | 2022-11-29 | 上海得帆信息技术有限公司 | iPaaS service arranging method and system based on open source mule integrated platform |
CN115412606B (en) * | 2022-08-31 | 2024-01-23 | 上海得帆信息技术有限公司 | iPaaS service arrangement method and system based on open source mule integration platform |
CN115145560A (en) * | 2022-09-06 | 2022-10-04 | 北京国电通网络技术有限公司 | Business orchestration method, device, equipment, computer readable medium and program product |
CN115550425A (en) * | 2022-09-21 | 2022-12-30 | 中国电子科技集团公司第二十八研究所 | Business process arrangement method facing microservice |
CN115550425B (en) * | 2022-09-21 | 2024-08-09 | 中国电子科技集团公司第二十八研究所 | Business process arrangement method for micro-service |
CN116185579A (en) * | 2022-12-19 | 2023-05-30 | 天闻数媒科技(北京)有限公司 | Data processing method, device and equipment applied to big data platform |
CN118502992A (en) * | 2024-07-22 | 2024-08-16 | 国网信息通信产业集团有限公司 | Service orchestration method and related equipment |
CN118689473A (en) * | 2024-08-27 | 2024-09-24 | 浙江口碑网络技术有限公司 | Multi-terminal application development system, method, medium and equipment |
CN118689473B (en) * | 2024-08-27 | 2025-06-17 | 浙江口碑网络技术有限公司 | Multi-terminal application development system, method, medium and equipment |
CN119938484A (en) * | 2025-04-09 | 2025-05-06 | 湖南亚信软件有限公司 | Online debugging method, device, electronic device and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114816375A (en) | Service orchestration method, apparatus, device and storage medium | |
CN112534398B (en) | System and method for connector development and integration channel deployment | |
CN114115852A (en) | Visual service orchestration method, device, device and medium | |
US8959477B2 (en) | Scripting language for business applications | |
CN117008923A (en) | Code generation and compiling deployment method, platform and equipment based on AI large model | |
WO2018072626A1 (en) | Method and apparatus for invoking component, and method and apparatus for processing component data | |
Nikolov et al. | Conceptualization and scalable execution of big data workflows using domain-specific languages and software containers | |
US10089084B2 (en) | System and method for reusing JavaScript code available in a SOA middleware environment from a process defined by a process execution language | |
Rattanapoka et al. | An MQTT-based IoT cloud platform with flow design by Node-RED | |
WO2017109791A1 (en) | A system and method for building enterprise applications | |
CN111026634A (en) | Interface automation test system, method, device and storage medium | |
CN114217887A (en) | Microservice orchestration method, execution method, device and server | |
Gómez et al. | A model-based approach for developing event-driven architectures with asyncapi | |
US20160291941A1 (en) | System and method for supporting javascript as an expression language in a process defined by a process execution language for execution in a soa middleware environment | |
CN119440541A (en) | A pipeline generation method and device based on low-code visualization | |
Davydova et al. | Mining hybrid UML models from event logs of SOA systems | |
US10268496B2 (en) | System and method for supporting object notation variables in a process defined by a process execution language for execution in a SOA middleware environment | |
CN114253547A (en) | Frame generation method and device, storage medium and electronic device | |
Indamutsa et al. | MDEForgeWL: Towards cloud-based discovery and composition of model management services | |
CN118502992A (en) | Service orchestration method and related equipment | |
Rademacher et al. | Design of a domain-specific language based on a technology-independent web service framework | |
CN115774573A (en) | Application integration method and device, electronic equipment and storage medium | |
Zeisler et al. | A Step Towards a Universal Method for Modeling and Implementing Cross-Organizational Business Processes | |
CN117709400A (en) | Layering system, computing method, computing device, electronic apparatus, and storage medium | |
US10223142B2 (en) | System and method for supporting javascript activities in a process defined by a process execution language for execution in a SOA middleware environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |