Business processing method and device for large language model, medium and electronic equipment

By using a domain-specific language to uniformly model workflow configurations and resource constraints, generating directed acyclic graphs and performing adaptive scheduling, the problem of inconsistent expression of resource constraints and execution strategies in workflow orchestration frameworks is solved, improving the development efficiency and semantic consistency of business configurations.

CN121542408APending Publication Date: 2026-02-17BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511883305.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, workflow orchestration frameworks cannot effectively utilize unified semantic expression resource constraints and execution strategies, resulting in low efficiency in business configuration development and inconsistent semantic understanding of business configuration by different roles.

Method used

The configuration of workflow, task operators, resource constraints, and execution strategies are uniformly modeled using a domain-specific language, generating a directed acyclic graph, and adaptive task scheduling is achieved through a scheduler.

Benefits of technology

It improves the development efficiency of business configuration, ensures consistency in the understanding of business configuration semantics among different roles, and supports the adaptation of heterogeneous execution engines and the efficient execution of tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542408A_ABST
    Figure CN121542408A_ABST
Patent Text Reader

Abstract

The invention discloses a business processing method and device for a large language model, a medium and electronic equipment, and relates to the technical field of large models and the technical field of computers, and the business processing method can comprise the steps: responding to a received business request, obtaining a target language text corresponding to the business request, the target language text is used for describing the service configuration of the service corresponding to the service request, the target language text is a text based on a domain specific language, and the service configuration comprises the configuration of a workflow, the configuration of an operator for realizing a task in the workflow, the configuration of resource constraints, the configuration of an execution strategy and the configuration of a data contract; generating a directed acyclic graph corresponding to the service request based on the target language text; and executing tasks in the directed acyclic graph, and uniformly modeling the configuration into structured semantics by utilizing a domain-specific language, so that the problem that the uniform semantics cannot be utilized to express resource constrained configuration and execution strategies in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates at least to the fields of large language model technology and computer technology, and specifically to a business processing method, apparatus, medium and electronic device for large language models. Background Technology

[0002] With the continuous development of large language models, they have been widely applied in various business scenarios. Workflow orchestration is a core means of leveraging the capabilities of large language models to implement complex business processes. It can solve the problem that a single large language model cannot handle complex business processes. Therefore, workflow orchestration has become a research focus. Summary of the Invention

[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] Firstly, this disclosure provides a business processing method for large language models, including: In response to receiving a business request, the system obtains the target language text corresponding to the business request. The target language text is used to describe the business configuration of the business corresponding to the business request. The target language text is text based on a domain-specific language. The business configuration includes the configuration of the workflow, the configuration of operators that implement the tasks in the workflow, the configuration of resource constraints, the configuration of execution strategies, and the configuration of data contracts. Based on the target language text, a directed acyclic graph corresponding to the business request is generated, wherein the directed acyclic graph includes nodes corresponding to the task and edges between the nodes, and the edges are used to describe the dependencies between the tasks; Perform the tasks in the directed acyclic graph.

[0005] Secondly, this disclosure provides a business processing apparatus for large language models, including: The acquisition module is used to acquire the target language text corresponding to the business request in response to receiving the business request. The target language text is used to describe the business configuration of the business corresponding to the business request. The target language text is text based on a domain-specific language. The business configuration includes the configuration of the workflow, the configuration of the operators that implement the tasks in the workflow, the configuration of resource constraints, the configuration of the execution strategy, and the configuration of the data contract. The first generation module is used to generate a directed acyclic graph corresponding to the business request based on the target language text, wherein the directed acyclic graph includes nodes corresponding to the task and edges between the nodes, and the edges are used to describe the dependencies between the tasks; The first execution module is used to execute tasks in the directed acyclic graph.

