A medical task automation workflow generation method and system

CN122314307BActive Publication Date: 2026-08-21BEIJING HUIMEI CLOUD TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610676887.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-08-21
Estimated Expiration
2046-05-18

AI Technical Summary

Technical Problem

[0006]基于此,有必要针对上述技术问题,提供一种医疗任务自动化工作流生成方法及系统,医生仅需输入任务描述并对生成结果进行审核确认,无需具备人工智能系统配置专业知识,即可快速创建高质量的工作流,有效解决了医疗任务种类繁多、人工定义效率低下的问题,便于规模化推广应用

Benefits of technology

[0018]The aforementioned automated workflow generation method and system for medical tasks transforms the complex traditional task of manually defining prompts, toolsets, and execution processes into a semi-automated generation process based on natural language task descriptions through an automated process from task analysis, demonstration execution, user review, to workflow compilation. Doctors only need to input the task description and review and confirm the generated results, without needing professional knowledge of configuring artificial intelligence systems, to quickly create high-quality workflows. This effectively solves the problems of the wide variety of medical tasks and the low efficiency of manual definition, facilitating large-scale promotion and application. By combining the intelligent reasoning capabilities of a large language model with deterministic workflow execution, process documents are generated and compiled into workflow definitions containing predefined nodes. The originally black-box real-time reasoning process is solidified into a clearly structured and step-by-step executable process. The logic, data sources, and output results of each decision are traceable, meeting the stringent requirements of interpretability, traceability, and auditability in medical scenarios, and facilitating regulatory approvals for medical device software, etc. By compiling the process documents generated during the demonstration into a fixed workflow definition, the inconsistency in execution paths and results caused by the randomness of general-purpose large language model agents is effectively avoided. For the same medical task, the fixed workflow will run stably according to the predefined node sequence and execution logic, ensuring consistent evaluation results for the same patient data and significantly improving the reliability of clinical decisions. The generated structured workflow definition is not only used for the deterministic execution of the current task, but its standardized node division and clear execution logic also provide a clear data foundation and operation entry point for subsequent collection of user feedback, identification and optimization of nodes, and adjustment of execution strategies, facilitating continuous iterative optimization of the workflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122314307B_ABST
    Figure CN122314307B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of medical informatization, in particular to a medical task automation workflow generation method and system, wherein the method comprises the following steps: receiving a medical task description input by a user, generating a task analysis plan containing an execution step plan based on a large language model; performing a simulation demonstration according to the task analysis plan, and recording the execution information of each step in real time to generate a structured process document; submitting the process document to the user for review and receiving feedback information from the user on the process document; and compiling and generating an executable workflow definition containing multiple predefined execution nodes based on the process document and the user feedback information. Doctors only need to input the task description and review and confirm the generated result, without the need for professional knowledge of artificial intelligence system configuration, so as to quickly create a high-quality workflow and effectively solve the problems of a large variety of medical tasks and low efficiency of manual definition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information technology, and in particular to a method and system for generating automated workflows for medical tasks. Background Technology

[0002] With the deepening application of artificial intelligence technology in the medical field, using large language models to assist doctors in completing tasks such as clinical decision-making, medical record writing, and risk assessment has become a research hotspot.

[0003] However, existing technical solutions have the following problems when handling medical tasks: When the solution involves manually defining the intelligent agent, doctors or technicians need to manually define the agent's prompts, toolsets, and workflows for each medical task. Given the wide variety of medical tasks, including rating scale calculations, diagnostic reasoning, and medication regimen development, manually defining each one is extremely inefficient. Furthermore, doctors typically lack the expertise to configure AI systems, resulting in inconsistent definition quality and hindering large-scale deployment.

[0004] When the solution is a general-purpose intelligent agent real-time reasoning scheme, a single general-purpose intelligent agent is used, with a large language model making real-time reasoning decisions at each step. While this offers high flexibility, it has significant drawbacks: due to the randomness of the large language model, the same task may produce different paths and results each time it is executed, lacking reproducibility; the execution process is a black box, making it impossible for doctors and regulatory authorities to audit the basis of each decision, which is difficult to meet the stringent requirements of interpretability and auditability in medical scenarios; each execution requires extensive calls to the large language model for reasoning, resulting in high computational costs, large response delays, and difficulty in passing regulatory approvals for medical device software.

