A method and system for generating a causal playback timeline for an agent execution process

CN122653943APending Publication Date: 2026-08-28BEIJING QIYU INTERACTIVE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610890929.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0004]本发明要解决的技术问题是提供一种面向智能体执行过程的因果回放时间线生成方法及系统,以解决现有多采集器异步执行场景中回放顺序不稳定、回放帧难以与原始事件和状态快照一致校验、以及审计证据难以关联角色行为序列和组行为序列的问题

Benefits of technology

[0009] The present invention also provides a corresponding method and electronic device, which can execute the processing steps corresponding to the above-described system modules. Compared with the prior art, the present invention has at least the following beneficial effects: improving the determinism of the playback order of asynchronous execution by multiple agents; verifying the consistency between playback frames, state snapshots, role behavior sequences, group behavior sequences, and event chains; and facilitating anomaly localization and audit review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122653943A_ABST
    Figure CN122653943A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of agent execution tracking and verifiable playback, and discloses an agent execution process-oriented causal playback timeline generation method and system. The system receives original behavior data generated by an agent runtime, a finite state machine runtime, a tool call wrapper, an agent general control interface, a scene editing module, a group behavior sequence generation module or an audit management module, converts the original behavior data into standard behavior events, establishes double indexes based on timestamps and collection side serial numbers, and constructs a causal event tree according to parent event identifiers and associated event identifiers. The system generates a playbackable timeline frame in combination with a finite state machine state sequence, a role behavior sequence, a group behavior sequence, a behavior state snapshot and a scene layout version, and generates an audit evidence package based on event hash, previous event hash, snapshot hash, frame hash and scene layout hash, so as to improve playback sequence determinacy and consistency checking capability in an asynchronous execution scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence agent execution tracking, finite state machine state replay, computer visualization, audit evidence chain, and data consistency verification, specifically to a method and system for generating a causal replay timeline for the execution process of an intelligent agent. Background Technology

[0002] Existing workflow telemetry, distributed tracing, event log retrieval, and program replay solutions typically display the execution process based on timestamps, call span, or log order. In multi-agent task execution, there may be multiple collectors, asynchronous tool calls, task handover, approval waiting, failure retries, scene editing, and group behavior generation. Simply sorting by log time is easily affected by clock skew and the order of asynchronous arrivals.

[0003] Existing hash chain auditing can improve log tamper resistance, but it typically cannot prove consistency between role states, group behavior states, scene layouts, behavior state snapshots, and original events in the replay footage. For agent execution processes generated by finite state machine configurations, environmental and team context decision chains, and group behavior script templates, it is also necessary to constrain standard behavior events, finite state machine state sequences, role behavior sequences, group behavior sequences, and scene layout versions into verifiable replay timeline frames. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and system for generating causal replay timelines for the execution process of intelligent agents, so as to solve the problems of unstable replay order, difficulty in verifying the consistency of replay frames with original events and state snapshots, and difficulty in associating audit evidence with role behavior sequences and group behavior sequences in existing multi-collector asynchronous execution scenarios.

[0005] To solve the above-mentioned technical problems, the system provided by the present invention includes at least a behavior data receiving module, a standard behavior event generation module, a dual index construction module, a causal event tree construction module, a state snapshot management module, a playback frame generation module, a hash evidence chain generation module, and a query output module.

[0006] The behavior data receiving module receives raw behavior data from the agent runtime, finite state machine runtime, tool invocation wrapper, agent control interface, scene editing module, group behavior sequence generation module, or audit governance module. The standard behavior event generation module converts the raw behavior data into standard behavior events. A standard behavior event includes at least a run identifier, step run identifier, status identifier, operation identifier, timestamp, acquisition-side sequence number, parent event identifier, and associated event identifier.

[0007] The dual-index building module establishes time and sequence indexes based on timestamps and acquisition serial numbers. When timestamps from different acquisition devices differ, the acquisition serial number is used as the primary basis for playback sorting, while the timestamp is used as the basis for time range retrieval, display, or auxiliary sorting. The causal event tree building module constructs a causal event tree based on parent event identifiers and related event identifiers.