[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the business processing method described in the first aspect.

[0007] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the business processing method described in the first aspect.

[0008] Fifthly, this disclosure provides a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the business processing method described in the first aspect.

[0009] Through the above technical solutions, the configuration of workflow, the configuration of operators that implement tasks, the configuration of resource constraints, the configuration of execution strategies, and the configuration of data contracts are all modeled into structured semantics using a domain-specific language. This solves the problem that workflow orchestration frameworks in related technologies cannot use unified semantics to express the configuration of resource constraints and execution strategies, improves the development efficiency of existing business configurations, and facilitates the consistency of different roles' understanding of business configuration semantics.

[0010] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is an architecture diagram of a system for implementing a business processing method for large language models, according to an embodiment of this disclosure. Figure 2 This is a flowchart illustrating a business processing method for a large language model according to an embodiment of this disclosure; Figure 3 This is a timing diagram illustrating a business processing method for a large language model according to an embodiment of this disclosure; Figure 4 This is a logic diagram of adaptive scheduling shown according to embodiments of the present disclosure; Figure 5 This is a logic diagram illustrating the execution of a control task according to an embodiment of the present disclosure; Figure 6 This is a schematic diagram illustrating a unified interface according to embodiments of the present disclosure; Figure 7 This is a block diagram illustrating a business processing apparatus for a large language model according to an embodiment of the present disclosure; Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0012] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0013] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0014] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0015] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0016] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0017] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0022] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] Figure 1 This is a system architecture diagram illustrating a business processing method for large language models according to an embodiment of this disclosure, with reference to... Figure 1 The system architecture includes an abstract user interface layer, a semantic DSL (Domain-Specific Language) layer, a compilation layer, a scheduling layer, an adaptation layer, an observability layer, and an infrastructure layer.

[0024] The user interface layer provides an SDK (Software Development Kit) for submitting business requests. These requests are then passed to the semantic DSL layer via an API (Application Programming Interface). The user interface layer also provides a web console for developers to submit requests for business configuration, debugging, etc., to achieve the corresponding functions. For example, the business configuration is a workflow configuration using the template library provided in the semantic DSL layer.

[0025] The Semantic DSL layer obtains the corresponding target language text based on the business request, performs schema verification, and provides a template library to support workflow configuration. The target language text that has passed schema verification generates an intermediate representation based on the compiler in the compilation layer. The validator can perform a second verification on the intermediate representation. After the second verification passes, the intermediate representation can be further used to generate a DAG (Directed Acyclic Graph) generator.

[0026] A Directed Acyclic Graph (DAG) includes at least one task. The scheduling layer uses a scheduler to schedule tasks based on multiple dimensions of scheduling criteria. Specifically, when scheduling tasks, the scheduler distributes the tasks to various execution engines through a task dispatcher within the scheduler, based on a unified interface in the adaptation layer. Figure 1 The external execution engine and the local execution engine are shown.

[0027] The observable layer can collect and record various metrics of the entire system (such as memory, throughput, etc.) for the upper layer (such as the scheduling layer) to read, so as to support the scheduler to schedule tasks based on multiple dimensions of scheduling criteria.

[0028] The infrastructure layer is used to provide the execution environment and resources required by each execution engine to execute tasks in the DAG.

[0029] Figure 2 This is a flowchart illustrating a business processing method for large language models according to an embodiment of this disclosure. This business processing method for large language models relies on... Figure 1 The system shown is referenced. Figure 2 The business processing method for large language models may include steps 210, 220 and 230.

[0030] In step 210, in response to receiving a business request, the target language text corresponding to the business request is obtained. The target language text is used to describe the business configuration of the business corresponding to the business request. The target language text is text based on a domain-specific language. The business configuration includes the configuration of the workflow, the configuration of the operators that implement the tasks in the workflow, the configuration of resource constraints, the configuration of the execution strategy, and the configuration of the data contract.

[0031] As an example, the business requests for large language models can correspond to different application scenarios such as data processing pipelines and model evaluation.

[0032] Here, business configuration can include the configuration of the entire process of defining, executing, and ending a business throughout its lifecycle. Workflow is a blueprint for the execution logic aimed at achieving the business goals; it's an abstract description of the ordered combination and dependencies of tasks. For example, taking a data processing pipeline as an example, its workflow can include data acquisition, cleaning, analysis, and storage, where data acquisition, cleaning, analysis, and storage are tasks executed sequentially. A task is the smallest schedulable unit of a workflow, serving as an intermediate layer between the workflow and operators. An operator is an atomic execution component of a task, used to define the specific algorithms, tools, or operations implemented for the task; it is the smallest technical unit of execution logic. Data contracts are the agreed-upon specifications for data interaction, used to ensure data consistency, such as defining the format and type of input / output data. Resource constraints refer to the resource limitations during task / operator execution, specifying the upper limits and requirements of computing (e.g., CPU (Central Processing Unit), GPU (Graphics Processing Unit)), storage, and network resources that tasks / operators can use. Execution strategies are the control rules for the execution of tasks or operators, used to ensure the stability, reliability and quality of service of task or operator execution. Examples include idempotency strategies, compensation strategies, retry strategies, rate limiting strategies, and SLOs (Service Level Objectives). Among them, an SLO may include at least one SLA (Service Level Agreement).

