Workflow engine based on large model

Through a workflow engine based on a large model, multiple data processing components and schedulers are used to solve the problems of complex configuration and long response time in the existing technology, and realize simple configuration and quick response service invocation.

CN119356767APending Publication Date: 2025-01-24金科览智科技(北京)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411391003.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When handling third-party service calls, service management and data encapsulation, existing workflow engines are complex in configuration and have a long response time, which cannot meet the needs of real-time service calls.

Method used

Provides a workflow engine based on a large model, including multiple data processing components, schedulers and executors. Data processing components are scheduled through the scheduler to implement third-party service invocation and data processing. The configuration is simple and the response time is short.

Benefits of technology

The scenario configuration of third -party service calls, service -oriented tube and data packaging is simple, and the response time when service calls are almost not increased to meet the needs of real -time service calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356767A_ABST
    Figure CN119356767A_ABST
Patent Text Reader

Abstract

The invention provides a workflow engine based on a large model, and the workflow engine comprises a plurality of data processing assemblies, each data processing assembly is used for completing a task required by a workflow; the scheduler is used for scheduling the plurality of data processing components according to the plurality of tasks in the workflow, so that the plurality of data processing components carry out data processing according to a data processing sequence required by the workflow; and each actuator is used for processing the data according to the calling of the data processing component. According to the method, scenes of third-party service (large model) calling, service nano-management and data encapsulation can be processed, configuration is simple, and the response time during service calling is almost not increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of model service platform, and in particular to a workflow engine based on a large model. Background Art

[0002] The workflow engine refers to the workflow as a part of the application system, and provides core solutions for each application system, such as determining the information transmission route, content level, etc. according to different roles, division of labor and conditions. The workflow engine includes important functions such as process node management, flow management, and process sample management.

[0003] As a comprehensive service platform, the service capabilities of the workflow engine are not all the capabilities of the platform itself, but more of the integration of third-party services. There are many ways of integration, including but not limited to: code development, through writing customized code, to complete the service call, data encapsulation, interface return, etc.; the use of workflow engines, referencing open source workflow engines, through proprietary modeling tools, specifying the corresponding flowcharts, and generating process execution files to complete the service call; the use of pipeline engines, referencing open source pipeline engines, through writing pipeline scripts, to complete the orchestration and call of services, etc.

[0004] At present, the most common and effective way is to use code development. This method has high reliability and strong integration, but the disadvantage is that the development cycle is long and each integration of a third-party capability requires additional code development. Workflow engines have been widely used in many platforms. Modern workflow engines can handle various complex scenarios, but most frameworks are too cumbersome and complicated to configure. The use of pipeline engines can also complete the service management and scheduling capabilities, but the pipeline cannot achieve real-time service response and cannot meet the scenario of real-time service call. Summary of the invention

[0005] In view of this, the purpose of this application is to provide a workflow engine based on a large model that can handle scenarios such as third-party service calls, service management, and data encapsulation. It has simple configuration and hardly increases the response time when the service is called.

[0006] In particular, the workflow engine proposed in this application is adapted to the scenario of bill recognition where it is necessary to distinguish which bill type to use to determine which large model service to call, and can be flexibly configured.

[0007] An embodiment of the present application provides a workflow engine based on a large model, wherein the workflow engine includes: multiple data processing components, each data processing component is used to complete a task required by a workflow; a scheduler, which is used to schedule the multiple data processing components according to the multiple tasks in the workflow, so that the multiple data processing components perform data processing in the data processing order required by the workflow; and multiple executors, each executor is used to process data according to the call of the data processing component.

[0008] Optionally, the workflow engine further includes a service management and scheduling platform, which is used to call third-party data services according to requirements of data processing components and to manage target services formed by the workflow engine.

[0009] Optionally, the scheduler calls multiple data processing components through the following steps: obtaining at least one target parameter; inputting the at least one target parameter into at least one data processing component corresponding to the at least one target parameter to obtain at least one data processing parameter; and inputting the at least one data processing parameter into at least one data processing component corresponding to the at least one data processing parameter according to the data processing order required by the workflow, until the workflow engine obtains the data processing result.