[0005] When the solution is a predefined workflow template solution, a large number of workflow templates are pre-built, and doctors complete the task definition by selecting a template and configuring parameters. Although the determinism of execution is relatively good, template construction requires a large upfront investment and is difficult to cover all long-tail needs in medical scenarios, lacking the ability to quickly adapt to new tasks. Summary of the Invention

[0006] Therefore, it is necessary to provide a method and system for generating automated workflows for medical tasks to address the aforementioned technical issues. Doctors only need to input the task description and review and confirm the generated results. They do not need to have professional knowledge of configuring artificial intelligence systems to quickly create high-quality workflows. This effectively solves the problems of the wide variety of medical tasks and the low efficiency of manual definition, and facilitates large-scale promotion and application.

[0007] This invention provides a method for generating automated workflows for medical tasks, the method comprising: Receive a medical task description input by the user and generate a task analysis plan that includes execution step planning based on a large language model; The task analysis plan is simulated and executed, and the execution information of each step is recorded in real time to generate a structured process document. The process document is submitted to the user for review, and feedback information from the user regarding the process document is received. Based on the process documentation and user feedback, an executable workflow definition containing multiple predefined execution nodes is compiled and generated.

[0008] In one embodiment, receiving a medical task description input by the user and generating a task analysis plan containing execution step planning based on a large language model includes: The medical task description is input into a large language model and combined with a medical knowledge base for semantic understanding and analysis. Generate a task analysis plan that includes task objective analysis, execution step planning, and identification of required tools; The task analysis plan will be submitted to the user for confirmation.

[0009] In one embodiment, the step of simulating execution according to the task analysis plan and recording the execution information of each step in real time to generate a structured process document includes: The large language model is driven to perform a simulation demonstration according to the confirmed task analysis plan; Record the step objectives, input data, execution logic, and output results of each step in real time; The recorded information is aggregated to generate a structured process document, which serves as an intermediate representation connecting intelligent reasoning and deterministic workflow.

[0010] In one embodiment, submitting the process document to the user for review and receiving user feedback on the process document includes: Submit the generated process documentation to the user for review; It can receive user confirmation of execution steps, adjustment of execution order, correction of data sources, or customized suggestions for specific scenarios.

[0011] In one embodiment, the step of compiling and generating an executable workflow definition containing multiple predefined execution nodes based on the process document and user feedback information includes: The process documents and user feedback are compiled into an executable workflow definition using a large language model, which includes deterministic decision nodes, large language model dialogue nodes, large language model inference nodes, and tool call nodes. Automated verification of step completeness, data dependencies, and branch coverage is performed on the generated workflow definitions.

[0012] In one embodiment, the method further includes: The generated workflow definition is connected to real patient data, and the workflow execution engine executes it sequentially according to the node definition. A complete execution log is generated during the execution process, recording the input, output, execution time, and decision basis for each node.

[0013] In one embodiment, the method further includes: Collect user feedback on workflow execution results, including confirmation or correction of the results; Utilize large language models to analyze feedback data, identify nodes that need optimization, and determine the optimization type, including adjusting the priority of data collection items, modifying inference node prompts, updating decision node rules, or adding or deleting workflow nodes; The optimized workflow version will take effect after user confirmation, and a record of version changes will be kept.

[0014] The present invention also provides a medical task automated workflow generation system, applied to the medical task automated workflow generation method described in any of the above embodiments, the system comprising: The task analysis module receives medical task descriptions input by the user and generates a task analysis plan that includes execution step planning based on a large language model. The demonstration execution module is used to simulate the execution of the task analysis plan, record the execution information of each step in real time, and generate a structured process document. The review and feedback module is used to submit the process document to the user for review and to receive feedback information from the user regarding the process document. The workflow compilation module is used to compile and generate an executable workflow definition containing multiple predefined execution nodes based on the process document and user feedback information.

[0015] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the medical task automation workflow generation method as described above.

[0016] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the medical task automation workflow generation method as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the medical task automation workflow generation method as described above.