[0033] As an example, the target language text can be obtained by combining the configurations of workflow, operators, resource constraints, execution strategies, and data contracts. Specifically, the configuration of the workflow corresponding to the business request can be obtained first, followed by the configurations of the tasks, operators, data contracts, resource constraints, and execution strategies bound to the workflow configuration. All configurations are then combined to obtain the target language text.

[0034] As an example, the configuration interface provided allows for the configuration of the workflow, operators, resource constraints, execution strategies, and data contracts. In other words, workflows, operators, resource constraints, execution strategies, and data contracts can be configured individually, enabling the reuse of configurations for different business needs in different business scenarios.

[0035] In some embodiments, commonly used workflows can be abstracted and used as templates to support the reuse of commonly used workflows. That is, the above method can also include the following steps: encapsulating the configuration of preset sub-workflows into a template file, wherein the template file is used to support the configuration of other workflows, and the template file can be stored... Figure 1 The template library for the architecture shown.

[0036] The template file here can be a file carrying constraints, which may include resource constraints, execution strategies, and data contracts. That is, the configuration of resource constraints, execution strategies, and data contracts can be embedded in the workflow configuration to form a template file carrying constraints, thereby improving configuration efficiency.

[0037] In some embodiments, the template file supports the customization of extended parameters. That is, the template file may include parameter placeholders corresponding to the extended parameters. When the template file is imported, the parameter placeholders can carry default values. At the same time, manual modification of the values ​​of the parameter placeholders is also supported. This can ensure reusability efficiency and also take into account flexibility.

[0038] In some embodiments, for tasks that take a preset amount of time, an asynchronous polling operator can be configured to implement the task. This asynchronous polling operator includes a first configuration and a second configuration. Specifically, by parsing the first configuration in the target language text, a corresponding task can be created and a task identifier returned. This task can be understood as a task in a directed acyclic graph. The created task can be placed in a queue to await scheduling for execution. After parsing the first configuration to create the task, a polling task is created based on the returned task identifier and the second configuration. This polling task is used to poll the execution status of the task (e.g., pending execution, executing, successful, or failed), and further processing is performed based on the polled execution status.

[0039] For example, taking document processing as an example, the corresponding workflow configuration is document parsing - document splitting - document storage. Document parsing is a task that takes a certain amount of time. It supports configuring asynchronous polling operators for document parsing. Parsing the first configuration of document parsing allows the creation of a task to perform document parsing. After creation, based on the task identifier returned upon successful creation and the second configuration of document parsing, a polling task is created to poll this task. Further processing is then implemented based on the execution status polled by the polling task. For example, if the execution status is "execution completed," the next task, i.e., document splitting, is triggered; or, if the execution status is "execution failed," the retry strategy bound to the operator is executed, and so on.

[0040] In step 220, a directed acyclic graph corresponding to the business request is generated based on the target language text. The directed acyclic graph includes nodes corresponding to tasks and edges between nodes, and the edges are used to describe the dependencies between tasks.

[0041] In step 230, the task in the directed acyclic graph is performed.

[0042] The generation of directed acyclic graphs and the execution of tasks in directed acyclic graphs can be referred to in the following related embodiments, which will not be elaborated here.

[0043] Figure 3 This is a timing diagram illustrating a business processing method for a large language model according to an embodiment of this disclosure. The following is in conjunction with... Figure 3 This disclosure is intended to provide explanations and clarifications.

[0044] In some embodiments, step 220 above may include the following steps: verifying the target language text to obtain a first verification result; if the first verification result indicates that the verification is passed, compiling the target language text to obtain an intermediate representation of the target language text; verifying based on the intermediate representation to obtain a second verification result; if the second verification result indicates that the verification is passed, generating a directed acyclic graph based on the intermediate representation.

[0045] As an example, the first validation result is based on performing the above Schema validation on the target language text. Schema validation includes basic format checks such as syntax, lexical analysis, and data type checks, for example, requiring a field to be either an integer or a string. If the format validation fails, the business request can be rejected directly.