[0008] The State Snapshot Management module is used to generate or load behavioral state snapshots and scene layout versions. The Replay Frame Generation module generates replayable timeline frames based on standard behavioral events, finite state machine state sequences, role behavioral sequences, group behavioral sequences, behavioral state snapshots, and scene layout versions. The Hash Evidence Chain Generation module generates audit evidence packages based on event hashes, preceding event hashes, behavioral state snapshot hashes, frame hashes, and scene layout hashes.

[0009] The present invention also provides a corresponding method and electronic device, which can execute the processing steps corresponding to the above-described system modules. Compared with the prior art, the present invention has at least the following beneficial effects: improving the determinism of the playback order of asynchronous execution by multiple agents; verifying the consistency between playback frames, state snapshots, role behavior sequences, group behavior sequences, and event chains; and facilitating anomaly localization and audit review. Attached Figure Description

[0010] Figure 1 This is a standard behavioral event structure diagram of an embodiment of the present invention.

[0011] Figure 2 This is a schematic diagram of a dual-index and causal event tree according to an embodiment of the present invention.

[0012] Figure 3 This is a diagram showing the relationship between state snapshots and scene layout versions according to an embodiment of the present invention.

[0013] Figure 4 This is a flowchart of a replayable timeline frame generation according to an embodiment of the present invention.

[0014] Figure 5 This is a playback frame and hash consistency verification diagram according to an embodiment of the present invention.

[0015] Figure 6 This is a schematic diagram of an electronic device structure according to an embodiment of the present invention. Detailed Implementation

[0016] The embodiments of the present invention will now be described with reference to the accompanying drawings. The described embodiments are for illustrating the technical solutions of the present invention and do not limit the scope of protection of the present invention.

[0017] In one implementation, such as Figure 1As shown, the standard behavior event generation module converts raw behavior data generated by the agent runtime, finite state machine runtime, tool call wrapper, agent central control interface, scene editing module, group behavior sequence generation module, or audit governance module into standard behavior events. Standard behavior events include at least the following: runtime identifier, step runtime identifier, status identifier, operation identifier, timestamp, acquisition-side sequence number, parent event identifier, and associated event identifier. They may also include the following: plan identifier, step identifier, status sequence number, event type, event stage, behavior subject information, event load summary, permission context, risk marker, de-identification status, execution permission identifier, allocation source identifier, central control instruction identifier, group behavior script identifier, playback frame range, finite state machine configuration version, scene layout version, and visualization mapping field.

[0018] In one implementation, the standard behavior event generation module is a serial number allocator that maintains the same running identifier. The serial number allocator assigns monotonically increasing acquisition-side serial numbers based on the acquisition arrival order, the original event time, and the running identifier. When there are discrepancies in the timestamps from different acquisition devices, the system can still maintain a definite playback order based on the acquisition-side serial numbers.

[0019] In one implementation, such as Figure 2 As shown, the dual-index building module establishes a time index and a sequence index based on timestamps and collection-side sequence numbers. The time index is used for time-range retrieval, display, or auxiliary sorting, while the sequence index is used for replaying sorting and replaying standard behavioral events. The causal event tree building module constructs a causal event tree based on parent event identifiers and related event identifiers. Nodes in the causal event tree correspond to standard behavioral events, and edges represent causal relationships between plan generation, state transition, tool invocation, data access, approval, task handover, allocation targets, group behavior generation, scene editing, errors, or retries.

[0020] In one implementation, such as Figure 3 As shown, the state snapshot management module generates behavior state snapshots when a preset number of events occurs, a preset time interval occurs, a state sequence changes, a role behavior sequence changes, a group behavior sequence changes, a scene layout version changes, or an abnormal event occurs. The behavior state snapshot includes the current finite state machine state, state stack, step execution state, role entity position, role entity state, role behavior sequence position, group behavior sequence position, and scene layout version.

[0021] In one implementation, such as Figure 4As shown, the replay frame generation module starts from the behavior state snapshot closest to the replay start point, replays standard behavior events according to the acquisition side sequence number, and generates or reads replayable timeline frames based on the finite state machine configuration, character behavior sequence, group behavior sequence, and scene layout version. Replayable timeline frames may include frame number, replay time, event identifier set, character entity identifier, character position, character orientation, character state, group behavior identifier, target scene element, connection status, highlighted area, panel summary, audit mark, snapshot hash, and frame hash.