[0010] Optionally, the workflow engine includes a sequential workflow, a parallel workflow and a merged workflow, wherein the multiple data processing components in the sequential workflow are controlled by a scheduler to perform data processing on the target parameters in sequence until a data processing result is obtained.

[0011] Optionally, the parallel workflow is used to process multi-threaded data, and multiple data processing components in the parallel workflow are all used to perform data processing on target parameters.

[0012] Optionally, the merged workflow is used to process multiple data simultaneously, and at least one data processing component in the merged workflow is used to obtain multiple target parameters and perform data processing on the multiple target parameters.

[0013] Optionally, the scheduler is also used to: determine whether multiple data required for the merged workflow are obtained; if the multiple data required for the merged workflow are not obtained, wait for the multiple data required for the merged workflow until the multiple data required for the merged workflow are obtained; if the multiple data required for the merged workflow are obtained, control the merged workflow to perform data processing.

[0014] Optionally, each target parameter is input into a data processing component corresponding to the target parameter through the following steps: identifying a flow mode of the target parameter; if the flow mode of the target parameter is inter-component flow, performing serialization format parsing on the target parameter to obtain a target parameter parsing result; determining the data processing component corresponding to the target parameter based on the target parameter parsing result, and constraining or converting the data type of the target parameter so that the data type of the target parameter corresponds to the data type required by the data processing component corresponding to the target parameter; and inputting the target parameter into the data processing component corresponding to the target parameter.

[0015] Optionally, if the target parameter is circulated across components, the target parameter is input into a shared data layer; and a data processing component corresponding to the target parameter is controlled to obtain the target parameter from the shared data layer.

[0016] Optionally, the flow mode also includes default value flow, and the default value flow is used to insert manually set parameters into the process of data flow between components and / or cross-component data flow in response to user parameter settings.

[0017] The large-model-based workflow engine provided in the embodiment of the present application can handle scenarios of third-party service calls, service management, and data encapsulation. It has simple configuration and hardly increases the response time during service calls.

[0018] In particular, the workflow engine proposed in this application is adapted to the scenario of bill recognition where it is necessary to distinguish which bill type to use to determine which large model service to call, and can be flexibly configured.

[0019] 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

[0020] 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.

[0021] Figure 1 A schematic diagram of a workflow engine based on a large model provided in an embodiment of the present application;

[0022] Figure 2 Schematic diagram of the scheduling order of components in the workflow provided by the embodiment of the present application Figure 1 ;

[0023] Figure 3 Schematic diagram of the scheduling order of components in the workflow provided by the embodiment of the present application Figure 2 ;

[0024] Figure 4 Schematic diagram of the scheduling order of components in the workflow provided by the embodiment of the present application Figure 3 ;

[0025] Figure 5 A schematic diagram of the parameter flow provided in the embodiment of the present application. DETAILED DESCRIPTION

[0026] 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. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different 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, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0027] First, the application scenarios to which this application is applicable are introduced. This application can be applied in the field of model service platform technology.

[0028] According to research, a workflow engine refers to a workflow that is part of an application system and provides core solutions that determine information delivery routing, content levels, and other key features of each application system based on roles, division of labor, and conditions. The workflow engine includes important functions such as process node management, flow management, and process sample management.

[0029] As a comprehensive service platform, the service capabilities of the workflow engine are not all the capabilities of the platform itself, but more of the integration of third-party services. There are many ways of integration, including but not limited to: code development, through writing customized code, to complete the service call, data encapsulation, interface return, etc.; the use of workflow engines, referencing open source workflow engines, through proprietary modeling tools, specifying the corresponding flowcharts, and generating process execution files to complete the service call; the use of pipeline engines, referencing open source pipeline engines, through writing pipeline scripts, to complete the orchestration and call of services, etc.