[0018] The aforementioned automated workflow generation method and system for medical tasks transforms the complex traditional task of manually defining prompts, toolsets, and execution processes into a semi-automated generation process based on natural language task descriptions through an automated process from task analysis, demonstration execution, user review, to workflow compilation. Doctors only need to input the task description and review and confirm the generated results, without needing professional knowledge of configuring artificial intelligence systems, to quickly create high-quality workflows. This effectively solves the problems of the wide variety of medical tasks and the low efficiency of manual definition, facilitating large-scale promotion and application. By combining the intelligent reasoning capabilities of a large language model with deterministic workflow execution, process documents are generated and compiled into workflow definitions containing predefined nodes. The originally black-box real-time reasoning process is solidified into a clearly structured and step-by-step executable process. The logic, data sources, and output results of each decision are traceable, meeting the stringent requirements of interpretability, traceability, and auditability in medical scenarios, and facilitating regulatory approvals for medical device software, etc. By compiling the process documents generated during the demonstration into a fixed workflow definition, the inconsistency in execution paths and results caused by the randomness of general-purpose large language model agents is effectively avoided. For the same medical task, the fixed workflow will run stably according to the predefined node sequence and execution logic, ensuring consistent evaluation results for the same patient data and significantly improving the reliability of clinical decisions. The generated structured workflow definition is not only used for the deterministic execution of the current task, but its standardized node division and clear execution logic also provide a clear data foundation and operation entry point for subsequent collection of user feedback, identification and optimization of nodes, and adjustment of execution strategies, facilitating continuous iterative optimization of the workflow. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 Flowchart of the method for generating automated workflows for medical tasks provided by the present invention; Figure 2 A block diagram of a medical task automated workflow generation system provided by the present invention; Figure 3 An internal structural diagram of the computer device provided by the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] The following is combined Figures 1 to 3 This invention describes a method and system for generating automated workflows for medical tasks.

[0023] In one embodiment, a method for generating automated workflows for medical tasks includes the following steps: Step S100: Receive the medical task description input by the user and generate a task analysis plan containing execution step planning based on the large language model.

[0024] Step S200: Perform a simulated demonstration execution according to the task analysis plan, record the execution information of each step in real time, and generate a structured process document.

[0025] Step S300: Submit the process document to the user for review and receive feedback from the user regarding the process document.

[0026] Step S400: Based on the process document and user feedback information, compile and generate an executable workflow definition containing multiple predefined execution nodes.

[0027] The aforementioned automated workflow generation method for medical tasks transforms the complex process of manually defining prompts, toolsets, and execution procedures—traditionally requiring manual definition—into a semi-automated generation process based on natural language task descriptions. This process, encompassing task analysis, demonstration execution, user review, and workflow compilation, automates the workflow process. Doctors only need to input the task description and review the generated results; no specialized knowledge of configuring AI systems is required to quickly create high-quality workflows. This effectively solves the problems of diverse medical tasks and low efficiency in manual definition, facilitating large-scale application. By combining the intelligent reasoning capabilities of a large language model with deterministic workflow execution, process documents are generated and compiled into workflow definitions containing predefined nodes. This solidifies the originally black-box real-time reasoning process into a clearly structured, step-by-step executable workflow. The logic, data sources, and output results of each decision are traceable, meeting the stringent requirements of interpretability, traceability, and auditability in medical scenarios, and aiding in regulatory approvals for medical device software, etc. By compiling the process documents generated during the demonstration into a fixed workflow definition, the inconsistency in execution paths and results caused by the randomness of general-purpose large language model agents is effectively avoided. For the same medical task, the fixed workflow will run stably according to the predefined node sequence and execution logic, ensuring consistent evaluation results for the same patient data and significantly improving the reliability of clinical decisions. The generated structured workflow definition is not only used for the deterministic execution of the current task, but its standardized node division and clear execution logic also provide a clear data foundation and operation entry point for subsequent collection of user feedback, identification and optimization of nodes, and adjustment of execution strategies, facilitating continuous iterative optimization of the workflow.

[0028] In one embodiment, receiving a medical task description input by the user and generating a task analysis plan containing execution step planning based on a large language model includes the following steps: Step S110: Input the medical task description into the large language model and perform semantic understanding and analysis in conjunction with the medical knowledge base.

[0029] Specifically, the system receives input from doctors or clinical researchers.