[0022] In one implementation, such as Figure 5 As shown, the hash evidence chain generation module calculates the event hash for the normalized fields of standard behavior events and writes the event hash of the previous valid standard behavior event under the same run identifier into the preceding event hash of the current standard behavior event to form an event hash chain. This module also calculates hash values ​​for behavior state snapshots, replayable timeline frames, scene layout versions, and audit evidence packages, and establishes reference relationships between the event hash chain, behavior state snapshot hash, frame hash, scene layout hash, and evidence package hash.

[0023] In one implementation, the audit evidence package may include event summaries, causal chains, finite state machine state sequences, role behavior sequence summaries, group behavior sequence summaries, scene layout versions, anonymized status, permission verification results, risk handling results, approval records, execution permission verification records, replay entry points, and hash verification information. The query output module can retrieve corresponding timeline segments based on run identifiers, plan identifiers, step run identifiers, status identifiers, role entity identifiers, group behavior script identifiers, operation identifiers, risk levels, anomaly types, time ranges, or scene layout versions.

[0024] In one implementation, during the replay frame and hash consistency verification process, the system first verifies that the standard behavior event has not been replaced based on the event hash chain, then verifies the replay starting point state based on the behavior state snapshot hash, verifies the scene version of the role based on the scene layout hash, and verifies the role's position, orientation, state, group behavior identifier, and panel summary based on the frame hash. If any hash verification fails, the query output module outputs the abnormal event identifier, abnormal frame range, abnormal hash type, and abnormal reason summary.

[0025] In one implementation, the system can receive standard behavioral events corresponding to target states, team member sets, or work allocation instructions generated by the environmental context and team context decision links, and it can also receive standard behavioral events corresponding to group behavioral sequences generated by group behavioral script templates. By incorporating the above events, along with role behavioral sequences, group behavioral sequences, and scene layout versions, into the replay frame generation process, the system can maintain consistency with the preceding agent state decisions and collaborative orchestration results.

[0026] In one application implementation, the causal replay timeline generation system can be used to develop automated intelligent agent systems. The system receives runtime events generated by intelligent agents such as products, designs, programs, reviews, tests, builds, and releases, and outputs a determined structured replay result according to the processing chain of this application.

[0027] In another application implementation, the causal replay timeline generation system can be used in enterprise intelligent agent operation platforms. Enterprises can deploy the technology of this application on private servers, cloud instances, development workstations, or edge computing devices to support intelligent agent operation monitoring, dispatching, replay, or governance.

[0028] like Figure 6 As shown, an electronic device may include at least one processor, a memory, a communication interface, and an input / output interface. The memory stores a computer program, and when the processor executes the computer program, it can implement the methods described above.

Claims

1. A causal replay timeline generation system for intelligent agent execution processes, characterized in that, The system includes a behavior data receiving module, a standard behavior event generation module, a dual-index construction module, a causal event tree construction module, a state snapshot management module, a playback frame generation module, a hash evidence chain generation module, and a query output module. The behavior data receiving module receives raw behavior data from an agent runtime, a finite state machine runtime, a tool call wrapper, an agent control interface, a scene editing module, a group behavior sequence generation module, or an audit governance module. The standard behavior event generation module converts the raw behavior data into standard behavior events, which at least include a run identifier, a step run identifier, a state identifier, an operation identifier, a timestamp, a collection-side sequence number, a parent event identifier, and a related event identifier. The dual-index construction module establishes a time index and a sequence index based on the timestamp and the collection-side sequence number. The causal event tree construction module is used to... The parent event identifier and the associated event identifier construct a causal event tree. The state snapshot management module is used to generate or load the behavior state snapshot and scene layout version associated with the standard behavior event. The replay frame generation module is used to generate a replayable timeline frame based on the standard behavior event, finite state machine state sequence, role behavior sequence, group behavior sequence, behavior state snapshot, and scene layout version. The hash evidence chain generation module is used to generate an audit evidence package based on event hash, preceding event hash, behavior state snapshot hash, frame hash, and scene layout hash. The query output module is used to output timeline fragments, causal event tree fragments, replayable timeline frames, or the audit evidence package. This enables the agent execution process generated by the finite state machine configuration, environmental context, team context decision chain, and group behavior script template to form a consistent replay record with a definite order and verifiability.

2. The system according to claim 1, characterized in that, The standard behavioral event also includes at least one of the following fields: plan identifier, step identifier, status sequence number, event type, event stage, behavioral subject information, event load summary, permission context, risk marker, desensitization status, execution permission identifier, allocation source identifier, master control instruction identifier, group behavioral script identifier, replay frame range, finite state machine configuration version, scene layout version, and visualization mapping field.