[0046] In this embodiment, the intermediate representation can carry the dependencies between tasks. Therefore, in this embodiment, a Directed Acyclic Graph (DAG) can be generated based on the dependencies in the intermediate representation. The intermediate representation can also carry resource constraints and execution strategies, etc. Verification based on the intermediate representation can reduce errors during execution. The verification here can include at least one of the following: whether there are cycles in the dependencies, whether there are resource conflicts, and whether the execution strategy is compliant. It should be noted that the secondary verification (i.e., verification based on the intermediate representation) is a verification of the semantic layer not covered by the primary verification (i.e., schema verification).

[0047] In this embodiment, the intermediate representation adopts an abstract syntax and semantic model decoupled from the specific execution engine. It only describes the execution logic of tasks, the dependencies between tasks, execution strategies, and resource constraints, etc., without being bound to a specific runtime implementation. That is, the intermediate representation is a carrier of execution semantics independent of the execution engine. Therefore, it can simultaneously serve as a general representation of execution logic, dependencies between tasks, execution strategies, and resource constraints under different execution engines, to adapt to the heterogeneous execution engines in this system. For relevant explanations on adapting to heterogeneous execution engines in this system, please refer to the following related embodiments, which will not be repeated here.

[0048] Reference Figure 3 Users can initiate business requests. The parser parses the target language text corresponding to the business request to obtain an abstract structure tree, and performs schema verification using the abstract structure tree. After the schema verification passes, an intermediate representation is generated by the compiler for secondary verification. After the secondary verification passes, the scheduler generates a directed acyclic graph (DAG) corresponding to the business request based on the intermediate representation. The scheduler can read the DAG, parse the dependencies between tasks, and, based on the dependencies between tasks and the execution strategies and resource constraints of the tasks in the intermediate representation, implement the scheduling and execution of tasks in the DAG. The scheduling and execution can be referenced in the following related embodiments.

[0049] In some embodiments, step 230 may include the following steps: for each task in the directed acyclic graph, determine whether the task has resource dependencies; determine the scheduling basis for the task based on whether the task has resource dependencies, wherein the scheduling basis includes at least load; obtain the index associated with the scheduling basis, and schedule the task based on the index.

[0050] Resource dependencies here can be represented by the configuration of resource constraints in the target language text, and the intermediate representation obtained by compiling the target language text also carries the corresponding resource dependencies. Therefore, the scheduler can determine whether a task has resource dependencies based on the intermediate representation.

[0051] As an example, resource dependencies can include dependencies on local resources and / or dependencies on external services. For example, a local resource dependency may be that an operator needs to depend on resources on a specific local engine (such as CPU, GPU memory, etc.). External service dependencies may be that the execution of a task requires calling at least one of the following: a UDF (User Defined Function), a UDA (User Defined Aggregate), an HTTP (Hypertext Transfer Protocol) service, or an RPC (Remote Procedure Call).

[0052] By using the above methods, adaptive task scheduling can be achieved based on multi-dimensional scheduling criteria (i.e., load and resources).