[0030] At present, the most common and effective way is to use code development. This method has high reliability and strong integration, but the disadvantage is that the development cycle is long and each integration of a third-party capability requires additional code development. Workflow engines have been widely used in many platforms. Modern workflow engines can handle various complex scenarios, but most frameworks are too cumbersome and complicated to configure. The use of pipeline engines can also complete the service management and scheduling capabilities, but the pipeline cannot achieve real-time service response and cannot meet the scenario of real-time service call.

[0031] Based on this, the embodiment of the present application provides a workflow engine based on a large model, which can handle scenarios of third-party service calls, service management, and data encapsulation. It has simple configuration and hardly increases the response time when the service is called.

[0032] In particular, the workflow engine proposed in this application is adapted to the scenario of bill identification where it is necessary to distinguish which bill type to determine which model service to call, and can be flexibly configured.

[0033] See also Figure 1 , Figure 1 Schematic diagram of a workflow engine based on a large model provided in an embodiment of the present application. Figure 1 As shown in , a schematic diagram of a workflow engine based on a large model provided in an embodiment of the present application includes: a service management and scheduling platform 101, a workflow engine 102, wherein the workflow engine 102 includes multiple data processing components 1021, a scheduler 1022, and an executor 1023.

[0034] Specifically, multiple data processing components, each data processing component is used to complete a task required by a workflow; a scheduler is used to schedule the multiple data processing components according to the multiple tasks in the workflow, so that the multiple data processing components process data in the data processing order required by the workflow; multiple executors, each executor is used to process data according to the call of the data processing component.

[0035] Among them, the dispatcher arranges a group of components according to the specified logic to complete a task. After the arrangement is completed, a call chain is formed, and the dispatcher parses and runs the call chain data.

[0036] Specifically, a scheduler contains multiple components. The scheduler can parse the call chain data formed by the components, run the call chain and obtain the call results.

[0037] Among them, data processing component (Component). A component represents the execution of a function, such as data processing, service call, model call, etc. Components can be customized. When defining a component, describe the component name, function, input parameters, output parameters, external call address (if necessary), actual executor and other data.

[0038] The data processing component will be constructed into a constructor (Wrapper) by the dispatcher in the dispatcher. The actual dispatcher (Dispatcher) dispatches a group of wrappers, which is consistent with the concept of components.

[0039] Among them, the function performed by a data processing component actually calls an executor (Worker) for execution. Worker is the smallest unit in the workflow and represents the execution of a specific work, such as data processing, external service call, etc.

[0040] Multiple components may reference the same executor at the bottom layer. For example, the invocation of the bill identification service and the invocation of the bill classification service are essentially service invocations. Therefore, a type of executor (Worker) is used internally for invocation.

[0041] Wherein, the workflow engine also includes a service management and scheduling platform.

[0042] The service management and scheduling platform is used to call third-party data services according to the needs of data processing components, and to manage target services formed by the workflow engine.

[0043] Here, the configured workflow will form a "service capability" on the platform. Each service capability will have a "service identifier". The service caller calls the platform's external interface and passes the "service identifier" to determine the corresponding workflow.

[0044] Among them, the "Service Identification" can be viewed and obtained on the platform's visual interface.

[0045] Specifically, the scheduler calls multiple data processing components through the following steps: obtaining at least one target parameter; inputting the at least one target parameter into at least one data processing component corresponding to the at least one target parameter to obtain at least one data processing parameter; according to the data processing order required by the workflow, inputting the at least one data processing parameter into at least one data processing component corresponding to the at least one data processing parameter until the workflow engine obtains the data processing result.

[0046] The workflow engine includes sequential workflow, parallel workflow and merged workflow.

[0047] The multiple data processing components in the sequential workflow are controlled by a scheduler, and perform data processing on the target parameters in sequence until a data processing result is obtained.

[0048] As an example, see Figure 2 , Figure 2 Schematic diagram of the scheduling order of components in the workflow provided by the embodiment of the present application Figure 1 .like Figure 2 As shown in , components 1, 2, and 3 are arranged to form a sequential workflow.

