Workflow generation and closed-loop execution methods, devices, equipment and media
By performing structured analysis and instantiated workflow generation on the inference output of the AI decision-making system, the problem of the disconnect between AI decision-making and execution is solved, realizing an intelligent closed loop from decision-making to execution, and improving the intelligence and reliability of business processing.
Patent Information
- Application Number
- CN202611327250.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-17
AI Technical Summary
Existing AI decision-making systems suffer from insufficient intelligence and poor coordination in the process of transitioning from decision-making to execution. This results in AI recommendations being heavily reliant on manual secondary analysis and distribution, lacking dynamic adjustment and self-learning optimization capabilities, and failing to meet the demands of modern complex business scenarios for high efficiency, high flexibility, and high reliability.
By receiving the inference output of the business decision-making system, performing structured parsing, extracting key information elements, generating instantiated workflows, constructing directed graphs based on task dependencies, generating optimal task execution order and parallel strategies, monitoring task status in real time and triggering failure rollback strategies, and recording failure events to optimize the decision-making system.
It enables the automatic transformation from unstructured decisions to structured, executable plans, avoiding errors from manual orchestration, ensuring uninterrupted service, and achieving continuous dynamic adjustment and self-learning optimization to meet the requirements of high efficiency, high flexibility, and high reliability.
Smart Images