[0053] Using the corresponding evaluator in the scheduler ( Figure 3 The load evaluator and resource evaluator shown evaluate the corresponding metrics to obtain the load and resource status, so that the scheduler can schedule tasks based on the load and / or resource status.

[0054] For example, when a task has no resource dependencies, scheduling is determined based on load, which can refer to a queue. Further, as an example, metrics associated with queues can include task priority, concurrency, tenant fairness, queue length, and throughput. Figure 4 This is a logic diagram of adaptive scheduling shown according to embodiments of the present disclosure, with reference to... Figure 4 Queue monitoring, latency monitoring, and throughput monitoring can obtain queue-related metrics. The corresponding load evaluator in the scheduler is used to evaluate the corresponding metrics to obtain the load situation. The scheduler then schedules tasks based on the load situation. For example, if a task belongs to a high-priority queue and the high-priority queue has a large load, it can preempt the resources of tasks in low-priority queues to schedule tasks in high-priority queues.

[0055] When a task has resource dependencies, the scheduling criteria include load and resources. Here, resources refer to resources in the local engine and / or downstream resources, which provide services such as UDA, UDF, HTTP services, or RPC services. For example, resource-related metrics could include the local engine's CPU, GPU, and memory usage, I / O blocking, and the achievement rate of SLOs (Service Level Objectives) in downstream resources. (Continue to refer to...) Figure 4CPU monitoring, GPU monitoring, memory monitoring, I / O monitoring, and SLO monitoring can each obtain corresponding metrics for resources. The scheduler then uses the corresponding resource evaluator to assess these metrics and determine the resource status. The scheduler then schedules tasks based on both load and resource availability. For example, even if there are high-priority tasks in the queue, if resources are insufficient (such as insufficient GPU memory), the task will need to enter a waiting state.

[0056] As can be understood, task scheduling refers to allocating resources within the execution engine to support task execution. (Continue to refer to...) Figure 3 Based on scheduling criteria, tasks in the directed acyclic graph (DAG) are distributed to utilize the resources of the execution engine to execute these tasks. Specifically, after determining the execution engine for a task, the engine can convert the intermediate representation associated with that task into native instructions that it can run, thus adapting to the heterogeneous execution engines in the system. The execution engine executes these native instructions to execute the task. Furthermore, the execution engine can feed back the task's execution status to the adapter, which then returns the task's status to the scheduler for updates, leading to decisions such as executing the next task or updating the DAG.

[0057] In some embodiments, the method may further include the following steps: during the execution of a task in a directed acyclic graph, in response to a triggering operation for the task, generating a control instruction corresponding to the triggering operation, the triggering operation being triggered during the execution of the task in the directed acyclic graph; executing the control instruction to control the execution of the directed acyclic graph.

[0058] Among them, the triggering operation can be triggered by the interaction between the target object (such as a developer or a user who submits a business request) and the system. For example, the system can provide a visual interactive control to support interaction with the target object and generate the triggering operation through this interaction. The triggering operation can also be triggered by the system based on the task execution status. For example, developers can set breakpoints inside the task, and generate the triggering operation when the conditions corresponding to the breakpoints are met during the task execution.

[0059] Continue to refer to Figure 3 The scheduler generates control instructions corresponding to the trigger operation based on the trigger operation, and passes the control instructions to the adapter. The adapter then passes the control instructions to the execution engine, which converts the control instructions into native instructions that it can execute. The execution engine then executes the control instructions.

[0060] Figure 5 This is a logic diagram illustrating the execution of a control task according to an embodiment of the present disclosure, with reference to... Figure 5The types of triggering operations can include those used to adjust task parameters, those used to interrupt (i.e.) Figure 5 The type of task execution that is paused, the type of task execution that is resumed, the type of task execution that is terminated, the type of task execution that is corrected for errors caused by task execution, and the type of task execution result that is submitted for review.

[0061] Types for adjusting task parameters allow the target object to hot-update the task parameters, and continue executing the task or its downstream tasks based on the hot-updated parameters. Types for interrupting and resuming task execution implement the pause and resumption of task execution. Types for terminating task execution can end the execution of a task early. This termination type can be triggered by the target object. Taking a request to build a knowledge base as an example, if the target object finds a file upload error, it can terminate the execution of the corresponding directed acyclic graph early to avoid wasting resources. Types for correcting errors caused by task execution can achieve early stopping (…). Figure 5 The terms "termination of execution," "rollback," and "compensation" are used to indicate the process. Early termination refers to the system proactively ending task execution after an anomaly is detected to avoid resource waste or error escalation. Rollback and compensation are used to eliminate the impact of task anomalies. The type of review result for the submitted task execution result is determined manually to decide whether to continue or terminate execution.

[0062] In some embodiments, the step of generating control instructions corresponding to a triggering operation in response to a triggering operation for a task may include: in response to a triggering operation for a task, determining a target subgraph based at least on the triggering operation and dependencies, wherein the target subgraph includes the affected subgraph and / or the subgraph obtained by updating the affected subgraph; and generating control instructions based on the target subgraph.

[0063] The dependencies here can be obtained from the DAG or from the intermediate representation. The intermediate representation includes not only task dependencies but also other information, such as resource constraints and parameters. Therefore, compared to dependency analysis based on the DAG, analysis based on the intermediate representation avoids missing implicit relationships (such as tasks sharing resources or indirect dependencies in parameter passing), thus improving the accuracy of impact assessment. Therefore, the intermediate representation should be obtained first to extract dependencies and other information, identify implicit relationships between tasks, and determine the target subgraph. It should be noted that "other information" here refers to information in the intermediate representation other than dependencies, such as the resource constraints and parameter passing links mentioned above.

[0064] The target subgraph here can include affected subgraphs. The affected subgraph refers to the link affected by the task's triggering operation. For example, if the triggering operation is to modify task C, and the determined affected subgraph is "A→B→C→D", then the minimum rollback point is determined to be A, and "A→B→C→D" is rerun. There is no need to rerun other unaffected tasks, such as task E which runs parallel to "A→B→C→D". The historical execution results of task E can be directly reused, saving the computing power and time consumed by task execution.

[0065] The target subgraph here can include the subgraph obtained by updating the affected subgraph, which refers to the modified subgraph determined based on the task's triggering operation. Continuing the example above, if the triggering operation is to modify the downstream task of task C and determine a new path "A→B→C→F", then "A→B→C→F" can be executed.

[0066] The target subgraph here can include both the subgraph obtained by updating the affected subgraph and the affected subgraph itself. Continuing with the example above, "A→B→C→D" and "A→B→C→F" can be launched simultaneously, executed in parallel, and key metrics compared in real time. This helps developers quickly determine whether the modifications meet expectations and avoids requiring them to assess the risks of replacing the original process. As an example, key metrics here can include any one of the following: execution time, output consistency, resource usage conflicts, and compliance verification results.

[0067] In some embodiments, the configuration of the data contract can be embedded in the task execution flow through an intermediate representation. Before the task is executed, the input data is checked to see if it conforms to the contract. After the task is executed, the output data is checked to see if it conforms to the contract. If it does not conform, processing such as early stop and rollback as described above is triggered.

[0068] As can be seen from the above, in a directed acyclic graph, at least one task is dispatched by the scheduler to the corresponding execution engine. The scheduler communicates with different execution engines through a unified interface. The execution engine is used to convert the intermediate representation of the task passed by the scheduler through the unified interface into native instructions that can be executed by the execution engine, and then runs the native instructions to achieve the execution of the task.

[0069] The unified interface here defines the communication protocol between the scheduler and different execution engines. Figure 6 This is a schematic diagram illustrating a unified interface according to embodiments of this disclosure. (Refer to...) Figure 6The unified interface can include an executor interface, a state management interface, an event handling interface, and a metric collection interface. The executor interface allows the scheduler to pass intermediate representations of tasks to the execution engine, enabling the execution engine to convert these intermediate representations into native instructions that can be executed by the executors within the engine. The state management interface passes the execution status (e.g., running, successful, failed, and retrying) of tasks managed by the state manager in the execution engine to the scheduler. The event handling interface allows the event handlers in the execution engine to pass events detected during task execution to the scheduler, enabling the scheduler to make decisions based on the reported events. The metric collection interface allows the metric monitors in the execution engine to pass collected metrics to the scheduler, such as resource usage metrics (e.g., CPU usage), performance metrics (e.g., throughput), and business metrics (e.g., computational accuracy).

[0070] As can be seen from the above, the intermediate representation serves as a carrier of semantic consistency across different execution engines. This enables different execution engines to achieve semantic alignment when converting the intermediate representation into executable native instructions, ensuring the consistency of high-level semantics (such as execution strategies) across heterogeneous execution engines.

[0071] In some embodiments, debugging functions are used to locate faults during task execution in a directed acyclic graph. As an example, at least one of the following debugging functions is provided: The single-step execution function is used to support the automatic pause of the next task after the completion of one task. This allows developers to manually control the execution rhythm of tasks in the directed acyclic graph, executing only one task at a time, pausing after execution, and then executing the next task only after the developers have confirmed that there are no errors. This makes it easier to pinpoint faulty task nodes. The variable viewing function allows developers to check whether the task's variables meet the requirements in real time when executing a task step by step. Variables can include the task's input parameters, intermediate variables, and output results.

[0072] The stack trace viewing feature is used to characterize the task's call stack (execution chain), task variables (such as input parameters, intermediate variables, and output results), task state, events, and environmental information (such as model version, resource usage, and configuration parameters). By reconstructing who called it, what data was input, and the environment at the time through stack traces, it covers multiple levels of information such as task, data, engine, and environment, which is helpful for analyzing the root cause of task anomalies.

[0073] Based on the same concept, Figure 7 This is a block diagram illustrating a business processing apparatus for a large language model according to an embodiment of this disclosure, with reference to... Figure 7 The business processing device 700 for large language models includes: The acquisition module 701 is used to acquire the target language text corresponding to the business request in response to receiving the business request. The target language text is used to describe the business configuration of the business corresponding to the business request. The target language text is text based on a domain-specific language. The business configuration includes the configuration of the workflow, the configuration of the operators that implement the tasks in the workflow, the configuration of resource constraints, the configuration of the execution strategy, and the configuration of the data contract. The first generation module 702 is used to generate a directed acyclic graph corresponding to the business request based on the target language text, wherein the directed acyclic graph includes nodes corresponding to the task and edges between the nodes, and the edges are used to describe the dependencies between the tasks. The first execution module 703 is used to execute the tasks in the directed acyclic graph.

[0074] Optionally, the first generation module 702 includes: The first verification module is used to verify the target language text and obtain a first verification result; The compilation module is used to compile the target language text to obtain an intermediate representation of the target language text if the first verification result indicates that the verification has passed. The second verification module is used to perform verification based on the intermediate representation to obtain a second verification result; A generation submodule is used to generate a directed acyclic graph based on the intermediate representation if the second verification result characterization verification passes.

[0075] Optionally, the first execution module 703 includes: The first determining submodule is used to determine whether there is a resource dependency for each task in the directed acyclic graph; The second determining submodule is used to determine the scheduling basis of the task based on whether the task has resource dependencies, wherein the scheduling basis includes at least load; The scheduling submodule is used to obtain the indicators associated with the scheduling basis and schedule the task based on the indicators.

[0076] Optionally, the business processing apparatus 700 for large language models further includes: The second generation module is used to generate control instructions corresponding to a triggering operation in response to a triggering operation for the task during the execution of the task in the directed acyclic graph. The triggering operation is triggered during the execution of the task. The second execution module is used to execute the control instructions to control the execution of the directed acyclic graph.

[0077] Optionally, the second generation module is further configured to: In response to a triggering operation for a task, a target subgraph is determined based at least on the triggering operation and the dependencies, wherein the target subgraph includes the affected subgraph and / or the subgraph obtained by updating the affected subgraph; Based on the target subgraph, control commands are generated.

[0078] Optionally, the tasks in the directed acyclic graph are distributed by the scheduler to the corresponding execution engines. The scheduler communicates with different execution engines through a unified interface. The execution engines are used to convert the intermediate representation of the task corresponding to the task transmitted by the scheduler through the unified interface into native instructions that can be executed by the execution engine, and run the native instructions to realize the execution of the task.

[0079] Optionally, the business processing apparatus 700 for large language models further includes: An encapsulation module is used to encapsulate the configuration of a preset sub-workflow into a template file, wherein the template file is used to support the configuration of other workflows.

[0080] Optionally, at least one of the following debugging functions is provided, wherein the at least one debugging function is used to locate faults in the task execution process of the directed acyclic graph: The single-step execution function is used to support automatically pausing the execution of the next task after completing one task; Functionality for viewing task variables; The ability to view stack snapshots.

[0081] The implementation of the above-mentioned business processing device 700 for large language models can refer to the relevant embodiments of the above method, and will not be described in detail here.

[0082] Based on the same concept, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-described business processing method.

[0083] Based on the same concept, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described business processing method.

[0084] Based on the same concept, embodiments of this disclosure provide an electronic device, including: A storage device on which computer programs are stored; A processing device is configured to execute the computer program in the storage device to implement the steps of the above-described business processing method.

[0085] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. (Refer to the following...) Figure 8 This diagram illustrates a structural schematic of an electronic device 800 suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0086] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0087] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0088] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.

