Creation method and device of composite artificial intelligence model service and electronic equipment
By orchestrating multiple atomic model services and generating composite artificial intelligence model services, the problem that existing AI model services cannot cope with complex intelligent application scenarios is solved, and their applicability and efficiency are improved.
Patent Information
- Application Number
- CN202510190176.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-06-06
AI Technical Summary
Existing AI model services can only provide a single atomic service and cannot cope with complex intelligent application scenarios, reducing their applicability.
Through service orchestration technology, multiple atomic model services are orchestrated to generate composite artificial intelligence model services to achieve support for complex intelligent application scenarios.
It effectively solves the problem that a single atomic model service cannot cope with complex intelligent application scenarios, and improves the applicability and efficiency of AI model services in complex intelligent application scenarios.
Smart Images

Figure CN120104231A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of artificial intelligence model services, and in particular to a method, device and electronic device for creating a composite artificial intelligence model service. Background Art
[0002] Model service technology is a service model based on artificial intelligence (AI) models such as machine learning or deep learning. AI models usually run on public clouds or servers and are called by users through APIs (Application Programming Interfaces) or other forms of interfaces. The purpose is to allow users to access complex AI models. After users submit input data, the AI model returns the corresponding inference and prediction results. In the prior art, AI model services are designed to provide only one function. By focusing on a single atomic function, they can better meet the business needs of specific fields and provide a consistent and reliable service experience, such as model services in the fields of image classification, OCR (Optical Character Recognition), natural language processing, etc.
[0003] In other words, traditional AI model services often provide a single atomic service. The problem they face is that AI model services cannot cope with complex intelligent application scenarios, which reduces the applicability of AI model services. Summary of the invention
[0004] In view of this, the purpose of this application is to at least provide a method, device and electronic device for creating a composite artificial intelligence model service, which uses service orchestration technology to orchestrate multiple atomic model services to generate a composite artificial intelligence model service, thereby effectively solving the problem that a single atomic model service cannot cope with complex intelligent application scenarios.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, an embodiment of the present application provides a method for creating a composite artificial intelligence model service, the method comprising: determining corresponding orchestration task information through a model service creation interface and creating a model service orchestration task based on the orchestration task information; using a service orchestration process design interface to orchestrate multiple atomic model services corresponding to the orchestration task information indicated by the model service orchestration task to generate a composite artificial intelligence model orchestration; and using a model service orchestration engine to debug the composite artificial intelligence model orchestration to obtain a composite artificial intelligence model service.
[0007] In one possible implementation, a model service creation interface includes a first virtual button and a second virtual button, wherein a model service orchestration task is created in the following manner: in response to a selection operation performed on the first virtual button, multiple orchestration task information configuration items are displayed, the orchestration task information configuration items including an orchestration name configuration item, an orchestration description configuration item, an orchestration parameter configuration item, and an orchestration application scenario configuration item; in response to a configuration operation performed on multiple orchestration task information configuration items, orchestration task information is determined, the orchestration task information including a model service name, a model service description, orchestration parameters, and a model service application scenario; a selection operation performed on the second virtual button is received, and a model service orchestration task is generated.
[0008] In one possible implementation, the service orchestration process design interface provides a global context variable configuration module, a primitive configuration module, and a model service orchestration drawing area, the primitive configuration module provides multiple logical primitives and multiple service primitives, each service primitive corresponds to an atomic model service, and the orchestration parameters include global context variable configuration data and processing logic configuration data under the model service application scenario, wherein the composite artificial intelligence model orchestration corresponding to the model service orchestration task is performed in the following manner: based on the global context variable configuration data, the global context variables corresponding to the composite artificial intelligence model orchestration are determined through the global context variable configuration module; through the primitive configuration module and the model service application scenario indicated by the model service orchestration task, multiple target model primitives are generated in the model service orchestration drawing area, the target model primitives include target logical primitives and target service primitives; through the global context variables and the processing logic configuration data, the primitive configuration parameters corresponding to each target model primitive are determined; based on the processing logic configuration data, the target model primitives are connected to generate a connection relationship between the target model primitives; according to the connection relationship between the target model primitives and the primitive configuration parameters corresponding to each target model primitive, the composite artificial intelligence model orchestration is generated.
[0009] In a possible implementation, the global context variables include a common variable set and an object variable set, the common variable set includes multiple common variables, the object variable set includes multiple object variables, the data types of the common variables include text type, numeric type, date type and Boolean type, the data types of the object variables include json object type, the global context variable configuration module includes a common variable configuration unit and an object variable configuration unit, the global context variable configuration data includes common variable configuration data and object variable configuration data, wherein the global context variables are generated in the following manner: using the common variable configuration unit and the common variable configuration data, multiple common variables are generated and form a corresponding common variable set; using the object variable configuration unit and the object variable configuration data, multiple object variables are generated and form a corresponding object variable set.
[0010] In one possible implementation, the multiple logical elements include a start element, a decision element, and a parallel element, wherein the step of generating multiple target model elements in the model service orchestration drawing area includes: dragging the start element to the model service orchestration drawing area to generate a target start element corresponding to the composite artificial intelligence model orchestration; dragging the service element related to the model service application scenario to the model service orchestration drawing area to generate multiple target start elements corresponding to the composite artificial intelligence model service; for each target service element, determining whether the output data corresponding to the target service element is associated with the corresponding decision condition; if the output data corresponding to the target service element is associated with the corresponding decision condition, dragging a corresponding decision element to the model service orchestration drawing area to form a target decision element corresponding to the target service element; for target service elements that have a parallel relationship, dragging the parallel element to the model service orchestration drawing area to generate a corresponding target parallel element.
[0011] In one possible implementation, the primitive configuration parameters include input and output parameters and decision condition configuration data, wherein the primitive configuration parameters corresponding to each target model primitive are determined in the following manner: if the target model primitive is a start primitive, then in response to the input and output parameter configuration operation performed on the target model primitive, the input and output parameters of the entire composite artificial intelligence model service are determined from the global context variables; if the target model primitive is a decision primitive, then in response to the decision condition configuration operation performed on the target model primitive, the decision condition variables corresponding to the target model primitive are determined from the global context variables and the corresponding decision condition configuration data are generated; if the target model primitive is a service primitive, then in response to the input and output parameter configuration operation performed on the target model primitive, the input and output parameters corresponding to the target model primitive are determined from the global context variables.
[0012] In one possible implementation, a composite artificial intelligence model service is obtained in the following manner: calling a model service orchestration engine to execute: generating a workflow json file corresponding to the composite artificial intelligence model orchestration, and saving the workflow json file to a relational database; parsing the workflow json file to obtain a target orchestration service object corresponding to the composite artificial intelligence model orchestration and caching the orchestration service object to a cache database; receiving a debugging request for a target composite artificial intelligence model orchestration through a model service debugging interface; loading a target orchestration service object corresponding to the target composite artificial intelligence model orchestration from a cache database according to the debugging request; passing the debugging request to the target orchestration service object to respond to the debugging request using the target composite artificial intelligence model orchestration corresponding to the target orchestration service object to obtain a response result; recording and saving the execution log corresponding to each target model primitive in the process of processing the debugging request of the target composite artificial intelligence model orchestration, the execution log including the data processing time, data processing status and data processing results corresponding to the model primitive; locating abnormal model primitives in the target model primitives according to the execution logs; debugging the input and output parameters and call links corresponding to the abnormal model primitives to obtain a composite artificial intelligence model service.
[0013] In one possible implementation, the method also includes: in response to a publishing operation performed on the composite artificial intelligence model service, registering the composite artificial intelligence model service in a microservice registration center; obtaining a registration result fed back by the microservice registration center, and if the registration result indicates a successful registration, completing the composite artificial intelligence model service; if the registration result indicates a registration failure, determining the cause of the failure and re-registering the composite artificial intelligence model service in the microservice registration center.
[0014] In the second aspect, an embodiment of the present application also provides a device for creating a composite artificial intelligence model service, the device comprising: a task creation module, used to determine the corresponding orchestration task information through a model service creation interface and create a model service orchestration task based on the orchestration task information; an orchestration module, used to use a service orchestration process design interface to orchestrate multiple atomic model services corresponding to the orchestration task information indicated by the model service orchestration task, and generate a composite artificial intelligence model orchestration; a debugging module, used to use a model service orchestration engine to debug the composite artificial intelligence model orchestration to obtain a composite artificial intelligence model service.
[0015] In the third aspect, an embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for creating a composite artificial intelligence model service in the above-mentioned first aspect or any possible implementation scheme of the first aspect.
[0016] The embodiments of the present application provide a method, device and electronic device for creating a composite artificial intelligence model service, the method comprising: determining the corresponding orchestration task information through a model service creation interface and creating a model service orchestration task based on the orchestration task information; using a service orchestration process design interface to orchestrate multiple atomic model services corresponding to the orchestration task information indicated by the model service orchestration task to generate a composite artificial intelligence model orchestration; using a model service orchestration engine to debug the composite artificial intelligence model orchestration to obtain a composite artificial intelligence model service. The present application orchestrates multiple atomic model services through service orchestration technology to generate a composite artificial intelligence model service, effectively solving the problem that a single atomic model service cannot cope with complex intelligent application scenarios.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart showing a method for creating a composite artificial intelligence model service provided in an embodiment of the present application is shown;
[0020] Figure 2 A flowchart of a method for generating a composite artificial intelligence model arrangement provided by an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram of a composite artificial intelligence model arrangement and debugging process provided by an embodiment of the present application is shown;
[0022] Figure 4 A functional module diagram of a device for creating a composite artificial intelligence model service provided by an embodiment of the present application is shown;
[0023] Figure 5 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0025] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0026] Traditional AI model services often provide a single atomic model service. The repeated development of different atomic model services makes the developed atomic model services lack reusability, resulting in the inability of AI model services to cope with complex intelligent application scenarios.
[0027] Based on this, the embodiments of the present application provide a method, device and electronic device for creating a composite artificial intelligence model service, which orchestrates multiple atomic model services through service orchestration technology to generate a composite artificial intelligence model service, effectively solving the problem that a single atomic model service cannot cope with complex intelligent application scenarios, as follows:
[0028] See also Figure 1 , Figure 1 A flow chart of a method for creating a composite artificial intelligence model service provided by an embodiment of the present application is shown. Figure 1 As shown, the method provided in the embodiment of the present application comprises the following steps:
[0029] S100: Determine corresponding orchestration task information through a model service creation interface and create a model service orchestration task based on the orchestration task information.
[0030] S200. Use the service orchestration process design interface to orchestrate multiple atomic model services corresponding to the orchestration task information indicated by the model service orchestration task to generate a composite artificial intelligence model orchestration.
[0031] S300. Use the model service orchestration engine to adjust the composite artificial intelligence model orchestration to obtain the composite artificial intelligence model service.
[0032] In the specific implementation, in steps S100 to S300, the present application uses orchestration technology to orchestrate and manage multiple atomic model services, and can freely combine atomic model services into various powerful composite artificial intelligence model services based on the scenario requirements indicated by different orchestration tasks, thereby achieving the reusability of atomic model services and effectively solving the problem that a single atomic model service cannot cope with complex intelligent application scenarios, thereby improving the efficiency of building corresponding artificial intelligence models in complex intelligent application scenarios. In the present application, the atomic model service is an artificial intelligence model service used to process a single application scenario.
[0033] Preferably, in step S100, the model service creation interface includes a first virtual button and a second virtual button.
[0034] In a preferred embodiment, step S100 includes:
[0035] In response to a selection operation performed on a first virtual button, multiple orchestration task information configuration items are displayed, the orchestration task information configuration items including an orchestration name configuration item, an orchestration description configuration item, an orchestration parameter configuration item, and an orchestration application scenario configuration item; in response to a configuration operation performed on multiple orchestration task information configuration items, orchestration task information is determined, the orchestration task information including a model service name, a model service description, orchestration parameters, and a model service application scenario; and in response to a selection operation performed on a second virtual button, a model service orchestration task is generated.
[0036] Specifically, the selection operation can be a click. In response to the selection operation on the first virtual button, the orchestration task configuration interface is displayed. The orchestration task configuration interface includes multiple orchestration task information configuration items. Corresponding orchestration task information is generated through multiple orchestration task information configuration items. In this application, the orchestration name must be unique and only supports numbers, uppercase and lowercase letters, and underscores. This facilitates data migration such as importing and exporting of composite artificial intelligence model services between different environments. The orchestration application scenario corresponds to the intelligent application scenario applicable to the composite artificial intelligence model service. The orchestration application scenario includes multiple categories. The orchestration task configuration interface also includes a Chinese alias configuration item. The Chinese alias configuration item is used to generate a Chinese alias for the composite artificial intelligence model service indicated by the orchestration task. The Chinese alias is used for operation monitoring indicator display. Through the orchestration parameter configuration item, the application can pre-write or set the corresponding orchestration parameters according to the actual parameter orchestration requirements of the composite artificial intelligence model service. In response to the selection operation performed on the second virtual button, a model service orchestration task is generated and the orchestration task information is saved to a preset database.
[0037] Preferably, the service orchestration process design interface provides a global context variable configuration module, a graphic element configuration module, and a model service orchestration drawing area.
[0038] In a specific embodiment, the orchestration parameters include but are not limited to at least one of the following items: global context variable configuration data and processing logic configuration data in a model service application scenario, wherein the global context variable configuration data includes common variable configuration data and object variable configuration data.
[0039] In a preferred embodiment, see Figure 2 , Figure 2 A flow chart of a method for generating a composite artificial intelligence model arrangement provided by an embodiment of the present application is shown. Figure 2 As shown, step S200 includes:
[0040] S2001. Based on the global context variable configuration data, determine the global context variables corresponding to the composite artificial intelligence model arrangement through the global context variable configuration module.
[0041] S2002. Generate multiple target model graphics elements in the model service orchestration drawing area through the graphics element configuration module, the model service application scenario indicated by the model service orchestration task, and the processing logic configuration data.
[0042] Among them, the primitive configuration module provides multiple logical primitives and multiple service primitives, each service primitive corresponds to an atomic model service, and the target model primitives include target logical primitives and target service primitives.
[0043] S2003. Determine the element configuration parameters corresponding to each target model element through global context variables and processing logic configuration data.
[0044] S2004. Connect the target model graphics elements based on the processing logic configuration data to generate connection relationships between the target model graphics elements.
[0045] S2005. Generate a composite artificial intelligence model arrangement based on the connection relationship between the target model primitives and the primitive configuration parameters corresponding to each target model primitive.
[0046] In steps S2001 to S2005, the service orchestration process design interface of the present application provides a model service orchestration designer and a model service orchestration drawing area. The model service orchestration designer includes a global context variable configuration module and a graphic element configuration module. Through the model service orchestration designer, multiple target model graphics elements are combined into a composite artificial intelligence model orchestration that conforms to the model service application scenario in the model service orchestration drawing area, thereby realizing the reusability of atomic model services and improving the creation efficiency of composite artificial intelligence model orchestrations.
[0047] Preferably, the global context variables include a common variable set and an object variable set, the common variable set includes multiple common variables, the object variable set includes multiple object variables, the data types of the common variables include text type, numeric type, date type and Boolean type, the data type of the object variables includes json object type, and the global context variable configuration module includes a common variable configuration unit and an object variable configuration unit.
[0048] The variable name corresponding to a common variable must be unique and contain only numbers, uppercase and lowercase letters, and underscores. Common variables support array form.
[0049] The object variable name must be unique and contain only numbers, uppercase and lowercase letters, and underscores. Object variables support nested configuration and provide attribute member configuration. The attribute members corresponding to object variables can be ordinary variables or object variables, including whether they are required or collection options. Object variables also support array form.
[0050] In a preferred embodiment, step S2001 includes:
[0051] Using common variable configuration units and common variable configuration data, multiple common variables are generated and form corresponding common variable sets; using object variable configuration units and object variable configuration data, multiple object variables are generated and form corresponding object variable sets.
[0052] Among them, the common variable configuration data describes the common variables and their data type configuration data required to create a composite artificial intelligence model service, and the object variable configuration data describes the object variables and their data type configuration data required to create a composite artificial intelligence model service.
[0053] Preferably, the plurality of logic primitives include a start primitive, a decision primitive and a parallel primitive.
[0054] Traditional orchestration technology often does not provide a drag-and-drop visual operation interface, has poor usability and user experience, and is usually difficult to support the creation of service combinations to reuse atomic model services. Therefore, in step S2002 of the present application, for the multiple logical graphics and multiple service graphics provided by the graphics configuration module, the selected logical graphics and service graphics can be dragged to the model service orchestration drawing area, and the target logical graphics and target service graphics corresponding to the model orchestration task are formed in the model service orchestration drawing area, so as to generate the corresponding composite artificial intelligence model orchestration through the target logical graphics and target service graphics. It can be seen that the present application selects the target logical graphics and target service graphics in a drag-and-drop visual form, which greatly improves the user experience.
[0055] In the present application, a mapping relationship between an orchestration application scenario and its corresponding at least one service graph element is created in advance. After the model service orchestration task is created, a plurality of candidate service graph elements corresponding to the orchestration application scenario indicated by the model service orchestration task can be determined based on the mapping relationship between the orchestration application scenario and its corresponding service graph element. Furthermore, based on the model service description, a plurality of target service graph elements can be determined from the plurality of candidate service graph elements.
[0056] In addition, the processing logic configuration data describes the processing logic of the composite artificial intelligence model service as a whole, from which multiple target logic elements can be determined.
[0057] In a preferred embodiment, step S2002 includes:
[0058] Drag the start element to the model service orchestration drawing area to generate the target start element corresponding to the composite artificial intelligence model orchestration; drag the service element related to the model service application scenario to the model service orchestration drawing area to generate multiple target start elements corresponding to the composite artificial intelligence model service; for each target service element, determine whether the output data corresponding to the target service element is associated with the corresponding decision condition; if the output data corresponding to the target service element is associated with the corresponding decision condition, drag a corresponding decision element to the model service orchestration drawing area to form a target decision element corresponding to the target service element; for target service elements that have a parallel relationship, drag the parallel element to the model service orchestration drawing area to generate a corresponding target parallel element.
[0059] In a specific embodiment, the start element is the starting element of the workflow corresponding to the composite artificial intelligence model orchestration. The composite artificial intelligence model orchestration has one and only one start element. The start element has no input interface but only an output interface. The input and output parameters of the entire composite artificial intelligence model orchestration can be defined on the start element.
[0060] A decision-making element is used to create a decision condition corresponding to the output result of a service element. The corresponding service element is connected according to the decision result corresponding to the decision element to determine the subsequent specific execution of the service element. It is similar to an if-else statement and supports visual configuration. The decision element includes an input interface and multiple output interfaces. Each output interface corresponds to an output branch. The multiple output branches include a default branch and an editable branch. There is only one default branch and at least one editable branch. An editable branch means that the branch condition of the output interface corresponding to the branch is editable. The branch condition name corresponding to the output branch will be used as the connection type corresponding to the output branch.
[0061] A parallel primitive can create a parallel process for target service primitives that have a parallel relationship. The parallel primitive includes a start primitive and an end primitive. The service primitives placed between the start primitive and the parallel primitive can be executed in parallel. The parallel start primitive includes an input interface and multiple output interfaces. The multiple output interfaces corresponding to the parallel start primitive are respectively connected to the input interfaces of the target service primitives that have a parallel relationship with each other. The parallel end primitive includes multiple input interfaces and an output interface. The multiple input interfaces corresponding to the parallel end primitive are respectively connected to the output interfaces of the target service primitives that have a parallel relationship with each other. In special application scenarios, for example, steps that must wait until all preceding dependent primitives are fully executed before continuing to execute can meet this requirement through parallel primitives.
[0062] This application provides logical primitives such as start primitives, decision primitives, and parallel primitives to enable the creation of composite artificial intelligence model orchestration to support serial, branch, and parallel scheduling processes, thereby meeting users' design requirements for composite artificial intelligence models.
[0063] In another preferred embodiment, the service element includes a native service element and a connector element. The native service element includes a machine learning element and a deep learning element. The connector element can be a rest service element. In this application, the atomic model service is divided into a machine learning atomic model service and a deep learning atomic model service.
[0064] Specifically, a machine learning graph corresponds to a machine learning atomic model service, and different machine learning graphs are bound to different published machine learning atomic model services. The machine learning graph includes an input interface and one or zero output interfaces.
[0065] A deep learning primitive corresponds to a deep learning atomic model service. Different deep learning primitives are bound to different published deep learning atomic model services. A deep learning primitive includes an input interface and one or zero output interfaces.
[0066] The connector element is used to access the published third-party REST service. The connector element includes an output interface, one or zero output interfaces.
[0067] In the present application, the requirement configuration data corresponding to each target model primitive can be further analyzed and extracted from the processing logic configuration data, and based on the requirement configuration data corresponding to each target model primitive, the primitive configuration parameters corresponding to each target model primitive can be further determined.
[0068] In a preferred embodiment, the primitive configuration parameters include input and output parameters and decision condition configuration data, wherein the primitive configuration parameters corresponding to each target model primitive are determined in the following manner:
[0069] If the target model entity is a start entity, then in response to the input and output parameter configuration operation performed on the target model entity, the input and output parameters of the entire composite artificial intelligence model orchestration are determined from the global context variables; if the target model entity is a decision entity, then in response to the decision condition configuration operation performed on the target model entity, the decision condition variables corresponding to the target model entity are determined from the global context variables and the corresponding decision condition configuration data are generated; if the target model entity is a service entity, then in response to the input and output parameter configuration operation performed on the target model entity, the input and output parameters corresponding to the target model entity are determined from the global context variables.
[0070] In a specific embodiment, for the target start primitive, in response to the input and output parameter configuration operation performed on the target start primitive, the input parameter array and output parameter array corresponding to the entire composite artificial intelligence model orchestration are determined through the variables provided by the global context variables, the input parameter array includes multiple input parameters corresponding to the entire composite artificial intelligence model orchestration, and the output parameter array includes multiple output parameters corresponding to the entire composite artificial intelligence model orchestration, wherein the input and output parameters corresponding to the target start primitive are fixed in json format, and when the composite artificial intelligence model service is running, the parameter data carried by the received service request is assigned to the input parameter corresponding to the target start primitive, and at the end of the process, the specified variable is assigned to the output parameter.
[0071] For the target decision primitive, in response to the decision condition configuration operation performed on the target decision primitive, the decision condition variable is determined from the variables provided by the global context variable and the corresponding decision condition configuration data is configured to generate the decision condition configuration data, the decision condition configuration data indicates a decision condition expression, the decision condition expression is formed by combining at least one sub-condition expression, at least one sub-condition expression is connected by a combination of and / or equal condition connectors, the sub-condition expression is formed by the decision condition variable, the comparison symbol and the judgment condition, and the connecting line corresponding to the decision primitive is a connecting line of a specified type.
[0072] For the target service primitive, it is divided into native service primitive configuration and connector primitive configuration. The input and output parameter configuration process of the native service primitive is as follows:
[0073] If the target service primitive is a native service primitive, then for the input parameter configuration process corresponding to the native service primitive, since the atomic model service has a standardized json format, after configuring and generating the input parameter configuration data corresponding to the native service primitive, if the input parameter configuration data contains the input parameter name, input parameter value and data encapsulation character "data", the input parameter configuration data is converted into a standardized json format, that is, converted into the form of {"data":"input parameter value"}; if the input parameter configuration data does not contain the data encapsulation character "data", the input parameter configuration data is converted into the form of {"data":{"parameter name":"parameter value"}}; similarly, when configuring the output parameter corresponding to the native service primitive, the response content corresponding to the output parameter is configured as the "data" attribute, that is, the response content corresponding to the output parameter is encapsulated with the data encapsulation character "data" to correspond to the source parameter "data". The output parameter can select an object variable, and the format of the output parameter must correspond to the content format of the "data" attribute to store the "data" response content.
[0074] The input and output parameter configuration process for the connector element is as follows:
[0075] After receiving the input parameters of the connector element entered by the user, the parameter name and parameter value corresponding to the input parameter are combined into the form of {"parameter name":"parameter value"} as the target input parameter corresponding to the connector element. The response json content corresponds to the source parameter result. The target parameter can select an object variable. The format must correspond to the content format of the result parameter, which is used to store the response content.
[0076] In addition, the connector element is mainly used to connect to the published third-party REST services. When the connector element is orchestrated, in response to the data configuration operation performed on the target connector element in the model service orchestration drawing area, the management interface of the management interface is displayed. The management interface includes multiple registered and published third-party REST services. In response to the selection operation performed on the target third-party REST service, the target third-party REST service is bound to the target connector element to implement the call to the target third-party REST service through the target connector element.
[0077] In this application, the input and output interfaces corresponding to the service graph elements provide a parameter standardization process, so that a common service workflow can be formed between different service graph elements. It is not only compatible with local model services, but also can be managed and compatible with third-party model services, providing an implementation basis for the combination of different model services.
[0078] In step S2004, different types of primitives have corresponding connection types. For each target model primitive, the output end of the target model primitive is connected to its corresponding target model primitive using the connection corresponding to the target model primitive according to the connection relationship corresponding to the target model primitive.
[0079] In a preferred embodiment, see Figure 3 , Figure 3 FIG. 1 is a schematic diagram showing a composite artificial intelligence model arrangement and debugging process provided by an embodiment of the present application. Figure 3 As shown, step S300 includes: calling the model service orchestration engine to execute:
[0080] Generate a workflow json file corresponding to the composite artificial intelligence model orchestration, save the workflow json file to the Mysql database, parse the workflow json file, obtain the target orchestration service object corresponding to the composite artificial intelligence model orchestration and cache the orchestration service object to the redis database, receive a debugging request for the target composite artificial intelligence model orchestration through the model service debugging interface, load the target orchestration service object corresponding to the target composite artificial intelligence model orchestration from the redis database according to the debugging request, pass the debugging request to the target orchestration service object, and use the target composite artificial intelligence model orchestration corresponding to the target orchestration service object to respond to the debugging request, output the response result, record and save the execution log corresponding to each target model primitive in the process of processing the debugging request of the target composite artificial intelligence model orchestration, the execution log includes the data processing time, data processing status and data processing results corresponding to the model primitive, locate the abnormal model primitive in the target model primitive according to the execution log, debug the input and output parameters and call link corresponding to the abnormal model primitive, and obtain the composite artificial intelligence model service.
[0081] In a specific embodiment, the model service orchestration engine provides a debugging interface. After the model service orchestration is completed, the debugging interface provided by the model service orchestration engine can be used to debug the model service orchestration. The specific debugging interface inputs a debugging request, and records the execution log of the entire orchestration link and each target model element in the process of the model service orchestration responding to the debugging request, tracks the execution details of each target model element, and assists the user in determining and resolving the calling status and problems of each target model element and its corresponding calling link, and finally obtains a debugged composite artificial intelligence model service.
[0082] This application debugs the model service orchestration through the debugging interface provided by the model service orchestration engine, which facilitates users to quickly debug the model service orchestration service and ensure the reliability of the composite artificial intelligence model service of the final released application.
[0083] In a preferred embodiment, the method provided by the present application further includes:
[0084] In response to the publishing operation performed on the composite artificial intelligence model service, the composite artificial intelligence model service is registered in the microservice registration center, and the registration result fed back by the microservice registration center is obtained. If the registration result indicates that the registration is successful, the composite artificial intelligence model service is completed. If the registration result indicates that the registration failed, the cause of the failure is determined and the composite artificial intelligence model service is re-registered in the microservice registration center.
[0085] In a specific embodiment, the model service creation interface provides a model service list, which records multiple composite artificial intelligence model services that have completed debugging and their corresponding publish virtual buttons. In response to a selection operation performed on the publish virtual button corresponding to the composite artificial intelligence model service, the composite artificial intelligence model service can be registered with the microservice registration center. After the composite artificial intelligence model service is registered, the user can access the composite artificial intelligence model service through the API gateway. The service request issued by the requester must carry the authentication parameters corresponding to the target composite artificial intelligence model service in order to access the API interface corresponding to the composite artificial intelligence model service, otherwise unauthorized information will be returned to the requester.
[0086] In a preferred embodiment, the present application supports batch export of composite artificial intelligence model services, mainly exporting the orchestration task information and workflow json files corresponding to the composite artificial intelligence model services, generating an orchestration file, and recording the orchestration task information and workflow json files corresponding to each composite artificial intelligence model service in the orchestration file. After the export, the composite artificial intelligence model service can be imported into different environments. After the orchestration file is successfully imported, the composite artificial intelligence model service recorded in the orchestration file can be restored in the imported environment. After the restoration is successful, the composite artificial intelligence model service can be directly run in the imported environment.
[0087] Based on the same application concept, the embodiments of the present application also provide a device for creating a composite artificial intelligence model service corresponding to the method for creating a composite artificial intelligence model service provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the method for creating a composite artificial intelligence model service in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0088] See also Figure 4 , Figure 4 The functional module diagram of a composite artificial intelligence model service creation device provided by an embodiment of the present application is shown. Figure 4 As shown, the device comprises:
[0089] The task creation module 400 is used to determine the corresponding orchestration task information through the model service creation interface and create a model service orchestration task based on the orchestration task information;
[0090] The orchestration module 410 is used to perform orchestration processing on multiple atomic model services corresponding to the orchestration task information indicated by the model service orchestration task using the service orchestration process design interface to generate a composite artificial intelligence model orchestration;
[0091] The debugging module 420 is used to use the model service orchestration engine to debug the composite artificial intelligence model orchestration to obtain the composite artificial intelligence model service.
[0092] Based on the same application idea, please refer to Figure 5 , Figure 5 FIG. 1 shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device includes: a processor 510, a memory 520 and a bus 530. The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 and the memory 520 communicate through the bus 530. The machine-readable instructions are executed by the processor 510 when it is running, such as the steps of the method for creating a composite artificial intelligence model service provided in any of the above embodiments.
[0093] Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for creating a composite artificial intelligence model service provided in the above embodiment are executed.
[0094] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0097] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0098] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for creating a composite artificial intelligence model service, characterized in that: The method comprises: Determine the corresponding orchestration task information through the model service creation interface and create a model service orchestration task based on the orchestration task information; Using a service orchestration process design interface, orchestrate multiple atomic model services corresponding to the orchestration task information indicated by the model service orchestration task to generate a composite artificial intelligence model orchestration; The composite artificial intelligence model orchestration is debugged by using a model service orchestration engine to obtain a composite artificial intelligence model service.
2. The method according to claim 1, characterized in that: The model service creation interface includes a first virtual button and a second virtual button. The model service orchestration task is created in the following way: In response to a selection operation performed on the first virtual key, a plurality of orchestration task information configuration items are displayed, wherein the orchestration task information configuration items include an orchestration name configuration item, an orchestration description configuration item, an orchestration parameter configuration item, and an orchestration application scenario configuration item; In response to the configuration operation performed on the plurality of orchestration task information configuration items, determining the orchestration task information, the orchestration task information including the model service name, the model service description, the orchestration parameters and the model service application scenario; A selection operation performed on the second virtual key is received, and a model service orchestration task is generated.
3. The method according to claim 2, characterized in that The service orchestration process design interface provides a global context variable configuration module, a primitive configuration module, and a model service orchestration drawing area. The primitive configuration module provides multiple logical primitives and multiple service primitives. Each service primitive corresponds to an atomic model service. The orchestration parameters include global context variable configuration data and processing logic configuration data in the model service application scenario. The composite artificial intelligence model orchestration corresponding to the model service orchestration task is performed in the following manner: Based on the global context variable configuration data, determining the global context variables corresponding to the composite artificial intelligence model arrangement through the global context variable configuration module; Generate multiple target model graphics elements in the model service arrangement drawing area through the graphics element configuration module, the model service application scenario and the processing logic configuration data, the target model graphics elements include target logic graphics elements and target service graphics elements; Determine the primitive configuration parameters corresponding to each target model primitive through the global context variables and the processing logic configuration data; Connecting target model primitives based on the processing logic configuration data to generate connection relationships between target model primitives; A composite artificial intelligence model arrangement is generated based on the connection relationship between the target model primitives and the primitive configuration parameters corresponding to each target model primitive.
4. The method according to claim 3, characterized in that The global context variables include a common variable set and an object variable set, the common variable set includes a plurality of common variables, the object variable set includes a plurality of object variables, the data types of the common variables include text type, number type, date type and Boolean type, the data types of the object variables include json object type, the global context variable configuration module includes a common variable configuration unit and an object variable configuration unit, the global context variable configuration data includes common variable configuration data and object variable configuration data, The global context variable is generated in the following way: Using the common variable configuration unit and the common variable configuration data, a plurality of common variables are generated and a corresponding common variable set is formed; The object variable configuration unit and the object variable configuration data are used to generate a plurality of object variables and form a corresponding object variable set.
5. The method according to claim 3, characterized in that: The plurality of logic primitives include a start primitive, a decision primitive and a parallel primitive, The step of generating a plurality of target model graphics elements in the model service arrangement drawing area includes: Drag the start primitive to the model service orchestration drawing area to generate the target start primitive corresponding to the composite AI model orchestration; Drag the service graphic element related to the model service application scenario to the model service arrangement drawing area to generate multiple target start graphic elements corresponding to the composite artificial intelligence model service; For each target service primitive, determine whether the output data corresponding to the target service primitive is associated with the corresponding decision condition. If the output data corresponding to the target service primitive is associated with the corresponding decision condition, drag a corresponding decision primitive to the model service arrangement drawing area to form a target decision primitive corresponding to the target service primitive. For target service primitives with parallel relationships, drag the parallel primitives to the model service orchestration drawing area to generate a corresponding target parallel primitive.
6. The method according to claim 3, characterized in that The primitive configuration parameters include input and output parameters and decision condition configuration data, The primitive configuration parameters corresponding to each target model primitive are determined in the following way: If the target model primitive is a start primitive, in response to the input and output parameter configuration operation performed on the target model primitive, determining the input and output parameters of the entire composite artificial intelligence model service from the global context variables; If the target model primitive is a decision primitive, in response to a decision condition configuration operation performed on the target model primitive, a decision condition variable corresponding to the target model primitive is determined from the global context variable and corresponding decision condition configuration data is generated; If the target model primitive is a service primitive, in response to an input / output parameter configuration operation performed on the target model primitive, the input / output parameters corresponding to the target model primitive are determined from the global context variables.
7. The method according to claim 3, characterized in that Get the composite AI model service through the following methods: Call the model service orchestration engine and execute: Generate a workflow json file corresponding to the composite artificial intelligence model orchestration, and save the workflow json file to a relational database; Parse the workflow json file, obtain the target orchestration service object corresponding to the composite artificial intelligence model orchestration, and cache the orchestration service object to the cache database; receiving a debugging request for the target composite AI model orchestration through a model service debugging interface; Loading a target orchestration service object corresponding to the target composite artificial intelligence model orchestration from a cache database according to a debugging request; Passing the debugging request to the target orchestration service object to respond to the debugging request using the target composite artificial intelligence model orchestration corresponding to the target orchestration service object to obtain a response result; Record and save the execution log corresponding to each target model element in the process of processing the debugging request of the target composite artificial intelligence model arrangement, and the execution log includes the data processing time, data processing status and data processing results corresponding to the model element; According to the execution log, locate the abnormal model elements in the target model elements; Debug the input and output parameters and call links corresponding to the abnormal model primitives to obtain the composite artificial intelligence model service.
8. The method according to claim 3, characterized in that The method further comprises: In response to a publishing operation performed on the composite artificial intelligence model service, registering the composite artificial intelligence model service in a microservice registration center; Obtaining the registration result fed back by the microservice registration center, and if the registration result indicates that the registration is successful, completing the service for the composite artificial intelligence model; If the registration result indicates that the registration failed, the cause of the failure is determined and the composite artificial intelligence model service is re-registered in the microservice registration center.
9. A device for creating a composite artificial intelligence model service, characterized in that: The device comprises: A task creation module, used to determine corresponding orchestration task information through a model service creation interface and create a model service orchestration task based on the orchestration task information; An orchestration module, used to perform orchestration processing on a plurality of atomic model services corresponding to the orchestration task information indicated by the model service orchestration task using a service orchestration process design interface, and generate a composite artificial intelligence model orchestration; The debugging module is used to use the model service orchestration engine to debug the composite artificial intelligence model orchestration to obtain the composite artificial intelligence model service.
10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for creating a composite artificial intelligence model service as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Task arrangement method and system in hybrid cloud environment
CN111552471A
Visual business service orchestration method and device based on zero code platform
CN115129304A
Business arrangement method based on Flowable workflow engine
CN115185496A
Service orchestration method and device, electronic equipment and storage medium
CN117687610A