Figure CN123117658A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence and can be applied to the fields of finance, healthcare, and elderly care. Specifically, it relates to a workflow generation and closed-loop execution method, apparatus, equipment, and medium. Background Technology
[0002] With the rapid development of artificial intelligence technology, AI decision-making systems have been widely applied in several key business areas such as healthcare, finance, and elderly care to improve business processing efficiency and decision-making accuracy. Currently, existing AI decision-making systems mainly focus on front-end decision-making processes such as data perception, status assessment, risk warning, and solution recommendation, and can output inference conclusions that include business intent.
[0003] However, current business systems generally suffer from insufficient intelligence and poor collaboration during the transition from "AI decision-making" to "actual business execution." Existing models are mostly limited to "AI suggestions + manual execution" or "fixed process automation" based on preset rules, failing to achieve an intelligent closed loop from decision-making to execution. This disconnect between decision-making and execution makes it difficult to directly translate the inference conclusions output by AI into specific cross-system operation instructions. Implementation heavily relies on manual secondary breakdown and dispatch, resulting in slow response times and a high risk of errors. Furthermore, existing execution processes lack the ability to dynamically adjust based on real-time feedback and a self-learning optimization mechanism based on historical execution data, making it difficult to meet the stringent requirements of modern complex business scenarios for high efficiency, high flexibility, and high reliability. Summary of the Invention
[0004] In view of this, this application provides a workflow generation and closed-loop execution method, apparatus, device and medium. The main purpose is to solve the technical problem that the AI decision-making and actual execution in the existing business system are disconnected, which leads to the implementation of AI suggestions relying heavily on manual secondary decomposition and distribution, and lacks dynamic adjustment and self-learning optimization capabilities, making it difficult to meet the technical requirements of modern complex business scenarios for high efficiency, high flexibility and high reliability.
[0005] According to a first aspect of this application, a workflow generation and closed-loop execution method is provided, the method comprising: The system receives the inference output from the business decision system and performs structured parsing on the inference output to extract key information elements; these key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. Based on the key information elements, a corresponding workflow template is matched from the preset workflow template library, and the key information elements are filled into the matched workflow template to generate an instantiated workflow; Based on the logical dependencies between tasks in the instantiated workflow, a task dependency directed graph is constructed, and the optimal task execution order strategy and task execution parallel strategy are generated based on the task dependency directed graph. The task instructions in the task execution order strategy are converted into executable call commands of the target business system, and the executable call commands are distributed and executed according to the task execution parallel strategy. The system monitors the task execution status of the target business system in real time, dynamically adjusts the plans for unexecuted tasks based on the task execution status, and triggers a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task failure. The system also records the failure event and processing results to the experience base to continuously optimize the reasoning and decision-making of the business decision-making system and the preset workflow template library.
[0006] According to a second aspect of this application, a workflow generation and closed-loop execution apparatus is provided, the apparatus comprising: The receiving module is used to receive the inference output results output by the business decision system, and to perform structured parsing on the inference output results to extract key information elements; the key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. The filling module is used to match the corresponding workflow template from the preset workflow template library according to the key information element, and fill the key information element into the matched workflow template to generate an instantiated workflow; The construction module is used to construct a task dependency directed graph based on the logical dependencies between tasks in the instantiated workflow, and to generate the optimal task execution order strategy and task execution parallel strategy based on the task dependency directed graph. The execution module is used to convert the task instructions in the task execution order strategy into executable call commands of the target business system, and distribute and execute the executable call commands according to the task execution parallel strategy; The monitoring module is used to monitor the task execution status of the target business system in real time, dynamically adjust the plan of unexecuted tasks according to the task execution status, and trigger a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task execution failure. The failure event and processing result are recorded in the experience base to continuously optimize the reasoning and decision-making of the business decision system and the preset workflow template library.
[0007] According to a third aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method of the first aspect described above.
[0008] According to a fourth aspect of this application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of the first aspect described above.
[0009] Compared with existing technologies, the workflow generation and closed-loop execution method, apparatus, equipment, and medium provided in this application can receive the inference output results from the business decision system, perform structured parsing on the inference output results to extract key information elements; the key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow; based on the key information elements, the corresponding workflow template is matched from the preset workflow template library, and the key information elements are filled into the matched workflow template to generate the instantiated workflow; based on the logical dependency relationship between each task in the instantiated workflow, a task dependency directed graph is constructed, and the optimal task execution order strategy and task execution parallel strategy are generated based on the task dependency directed graph; the task instructions in the task execution order strategy are converted into executable call commands of the target business system, and the executable call commands are distributed and executed according to the task execution parallel strategy; the task execution status of the target business system is monitored in real time, the plan of unexecuted tasks is dynamically adjusted according to the task execution status, and when the task execution status is a task execution failure, a failure rollback strategy matching the failure scenario is triggered to execute an alternative solution, and the failure event and processing result are recorded in the experience base to continuously optimize the inference decision of the business decision system and the preset workflow template library.
[0010] The solution proposed in this application can extract key information elements by performing structured parsing on the inference output results, and automatically fill the key information elements into the matching workflow template to generate an instantiated workflow. This achieves the automatic transformation from "unstructured decision" to "structured executable plan" without the need for manual secondary disassembly and distribution.
[0011] This application constructs a directed task dependency graph based on the logical dependencies in the instantiated workflow. Based on this directed task dependency, it can not only derive the optimal task execution order strategy but also identify which tasks are independent, thereby generating a parallel task execution strategy. This enables intelligent orchestration and collaborative execution among multiple tasks, avoiding order errors and inefficiencies caused by manual orchestration.
[0012] When a task fails, the system not only triggers a pre-defined alternative (failure rollback strategy) to ensure uninterrupted service, but also records the failure event and its handling results in an experience database. This accumulated experience feeds back into the AI inference and decision-making system and the pre-defined workflow template library, making the system smarter when facing similar scenarios in the future. This enables continuous dynamic adjustment and self-learning optimization, meeting the demands of modern elderly care services for high efficiency, high flexibility, and high reliability.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A schematic diagram of the application environment for a workflow generation and closed-loop execution method provided in an embodiment of this application; Figure 2 A flowchart illustrating a workflow generation and closed-loop execution method provided in an embodiment of this application; Figure 3 A schematic diagram of a workflow generation and closed-loop execution device provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of another computer device provided in an embodiment of this application. Detailed Implementation
[0017] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0018] The workflow generation and closed-loop execution method provided in this application embodiment can be applied to, for example, Figure 1 In this application environment, the client communicates with the server via a network. The server can receive the inference output from the business decision system through the client, perform structured parsing of the inference output to extract key information elements; match the corresponding workflow template from the preset workflow template library based on the key information elements, and fill the matching workflow template with the key information elements to generate an instantiated workflow; construct a task dependency directed graph based on the logical dependencies between tasks in the instantiated workflow, and generate the optimal task execution order strategy and task execution parallel strategy based on the task dependency directed graph; convert the task instructions in the task execution order strategy into executable call commands of the target business system, and distribute and execute the executable call commands according to the task execution parallel strategy; monitor the task execution status of the target business system in real time, dynamically adjust the plan of unexecuted tasks according to the task execution status, and trigger a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task execution failure, and record the failure event and processing result in the experience base to continuously optimize the inference decision of the business decision system and the preset workflow template library.
[0019] The solution proposed in this application allows for the extraction of key information elements from the inference output through structured parsing. These key information elements are then filled into a matching workflow template to generate an instantiated workflow. This achieves an automatic transformation from "unstructured decision-making" to "structured executable plan" without the need for manual secondary decomposition and distribution.
[0020] This application constructs a directed task dependency graph based on the logical dependencies in the instantiated workflow. Based on this directed task dependency, it can not only derive the optimal task execution order strategy but also identify which tasks are independent, thereby generating a parallel task execution strategy. This enables intelligent orchestration and collaborative execution among multiple tasks, avoiding order errors and inefficiencies caused by manual orchestration.
[0021] When a task fails, the system not only triggers a pre-defined alternative (failure rollback strategy) to ensure uninterrupted service, but also records the failure event and its handling result in an experience base. This accumulated experience feeds back into the AI inference and decision-making system and the pre-defined workflow template library, making the system smarter when facing similar scenarios in the future. This achieves continuous dynamic adjustment and self-learning optimization, meeting the demands of modern elderly care services for high efficiency, high flexibility, and high reliability. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The following detailed description of specific embodiments further illustrates this application.
[0022] Please see Figure 2 As shown, Figure 2 A flowchart illustrating the workflow generation and closed-loop execution method provided in this application embodiment includes the following steps 101 to 105: Step 101: Receive the reasoning output results from the business decision system, and perform structured parsing on the reasoning output results to extract key information elements.
[0023] In this embodiment, the inference output result refers to the original feedback information generated by the business decision-making system after receiving and analyzing external input data (such as user health monitoring data), through internal logical calculation, semantic understanding, and comprehensive judgment. This feedback information includes business intent, current status assessment, or handling suggestions. The inference output result is usually presented in unstructured natural language text, containing rich contextual semantics, but it cannot be directly recognized and executed by downstream business systems. Therefore, it needs to be parsed and transformed into structured business scheduling parameters.
[0024] Key information elements can be used to characterize the business scheduling parameters required to generate instantiated workflows. Key information elements include at least the service object identity, risk type, and suggested action.
[0025] In this embodiment, the business decision system can analyze the user's health monitoring data in real time. When abnormal data is detected in the health monitoring data, the business decision system can perform analysis and reasoning and output the reasoning output results in natural language.
[0026] For example, the business decision-making system analyzes the user's health monitoring data in real time and finds that: 78-year-old Grandma Li's blood pressure fluctuations have intensified in the past week, and gait analysis shows that her walking speed has slowed down and her stride has become shorter. Therefore, the system outputs the following reasoning result: "Grandma Li has an increased risk of falling. The following measures are recommended: increase the frequency of blood pressure monitoring to twice a day; arrange for a rehabilitation therapist to conduct gait assessment and balance training; notify family members to pay attention; and conduct a fall prevention environment inspection of the room."
[0027] After receiving the reasoning output in natural language form, the system of this application can perform semantic parsing on the reasoning output in natural language form through a Large Language Model (LLM) reasoning output parser to extract key information elements of elderly care services.
[0028] The extraction results are as follows: Service recipient: Grandma Li; Risk type: Increased risk of falling; Recommended actions: Increase blood pressure monitoring frequency to twice daily, arrange for a therapist to conduct gait assessment and balance training, notify family members to pay attention, and conduct a fall prevention environment check on the room.
[0029] Among them, the large language model inference output parser can be a key data processing component (or middleware) connecting the AI decision-making layer and the underlying business execution layer. Its core function is to perform semantic analysis, format validation, and information extraction on unstructured natural language text, and convert it into a structured data format (such as JSON objects, Python dictionaries, or specific business parameter objects) that can be recognized and processed by downstream systems.
[0030] Step 102: Match the corresponding workflow template from the preset workflow template library based on the key information elements, and fill the key information elements into the matched workflow template to generate an instantiated workflow.
[0031] The workflow templates in the preset workflow template library are pre-built based on the elderly care service ontology. The elderly care service ontology can be understood as a "core knowledge graph" or "underlying logical framework" in the field of elderly care services. It is a highly abstract, structured, and standardized definition of various entities, concepts, and their interrelationships related to elderly care in the real world. By constructing the elderly care service ontology, it is possible to accurately understand various key information elements in elderly care service scenarios, thereby achieving intelligent template matching and workflow instantiation.
[0032] The core of elderly care services encompasses: the service recipients (e.g., the elderly, their families, caregivers, etc.), the service types (e.g., daily living assistance (e.g., bathing assistance, meal assistance, cleaning assistance, etc.), health management (e.g., monitoring, medication, rehabilitation, etc.), safety and security (e.g., fall warnings, emergency calls, etc.), and emotional support (e.g., companionship, activities, etc.), the service resources (e.g., caregivers, nurses, doctors, volunteers, equipment, supplies, etc.), the service locations (e.g., the elderly's home, elderly care community, day care center, hospital, etc.), and the service events (e.g., assessment, planning, execution, completion, abnormalities, etc.).
[0033] Based on the above ontology, the preset workflow template library predefines a variety of reusable templates. Each template can include trigger conditions (i.e., under what circumstances the workflow is started), task sequence (i.e., a series of operations that need to be performed), pre- and post-deployment relationships between tasks, resource requirements (i.e., the personnel, equipment, and materials required for each task), and failure rollback strategy (i.e., alternative solutions when a task fails).
[0034] In some cases, the server uses the key information elements extracted in step 101 (service object identity, risk type, suggested action) to intelligently match the parsed reasoning conclusions with the preset workflow template library through the workflow template matcher, and identifies the most suitable template type.
[0035] For example, based on the risk type (such as fall risk) and suggested actions (such as assessment / inspection), the most suitable template is identified by the workflow template matcher as the "fall risk intervention workflow" template.
[0036] Subsequently, the extracted specific information (such as Grandma Li, fall risk, and recommended actions) is populated into the matching "Fall Risk Intervention Workflow" template. For example, the service recipient "Grandma Li" is populated into the elderly identity field of the template; the risk type "fall" is populated into the risk identifier field; and the recommended actions "increase blood pressure monitoring frequency, rehabilitation therapist assessment, family notification, and environmental inspection" are populated into the task sequence field.
[0037] Once the population is complete, the system generates an instantiated workflow, which can contain the following initial task list: T1: Set Grandma Li's blood pressure monitoring frequency to twice daily; T2: Check the availability of rehabilitation therapists and schedule an in-home assessment. T3: Push risk alerts and assessment arrangements to the family member's mobile app; T4: Generate an environmental inspection work order and assign it to environmental maintenance personnel; T5: After completing the assessment, the rehabilitation therapist will develop an individualized training plan based on the assessment results; T6: Arrange for a caregiver to assist in implementing the training plan.
[0038] Step 103: Based on the logical dependencies between tasks in the instantiated workflow, construct a task dependency directed graph, and generate the optimal task execution order strategy and task execution parallel strategy based on the task dependency directed graph.
[0039] In this embodiment, based on the logical dependencies between tasks in the instantiated workflow, a task dependency directed graph is constructed, and an optimal task execution order strategy and a task execution parallel strategy are generated based on the task dependency directed graph. Specifically, this may include: Step 201: Analyze the pre- and post-dependencies between tasks in the instantiated workflow, identify tasks that can be executed immediately without dependencies, serial tasks with pre- and post-dependencies, and parallel tasks, and construct a directed graph of task dependencies. Step 202: Based on the task dependency directed graph, and combining resource availability and time constraints, generate the optimal task execution order strategy and task execution parallel strategy; Step 203: Identify resource conflicts between different tasks, and adjust or prompt the task execution order strategy and / or task execution parallel strategy based on the identification results.
[0040] Specifically, the system can analyze the pre- and post-dependencies between tasks in the instantiated workflow using an intelligent dependency resolution and task scheduling engine. T1 (Set monitoring frequency): No dependencies, can be executed immediately; T2 (Scheduled Rehabilitation Therapist): No dependency, can be implemented immediately; T3 (Notify family members): This step has a pre- and post-delay dependency and must be executed after T2 is completed (i.e., after the appointment is confirmed). T4 (Environmental Inspection Work Order): No dependencies, can be executed immediately; T5 (Develop Training Plan): This step has pre- and post-dependencies and must be executed after T2 (i.e., after evaluation). T6 (Arrange for caregiver assistance): This has pre- and post-dependent dependencies and must be executed after T5 is completed.
[0041] Based on the above dependencies, the engine constructs a directed graph of task dependencies: T1, T2, and T4 are the starting nodes, and the three are independent of each other and can be executed immediately without dependencies; T3 has pre- and post-dependencies and must be executed after T2 (scheduled and confirmed time); T5 has pre- and post-dependencies and must be executed after T2 (evaluation completed); T6 has pre- and post-dependencies and must be executed after T5 (planning completed).
[0042] Based on the above logic, the system constructs a task-dependent directed graph (DAG). Combining the resource availability (such as available time slots for rehabilitation therapists) and time constraints of the personnel scheduling system, the optimal permutation generator generates the optimal execution order and parallel strategy: T1, T2, and T4 are executed in parallel as starting nodes; T3 is triggered after T2 is completed; after T2 is completed, wait for T5 to complete; after T5 is completed, trigger T6.
[0043] Meanwhile, the system's resource conflict detector identifies resource conflicts between different tasks (e.g., detecting whether the same caregiver is assigned to two tasks at the same time). If a conflict exists, it automatically adjusts the task execution order strategy or the task execution parallel strategy, and prompts the administrator to resolve the resource conflict.
[0044] Step 104: Convert the task instructions in the task execution order strategy into executable call commands of the target business system, and distribute and execute the executable call commands according to the task execution parallel strategy.
[0045] In this embodiment, the task instructions in the task execution order strategy are converted into API call commands or API operation commands that can be executed by the target business system through the instruction converter in the cross-system intelligent interface adapter.
[0046] Among them, the cross-system intelligent interface adapter is a core component used to achieve seamless connection and communication between the workflow engine and various business systems.
[0047] In real-world elderly care service scenarios, different business functions (such as health monitoring, staff scheduling, work order management, and family notification) are typically run independently by different software systems, each with its own interface protocols and data formats. Directly having a workflow engine call these systems would be extremely complex and prone to errors.
[0048] The role of the cross-system intelligent interface adapter is to shield the differences between the underlying business systems and provide a unified and standardized service interface to the upper-layer workflow, so that the workflow can drive the collaborative work of various systems in a common way.
[0049] The target business system may be one or more. In some cases, the target business system includes at least one of the following: a health monitoring system (which can be used to set monitoring frequency and acquire monitoring data), a work order management system (which can be used to create task work orders and assign personnel), a personnel scheduling system (which can be used to query caregiver availability and book services), a materials management system (which can be used to check inventory and apply for materials), a family notification system (which can be used to send SMS messages and APP push notifications), and an emergency response system (which can be used to trigger alarms and coordinate emergency response).
[0050] According to the parallel strategy, the system can distribute execution simultaneously, for example: For T1, the system calls the API command of the health monitoring system through the interface to automatically set the monitoring frequency for Grandma Li (T1 completes). For T2, the system queries the API operation commands of the personnel scheduling system and finds that rehabilitation therapist Dr. Zhang is available the next morning. It automatically schedules an appointment and calls the work order management system API to create a work order (T2 completed). After T2 is completed, T3 is triggered. The system pushes a message to Grandma Li's children through the family notification system API: "Grandma Li's fall risk assessment has been triggered. A rehabilitation therapist has been arranged to come to the home for assessment tomorrow. Please pay attention" (T3 completed).
[0051] For T4, the system calls the API call command of the work order management system to create an environment check work order and assigns it to Master Wang (T4 completes).
[0052] Step 105: Monitor the task execution status of the target business system in real time, dynamically adjust the plan of unexecuted tasks according to the task execution status, and trigger the failure rollback strategy that matches the failure scenario to execute the alternative when the task execution status is a task failure. Record the failure event and processing result to the experience base to continuously optimize the reasoning decision-making of the business decision-making system and the preset workflow template library.
[0053] During the execution of the fall risk intervention workflow (involving tasks such as T1 setting up monitoring, T2 scheduling rehabilitation therapists, T3 notifying family members, T4 environmental inspection, T5 planning, and T6 caregiver assistance), the system does not simply perform one-way dispatching. Instead, it achieves closed-loop management through an adaptive plan optimizer and a built-in failure rollback and learning mechanism module. Specifically: The real-time feedback processor can monitor the task execution status returned by target business systems (such as personnel scheduling systems, work order management systems, etc.) in real time. This task execution status includes not only the standard "in progress" and "completed" statuses, but also "early completion," "delayed," and "urgent tasks." The dynamic adjustment engine can then adopt corresponding adjustment strategies based on different status feedbacks. When a task is detected to be completed ahead of schedule, the time of subsequent tasks can be brought forward accordingly. For example, if environmental maintenance personnel complete T4 (room fall prevention environmental inspection) ahead of schedule, the system will recognize that the task has been completed ahead of schedule. The dynamic adjustment engine will automatically bring forward the time of subsequent disinfection or material allocation tasks that depend on the environmental inspection results, thereby reducing the overall workflow time.
[0054] When a task delay is detected, the scheduling of subsequent tasks is postponed. For example, the following morning, the system detects that Dr. Zhang, the rehabilitation therapist originally scheduled to perform the assessment, has taken sick leave, causing a delay in task T2 (scheduling a rehabilitation therapist assessment). The dynamic adjustment engine responds by automatically checking the availability of other rehabilitation therapists and finding that Dr. Li is available in the afternoon. The system automatically reschedules Dr. Li's appointment. Due to the delay in T2, the system postpones the scheduling of its subsequent task T3 (notifying family members), which depends on T2, automatically updating the notification information on the family's end, changing the assessment time to the afternoon, and recording this adjustment as a "minor anomaly."
[0055] When an emergency task is detected, the priority of unexecuted tasks is recalculated and the execution order is adjusted. For example, if Grandma Li suddenly presses the emergency call button (triggering an emergency task) during the execution of T1-T4, the dynamic adjustment engine immediately recalculates the priority of unexecuted tasks, suspends the current regular T2, T3, and other tasks, raises the emergency response task to the highest priority, and prioritizes calling the emergency response system to coordinate the nearest caregiver to handle the situation. The original workflow is restored after the emergency is resolved.
[0056] In addition, at critical junctures requiring human intervention (such as when there is no qualified rehabilitation therapist available to replace them), decision requests can be pushed to management personnel through a human-machine collaboration interface, and the system can continue to execute after receiving human instructions.
[0057] When the task execution status is "task execution failed," a failure rollback strategy matching the failure scenario is triggered to execute an alternative solution, which may include: Step 301: When the task execution status is "task execution failed", match the failure scenario of task execution failure from the predefined failure mode library. The failure scenarios include personnel leave, equipment failure, and service object refusal to provide service. Step 302: Trigger a failure rollback strategy that matches the failure scenario to execute an alternative solution, wherein the alternative solution includes at least one of the following: matching a replacement with the same qualifications, activating a backup device, adjusting the service method, suspending the task and recording the reason, and notifying the family.
[0058] To better illustrate the above dynamic adjustment and failure rollback mechanisms, the following will provide a detailed explanation using specific application scenarios of senior living communities: Suppose that during the execution of T2 (i.e., the scenario of rescheduling a therapist), the staff scheduling system interface crashes, returning a task execution failure status. The system matches this failure scenario as "equipment failure (business system interface failure)" from the predefined failure mode library and immediately triggers the matching failure rollback strategy: that is, to activate backup equipment or adjust the service method, i.e., automatically switch to the backup notification method, directly send a task SMS to the therapist's mobile phone, and copy the supervisor for manual attention.
[0059] Simultaneously, failure events and their handling results are recorded in the experience base, and the following self-learning optimization process is performed: First, record the failure events (such as "the personnel scheduling system interface crashed") and the handling results (such as "successfully switching to the SMS backup channel") in the experience database. Secondly, the system analyzes failure experiences related to failure events and their handling results in the experience base, generates analysis results, and optimizes the failure rollback strategy design of the corresponding workflow templates in the preset workflow template library based on these results. For example, if the analysis reveals that interface failures are relatively frequent, the "Fall Risk Intervention Workflow" template is automatically optimized by adding a predefined strategy of "backup channel for communication failures" to the original template. This allows for faster SMS channel switching when similar failures occur in the future, without the need for re-matching. Finally, based on the analysis results, optimize the business decision-making system's strategies for anticipating and handling potential failure risks during reasoning and decision-making. For example, after learning of this risk, when generating suggested actions, if the scheduling system is involved, the business decision-making system will consider the risk factor of "the system may be unstable" in advance, and increase the weight of "confirming system availability" or "prioritizing manual confirmation" in the reasoning conclusion, thereby reducing the reliance on a single automated system.
[0060] As can be seen from the above embodiments, this application realizes a complete closed loop from AI inference output to cross-system collaborative execution, and then to anomaly self-healing and experience accumulation. It completely solves the technical pain points of existing smart elderly care systems, such as difficulty in implementation, poor collaboration, and lack of self-learning, caused by "AI suggestions + manual execution", and greatly improves the intelligence and reliability of elderly care services.
[0061] In summary, based on the workflow generation and closed-loop execution method provided in this application, compared with the prior art, this application can receive the inference output results from the business decision system, perform structured parsing on the inference output results to extract key information elements; match the corresponding workflow template from the preset workflow template library based on the key information elements, and fill the key information elements into the matched workflow template to generate an instantiated workflow; construct a task dependency directed graph based on the logical dependency relationships between tasks in the instantiated workflow, and generate the optimal task execution order strategy and task execution parallel strategy based on the task dependency directed graph; convert the task instructions in the task execution order strategy into executable call commands of the target business system, and distribute and execute the executable call commands according to the task execution parallel strategy; monitor the task execution status of the target business system in real time, dynamically adjust the plan of unexecuted tasks according to the task execution status, and trigger a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task execution failure, and record the failure event and processing result in the experience base to continuously optimize the inference decision of the business decision system and the preset workflow template library.
[0062] The solution proposed in this application can extract key information elements by performing structured parsing on the inference output results, and automatically fill the key information elements into the matching workflow template to generate an instantiated workflow. This achieves the automatic transformation from "unstructured decision" to "structured executable plan" without the need for manual secondary disassembly and distribution.
[0063] This application constructs a directed task dependency graph based on the logical dependencies in the instantiated workflow. Based on this directed task dependency, the system can not only derive the optimal task execution order strategy, but also identify which tasks are independent of each other, thereby generating a parallel task execution strategy. This enables intelligent orchestration and collaborative execution among multiple tasks, avoiding order errors and inefficiencies caused by manual orchestration.
[0064] When a task fails, this application not only triggers a pre-defined alternative (failure rollback strategy) to ensure uninterrupted service, but also records the failure event and its handling results in an experience base. This accumulated experience feeds back into the AI inference and decision-making system and the pre-defined workflow template library, making the system smarter when facing similar scenarios in the future. This enables continuous dynamic adjustment and self-learning optimization, meeting the demands of modern elderly care services for high efficiency, high flexibility, and high reliability.
[0065] Based on the above Figure 2 The specific implementation of the method shown in this embodiment provides a workflow generation and closed-loop execution device, such as... Figure 3 As shown, the device includes: a receiving module 31, a filling module 32, a building module 33, an execution module 34, and a monitoring module 35; The receiving module 31 is used to receive the inference output result output by the business decision system, and to perform structured parsing on the inference output result to extract key information elements; the key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. The filling module 32 is used to match the corresponding workflow template from the preset workflow template library according to the key information element, and fill the key information element into the matched workflow template to generate an instantiated workflow; The construction module 33 is used to construct a task dependency directed graph based on the logical dependency relationship between each task in the instantiated workflow, and to generate the optimal task execution order strategy and task execution parallel strategy based on the task dependency directed graph. Execution module 34 is used to convert the task instructions in the task execution order strategy into executable call commands of the target business system, and distribute and execute the executable call commands according to the task execution parallel strategy; The monitoring module 35 is used to monitor the task execution status of the target business system in real time, dynamically adjust the plan of unexecuted tasks according to the task execution status, and trigger a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task execution failure, and record the failure event and processing result to the experience base to continuously optimize the reasoning decision of the business decision system and the preset workflow template library.
[0066] In a specific application scenario, the receiving module 31 can be used to parse the reasoning output result output in natural language form through a large language model reasoning output parser, and extract key information elements of elderly care services from the reasoning output result, wherein the key information elements include at least the identity of the service recipient, risk type, and suggested actions.
[0067] In specific application scenarios, the filling module 32 can be used to fill the workflow templates in the preset workflow template library, which are pre-built based on the elderly care service ontology. The elderly care service ontology includes at least: service object ontology, service type ontology, service resource ontology, service location ontology and service event ontology. The workflow template is predefined with triggering conditions, task sequence, pre- and post-dependent relationships between tasks, resource requirements and failure rollback strategies.
[0068] In specific application scenarios, the construction module 33 can be used to analyze the pre- and post-dependent relationships between tasks in the instantiated workflow, identify tasks that can be executed immediately without dependencies, serial tasks with pre- and post-dependent relationships, and parallel tasks, and construct the task dependency directed graph; based on the task dependency directed graph, combined with resource availability and time constraints, generate the optimal task execution order strategy and the task execution parallel strategy; identify resource conflicts between different tasks, and adjust or prompt the task execution order strategy and / or the task execution parallel strategy with resource conflicts based on the identification results.
[0069] In specific application scenarios, the execution module 34 can be used to convert the task instructions in the task execution sequence strategy into API call commands or API operation commands that can be executed by the target business system through the instruction converter in the cross-system intelligent interface adapter; wherein, the target business system includes at least one of the following: health monitoring system, work order management system, personnel scheduling system, material management system, family notification system and emergency response system.
[0070] In specific application scenarios, the monitoring module 35 can be used to monitor the task execution status returned by the target business system in real time. The task execution status includes tasks completed ahead of schedule, tasks delayed, and urgent tasks. When a task is detected to be completed ahead of schedule, the time of subsequent tasks is advanced accordingly. When a task is detected to be delayed, the time of subsequent tasks is postponed. When an urgent task is detected, the priority of unexecuted tasks is recalculated and the execution order is adjusted.
[0071] In specific application scenarios, the monitoring module 35 can be used to match the failure scenario of the task execution failure from a predefined failure mode library when the task execution status is task execution failure. The failure scenario includes personnel leave, equipment failure, and service object refusal to provide service. The monitoring module 35 can trigger a failure rollback strategy that matches the failure scenario to execute an alternative solution. The alternative solution includes at least matching a replacement with the same qualifications, activating backup equipment, adjusting the service method, suspending the task and recording the reason, and notifying the family members.
[0072] In specific application scenarios, the monitoring module 35 can be used to record the failure events and processing results to the experience base; analyze the failure experience in the experience base for the failure events and processing results, generate analysis results, optimize the failure rollback strategy design of the corresponding workflow template in the preset workflow template library based on the analysis results; and optimize the prediction and processing strategy of the business decision system for potential failure risks in reasoning decision-making based on the analysis results.
[0073] Specific limitations regarding the workflow generation and closed-loop execution device can be found in the limitations of the workflow generation and closed-loop execution method described above, and will not be repeated here. Each module in the aforementioned workflow generation and closed-loop execution device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0074] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a workflow generation and closed-loop execution method on the server side.
[0075] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media 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 media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a workflow generation and closed-loop execution method.
[0076] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The system receives the inference output from the business decision system and performs structured parsing on the inference output to extract key information elements; these key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. Based on the key information elements, a corresponding workflow template is matched from the preset workflow template library, and the key information elements are filled into the matched workflow template to generate an instantiated workflow; Based on the logical dependencies between tasks in the instantiated workflow, a task dependency directed graph is constructed, and the optimal task execution order strategy and task execution parallel strategy are generated based on the task dependency directed graph. The task instructions in the task execution order strategy are converted into executable call commands of the target business system, and the executable call commands are distributed and executed according to the task execution parallel strategy. The system monitors the task execution status of the target business system in real time, dynamically adjusts the plans for unexecuted tasks based on the task execution status, and triggers a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task failure. The system also records the failure event and processing results to the experience base to continuously optimize the reasoning and decision-making of the business decision-making system and the preset workflow template library.
[0077] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The system receives the inference output from the business decision system and performs structured parsing on the inference output to extract key information elements; these key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. Based on the key information elements, a corresponding workflow template is matched from the preset workflow template library, and the key information elements are filled into the matched workflow template to generate an instantiated workflow; Based on the logical dependencies between tasks in the instantiated workflow, a task dependency directed graph is constructed, and the optimal task execution order strategy and task execution parallel strategy are generated based on the task dependency directed graph. The task instructions in the task execution order strategy are converted into executable call commands of the target business system, and the executable call commands are distributed and executed according to the task execution parallel strategy. The system monitors the task execution status of the target business system in real time, dynamically adjusts the plans for unexecuted tasks based on the task execution status, and triggers a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task failure. The system also records the failure event and processing results to the experience base to continuously optimize the reasoning and decision-making of the business decision-making system and the preset workflow template library.
[0078] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[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. The 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 in this application 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. 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), dual 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.
[0080] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0081] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0082] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A workflow generation and closed-loop execution method, characterized in that, The method includes: The system receives the inference output from the business decision system and performs structured parsing on the inference output to extract key information elements; these key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. Based on the key information elements, a corresponding workflow template is matched from the preset workflow template library, and the key information elements are filled into the matched workflow template to generate an instantiated workflow; Based on the logical dependencies between tasks in the instantiated workflow, a task dependency directed graph is constructed, and the optimal task execution order strategy and task execution parallel strategy are generated based on the task dependency directed graph. The task instructions in the task execution order strategy are converted into executable call commands of the target business system, and the executable call commands are distributed and executed according to the task execution parallel strategy. The system monitors the task execution status of the target business system in real time, dynamically adjusts the plans for unexecuted tasks based on the task execution status, and triggers a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task failure. The system also records the failure event and processing results to the experience base to continuously optimize the reasoning and decision-making of the business decision-making system and the preset workflow template library.
2. The workflow generation and closed-loop execution method according to claim 1, characterized in that, The step of performing structured parsing on the inference output to extract key information elements specifically includes: The reasoning output, presented in natural language, is parsed, and key information elements for elderly care services are extracted from the reasoning output. These key information elements include at least the identity of the service recipient, the type of risk, and suggested actions.
3. The workflow generation and closed-loop execution method according to claim 1, characterized in that, The process of constructing a task dependency directed graph based on the logical dependencies between tasks in the instantiated workflow, and generating an optimal task execution order strategy and a task execution parallel strategy based on the task dependency directed graph, specifically includes: Analyze the pre- and post-dependencies between tasks in the instantiated workflow, identify tasks that can be executed immediately without dependencies, serial tasks with pre- and post-dependencies, and parallel tasks, and construct the task dependency directed graph. Based on the task dependency directed graph, and combined with resource availability and time constraints, the optimal task execution order strategy and the task execution parallel strategy are generated. Identify resource conflicts between different tasks, and adjust or prompt the execution order strategy and / or parallel execution strategy of the tasks with resource conflicts based on the identification results.
4. The workflow generation and closed-loop execution method according to claim 1, characterized in that, The step of converting the task instructions in the task execution order strategy into executable invocation commands for the target business system specifically includes: The task instructions in the task execution order strategy are converted into API call commands or API operation commands that can be executed by the target business system; The target business system includes at least one of a health monitoring system, a work order management system, a staff scheduling system, a materials management system, a family notification system, and an emergency response system.
5. The workflow generation and closed-loop execution method according to claim 1, characterized in that, The step of dynamically adjusting the plan for unexecuted tasks based on the task execution status specifically includes: Real-time monitoring of the task execution status returned by the target business system, wherein the task execution status includes tasks completed ahead of schedule, tasks delayed, and urgent tasks; If a task is detected to have been completed ahead of schedule, the time for subsequent tasks will be moved forward accordingly. When a task delay is detected, the scheduling of subsequent tasks will be postponed. When an urgent task is detected, the priority of the unexecuted tasks is recalculated and the execution order is adjusted.
6. The workflow generation and closed-loop execution method according to claim 1, characterized in that, When the task execution status is "task execution failed," a failure rollback strategy matching the failure scenario is triggered to execute an alternative, specifically including: When the task execution status is "task execution failed", the failure scenario of the task execution failure is matched from the predefined failure mode library, wherein the failure scenario includes personnel leave, equipment failure, and service object refusal to provide service. Trigger a failure rollback strategy that matches the failure scenario to execute an alternative solution, wherein the alternative solution includes at least one of the following: matching a replacement with the same qualifications, activating a backup device, adjusting the service method, suspending the task and recording the reason, and notifying the family.
7. The workflow generation and closed-loop execution method according to claim 1, characterized in that, The step of recording failure events and processing results to an experience base to continuously optimize the reasoning and decision-making of the business decision-making system and the preset workflow template library specifically includes: The failure events and their handling results are recorded in the experience base. Analyze the failure experiences in the experience base regarding the failure events and their handling results, generate analysis results, and optimize the failure rollback strategy design of the corresponding workflow template in the preset workflow template library based on the analysis results; and, Based on the analysis results, optimize the business decision-making system's prediction and handling strategies for potential failure risks in reasoning and decision-making.
8. A workflow generation and closed-loop execution device, characterized in that, include: The receiving module is used to receive the inference output results output by the business decision system, and to perform structured parsing on the inference output results to extract key information elements; The key information elements are used to characterize the business scheduling parameters required to generate the instantiated workflow. The filling module is used to match the corresponding workflow template from the preset workflow template library according to the key information element, and fill the key information element into the matched workflow template to generate an instantiated workflow; The construction module is used to construct a task dependency directed graph based on the logical dependencies between tasks in the instantiated workflow, and to generate the optimal task execution order strategy and task execution parallel strategy based on the task dependency directed graph. The execution module is used to convert the task instructions in the task execution order strategy into executable call commands of the target business system, and distribute and execute the executable call commands according to the task execution parallel strategy; The monitoring module is used to monitor the task execution status of the target business system in real time, dynamically adjust the plan of unexecuted tasks according to the task execution status, and trigger a failure rollback strategy matching the failure scenario to execute an alternative when the task execution status is a task execution failure. The failure event and processing result are recorded in the experience base to continuously optimize the reasoning and decision-making of the business decision system and the preset workflow template library.
9. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the workflow generation and closed-loop execution method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the workflow generation and closed-loop execution method as described in any one of claims 1 to 7.