[0089] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0090] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0091] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0092] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following actions: In response to receiving a business request, it acquires target language text corresponding to the business request, wherein the target language text describes the business configuration of the business corresponding to the business request, the target language text is text based on a domain-specific language, and the business configuration includes workflow configuration, operator configuration for implementing tasks in the workflow, resource constraint configuration, execution strategy configuration, and data contract configuration; Based on the target language text, it generates a directed acyclic graph corresponding to the business request, wherein the directed acyclic graph includes nodes corresponding to the tasks and edges between the nodes, the edges describing the dependencies between the tasks; and executes the tasks in the directed acyclic graph.

[0093] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0095] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the module itself; for example, an acquisition module can also be described as "a module that, in response to receiving a business request, acquires the target language text corresponding to the business request."

[0096] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0097] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0098] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0099] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0100] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.

Claims

1. A method for processing a business by a large language model, the method comprising: The method comprises: in response to receiving a service request, obtaining target language text corresponding to the service request, wherein the target language text is used to describe the service configuration of the service corresponding to the service request, the target language text is a text based on a domain-specific language, and the service configuration comprises the configuration of a workflow, the configuration of an operator for implementing a task in the workflow, the configuration of a resource constraint, the configuration of an execution strategy, and the configuration of a data contract; based on the target language text, generating a directed acyclic graph corresponding to the service request, wherein the directed acyclic graph comprises nodes corresponding to the tasks and edges between the nodes, and the edges are used to describe the dependency relationship between the tasks; executing the tasks in the directed acyclic graph.