[0030] Suppose a user (such as an ICU attending physician) enters a medical task description on the system interface: "For newly admitted ICU patients suspected of infection, automatically complete the sepsis-related risk assessment, provide initial antibiotic medication recommendations based on the assessment results, and record each item of the SOFA score (Sequential Organ Failure Score). The system inputs this natural language description into a large language model (e.g., GPT-4 or a custom model fine-tuned based on medical corpora). Simultaneously, the system connects to and retrieves a local "medical knowledge base," which contains the latest guidelines for the Campaign to Save Sepsis, authoritative pharmacopoeias, disease diagnostic criteria (such as ICD-10), and definitions and calculation methods for rating scales (such as SOFA and qSOFA).

[0031] Step S120: Generate a task analysis plan that includes task objective analysis, execution step planning, and identification of required tools.

[0032] Specifically, the large language model, combined with a medical knowledge base, generates the following structured task analysis plan (using JSON format as an example): { "Task Objective Analysis": { "Main Task": "Sepsis Risk Assessment" Subtasks: ["Calculate SOFA score", "Calculate qSOFA score", "Assess source of infection"], "Related Task": "Provide antibiotic use recommendations based on risk assessment results" }, “Execution Step Planning”: [ "Step 1: Obtain the patient's latest vital signs and laboratory test results from the electronic medical record (e.g., respiratory rate, Glasgow Coma Scale score, platelet count, bilirubin, creatinine, blood pressure, and vasoactive drug use)." Step 2: Based on the acquired data, calculate the SOFA score for each of the six sub-items: respiratory, coagulation, liver, cardiovascular, nervous system, and kidney, and then summarize the total score. Step 3: Determine if the SOFA score is ≥2 to assess whether the patient has sepsis. Step 4: If sepsis is diagnosed, based on the patient's renal function, allergy history, and antibiotic usage guidelines, generate initial antibiotic recommendations. Step 5: Integrate all assessment results and recommendations into a structured report and store it in the medical record system. ], “Required Tools Identification”: [ Tool 1: Electronic Medical Record (EMR) Data Query Interface (for retrieving patient data) Tool 2: SOFA Scoring Calculator (can call external functions or built-in model logic) Tool 3: Antibiotic Knowledge Base Query Interface (for obtaining medication advice) Tool 4: Structured Report Generator ] } Step S130: Submit the task analysis plan to the user for confirmation.

[0033] Specifically, the system will display the JSON plan generated in the previous step to the user in a user-friendly interface (such as a flowchart or list).

[0034] The user (doctor) reviews the plan and may suggest modifications, such as: "Before calculating the SOFA score, it is necessary to confirm whether the patient is over 18 years old." After the user confirms that everything is correct, they click "Confirm," and the system proceeds to the next stage.

[0035] In one embodiment, the step of simulating execution according to the task analysis plan, recording execution information of each step in real time, and generating a structured process document includes the following steps: Step S210: Drive the large language model to perform a simulation demonstration according to the confirmed task analysis plan.

[0036] Specifically, the system starts a "simulated execution" sandbox environment.

[0037] Based on the plan generated in step S120, it drives the large language model to perform inference step by step. For example, for "Step 1", the model will simulate sending a request to the "electronic medical record data query interface" and generate a simulated patient data (such as: "Patient A: respiratory rate 25 breaths / min, Glasgow score 13, platelet count 80x10^9 / L...") for demonstration of subsequent steps.

[0038] Step S220: Record the step objective, input data, execution logic and output results of each step in real time.

[0039] Specifically, during the simulation, the system acts like a "black box recorder," meticulously recording each step. For example, it records the execution information for step 2: Step objective: Calculate the SOFA total score.

[0040] Input data: {"Respiratory rate": 25, "PaO2 / FiO2": 200 (simulated value), "Platelet count": 80, "Bilirubin": 2.1, "Mean arterial pressure": 65, "Dopamine dose": 5, "Glasgow score": 13, "Cretin": 1.5}.

[0041] Execution logic: Call the "SOFA Scoring Calculator" tool. Based on the input, the respiratory system gets 2 points, the coagulation system gets 2 points, and so on, calculating accordingly.

[0042] Output: {"SOFA Total Score": 8, "Sub-item Details": {"Respiratory": 2, "Coagulation": 2, "Liver": 1, "Cardiovascular": 2, "Nervous": 1, "Kidney": 1}}.

[0043] Step S230: Summarize the recorded information to generate a structured process document, which serves as an intermediate representation connecting intelligent reasoning and deterministic workflow.

[0044] Specifically, the system summarizes the recorded information from all steps to generate a detailed, structured process document. This document not only contains the final result, but more importantly, it includes the entire path and intermediate data on "how to obtain this result".

[0045] This document is human-readable and machine-parseable, in formats such as Markdown or HTML. It clearly demonstrates all the atomic operations and data flows required to complete the task.

[0046] In one embodiment, submitting the process document to the user for review and receiving user feedback on the process document includes the following steps: Step S310: Submit the generated process document to the user for review.

[0047] Specifically, the system presents the generated sepsis risk assessment process document to the user. The user can see that the system uses "dopamine dose" as the basis for calculating the cardiovascular score in the "Calculate SOFA Score" step.

[0048] Step S320: Receive user confirmation of execution steps, adjustment of execution order, correction of data source, or customized suggestions for specific scenarios.

[0049] Specifically, after reviewing the feedback, the doctor stated: "In actual clinical practice, when calculating the cardiovascular SOFA score, if a patient is using both dopamine and norepinephrine, the higher score should be used. Please correct the data source logic to retrieve both drugs from the medication records simultaneously." This user feedback was received by the system and used as important correction information for subsequent compilation.

[0050] In one embodiment, the step of compiling and generating an executable workflow definition containing multiple predefined execution nodes based on the process document and user feedback information includes the following steps: Step S410: Use the large language model to compile the process documents and user feedback into an executable workflow definition, which includes deterministic decision nodes, large language model dialogue nodes, large language model inference nodes, and tool call nodes.

[0051] It should be noted that, based on the process document and the user feedback information, the system uses a large language model to compile the process document into a structured executable workflow definition; the workflow definition contains multiple execution nodes, each of which has a predefined node type, input / output specifications, execution logic, and flow conditions.

[0052] The workflow definition includes the following four node types: (a) Deterministic decision nodes: Branch judgments are made based on preset rules and threshold conditions. The execution process is completely deterministic and does not rely on large language model reasoning. It is suitable for medical judgments with clear standards, such as scoring and grading, and indicator threshold judgments. (b) Large Language Model Dialogue Node: A natural language interaction node driven by a large language model, used in stages where information needs to be collected from patients or doctors; it has a preset list of questions, information extraction rules and dialogue strategies; (c) Large Language Model Inference Node: The medical inference node executed by the large language model is configured with input constraints and output guardrail rules, which are used in the process of making a judgment based on multiple factors, such as medication regimen recommendation and differential diagnosis; the guardrail rules include safety constraints such as drug contraindication checks and dosage range verification. (d) Tool call node: A node that performs deterministic operations by calling external system interfaces, including but not limited to electronic medical record system query, laboratory system data acquisition, and prescription system interaction.

[0053] Specifically, the system will resubmit the process document generated in step S230 and the user feedback from step S320 to the large language model for "compilation".

[0054] The model transforms this information into a standardized, machine-executable DAG (Directed Acyclic Graph) workflow definition, such as based on YAML or JSON format.

[0055] Workflow definition fragment example: nodes: - id: 1 type: "Tool Invocation Node" #Tool Invocation Node Name: "Obtaining Patient Vital Signs" action: “api.emr.get_vitals” next: [2] - id: 2 type: "Tool Invocation Node" name: "Retrieve Patient Medication Records" action: “api.emr.get_medication” next: [3] - id: 3 type: “Deterministic Decision Node” #Deterministic Decision Node Name: "Assessing Cardiovascular Drug Use" rule: "input.medication.contains('dopamine') OR input.medication.contains('norepinephrine')" branches: “TRUE”: “node_4” “FALSE”: “node_5” - id: 4 type: "Large Language Model Inference Node" #Large Language Model Inference Node Name: “Calculation of SOFA Cardiovascular Score (Complex Cases)” Prompt: "Calculate the cardiovascular SOFA score based on the patient's vasoactive medications {medication_list}, according to the rules..." guardrails: “Rating range 0-4” next: [6] - id: 5 type: "Deterministic decision node" Name: “Calculation of SOFA Cardiovascular Score (Simplified Case)” rule: “calculate_by_map(input.map)” next: [6] - id: 6 type: "Large Language Model Inference Node" name: "Generate antibiotic usage recommendations" The prompt reads: "Based on the patient's renal function (eGFR), allergy history, and suspected source of infection, an initial antibiotic regimen is recommended." guardrails: "Check for drug contraindications; dosage should not exceed {max_dose}". # ... Other nodes Step S420: Automated verification of step completeness, data dependencies, and branch coverage of the generated workflow definition.

[0056] Specifically, the workflow compilation module automatically checks the generated definition. It verifies: whether all node inputs are provided by upstream nodes (data dependency verification); whether each decision node covers all possible outputs (branch coverage verification, e.g., both "yes" and "no" branches point to the same node); and whether the workflow has a clear start and end point (step integrity verification). Once verification is successful, the workflow definition can be officially published.

[0057] In one embodiment, the method for generating automated workflows for medical tasks further includes the following steps: Step S510: Connect the generated workflow definition with the real patient data, and execute it sequentially by the workflow execution engine according to the node definition.

[0058] Specifically, when the system needs to process a real newly admitted ICU patient, "Patient B", the workflow execution engine loads the published workflow definition and starts executing node 1 (obtaining Patient B's real vital signs).

[0059] Step S520: Generate a complete execution log during the execution process, recording the input, output, execution time, and decision basis of each node.

[0060] Specifically, the execution engine records detailed logs for each step.

[0061] For example, when executing the "Large Language Model Inference Node" (generating antibiotic suggestions), the log records the input kidney function, allergy history, the specific suggestions output by the large language model, the prompt word fragments on which the suggestions were generated, and even the model's keyword attention weights (if available).

[0062] In one embodiment, the method for generating automated workflows for medical tasks further includes the following steps: Step S610: Collect user feedback on the workflow execution results, including confirmation or correction of the execution results.

[0063] Specifically, for "Patient B", the medication recommendation generated by the workflow is "Ceftriaxone 2g / day".

[0064] After reviewing the medication, the attending physician recommended "piperacillin-tazobactam" based on the latest departmental drug sensitivity data. The doctor directly clicked "correct" in the system, changing the recommendation to "piperacillin-tazobactam 4.5g q8h" and submitted it. This "correction" was recorded as negative feedback by the system.

[0065] Step S620: Analyze the feedback data using a large language model, identify nodes that need optimization and determine the optimization type, including adjusting the priority of collection items, modifying the prompt words of inference nodes, updating the rules of decision nodes, or adding or deleting workflow nodes.

[0066] Specifically, the system periodically analyzes all collected feedback from doctors for corrections.

[0067] After analyzing the multiple revisions to the "antibiotic use recommendations" section, the large language model identified that: "The original prompts did not include the key information of 'the latest departmental bacterial resistance data,' which led to a discrepancy between the recommendations and clinical practice." The system (or after manual confirmation) determines the optimization type as "modify inference node prompt words". It automatically adds a command to the prompt word template of the original "generate antibiotic medication recommendations" node: "Please recommend antibiotics based on the pathogen distribution data of community-acquired pneumonia in this quarter's 'In-Hospital Bacterial Resistance Surveillance Report'". Step S630: Submit the optimized workflow version to the user for confirmation and it will take effect. Keep a record of the version change.

[0068] Specifically, the system generates a new version of the workflow (V2.0), highlights the modified parts, and resubmits it to the medical affairs department or expert group for review and confirmation. Once confirmed, version V2.0 becomes effective. At the same time, the system retains complete records of version V1.0, including its definition, execution logs, and analysis reports explaining why the upgrade to V2.0 was made, ensuring that the entire workflow evolution process is clear and traceable.

[0069] The automated workflow generation system for medical tasks provided by this invention is described below. The automated workflow generation system for medical tasks described below can be referred to in correspondence with the automated workflow generation method for medical tasks described above.

[0070] In one embodiment, a medical task automated workflow generation system, applied to the medical task automated workflow generation method described in any of the above embodiments, includes a task analysis module, a demonstration execution module, an audit feedback module, and a workflow compilation module.

[0071] The task analysis module receives a description of a medical task from the user and generates a task analysis plan that includes execution steps based on a large language model.

[0072] The demonstration execution module is used to simulate and execute the task analysis plan, record the execution information of each step in real time, and generate a structured process document.

[0073] The review and feedback module is used to submit the process document to the user for review and to receive feedback information from the user regarding the process document.

[0074] The workflow compilation module is used to compile and generate an executable workflow definition containing multiple predefined execution nodes based on the process document and user feedback information.

[0075] Figure 3 This example illustrates a schematic diagram of the physical structure of an electronic device, which can be a smart terminal. Its internal structure diagram can be as follows: Figure 3 As shown, this electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for generating automated workflows for medical tasks.

[0076] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device to which the present invention is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0077] On the other hand, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements a method for generating automated workflows for medical tasks.

[0078] In another aspect, a computer program product or computer program is provided, which includes computer instructions stored in a computer storage medium. A processor of an electronic device reads the computer instructions from the computer storage medium, and when the processor executes the computer instructions, it implements a method for generating automated workflows for medical tasks.

[0079] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.

[0080] By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0081] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0082] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A method for generating an automated workflow for medical tasks, characterized in that, The method includes: The system receives a medical task description from the user and generates a task analysis plan, including execution step planning, based on a large language model; specifically, it includes: The medical task description is input into a large language model and combined with a medical knowledge base for semantic understanding and analysis. Generate a task analysis plan that includes task objective analysis, execution step planning, and identification of required tools; The task analysis plan will be submitted to the user for confirmation. The task analysis plan is simulated and executed, and the execution information of each step is recorded in real time to generate a structured process document; specifically including: The large language model is driven to perform a simulation demonstration according to the confirmed task analysis plan; Record the step objectives, input data, execution logic, and output results of each step in real time; The recorded information is aggregated to generate a structured process document, which serves as an intermediate representation connecting intelligent reasoning and deterministic workflow; The process documentation includes not only the final result, but also the entire path and intermediate data of "how to obtain this result"; The process document is submitted to the user for review, and feedback information from the user regarding the process document is received. Based on the process documentation and user feedback, an executable workflow definition containing multiple predefined execution nodes is compiled and generated; specifically including: The process documents and user feedback are compiled into an executable workflow definition using a large language model, which includes deterministic decision nodes, large language model dialogue nodes, large language model inference nodes, and tool call nodes. The deterministic decision node: performs branch judgments based on preset rules and threshold conditions, the execution process is completely deterministic, and does not rely on large language model reasoning; it is suitable for medical judgments with clear standards, such as scoring and grading, and indicator threshold judgments; The large language model dialogue node is a natural language interaction node driven by a large language model, used in stages where information needs to be collected from patients or doctors; it has a preset question list, information extraction rules, and dialogue strategies. The large language model inference node: a medical inference node executed by the large language model, configured with input constraints and output guardrail rules, used in stages that require comprehensive judgment of multiple factors, such as medication regimen recommendation and differential diagnosis; The tool invocation node is a node that performs deterministic operations by calling external system interfaces, including but not limited to electronic medical record system queries, laboratory system data acquisition, and prescription system interaction. Automated verification of step completeness, data dependencies, and branch coverage is performed on the generated workflow definitions.