3. The system according to claim 1, characterized in that, The standard behavior event generation module is a serial number allocator that maintains the same running identifier. It assigns monotonically increasing collection-side serial numbers to standard behavior events based on the collection arrival order, original event time, and running identifier. When there is a discrepancy in the timestamps of different collectors, the dual index construction module uses the collection-side serial number as the main basis for playback sorting and uses the timestamp as the basis for time range retrieval, display, or auxiliary sorting.

4. The system according to claim 1, characterized in that, The nodes of the causal event tree correspond to standard behavioral events, and the edges of the causal event tree represent the causal relationships between plan generation, state transition, tool invocation, data access, approval, task handover, allocation target, group behavior generation, scene editing, error or retry.

5. The system according to claim 1, characterized in that, The state snapshot management module generates a behavior state snapshot when a preset number of events, a preset time interval, a change in state sequence, a change in role behavior sequence, a change in group behavior sequence, a change in scene layout version, or an abnormal event occurs. The behavior state snapshot includes at least one of the following: current finite state machine state, state stack, step running state, role entity position, role entity state, role behavior sequence position, group behavior sequence position, and scene layout version.

6. The system according to claim 1, characterized in that, The playback frame generation module starts from the behavior state snapshot closest to the playback start point, replays the standard behavior events according to the acquisition side sequence number, and generates or reads replayable timeline frames based on the finite state machine configuration, character behavior sequence, group behavior sequence, and scene layout version. The replayable timeline frames include at least one of the following: frame number, playback time, event identifier set, character entity identifier, character position, character orientation, character state, group behavior identifier, target scene element, connection state, highlighted area, panel summary, audit mark, snapshot hash, and frame hash.

7. The system according to claim 1, characterized in that, The hash evidence chain generation module calculates the event hash for the normalized fields of the standard behavior event, and writes the event hash of the previous valid standard behavior event under the same running identifier into the preceding event hash of the current standard behavior event to form an event hash chain. The hash evidence chain generation module also calculates the hash value for the behavior state snapshot, the replayable timeline frame, the scene layout version, and the audit evidence package respectively, and establishes the reference relationship between the event hash chain, the behavior state snapshot hash, the frame hash, the scene layout hash, and the evidence package hash.

8. A method for generating a causal replay timeline for the execution process of an intelligent agent, characterized in that, The process includes the following steps: S1, receiving raw behavioral data from the agent runtime, finite state machine runtime, tool call wrapper, agent control interface, scene editing module, group behavior sequence generation module, or audit governance module; S2, converting the raw behavioral data into standard behavioral events, wherein the standard behavioral events include at least a run identifier, a step run identifier, a state identifier, an operation identifier, a timestamp, a collection-side sequence number, a parent event identifier, and an associated event identifier; S3, establishing a time index and a sequence index based on the timestamp and the collection-side sequence number; S4, constructing a causal event tree based on the parent event identifier and the associated event identifier; S5, generating or loading a behavioral state snapshot and a scene layout version associated with the standard behavioral events; S6, generating a replayable timeline frame based on the standard behavioral events, finite state machine state sequence, role behavior sequence, group behavior sequence, behavioral state snapshot, and scene layout version; and S7, generating an audit evidence package based on event hash, preceding event hash, behavioral state snapshot hash, frame hash, and scene layout hash.

9. The method according to claim 8, characterized in that, Converting the raw behavioral data into standard behavioral events includes at least one of the following: performing field mapping, field validation, de-identifying status recording, generating event load summaries, allocating acquisition-side serial numbers, deduplicating events, normalizing field calculations, and calculating event hashes. Generating the replayable timeline frame includes loading the behavioral state snapshot closest to the playback start point, replaying standard behavioral events according to the acquisition-side serial number, generating or reading character behavioral sequences and group behavioral sequences based on a finite state machine configuration, and mapping the character behavioral sequences, group behavioral sequences, and scene layout versions to at least one of the following: character position, character orientation, character state, target scene element, connection state, highlighted area, panel summary, and audit mark.

10. An electronic device comprising at least one processor and a memory communicatively connected to said at least one processor, characterized in that, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, cause the electronic device to perform the method of claim 8 or 9.