Service arrangement method, device, electronic device, and storage medium
Through the automated service orchestration method of the workflow engine, the complexity of manual code writing in multiple model scenarios is solved, and efficient and standardized model integration and service release are achieved.
Patent Information
- Application Number
- CN202410014152.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-01-04
AI Technical Summary
The existing technology requires manual code writing for model selection and integration in multi-model scenarios, resulting in high technical thresholds, time-consuming and labor-intensive, and difficult to standardize and maintain.
Automatic service orchestration is achieved by establishing a workflow engine, including component modules, orchestration modules and service modules. The workflow engine allows users to drag components and logical relationships through the visual interface to form service orchestration tasks, and publish the model as a prediction service for invocation.
It realizes automated service orchestration, lowers technical thresholds, reduces the time and complexity of manual code writing, and improves the efficiency and standardization of model integration.
Smart Images

Figure CN117687610B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning technology, and in particular to a service orchestration method, device, electronic device, and storage medium. Background Art
[0002] The learning threshold in the field of machine learning is high. In addition to professional knowledge, model construction, prediction service release, etc. also require users to have strong coding skills.
[0003] When a business scenario involves multiple models and requires model selection and integration based on different business logics, existing methods usually require complicated code writing, which is time-consuming and labor-intensive. Summary of the invention
[0004] The embodiments of the present application provide a service orchestration method, device, electronic device, and storage medium to implement automated service orchestration.
[0005] The present application embodiment adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a service orchestration method, wherein the method includes:
[0007] Establishing a workflow engine, wherein the workflow engine comprises at least a component module, an orchestration module and a service module;
[0008] Configuring the component modules in the workflow engine in the job scheduling node;
[0009] Performing service orchestration of model prediction services through the orchestration module in the workflow engine;
[0010] Through the service module in the workflow engine, the model is published as a prediction service so that the published model can be called as an AI atomic service of service orchestration.
[0011] In some embodiments, the method further comprises:
[0012] In the model service layer, by publishing multiple types of models as corresponding services for registration, it is possible to add services of multiple types and scenarios to the service orchestration task and obtain preset service components.
[0013] In some embodiments, the workflow engine is configured to:
[0014] The component module, a service component formed by service registration, orchestrates AI atomic service capabilities by combining basic components and service components to respond to business logic requirements;
[0015] The orchestration module provides an orchestration task in the form of a workflow based on a component library;
[0016] The service module at least includes service creation and service registration. The service creation is used to publish the model as a prediction service, and the published model can be used as an AI atomic service for service orchestration; the service registration is used to register the protocol and parameter information of the existing service to form a preset service component.
[0017] In some embodiments, the preset service component includes:
[0018] Parallel component, used to inject the input data of the parallel component into each branch defined inside the component at the same time, execute the sub-state machines defined in each branch in parallel, and return the results in summary;
[0019] Conditional component, used to select and execute different branches based on conditions;
[0020] The loop component is used to take each element of the specified array type element in the loop component input data as input data, execute the sub-state machine defined inside the loop component, and return the results in summary.
[0021] In some embodiments, the preset service component further includes:
[0022] The transfer component is used to pass data to the next node;
[0023] Success component, used to stop the workflow after it reaches the success component and return a success status;
[0024] The failure component is used to stop the workflow from running when it reaches the failure component and return a failure status.
[0025] In some embodiments, the structure of service orchestration in the workflow engine includes:
[0026] The service orchestration management module is used to cooperate with the front-end page to process the data of the service orchestration control plane;
[0027] The executor of the orchestration service is used to process the data of the service orchestration data plane and the request data of each orchestration service;
[0028] The service orchestration management module is also used to manage all prediction services.
[0029] In some embodiments, the workflow engine includes multiple data flows, wherein:
[0030] The first data stream serves as an editing control stream for the choreography task;
[0031] The second data stream is used as a debugging data stream;
[0032] The third data stream serves as a publishing control stream;
[0033] The fourth data stream is used as the access data stream;
[0034] The fifth data stream serves as the control flow of the executor.
[0035] In a second aspect, an embodiment of the present application further provides a service orchestration device, wherein the device includes:
[0036] A building module, used to build a workflow engine, wherein the workflow engine includes at least a component module, an orchestration module, and a service module;
[0037] A configuration module, used to configure the component modules in the workflow engine in the job scheduling node;
[0038] A service orchestration module, used to perform service orchestration of the model prediction service through the orchestration module in the workflow engine;
[0039] The publishing module is used to publish the model as a prediction service through the service module in the workflow engine so as to call the published model as an AI atomic service of service orchestration.
[0040] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the above method.
[0041] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the above method.
[0042] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: by establishing a workflow engine, the model is quickly published as a prediction service, and visual service orchestration replaces manual code writing. By configuring the component modules in the workflow engine in the job scheduling node; performing service orchestration of the model prediction service through the orchestration module in the workflow engine; and publishing the model as a prediction service through the service module in the workflow engine to call the published model as an AI atomic service of service orchestration. The above method realizes a standard process of integrating multi-model scenarios through normalization. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 This is a schematic diagram of the architecture of the service orchestration method in the embodiment of the present application;
[0045] Figure 2 A schematic diagram of the workflow engine structure of the service orchestration method in an embodiment of the present application;
[0046] Figure 3 A flow chart of a service arrangement method in an embodiment of the present application;
[0047] Figure 4 A service orchestration logic diagram of a service orchestration method in an embodiment of the present application;
[0048] Figure 5 This is a schematic diagram of the structure of the service orchestration device in the embodiment of the present application;
[0049] Figure 6 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0051] The technical terms involved in the embodiments of this application are as follows:
[0052] Artificial Intelligence, abbreviated as AI in English, is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
[0053] Machine learning is a way to achieve artificial intelligence. It focuses on the design of algorithms, allowing computers to automatically learn patterns from data and use the patterns to predict unknown data.
[0054] Model prediction is the process of obtaining new results by inputting new data into a specified model.
[0055] Prediction service, prediction service (hereinafter referred to as service) is to publish the artificial intelligence model as an online HTTP service provided to the outside world, providing users with support for quick model online service, ensuring the stability and long-term service of the model, and is the last stop for the model to form productivity.
[0056] Service registration is to register the protocol, parameters and other information of existing services into the platform for management. Services hosted by third-party platforms can be registered into the platform through this function, and then use the service orchestration function.
[0057] DSL language, DSL language (Domain Specific Language) is a computer programming language with limited expressiveness for a certain field.
[0058] Service orchestration refers to a visual orchestration platform for AI capabilities for AI application developers. It provides a drag-and-drop, visual workflow orchestration interface and code orchestration method, and supports users to orchestrate multiple services as business applications in serial, parallel, and branch structures according to business logic.
[0059] The inventor found during research that with the development of artificial intelligence technology, more and more business scenarios use machine learning and deep learning methods to learn historical data, and use the learned models to predict unknown data. When multiple models are involved in the scenario and different models need to be combined into corresponding processes according to business logic, commonly used methods include but are not limited to:
[0060] Method 1: Combine business logic at the model layer, read the model file by writing code, combine the model with specific logic, and then publish the combined logic file as a prediction service.
[0061] Method 2: Business logic is combined at the service layer. After each model is published as a prediction service, the service caller writes code according to the business logic and calls the prediction services for combination according to the logical relationship.
[0062] Both of the above methods require the implementation of the business logic of model combination and service combination through code. In actual use, they have the following disadvantages: 1. The technical threshold is high, and developers are usually required to have model training and code writing capabilities; 2. The code implementation method is not easy to maintain; 3. Different users have different code styles, which are difficult to standardize; 4. Professionals are required to publish the model combination logic code into a prediction service, which is a cumbersome process.
[0063] The multi-model combination scenario in related technologies mainly implements the business logic of multiple models or multiple services by manual code writing, including serial, parallel, branch and other logical structures. Manual code writing requires professionals to write the business logic and publish the combined multi-model logic as a prediction service. The whole process requires developers to have an artificial intelligence modeling background and high code writing ability.
[0064] The main disadvantages of the manual code writing implementation method are as follows:
[0065] 1. The technical threshold is high. The manual code writing method usually requires developers to have certain programming skills and be proficient in machine learning model training methods. They can express the model and prediction service in combination with business logic in code form and run it normally, which greatly affects the usability of the artificial intelligence model.
[0066] 2. Writing code takes a long time and the overall implementation efficiency is low.
[0067] 3. After the multi-model logic is successfully written, it needs to be published as a prediction service, and the publishing process is cumbersome.
[0068] 4. Different developers have different coding styles, which makes it difficult to standardize and scale, and is not conducive to model reuse.
[0069] 5. It places high demands on operation and maintenance personnel. When troubleshooting errors, they need to traverse the entire code and understand the code logic before they can troubleshoot the problem.
[0070] In view of the above shortcomings, the service orchestration method in the embodiment of the present application introduces a workflow engine by standardizing the standard process of multi-service orchestration, and converts the atomic AI service capabilities into configurable service components through the service registration function, and designs the logical relationships such as serial, parallel, and branching into configurable logical components, which are configured in the job scheduling node to realize the fusion processing capabilities of multiple services. At the same time, the operability and result correctness of the orchestration task can be tested at any time through the task debugging function.
[0071] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0072] Please refer to Figure 1 , which is a schematic diagram of the architecture of the service orchestration method in the embodiment of the present application. Specifically, AI atomic services are orchestrated in a manner that separates model capabilities from business logic processing. The architecture consists of a three-layer structure, specifically including: a bottom-level management layer, a model service layer, and an application interaction layer. In the bottom-level management layer, the bottom-level support from service registration, service orchestration to service release is achieved by coordinating the resources, logs, permissions, interfaces, etc. involved in the management plan. The bottom-level management layer includes resource management, state management, task mobilization, data storage, permission management, model storage, and interface management.
[0073] It can be understood that "AI atomic service" refers to the prediction service or other services that the model can provide after machine learning.
[0074] The model service layer includes functions such as model management, service management, and orchestration management. By publishing various models as corresponding services for registration, it is possible to add machine learning, deep learning, smart text, smart image and other services of various types and scenarios to the service orchestration tasks to form specific service components. The workflow engine in the embodiment of the present application is deployed in the model service layer.
[0075] At the application interaction layer, a Web-based interactive interface and an interface for external service calls are provided, including service testing, service monitoring, and service API calls.
[0076] The service orchestration method in the embodiment of the present application can orchestrate predictive services according to business logic, realize the integration, understanding, analysis, and decision-making of multi-dimensional data, multiple models, and complex businesses, and realize an intelligent predictive service center.
[0077] Based on workflow engine technology, each processing node in the service orchestration is componentized, which facilitates the decoupling of each node processing process from the business processing process. To modify the business logic, you only need to add, reduce or modify the associated processing components, which can quickly adjust the process changes. In actual deployment, by combining the management modules of related basic technology stacks such as Kubernetes and Docker, the management and scheduling functions of the underlying resources are completed, so that the prediction service can dynamically adjust the hardware resources according to the size of the business volume.
[0078] It can be understood that Docker container technology (including docker-compose) is deployed and managed in a container manner in the embodiments of the present application, including the main program, model management, underlying related services, etc. are all deployed in a container manner.
[0079] It can be understood that the use of Kubernetes can improve the availability of services, and the kubernetes container orchestration service framework is introduced in the embodiment of this application. Based on Docker technology, Kubernetes provides a series of complete functions such as deployment and operation, resource scheduling, and dynamic scaling for containerized applications.
[0080] Please refer to Figure 2 , is a schematic diagram of the workflow engine structure of the service orchestration method in the embodiment of the present application. The workflow engine in the embodiment of the present invention consists of three parts: component management, orchestration management, and service management:
[0081] Component management mainly includes component creation management, component configuration management, and component library. The component library contains parallel components, conditional components, loop components, transfer components, success components, failure components, and service components formed through service registration. By combining basic components and service components, atomic service capabilities can be flexibly orchestrated to quickly implement business logic requirements.
[0082] Orchestration management provides the ability to form orchestration tasks in the form of workflows based on component libraries. It mainly includes task orchestration, parameter settings, task debugging, and task publishing. Task orchestration forms a visual workflow by dragging, connecting, and configuring basic components and service components on a visual page. Parameter settings can set the association, input, output, etc. in the components. Parameter settings also include visual page settings and DSL language code view settings. Task debugging can debug the orchestration tasks that are being edited and completed, and can be used to test the correctness of the tasks at any time. Task publishing can publish successfully debugged orchestration tasks as online service capabilities.
[0083] Service management mainly includes service creation, service registration, service query, service start and stop, service update, service test, service deletion and other functions. Service creation is used to publish the model as a prediction service. The published model can be used as an AI atomic service for service orchestration. Service registration mainly registers the protocols, parameters and other information of existing services to form service components, which are then used for service orchestration. Service registration requires configuration of service type, service input and output and other parameters. Service query can query the current service status, service configuration, operation status, etc. Service testing can test the published services by giving specific input parameters.
[0084] Based on the above workflow scheduling engine, it can provide visualized, assembleable, and debuggable flexible orchestration services for scenarios with multiple model combinations, allowing users to quickly realize the orchestration of multiple service scenarios and service launch, reduce the time investment in service deployment, simplify service updates, and simplify the difficulty of operation and maintenance, and improve the work efficiency of developers.
[0085] The present application embodiment provides a service arrangement method, such as Figure 3 As shown, a schematic diagram of the service orchestration method in an embodiment of the present application is provided, and the method at least includes the following steps S310 to S340:
[0086] Step S310: Establish a workflow engine, which includes at least a component module, an orchestration module, and a service module.
[0087] By introducing a workflow engine, we can achieve containerized deployment of models and decouple model capabilities from business logic. AI atomic services are registered as service components and combined with logical components to achieve the modular assembly goal of artificial intelligence model services.
[0088] Step S320: configuring the component modules in the workflow engine in the job scheduling node.
[0089] By combining basic components and service components, atomic service capabilities can be flexibly orchestrated to quickly meet business logic requirements. Serial, parallel, branch and other logical relationships are designed into configurable logical components and configured in the job scheduling node to achieve the fusion processing capability of multiple services.
[0090] Step S330: Perform service orchestration of the model prediction service through the orchestration module in the workflow engine.
[0091] Orchestration management provides the ability to form orchestration tasks in the form of workflows based on component libraries. It mainly includes task orchestration, parameter settings, task debugging, and task publishing. Task orchestration forms a visual workflow by dragging, connecting, and configuring basic components and service components on a visual page. Parameter settings can set the association, input, output, etc. in the components. Parameter settings also include visual page settings and DSL language code view settings. Task debugging can debug the orchestration tasks that are being edited and completed, and can be used to test the correctness of the tasks at any time. Task publishing can publish successfully debugged orchestration tasks as online service capabilities.
[0092] It can be understood that the prediction service (hereinafter referred to as the service) is to publish the artificial intelligence model as an online HTTP service provided to the outside world, providing users with support for quick model online service, ensuring the stability and long-term service of the model, and is the last stop for the model to form productivity.
[0093] The task debugging function can be used to test the operability and result correctness of the scheduled tasks at any time.
[0094] Step S340: publish the model as a prediction service through the service module in the workflow engine so as to call the published model as an AI atomic service of service orchestration.
[0095] Service management mainly includes service creation, service registration, service query, service start and stop, service update, service test, service deletion and other functions. Service creation is used to publish the model as a prediction service. The published model can be used as an AI atomic service for service orchestration. Service registration mainly registers the protocols, parameters and other information of existing services to form service components, which are then used for service orchestration. Service registration requires configuration of service type, service input and output and other parameters. Service query can query the current service status, service configuration, operation status, etc. Service testing can test the published services by giving specific input parameters.
[0096] It should be noted that service orchestration refers to a visual orchestration platform for AI capabilities for AI application developers, which provides a drag-and-drop, visual workflow orchestration interface and code orchestration method, and supports users to orchestrate multiple services as business applications in serial, parallel, and branch structures according to business logic.
[0097] Through the above-mentioned service orchestration method of predictive services, the atomic AI service is quickly orchestrated into a new service with a business scenario through visual and flexible DSL language code. The method provides logical relationship components such as series, parallel, and branching. The existing service is registered as an orchestrated service component through the service registration function. The service components and logical components can be assembled by dragging and dropping through the visual interface, and the process configuration, process debugging, service orchestration and other steps are completed, allowing users to focus on solving the business problems themselves and accelerate the innovation and development of upper-level applications. It can be understood that the DSL language is only an example, and it can also be other programming languages, which are not specifically limited in the embodiments of this application.
[0098] In one embodiment of the present application, the method further includes: at the model service layer, by publishing multiple types of models as corresponding services for registration, it is possible to add multiple types and multiple scenarios of services to the service orchestration task to obtain preset service components.
[0099] like Figure 1 As shown in the figure, the model service layer includes functions such as model management, service management, and orchestration management. By publishing various models as corresponding services for registration, machine learning, deep learning, intelligent text, intelligent image and other services of various types and scenarios can be added to the service orchestration tasks to form specific service components.
[0100] In one embodiment of the present application, the workflow engine is configured as follows: the component module, the service component formed by service registration, realizes the orchestration of AI atomic service capabilities by combining basic components and service components to respond to business logic requirements; the orchestration module provides a component library-based, orchestration task in the form of a workflow; the service module includes at least service creation and service registration, the service creation is used to publish the model as a prediction service, and the published model can be used as an AI atomic service for service orchestration; the service registration is used to register the protocol and parameter information of existing services to form a preset service component.
[0101] In the component module, by combining basic components and service components, atomic service capabilities can be flexibly orchestrated to quickly implement business logic requirements.
[0102] In the orchestration module, the ability to form an orchestration task in the form of a workflow. Specifically, parameter settings can set the association, input, output, etc. in the component. Parameter settings also include visualization page settings and DSL language code view settings. Task debugging can debug the editing and completed orchestration tasks to test the correctness of the tasks at any time. Task publishing can publish successfully debugged orchestration tasks as online service capabilities.
[0103] In the service module, service creation is used to publish the model as a prediction service. The published model can be used as an AI atomic service for service orchestration. Service registration mainly registers the protocols, parameters and other information of existing services to form service components, which are then used for service orchestration. Service registration requires configuration of service types, service input and output and other parameters. It can be understood that service registration is to register the protocols, parameters and other information of existing services into the platform for management. Services hosted by third-party platforms can be registered to the platform through this function, and then use the service orchestration function.
[0104] In one embodiment of the present application, the preset service component includes: a parallel component, which is used to simultaneously inject the input data of the parallel component into each branch defined inside the component, execute the sub-state machine defined in each branch in parallel, and summarize and return the results; a conditional component, which is used to select and execute different branches according to conditions; a loop component, which is used to use each element of the specified array type element in the input data of the loop component as input data, execute the sub-state machine defined inside the loop component, and summarize and return the results.
[0105] like Figure 2 As shown, the workflow scheduling engine can provide visualized, assembleable, and debuggable flexible orchestration services for scenarios with multiple models, allowing users to quickly orchestrate multiple service scenarios and launch services, reduce service deployment time, simplify service updates, and simplify operation and maintenance, thus improving developer work efficiency.
[0106] Parallel component: that is, Parallel component, which injects the input data of the Parallel component into each branch defined inside the component at the same time, then executes the sub-state machines defined in each branch in parallel and returns the results in summary;
[0107] Conditional component: also known as the Choice component, which selects different branches to execute based on the conditions.
[0108] Loop component: that is, Map component, takes each element of the specified array type element in the Map component input data as input data, executes the sub-state machine defined inside the Map component, and returns the results in summary.
[0109] In one embodiment of the present application, the preset service component also includes: a transfer component for passing data to the next node; a success component for stopping running after the workflow runs to the success component and returning a success status; a failure component for stopping running after the workflow runs to the failure component and returning a failure status.
[0110] Pass component: Pass component, used to pass data to the next node. Pass component is mainly used to construct specific results.
[0111] Success component: that is, the Succeed component. When the workflow runs to the Succeed component, it stops running and returns a success status.
[0112] Failure component: that is, the Fail component. When the workflow runs to the Fail component, it stops running and returns a failure status.
[0113] like Figure 2 As shown, the workflow scheduling engine can provide visualized, assembleable, and debuggable flexible orchestration services for scenarios with multiple models, allowing users to quickly orchestrate multiple service scenarios and launch services, reduce service deployment time, simplify service updates, and simplify operation and maintenance, thus improving developer work efficiency.
[0114] In one embodiment of the present application, the structure of service orchestration in the workflow engine includes: a service orchestration management module, which is used to cooperate with the front-end page to process data on the service orchestration control plane; an executor of the orchestration service, which is used to process data on the service orchestration data plane and request data of each orchestration service; the service orchestration management module is also used to manage all prediction services.
[0115] Figure 4 This is the logical architecture diagram of service orchestration. As the service orchestration management module, ai-conductor-service is responsible for cooperating with the front-end page to process data on the service orchestration control plane, and provide functions such as service orchestration task management, canvas management, and service publishing. As the executor of the orchestration service, ai-conductor processes data on the service orchestration data plane, actually processes the request data of each orchestration service, and provides functions such as logical judgment, parameter conversion, and atomic service call. Ai-application-service is responsible for the management of all prediction services, and also provides functions such as online and offline, deletion, version addition, and version switching of the orchestration service. As the gateway of the system, ai-proxy is responsible for receiving user requests for prediction services, completing authentication, and then forwarding them to the pml-pfe module (custom function module). The pml-pfe module is responsible for the current limiting and secondary forwarding of the prediction service; DB is a database responsible for storing the metadata of the orchestration task.
[0116] In one embodiment of the present application, the workflow engine includes multiple data flows, wherein the first data flow serves as an editing control flow for the orchestration task; the second data flow serves as a debugging data flow; the third data flow serves as a publishing control flow; the fourth data flow serves as an access data flow; and the fifth data flow serves as a control flow of the executor.
[0117] The data flow that starts with the number 1 is the editing control flow of the orchestration task, such as: creating a new service orchestration task, editing the canvas, etc.
[0118] The data stream that begins with the number 2 is the debugging data stream, that is, the data stream generated by calling the "debug" function on the web.
[0119] The data flow starting with the number 3 is the publishing control flow, that is, the data flow generated in the process of publishing an orchestration task for the prediction service.
[0120] The data flow starting with the number 4 is the access data flow, that is, the data flow generated by the user's actual call to the prediction service.
[0121] The data flow starting with the number 5 is the control flow of the executor, such as querying atomic capability information.
[0122] The present application embodiment also provides a service arrangement device 500, such as Figure 5 As shown, a schematic diagram of the structure of a service orchestration device in an embodiment of the present application is provided, wherein the service orchestration device 500 at least includes: an establishment module 510, a configuration module 520, a service orchestration module 530, and a publishing module 540, wherein:
[0123] In one embodiment of the present application, the establishment module 510 is specifically used to: establish a workflow engine, and the workflow engine at least includes a component module, an orchestration module, and a service module.
[0124] By introducing a workflow engine, we can achieve containerized deployment of models and decouple model capabilities from business logic. AI atomic services are registered as service components and combined with logical components to achieve the modular assembly goal of artificial intelligence model services.
[0125] In one embodiment of the present application, the configuration module 520 is specifically used to configure the component modules in the workflow engine in the job scheduling node.
[0126] By combining basic components and service components, atomic service capabilities can be flexibly orchestrated to quickly meet business logic requirements. Serial, parallel, branch and other logical relationships are designed into configurable logical components and configured in the job scheduling node to achieve the fusion processing capability of multiple services.
[0127] In one embodiment of the present application, the service orchestration module 530 is specifically used to perform service orchestration of the model prediction service through the orchestration module in the workflow engine.
[0128] Orchestration management provides the ability to form orchestration tasks in the form of workflows based on component libraries. It mainly includes task orchestration, parameter settings, task debugging, and task publishing. Task orchestration forms a visual workflow by dragging, connecting, and configuring basic components and service components on a visual page. Parameter settings can set the association, input, output, etc. in the components. Parameter settings also include visual page settings and DSL language code view settings. Task debugging can debug the orchestration tasks that are being edited and completed, and can be used to test the correctness of the tasks at any time. Task publishing can publish successfully debugged orchestration tasks as online service capabilities.
[0129] It can be understood that the prediction service (hereinafter referred to as the service) is to publish the artificial intelligence model as an online HTTP service provided to the outside world, providing users with support for quick model online service, ensuring the stability and long-term service of the model, and is the last stop for the model to form productivity.
[0130] The task debugging function can be used to test the operability and result correctness of the scheduled tasks at any time.
[0131] In one embodiment of the present application, the publishing module 540 is specifically used to: publish the model as a prediction service through the service module in the workflow engine to call the published model as an AI atomic service of service orchestration.
[0132] Service management mainly includes service creation, service registration, service query, service start and stop, service update, service test, service deletion and other functions. Service creation is used to publish the model as a prediction service. The published model can be used as an AI atomic service for service orchestration. Service registration mainly registers the protocols, parameters and other information of existing services to form service components, which are then used for service orchestration. Service registration requires configuration of service type, service input and output and other parameters. Service query can query the current service status, service configuration, operation status, etc. Service testing can test the published services by giving specific input parameters.
[0133] It should be noted that service orchestration refers to a visual orchestration platform for AI capabilities for AI application developers, which provides a drag-and-drop, visual workflow orchestration interface and code orchestration method, and supports users to orchestrate multiple services as business applications in serial, parallel, and branch structures according to business logic.
[0134] It can be understood that the above-mentioned service orchestration device can implement each step of the service orchestration method provided in the above-mentioned embodiment, and the relevant explanations about the service orchestration method are applicable to the service orchestration device and will not be repeated here.
[0135] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 6 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0136] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0137] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0138] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a service orchestration device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0139] Establishing a workflow engine, wherein the workflow engine comprises at least a component module, an orchestration module and a service module;
[0140] Configuring the component modules in the workflow engine in the job scheduling node;
[0141] Performing service orchestration of model prediction services through the orchestration module in the workflow engine;
[0142] Through the service module in the workflow engine, the model is published as a prediction service so that the published model can be called as an AI atomic service of service orchestration.
[0143] The above application Figure 3The method performed by the service orchestration device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0144] The electronic device may also perform Figure 3 The method executed by the service arrangement device in Figure 3 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0145] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 3 The method executed by the service orchestration device in the illustrated embodiment is specifically used to execute:
[0146] Establishing a workflow engine, wherein the workflow engine comprises at least a component module, an orchestration module and a service module;
[0147] Configuring the component modules in the workflow engine in the job scheduling node;
[0148] Performing service orchestration of model prediction services through the orchestration module in the workflow engine;
[0149] Through the service module in the workflow engine, the model is published as a prediction service so that the published model can be called as an AI atomic service of service orchestration.
[0150] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0151] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0154] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0155] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0156] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0157] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0159] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A service orchestration method, wherein: The method comprises: Establishing a workflow engine, wherein the workflow engine comprises at least a component module, an orchestration module and a service module; Configuring the component modules in the workflow engine in the job scheduling node; Performing service orchestration of model prediction services through the orchestration module in the workflow engine; Through the service module in the workflow engine, the model is published as a prediction service to call the published model as an AI atomic service of service orchestration. The AI atomic service refers to the prediction service or other service that the model can provide after machine learning; In the model service layer, by publishing multiple types of models as corresponding services for registration, it is possible to add services of multiple types and scenarios to the service orchestration task, and obtain preset service components. In the model service layer, including model management, service management, and orchestration management functions, by publishing various types of models as corresponding services for registration, it is possible to add machine learning, deep learning, intelligent text, and intelligent image services of various types and scenarios to the service orchestration task, and form specific service components; The workflow engine is configured as follows: the component module, the service component formed by service registration, realizes the orchestration of AI atomic service capabilities by combining basic components and service components to respond to business logic requirements; the orchestration module provides an orchestration task in the form of a workflow based on a component library; the service module includes at least service creation and service registration, the service creation is used to publish the model as a prediction service, and the published model is used as an AI atomic service of service orchestration; the service registration is used to register the protocol and parameter information of an existing service to form a preset service component; The preset service component includes: a parallel component, which is used to inject the input data of the parallel component into each branch defined inside the component at the same time, execute the sub-state machine defined in each branch in parallel, and summarize and return the results; a conditional component, which is used to select and execute different branches according to conditions; a loop component, which is used to use each element of the specified array type element in the input data of the loop component as input data, execute the sub-state machine defined inside the loop component, and summarize and return the results.
2. The method of claim 1, wherein: The preset service component also includes: The transfer component is used to pass data to the next node; Success component, used to stop the workflow after it reaches the success component and return a success status; The failure component is used to stop the workflow from running when it reaches the failure component and return a failure status.
3. The method of claim 1, wherein: The structure of service orchestration in the workflow engine includes: The service orchestration management module is used to cooperate with the front-end page to process the data of the service orchestration control plane; The executor of the orchestration service is used to process the data of the service orchestration data plane and the request data of each orchestration service; The service orchestration management module is also used to manage all prediction services.
4. The method of claim 3, wherein: The workflow engine includes multiple data flows, wherein: The first data stream serves as an editing control stream for the choreography task; The second data stream is used as a debugging data stream; The third data stream serves as a publishing control stream; The fourth data stream is used as the access data stream; The fifth data stream serves as the control flow of the executor.
5. A service arrangement device, wherein: The device comprises: A building module, used to build a workflow engine, wherein the workflow engine includes at least a component module, an orchestration module, and a service module; A configuration module, used to configure the component modules in the workflow engine in the job scheduling node; A service orchestration module, used to perform service orchestration of the model prediction service through the orchestration module in the workflow engine; A publishing module, used to publish the model as a prediction service through the service module in the workflow engine so as to call the published model as an AI atomic service of service orchestration; The AI atomic service refers to the prediction service or other service that the model can provide after machine learning; In the model service layer, by publishing multiple types of models as corresponding services for registration, it is possible to add services of multiple types and scenarios to the service orchestration task, and obtain preset service components. In the model service layer, including model management, service management, and orchestration management functions, by publishing various types of models as corresponding services for registration, it is possible to add machine learning, deep learning, intelligent text, and intelligent image services of various types and scenarios to the service orchestration task, and form specific service components; The workflow engine is configured as follows: the component module, the service component formed by service registration, realizes the orchestration of AI atomic service capabilities by combining basic components and service components to respond to business logic requirements; the orchestration module provides an orchestration task in the form of a workflow based on a component library; the service module includes at least service creation and service registration, the service creation is used to publish the model as a prediction service, and the published model is used as an AI atomic service of service orchestration; the service registration is used to register the protocol and parameter information of an existing service to form a preset service component; The preset service component includes: a parallel component, which is used to inject the input data of the parallel component into each branch defined inside the component at the same time, execute the sub-state machine defined in each branch in parallel, and summarize and return the results; a conditional component, which is used to select and execute different branches according to conditions; a loop component, which is used to use each element of the specified array type element in the input data of the loop component as input data, execute the sub-state machine defined inside the loop component, and summarize and return the results.
6. An electronic device comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of any one of claims 1 to 4.
7. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, enables the electronic device to execute any one of the methods of claims 1 to 4.
Citation Information
Patent Citations
Service execution method and device
CN113626002A