2. The method for generating automated workflows for medical tasks according to claim 1, characterized in that, The step of submitting the process document to the user for review and receiving user feedback on the process document includes: Submit the generated process documentation to the user for review; It can receive user confirmation of execution steps, adjustments to the execution order, or corrections to data sources.

3. The method for generating automated workflows for medical tasks according to claim 2, characterized in that, The method further includes: The generated workflow definition is connected to real patient data, and the workflow execution engine executes it sequentially according to the node definition. A complete execution log is generated during the execution process, recording the input, output, execution time, and decision basis for each node.

4. The method for generating automated workflows for medical tasks according to claim 3, characterized in that, The method further includes: Collect user feedback on workflow execution results, including confirmation or correction of the results; Utilize large language models to analyze feedback data, identify nodes that need optimization, and determine the optimization type, including adjusting the priority of data collection items, modifying inference node prompts, updating decision node rules, or adding or deleting workflow nodes; The optimized workflow version will take effect after user confirmation, and a record of version changes will be kept.

5. A medical task automated workflow generation system, applied to the medical task automated workflow generation method according to any one of claims 1 to 4, characterized in that, The system includes: The task analysis module receives medical task descriptions input by the user and generates a task analysis plan that includes execution step planning based on a large language model. The demonstration execution module is used to simulate the execution of the task analysis plan, record the execution information of each step in real time, and generate a structured process document. The review and feedback module is used to submit the process document to the user for review and to receive feedback information from the user regarding the process document. The workflow compilation module is used to compile and generate an executable workflow definition containing multiple predefined execution nodes based on the process document and user feedback information.

6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Dynamic document template generation system and method based on large model workflow

    CN121212108A