An event-driven processing apparatus, method, device, medium and program product of an AI conversation system
By using an event-driven processing device, the problems of high coupling and high expansion costs in existing AI dialogue systems are solved. It achieves low-intrusion expansion, fault isolation and indicator separation, improves the stability and flexibility of the system, and supports function combination and dynamic operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING DIANFU TECHNOLOGY CO LTD
- Filing Date
- 2025-12-18
- Publication Date
- 2026-06-09
AI Technical Summary
Existing AI dialogue systems suffer from high coupling, high expansion costs, lack of chain event sequence control, difficulty in isolating faults, and insufficient granularity of indicators. This results in new capabilities requiring intrusion into core generation code, repetitive coding, faults blocking overall output, and the inability to separate key indicators.
An event-driven processing device is adopted, including an event orchestration module, a session management module, an event processor module, a system observation module, and an output module. Through an event distribution unit, a priority scheduling unit, a processor registration unit, an adaptive buffer unit, and an indicator collector unit, dynamic registration, fault isolation, adaptive buffering, and indicator separation are achieved.
It achieves low-intrusion expansion, fault isolation, indicator separation, chained enhancement, and dynamic maintainability, reducing expansion costs, ensuring system stability and consistency, and supporting function combination and flexible operation and maintenance.
Smart Images