2. The service processing method according to claim 1, characterized by, The method further comprises: verifying the target language text to obtain a first verification result; in a case where the first verification result indicates that the verification is passed, compiling the target language text to obtain an intermediate representation of the target language text; verifying based on the intermediate representation to obtain a second verification result; in a case where the second verification result indicates that the verification is passed, generating a directed acyclic graph based on the intermediate representation.

3. The service processing method according to claim 1, characterized by, The method further comprises: for each task in the directed acyclic graph, determining whether the task has a resource dependency; determining a scheduling basis for the task according to whether the task has a resource dependency, wherein the scheduling basis at least comprises a load; obtaining an index associated with the scheduling basis, and scheduling the task based on the index.

4. The service processing method according to claim 1, characterized by, The method further comprises: in the process of executing the tasks in the directed acyclic graph, in response to a trigger operation for the task, generating a control instruction corresponding to the trigger operation, wherein the trigger operation is triggered in the process of executing the task; executing the control instruction to control the execution of the directed acyclic graph.

5. The service processing method according to claim 4, characterized by, The method further comprises: in response to the trigger operation for the task, determining a target subgraph based on at least the trigger operation and the dependency relationship, wherein the target subgraph comprises an affected subgraph and / or a subgraph obtained by updating the affected subgraph; generating a control instruction based on the target subgraph.