[0049] Among them, these components can be executed sequentially by a total trigger.

[0050] Specifically, a data processing component consists of input parameters, execution logic, and output parameters. The scheduler will transmit the input parameters to the component. After the component is executed, the scheduler obtains its output parameters and then calls the next component.

[0051] The execution scheduler needs to pass parameters to start. The passed parameters will be used as input parameters of the first component executed, and the output parameters of the previous component will be used as input parameters of the next component.

[0052] The parallel workflow is used to process multi-threaded data, and the multiple data processing components in the parallel workflow are all used to perform data processing on the target parameters.

[0053] As an example, see Figure 3 , Figure 3 Schematic diagram of the scheduling order of components in the workflow provided by the embodiment of the present application Figure 2 .like Figure 3 As shown in , the input data of component 2 and component 3 are both the output data of component 1, and component 1, component 2 and component 3 form a parallel workflow.

[0054] For multiple lines, the scheduler will enable multi-threaded parallel execution, and the output parameters of the previous component will be used as input parameters of multiple downstream components.

[0055] When multiple lines are merged into one line, the output parameters of multiple components are transmitted to one component as input parameters, and the components need to be processed simultaneously.

[0056] Specifically, the merged workflow is used to process multiple data simultaneously, and at least one data processing component in the merged workflow is used to obtain multiple target parameters and perform data processing on the multiple target parameters.

[0057] As an example, see Figure 4 , Figure 4 Schematic diagram of the scheduling order of components in the workflow provided by the embodiment of the present application Figure 3 .like Figure 4 As shown in , the output data of component 2 and component 3 are both input data of component 4, and component 4, component 2 and component 3 form a merged workflow.

[0058] When multiple lines are running, one line may run fast while another line may run slow. The scheduler will wait until all the previous components are executed before starting to execute the next component.

[0059] Specifically, the scheduler is also used to: determine whether the multiple data required for the merged workflow are obtained; if the multiple data required for the merged workflow are not obtained, wait for the multiple data required for the merged workflow until the multiple data required for the merged workflow are obtained; if the multiple data required for the merged workflow are obtained, control the merged workflow to perform data processing.

[0060] Specifically, each target parameter can be input into the data processing component corresponding to the target parameter through the following steps: identifying the flow mode of the target parameter; if the flow mode of the target parameter is flow between components, performing serialization format parsing on the target parameter to obtain the target parameter parsing result; determining the data processing component corresponding to the target parameter based on the target parameter parsing result, and constraining or converting the data type of the target parameter so that the data type of the target parameter corresponds to the data type required by the data processing component corresponding to the target parameter; and inputting the target parameter into the data processing component corresponding to the target parameter.

[0061] The flow of parameters between components must follow the structure of json.xx.xx.

[0062] Specifically, component parameters can be parsed in a serialized format, supporting deep-level data structure expansion and acquisition, as well as deep-level data mapping. When the engine parses data for a component, it will automatically constrain or convert the data type to ensure normal data exchange.

[0063] Specifically, if the target parameter is transferred across components, the target parameter is input into the shared data layer; and the data processing component corresponding to the target parameter is controlled to obtain the target parameter from the shared data layer.

[0064] The flow of parameters across components must follow the structure of global.xx.

[0065] Specifically, when the data required by the downstream component may not come from the upstream component but from a higher-level component, the engine supports promoting the data generated by the component to the data sharing layer so that all subsequent components can use it freely.

[0066] Specifically, the flow method also includes default value flow, and the default value flow is used to insert manually set parameters into the process of data flow between components and / or cross-component data flow in response to user parameter settings.

[0067] When the parameters required by a component do not come from or do not all come from other components, you can manually set the parameter value for the parameter. Setting the default value supports the expression method, which is marked with #{}. The parameter setting method that supports the flow between components and across components is supported within the mark {}, such as #{json.xx} or #{global.xx}