Figure CN121704982B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of AI dialogue technology, and in particular to an event-driven processing device, method, apparatus, medium, and program product for an AI dialogue system. Background Technology
[0002] Existing AI dialogue systems often mix logic such as streaming generation, metric collection, context buffering, content recommendation, and audit trails within a single loop or callback structure, which presents the following problems:
[0003] 1. High coupling: Adding new capabilities (such as video recommendation and real-time monitoring) requires intrusion into the core code generation process;
[0004] 2. High expansion costs: The lack of a unified registration entry point leads to duplicate coding of horizontal functions (Tracing / Metrics / Buffering strategies);
[0005] 3. Lack of chained event sequence control: There is a lack of standardized event abstraction in different stages (model startup, chained calls, stream segment processing, and termination);
[0006] 4. Difficulty in isolating faults: A malfunction in one function may block the overall output;
[0007] 5. Insufficient granularity of metrics: It is impossible to separate key metrics such as first token delay, inference stage buffer delay, and recommended insertion point.
[0008] Therefore, an event-driven processing device for a unified, declarative, and dynamically add / remove processor for an AI dialogue system is needed. Summary of the Invention
[0009] In view of this, embodiments of the present invention provide an event-driven processing apparatus, method, device, medium, and program product for an AI dialogue system, which at least partially solves the problems existing in the prior art.
[0010] Other features and advantages of the invention will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0011] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0012] An event-driven processing device for an AI dialogue system includes: an event orchestration module, a session management module, an event processor module, a system observation module, and an output module;
[0013] The event orchestration module includes an event distribution unit, a priority scheduling unit, and a processor registration unit; the event processor module includes an event processing logic unit and an adaptive buffer unit; the system observation module includes an indicator collector unit.
[0014] The event distribution unit is used to receive standard events converted from session content from the session management module; send a sorting request to the priority scheduling unit based on the standard events to obtain an ordered sequence of event processing logic units, and dynamically inject the event processing logic units in the sequence into the event processor module.
[0015] The priority scheduling unit is used to pull the enabled processing units from the processor registration unit, obtain the return list, and sort the priorities based on the sorting request of the event distribution unit.
[0016] The processor registration unit is hot-swappable and used for dynamically registering and unloading the processing unit.
[0017] The event processing logic unit is used to perform event processing;
[0018] The adaptive buffer unit is used to adaptively buffer the AI dialogue results;
[0019] The indicator collection unit is used to collect indicators during the AI dialogue process;
[0020] The output module is used to receive the result of the adaptive buffer and output it.
[0021] As a further improvement of the present invention, when the priority scheduling unit performs priority sorting, it sorts according to preset or dynamically adjusted weights to give priority to critical paths; the dynamic indicators on which the weights are dynamically adjusted include recent time consumption and failure rate.
[0022] Furthermore, the processor registration unit is also used to register and manage the processing unit during device operation by extending the registry;
[0023] Furthermore, the adaptive buffer unit is used to aggregate consecutive small segments of AI dialogue results and switch the first segment acceleration strategy; it dynamically calculates the aggregation threshold using real-time statistical data on the segment generation interval and length distribution.
[0024] Furthermore, the event handler module also includes an exception capture and circuit breaker unit and / or a condition-derived event handling unit;
[0025] The exception capture and circuit breaker unit is used to provide fault isolation and circuit breaker degradation for the execution of the event processing logic unit. The fault isolation includes wrapping the execution of the event processing logic unit in an isolation layer and recording and measuring exceptions.
[0026] The condition-derived event processing unit is used to be injected into the event processor module when the main event meets the policy conditions, thereby triggering the derived event chain.
[0027] Furthermore, the condition-derived event handling unit includes a compliance and audit unit;
[0028] The compliance and audit unit is used to inject policy checks or permission verifications into a node executed by the event processing logic unit. Outputs that fail are marked or replaced and written to the audit.
[0029] Furthermore, it also includes a dynamic tuning unit, which is used to periodically analyze buffer hit rate and isolation count indicators, adjust aggregation threshold, priority weight and derivation trigger conditions to form a closed loop.
[0030] Furthermore, in the observation system module, the index collector unit collects indices within an independent processor. The collected indices include: first-piece delay, stage switching time, recommended insertion point timestamp, and buffer hit rate.
[0031] Furthermore, the session management module includes a state machine unit and a context management unit:
[0032] The state machine unit is used to manage key session states, which include the thinking phase, the response phase, the recommended insertion point, and the termination flag.
[0033] The context management unit is used to manage the semantics and timestamps of the context;
[0034] Furthermore, the output module includes: a multi-terminal distribution unit and a playback unit;
[0035] The multi-terminal distribution unit is used to distribute all output segments with time offsets and status tags to multiple terminals for consistent playback.
[0036] The playback unit is used for offline playback.
[0037] Secondly, the present invention provides an event-driven processing method based on the event-driven processing device of the above-mentioned AI dialogue system, comprising:
[0038] The event distribution unit receives standard events converted from session content from the session management module; based on the standard events, it sends a sorting request to the priority scheduling unit; the priority scheduling unit pulls the enabled processing units from the processor registration unit, obtains the return list, and sorts them by priority based on the sorting request from the event distribution unit; the event distribution unit obtains an ordered sequence of event processing logic units from the priority scheduling unit and dynamically injects the event processing logic units in the sequence into the event processor module.
[0039] The event handling logic unit processes events;
[0040] The adaptive buffer unit adaptively buffers the AI dialogue results.
[0041] The metrics collection unit collects metrics during the AI dialogue process;
[0042] The output module receives the results from the adaptive buffer and outputs them.
[0043] According to a third aspect of the present invention, an event-driven processing device is provided, the device comprising: a processor and a memory;
[0044] The memory is used to store one or more program instructions;
[0045] The processor is configured to run one or more program instructions to perform the steps of the event-driven processing method as described in any of the preceding embodiments.
[0046] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored on the computer program, and the computer program, when executed by a processor, implements the steps of the event-driven processing method as described in any of the preceding claims.
[0047] According to a fifth aspect of the present invention, a computer program product is provided, the computer program product including a computing program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the steps of the event-driven processing method as described in any of the preceding claims.
[0048] The event-driven processing device for the AI dialogue system of the present invention has the following advantages:
[0049] 1. Plug-in extension: New features can be added to the lifecycle simply by registering a processor instance.
[0050] 2. Low-intrusion extension: Core generation logic and functional extension are completely decoupled.
[0051] 3. Separate metrics: First token, stage time, recommended insertion, etc. are measured in independent processors.
[0052] 4. Fault isolation: Single-processor anomalies are suppressed to prevent cascading failures.
[0053] 5. Chained enhancement: Allows conditional events (such as recommendations) to enable feature combination.
[0054] 6. Dynamic and maintainable: Registration / deregistration during runtime optimizes operational flexibility.
[0055] 7. Consistency: A unified StreamContext is used throughout the entire process, reducing state duplication.
[0056] 8. Combinable: Capabilities such as buffering, tracking, recommendation, and auditing can be selected and configured as needed. Attached Figure Description
[0057] To more clearly illustrate the embodiments of the present invention or the technical solutions in 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 merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0058] Figure 1 This is an architectural diagram of an event-driven processing device for an AI dialogue system provided in an embodiment of the present invention. Detailed Implementation
[0059] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0061] The event-driven processor device of the AI dialogue system of this invention integrates various horizontal capabilities of the AI dialogue flow (state management, buffer optimization, indicator collection, recommendation insertion, auditing / security) in a loosely coupled manner using an "event-driven + component unit collaboration" approach. Its core does not emphasize specific code class names, but rather abstract components and their relationships, as reflected in:
[0062] 1. Lifecycle event abstraction: The session from "startup → generation → stage switching → recommendation insertion → end" is uniformly abstracted into an extensible event set; any new scenario (such as multimodal, risk control) only requires defining a new event type.
[0063] 2. Event Dispatcher: Maintains a mapping table between events and processing units, and supports dynamic addition, modification, and removal during runtime. This centralized directory allows for the enumeration of system capabilities and controlled evolution.
[0064] 3. Unified Handler Interface: The handling unit receives standardized events and context (StateContext), and returns optional output fragments or metric updates to achieve "pluggable" consistency.
[0065] 4. Adaptive Buffer: Independently responsible for aggregating consecutive small segments and switching the first segment acceleration strategy; dynamically calculates the aggregation threshold using real-time statistics (segment generation interval, length distribution), taking into account both continuity and timeliness.
[0066] 5. State Machine Unit: Manages key session states (such as the thinking phase, response phase, recommended insertion point, and termination marker), providing explicit signals for buffering strategies and priority decisions.
[0067] 6. Priority Scheduler Unit: When multiple processing units apply the same event simultaneously, they are executed according to preset or dynamically adjusted weights to ensure that critical paths (such as processing related to the first packet) are given priority.
[0068] 7. Dynamic Extension Registry: New capabilities are hot-swapped via the registry; uninstallation or replacement does not require restarting the main service, improving operational and testing efficiency.
[0069] 8. Fault Isolation Layer: Each processing unit is wrapped in an isolation layer, and exceptions are recorded and measured without propagating to the outer layer and blocking the main generation; optional circuit breaking and degradation strategies are available.
[0070] 9. Conditional Derivation: When a main event satisfies a policy (label, context signal, or model output marker), a chain of derived events is triggered; enabling "on-demand insertion" of recommendation, auditing, policy injection, etc.
[0071] 10. Metrics & Trace Collector: Independently collects first-chip latency, stage switching time, recommended insertion point timestamp, buffer hit rate, etc., to provide an observable basis for subsequent optimization and SLA management.
[0072] 11. Stream Publisher & Replay: All output segments have time offsets and status tags, can be played consistently across multiple devices, and support offline playback and auditing.
[0073] 12. Security and Compliance (Policy / Audit Hooks): Inject policy checks or hash signatures into specific nodes of the event chain to form traceability and gray-scale control capabilities.
[0074] Figure 1 An architectural diagram of an event-driven processing device for an AI dialogue system according to an embodiment of the present invention is shown.
[0075] like Figure 1 As shown in this embodiment, an event-driven processing device for an AI dialogue system includes: an event orchestration module, a session management module, an event processor module, a system observation module, and an output module. The event orchestration module includes an event distribution unit, a priority scheduling unit, and a processor registration unit; the event processor module includes an event processing logic unit and an adaptive buffer unit, and may also include an exception capture and circuit breaker unit and a condition-derived event processing unit; the system observation module includes an indicator collector unit.
[0076] Specifically, the event dispatch unit is used to receive standard events converted from session content from the session management module; based on the standard events, it sends a sorting request to the priority scheduling unit to obtain an ordered sequence of event processing logic units, and dynamically injects the event processing logic units in the sequence into the event processor module.
[0077] The session management module includes a state machine unit and a context management unit: the state machine unit manages key session states, including the thinking phase, the response phase, the recommendation insertion point, and the termination marker; the context management unit manages the semantics and timestamps of the context.
[0078] The priority scheduling unit is used to pull the enabled processing units from the processor registration unit, obtain the return list, and sort the priorities based on the sorting request of the event dispatch unit. When sorting priorities, the priority scheduling unit sorts according to preset or dynamically adjusted weights to give priority to critical paths. The dynamic indicators used to dynamically adjust the weights include recent latency and failure rate.
[0079] The processor registration unit is hot-swappable and used for dynamically registering and unloading processing units; it is also used to manage the registration of processing units during device operation by extending the registry.
[0080] The event handling logic unit is used to perform event handling.
[0081] An adaptive buffer unit is used to adaptively buffer the AI dialogue results; more specifically, it is used to aggregate consecutive small segments of the AI dialogue results and switch the first segment acceleration strategy; and dynamically calculates the aggregation threshold using real-time statistical data on the segment generation interval and length distribution.
[0082] The exception handling and circuit breaking unit is used to provide fault isolation and circuit breaking degradation for the execution of the event handling logic unit. Fault isolation includes wrapping the execution of the event handling logic unit in an isolation layer, and exceptions are logged and measured.
[0083] The condition-derived event handling unit is injected into the event handler module when the main event meets the policy conditions, triggering the derived event chain.
[0084] Here, the condition-derived event handling unit may include a compliance and audit unit; the compliance and audit unit is used to inject policy checks or permission verifications at a certain node executed by the event handling logic unit, and the output that fails is marked or replaced and written to the audit.
[0085] The aforementioned device may also include a dynamic tuning unit for periodically analyzing buffer hit rate and isolation count metrics, adjusting aggregation thresholds, priority weights, and derived triggering conditions to form a closed loop.
[0086] The indicator collection unit in the aforementioned system observation module is used to collect indicators during the AI dialogue process. It collects indicators within an independent processor, including: first chip latency, stage switching time, recommended insertion point timestamp, and buffer hit rate.
[0087] The aforementioned output module is used to receive the results of the adaptive buffer and output them. The output module includes: a multi-terminal distribution unit and a playback unit; the multi-terminal distribution unit is used to distribute all output segments with time offsets and status tags to multiple terminals for consistent playback; the playback unit is used for offline playback.
[0088] The architecture of the event-driven processor device in the aforementioned AI dialogue system can achieve:
[0089] 1. Centralized registration of event types → processor instances;
[0090] 2. The processor conforms to a unified interface (BaseEventHandler.handle), supporting asynchronous execution and context access;
[0091] 3. Supports chained event dispatch: Executes by event type and allows derived events to be triggered again within the processor;
[0092] 4. Provides dynamic registration / deregistration, priority sorting, and isolation protection mechanisms;
[0093] 5. Metrics such as first token, stage switching, and recommended insertion are collected in a separate processor;
[0094] 6. New features (such as multimodal filtering, policy routing, and audit signatures) can be inserted as independent processors on demand;
[0095] 7. Fault isolation and degradation: Processor anomalies do not affect the main generation process.
[0096] This embodiment also provides an event-driven processing method based on the event-driven processing device of the above-mentioned AI dialogue system, including:
[0097] The event distribution unit receives standard events converted from session content from the session management module; based on the standard events, it sends a sorting request to the priority scheduling unit. The priority scheduling unit pulls the enabled processing units from the processor registration unit, obtains the return list, and sorts them by priority based on the sorting request from the event distribution unit; the event distribution unit obtains an ordered sequence of event processing logic units from the priority scheduling unit and dynamically injects the event processing logic units in the sequence into the event processor module; the event processing logic units perform event processing; the adaptive buffering unit adaptively buffers the AI dialogue results; the indicator collection unit collects indicators during the AI dialogue process; and the output module receives the adaptively buffered results and outputs them.
[0098] The following example illustrates the situation: "A user inquires about the latest status of their order."
[0099] 1. System Initialization: Load basic event types and corresponding processing units; establish the initial stage and termination flag of the session state; set the initial aggregation threshold for the buffer and the first output strategy. This prepares a unified entry point for subsequent order queries and response generation.
[0100] 2. Event Standardization: The original user questions and subsequent model-generated fragments are uniformly converted into standard event objects, with timestamps and contextual references. For example, the question "Where is my order now?" is standardized to facilitate the extraction of the order number later.
[0101] 3. Distribution and Scheduling: After receiving standard events, the event distribution unit prioritizes currently executable processing units based on a combination of static weights and dynamic metrics such as recent processing time and failure rate. For example, order number identification and status query take precedence over recommendation and auditing.
[0102] 4. Adaptive Buffering: Fine-grained output segments are buffered; aggregation or direct pass-through is determined based on segment intervals, average length, and stage status, with a tail refresh performed at the end of the stage. For example, if the first paragraph has reached the minimum readable length, an order status overview is immediately returned to the user.
[0103] 5. Conditional Derivation: When the strategy conditions are met, a derived event is injected and the scheduling process is re-entered. For example, a logistics progress prompt or delivery notice is triggered in the "shipped but not signed for" status. An "estimated delivery" reminder is automatically added after the order status query is completed.
[0104] 6. Fault Isolation: Each processing unit executes within an isolation layer; exceptions are recorded and counted, and the current output is skipped without affecting subsequent units; high-error-rate units can be temporarily disabled when necessary. For example, if the logistics interface times out, it can still output the known order stage and prompt you to check again later.
[0105] 7. Metrics and Tracking: Laterally monitor key nodes (first piece generation, stage switching, derivative triggering, buffer refresh), record timestamps and statistical values for subsequent optimization. For example, track the time taken for this order query and the initial response delay.
[0106] 8. Dynamic Expansion: Processing units can be added, replaced, or disabled during runtime by extending the registry, and the changes will take effect automatically on the next scheduling without requiring a restart. For example, a "logistics risk warning" capability can be added via the registry.
[0107] 9. Security and Compliance: Perform content policy and permission checks at specified event nodes; failed outputs are flagged or replaced and written into the audit trail. For example, filter privacy fields that may be included in order descriptions.
[0108] 10. Lifecycle End: The end event triggers a buffer refresh of remaining fragments; the state enters termination; the metrics component generates a session summary; optionally, a replayable record is created. For example, organize the event sequence of an order inquiry for subsequent analysis.
[0109] 11. Replay and Diagnostics (Optional): Reconstruct the execution sequence based on the stored event and output timeline, verify whether the scheduling and metric collection meet expectations, and provide evidence for optimization and compliance. For example, verify whether the "query → answer → recommendation insertion" chain is executed according to the established priority.
[0110] 12. Dynamic Optimization (Optional): Periodically analyze metrics such as buffer hit rate and isolation count, and adjust aggregation thresholds, priority weights, and derived trigger conditions to form a closed loop. For example, if the first response latency increases, shorten the first aggregation wait time; if the recommended trigger rate is too low, appropriately relax the conditions.
[0111] In addition, embodiments of the present invention also provide an event-driven processing device, the device comprising: a processor and a memory; the memory being used to store one or more program instructions; the processor being used to execute one or more program instructions to perform the steps of the event-driven processing method described above.
[0112] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of an event-driven processing method as described above.
[0113] In addition, embodiments of the present invention also provide a computer program product, which includes computer program instructions that, when executed by a processor, implement the steps of an event-driven processing method as described above.
[0114] In this embodiment of the invention, the processor in the device, computer-readable storage medium, or computer program product can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in this embodiment of the invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in this embodiment of the invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods. The storage medium can be a memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache.By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage media described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable types of memory. Those skilled in the art will recognize that the functionality described in one or more of the examples above can be implemented using a combination of hardware and software. When applied software, the corresponding functionality can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer. Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
[0115] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, or alterations made by those skilled in the art using the disclosed technical content shall fall within the protection scope of the present invention.
Claims
1. An event-driven processing device for an AI dialogue system, characterized in that, include: Event orchestration module, session management module, event handler module, system observation module, and output module; The event orchestration module includes an event distribution unit, a priority scheduling unit, and a processor registration unit; the event processor module includes an event processing logic unit and an adaptive buffer unit; the system observation module includes an indicator collector unit. The event distribution unit is used to receive standard events converted from session content from the session management module; Based on the standard event, a sorting request is sent to the priority scheduling unit to obtain an ordered sequence of event processing logic units, and the event processing logic units in the sequence are dynamically injected into the event processor module. The priority scheduling unit is used to pull the enabled processing units from the processor registration unit, obtain the return list, and sort the priorities based on the sorting request of the event distribution unit. The processor registration unit is hot-swappable and used for dynamically registering and unloading the processing unit. The event processing logic unit is used to perform event processing; The adaptive buffer unit is used to adaptively buffer the AI dialogue results; including: aggregating consecutive small segments of the AI dialogue results and switching the first segment acceleration strategy; dynamically calculating the aggregation threshold using real-time statistical segment generation intervals and length distributions. The indicator collector unit is used to collect indicators during the AI dialogue process; the collected indicators include: first piece delay, stage switching time, recommended insertion point timestamp, and buffer hit rate. The output module is used to receive the result of the adaptive buffer and output it.
2. The event-driven processing device for the AI dialogue system according to claim 1, characterized in that, When the priority scheduling unit sorts priorities, it sorts them according to preset or dynamically adjusted weights to give priority to critical paths; the dynamic indicators used for the dynamic adjustment of weights include recent latency and failure rate. And / or, the processor registration unit is further configured to register and manage the processing units during device operation by extending the registry.
3. The event-driven processing device for the AI dialogue system according to claim 1, characterized in that, The event handler module further includes an exception capture and circuit breaker unit and / or a condition-derived event handling unit; The exception capture and circuit breaker unit is used to provide fault isolation and circuit breaker degradation for the execution of the event processing logic unit. The fault isolation includes wrapping the execution of the event processing logic unit in an isolation layer and recording and measuring exceptions. The condition-derived event processing unit is used to be injected into the event processor module when the main event meets the policy conditions, thereby triggering the derived event chain.
4. The event-driven processing device for the AI dialogue system according to claim 3, characterized in that, The condition-derived event handling unit includes a compliance and audit unit; The compliance and audit unit is used to inject policy checks or permission verifications into a node executed by the event processing logic unit. Outputs that fail are marked or replaced and written to the audit.
5. The event-driven processing device for the AI dialogue system according to claim 4, characterized in that, It also includes a dynamic tuning unit, which is used to periodically analyze buffer hit rate and isolation count metrics, adjust aggregation threshold, priority weight and derivation trigger conditions to form a closed loop.
6. The event-driven processing device for the AI dialogue system according to claim 1, characterized in that, In the system observation module, the index collector unit collects indicators within an independent processor; And / or, the session management module includes a state machine unit and a context management unit: The state machine unit is used to manage key session states, which include the thinking phase, the response phase, the recommended insertion point, and the termination flag. The context management unit is used to manage the semantics and timestamps of the context; And / or, the output module includes: a multi-terminal distribution unit and a playback unit; The multi-terminal distribution unit is used to distribute all output segments with time offsets and status tags to multiple terminals for consistent playback. The playback unit is used for offline playback.
7. An event-driven processing method based on the event-driven processing apparatus of the AI dialogue system according to any one of claims 1-6, characterized in that, include: The event dispatch unit receives standard events converted from session content from the session management module; Based on the standard event, a sorting request is sent to the priority scheduling unit. The priority scheduling unit pulls the enabled processing units from the processor registration unit, obtains the return list, and sorts them by priority based on the sorting request from the event distribution unit. The event distribution unit obtains an ordered sequence of event processing logic units from the priority scheduling unit and dynamically injects the event processing logic units in the sequence into the event processor module. The event handling logic unit processes events; The adaptive buffer unit adaptively buffers the AI dialogue results. The metrics collector unit collects metrics during the AI dialogue process; The output module receives the results from the adaptive buffer and outputs them.
8. An event-driven processing device, characterized in that, The device includes: a processor and a memory; The memory is used to store one or more program instructions; The processor is configured to run one or more program instructions to perform the steps of the event-driven processing method as described in claim 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the event-driven processing method as described in claim 7.
10. A computer program product, characterized in that, The computer program product includes computer program instructions that, when executed by a processor, implement the steps of the event-driven processing method as described in claim 7.