6. The service processing method of claim 1, wherein, The tasks in the directed acyclic graph are distributed to corresponding execution engines by a scheduler, the scheduler communicates with different execution engines through a unified interface, the execution engine is used to convert an intermediate representation corresponding to the task transmitted by the scheduler through the unified interface into native instructions executable by the execution engine, and the native instructions are run to implement the execution of the task.

7. The service processing method of claim 1, wherein, The method further comprises: encapsulating the configuration of a preset sub-workflow as a template file, wherein the template file is used to support the configuration of other workflows.

8. The service processing method of claim 1, wherein, at least one debugging function is provided, and the at least one debugging function is used to locate a fault in the execution process of the tasks in the directed acyclic graph. A single-step execution function for supporting automatic suspension of execution of a next task after a task is executed; A task variable viewing function; A stack snapshot viewing function. 9.A service processing apparatus for a large language model, characterized by comprising: Comprise: An acquisition module, configured to acquire a target language text corresponding to a service request in response to receiving the service request, wherein the target language text is used to describe a service configuration of a service corresponding to the service request, the target language text is a text based on a domain specific language, and the service configuration comprises a configuration of a workflow, a configuration of an operator for implementing a task in the workflow, a configuration of a resource constraint, a configuration of an execution strategy, and a configuration of a data contract; A first generation module, configured to generate a directed acyclic graph corresponding to the service request based on the target language text, wherein the directed acyclic graph comprises nodes corresponding to the tasks and edges between the nodes, and the edges are used to describe a dependency relationship between the tasks; A first execution module, configured to execute the tasks in the directed acyclic graph.

10. A computer readable medium having stored thereon a computer program, characterized in that, The computer program is executed by a processing device to implement the steps of the service processing method in any one of claims 1-8.

11. An electronic device, comprising: Comprise: A storage device having a computer program stored thereon; A processing device configured to execute the computer program in the storage device to implement the steps of the service processing method in any one of claims 1-8.

12. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the service processing method in any one of claims 1-8.

Citation Information

Patent Citations

  • Business text generation method and device, electronic equipment and readable storage medium

    CN117473047A

  • Task process repairing method and device, equipment, medium and product

    CN120086054A