[0068] As an example, see Figure 5 , Figure 5 A schematic diagram of the parameter flow provided in the embodiment of the present application.

[0069] Here, it should be noted that parameter transfer is a very complex operation. Only when the parameters are transferred correctly can the entire workflow process be executed smoothly. However, under the fine encapsulation of the platform, users only need to perform simple configuration to complete the parameter mapping of a set of workflows.

[0070] The large-model-based workflow engine provided in the embodiment of the present application can handle scenarios of third-party service calls, service management, and data encapsulation. It has simple configuration and hardly increases the response time during service calls.

[0071] In particular, the workflow engine proposed in this application is adapted to the scenario of bill recognition where it is necessary to distinguish which bill type to use to determine which large model service to call, and can be flexibly configured.

[0072] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0073] 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.

[0074] 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.

[0075] If the functions are implemented in the form of software functional units and sold or used as independent products, they 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 can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for 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: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0076] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A workflow engine based on a large model, characterized in that: The workflow engine comprises: Multiple data processing components, each data processing component is used to complete a task required by a workflow; A scheduler is used to schedule multiple data processing components according to multiple tasks in the workflow, so that the multiple data processing components perform data processing in the data processing order required by the workflow; Multiple executors, each executor is used to process data according to the call of the data processing component.

2. The workflow engine according to claim 1, characterized in that: The workflow engine also includes a service management and scheduling platform. The service management and scheduling platform is used to call third-party data services according to the needs of data processing components, and to manage target services formed by the workflow engine.

3. The workflow engine according to claim 1, characterized in that: The scheduler calls multiple data processing components through the following steps: Get at least one target parameter; Inputting the at least one target parameter into at least one data processing component corresponding to the at least one target parameter to obtain at least one data processing parameter; According to the data processing sequence required by the workflow, the at least one data processing parameter is input into at least one data processing component corresponding to the at least one data processing parameter until the workflow engine obtains the data processing result.

4. The workflow engine according to claim 3, characterized in that: The workflow engine includes sequential workflow, parallel workflow and merged workflow. The multiple data processing components in the sequential workflow are controlled by a scheduler, and perform data processing on the target parameters in sequence until a data processing result is obtained.

5. The workflow engine according to claim 4, characterized in that: The parallel workflow is used to process multi-threaded data, and the multiple data processing components in the parallel workflow are all used to perform data processing on the target parameters.

6. The workflow engine according to claim 4, characterized in that: The merged workflow is used to process multiple data simultaneously, and at least one data processing component in the merged workflow is used to obtain multiple target parameters and perform data processing on the multiple target parameters.

7. The workflow engine according to claim 6, characterized in that: The scheduler is also used to: Determining whether multiple data required for the merged workflow are obtained; If the multiple data required for the merged workflow are not obtained, waiting for the multiple data required for the merged workflow until the multiple data required for the merged workflow are obtained; If multiple data required by the merged workflow are acquired, the merged workflow is controlled to perform data processing.

8. The workflow engine according to claim 6, characterized in that: Each target parameter is input into the data processing component corresponding to the target parameter by following the steps below: Identify the flow mode of the target parameter; If the target parameter is transferred between components, the target parameter is parsed in serialized format to obtain the target parameter parsing result; According to the target parameter parsing result, determine the data processing component corresponding to the target parameter, and constrain or convert the data type of the target parameter so that the data type of the target parameter corresponds to the data type required by the data processing component corresponding to the target parameter; The target parameter is input into a data processing component corresponding to the target parameter.

9. The workflow engine according to claim 8, characterized in that: If the target parameter is transferred across components, the target parameter is input into the shared data layer; The data processing component corresponding to the target parameter is controlled to obtain the target parameter from the shared data layer.

10. The workflow engine according to claim 9, characterized in that: The transfer method also includes default value transfer, which is used to insert manually set parameters into the process of inter-component data flow and / or cross-component data flow in response to user parameter settings.