An agent multi-source enterprise data recall method, device, equipment and storage medium
By generating knowledge fragments with fragment version identifiers in enterprise data retrieval, establishing a two-way mapping relationship and performing differential retrieval, the problems of inaccurate data retrieval and inaccurate feedback in existing technologies are solved, achieving efficient and secure data management.
Patent Information
- Application Number
- CN202611400071.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-27
AI Technical Summary
Existing enterprise data retrieval solutions are unable to accurately identify and remove expired, unauthorized, or unsuitable data for the current stage, resulting in invalid or non-compliant retrieval results and inaccurate feedback attribution.
By generating knowledge fragments with fragment version identifiers, the current corpus state version and task state are determined, a two-way mapping relationship between knowledge fragments and activity context snapshots is established, eligibility criteria are verified, knowledge fragments affected by data events or task migrations are accurately identified, and differential recall is performed.
It achieves accurate and consistent recall and feedback attribution, reduces the overhead of duplicate recalls, and improves the real-time performance and security of enterprise data management.
Smart Images

Figure CN123178355A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of enterprise data governance technology, and in particular to a method, apparatus, device and storage medium for multi-source enterprise data retrieval by an intelligent agent. Background Technology
[0002] In the context of digital transformation, enterprise intelligent agents need to integrate heterogeneous data from multiple sources, such as documents, databases, and business systems, to complete complex tasks. To support efficient retrieval, existing solutions often employ a knowledge base combined with enhanced retrieval generation, using semantic slicing and hybrid retrieval to acquire data, and introducing caching mechanisms to improve response speed.
[0003] However, the above solutions still have significant shortcomings in enterprise data retrieval scenarios. First, traditional caching or retrieval result reuse mechanisms are typically geared towards static knowledge bases or single-round question answering, lacking linkage with the dynamically changing task states of intelligent agents. Enterprise data is constantly changing (e.g., permission updates, version iterations), and the intelligent agent tasks themselves go through different stages such as planning, execution, and review, with varying requirements for data timeliness, permissions, and applicability at each stage. Existing solutions cannot accurately identify and discard expired, unauthorized, or unsuitable data for the current stage when data or task states change, leading to invalid or non-compliant retrieval results.
[0004] Secondly, existing feedback mechanisms often associate execution results with query terms or knowledge identifiers in a coarse-grained manner, making it difficult to accurately attribute them to the actual data version used. When data changes, failures or successes are easily attributed to fragments that were not actually used or older versions, affecting the accuracy of recall ranking and knowledge graph updates.
[0005] Therefore, there is an urgent need for an enterprise data recall method that can sense dynamic changes in enterprise data and the migration of intelligent agent task states, and achieve accurate, consistent recall and feedback attribution. Summary of the Invention
[0006] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for multi-source enterprise data retrieval by an intelligent agent, which can achieve accurate and consistent retrieval and feedback attribution of enterprise data, thereby improving the accuracy of enterprise data management. The specific solution is as follows: Firstly, this application discloses a method for recalling multi-source enterprise data by an intelligent agent, including: Receive data events corresponding to changes in multi-source enterprise data, generate a first knowledge fragment with a fragment version identifier based on the data events, and determine the current corpus state version; The current task state of the enterprise-level intelligent agent is determined, and the first qualification condition is verified based on the current task state to generate a qualification certificate; The first knowledge fragment that has passed verification, the current corpus state version, and the qualification certificate are assembled into an activity context snapshot, and a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot is established. If a new data event is received or the current task state changes, a second knowledge fragment affected by the data event or the current task state is determined based on the bidirectional mapping relationship. The second knowledge fragment is subjected to a second qualification condition verification, and the knowledge fragments that need to be supplemented are determined based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval for the target knowledge fragment.
[0007] Optionally, receiving data events corresponding to changes in multi-source enterprise data, generating a first knowledge fragment with a fragment version identifier based on the data events, and determining the current corpus state version includes: Receive data changes from several data sources through connectors, listeners, database change subscriptions, interface polling, or message queues, and convert each received data change into a data event in a uniform format. The source data corresponding to the data event is segmented to generate a first knowledge segment with a unified segment identifier and a segment version identifier. After the content, version, permissions, or lifecycle status of the first knowledge fragment changes and the status is successfully submitted, the corpus status version is incremented or replaced to obtain the current corpus status version.
[0008] Optionally, determining the current task state of the enterprise-level intelligent agent and performing a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate includes: Read the task identifier, task step identifier, current execution stage, tool execution status, user role, permission scope, task time, output target and risk level of the enterprise-level intelligent agent to obtain the current task status; The first eligibility condition is determined based on the current task status; Using the first qualification condition, the permission level, fragment version identifier, validity period and applicable stage of the first knowledge fragment are sequentially verified to obtain the first knowledge fragment that passes the verification. Generate a qualification certificate corresponding to the first knowledge fragment; the qualification certificate records the permission verification result of the first knowledge fragment during verification, the selected valid version, the applicable time interval, and the applicable task stage.
[0009] Optionally, assembling the verified first knowledge fragment, the current corpus state version, and the qualification certificate into an activity context snapshot, and establishing a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot, includes: The unified fragment identifier and corresponding fragment version identifier of the first knowledge fragment that has passed the first qualification condition verification are assembled with the current corpus state version and the qualification certificate into an activity context snapshot; Establish a first reverse mapping from the unified fragment identifier of the first knowledge fragment to the activity context snapshot identifier that references the first knowledge fragment, and a second reverse mapping from the activity context snapshot identifier to the fragment version identifier contained therein; The first reverse mapping and the second reverse mapping are determined as a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot.
[0010] Optionally, if a new data event is received or the current task state changes, determining the second knowledge fragment affected by the data event or the current task state based on the bidirectional mapping relationship includes: If a new data event is received, the source object identifier contained in the new data event is determined, and the knowledge fragments whose source object identifiers are consistent with the source object identifiers are determined as the set of directly affected knowledge fragments; Based on the dependency, reference, overriding, and conflict relationships of each knowledge fragment in the directly affected knowledge fragment set, the dependency closure is determined; Based on the first reverse mapping, determine the activity context snapshot that references the directly affected knowledge fragment set or the knowledge fragment in the dependent closure, and obtain the affected snapshot set; Based on the second reverse mapping, the first target version identifier contained in each activity context snapshot in the affected snapshot set is determined, and the knowledge fragment corresponding to the first target version identifier is determined as the second knowledge fragment; If the current task state is migrated from the old task state to the new task state, the task state version corresponding to the current task state is incremented to obtain the migrated task state version. The permission predicate, version predicate, time predicate, task stage predicate, required corpus view, tool constraints and context structure corresponding to the old task state and the new task state are compared to obtain the state differences; Based on the second reverse mapping, the second target version identifier contained in the activity context snapshot corresponding to the current task step of the enterprise-level intelligent agent is determined, and the knowledge fragment related to the state difference in the knowledge fragment corresponding to the second target version identifier is determined as the second knowledge fragment.
[0011] Optionally, the step of performing a second qualification condition verification on the second knowledge fragment and determining the knowledge fragments that need to be supplemented based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval on the target knowledge fragment, includes: Based on the current task status after migration, the second qualification condition verification is performed on each of the second knowledge segments to obtain the verification results; the verification results include a first verification result where the verification passes and the version identifier of the referenced segment has not been replaced, and a second verification result where the verification fails or the version identifier of the referenced segment has been replaced. The knowledge segments in the second knowledge segment that correspond to the first verification result are determined as the retention set, and the knowledge segments in the second knowledge segment that correspond to the second verification result are determined as the elimination set; The fragment version identifier and corresponding qualification certificate of the knowledge fragment in the elimination set are deleted from the activity context snapshot to obtain the activity context snapshot after deletion; The context structure required for the current task state after migration is compared with the retention set. The part of the context structure not covered by the retention set is identified as a context gap, and the knowledge fragment corresponding to the context gap is identified as the knowledge fragment that needs to be supplemented, so as to obtain the target knowledge fragment. Multi-channel recall is performed on the target knowledge fragment to obtain candidate knowledge fragments; the multi-channel recall includes task stage recall, time version recall and permission filtering, as well as semantic recall, keyword recall, entity recall, historical successful sample recall and conflict avoidance recall.
[0012] Optionally, after performing enterprise data retrieval on the target knowledge fragment, the method further includes: The activity context snapshot is updated to obtain the updated activity snapshot. Before the enterprise-level agent calls the generation model or tool, the current corpus state version and the current task state version are read to obtain the target corpus state version and the target task state version. The target corpus state version and the target task state version are compared with the corpus state version and task state version corresponding to the updated activity snapshot to obtain the consistency verification result. Based on the consistency verification results, the enterprise-level intelligent agent invokes the generation model or tool to obtain the execution results; the execution results include manually retained, manually deleted, execution errors, approved, business effects, expired markers, and conflict markers; The execution result is bound to the usage trajectory record to obtain a feedback record. Based on the feedback record, the candidate knowledge fragments are sorted when enterprise data is retrieved for the target knowledge fragment.
[0013] Secondly, this application discloses a multi-source enterprise data retrieval device for intelligent agents, comprising: The corpus state version determination module is used to receive data events corresponding to changes in multi-source enterprise data, generate a first knowledge fragment with a fragment version identifier based on the data events, and determine the current corpus state version. The qualification certificate generation module is used to determine the current task state of the enterprise-level intelligent agent and perform a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate. The mapping relationship establishment module is used to assemble the verified first knowledge fragment, the current corpus state version, and the qualification certificate into an activity context snapshot, and establish a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot; The fragment determination module is used to determine a second knowledge fragment affected by the data event or the current task state based on the bidirectional mapping relationship if a new data event is received or the current task state changes. The data retrieval module is used to perform a second qualification condition verification on the second knowledge fragment, and determine the knowledge fragments that need to be supplemented based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval on the target knowledge fragment.
[0014] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor for executing the computer program to implement the aforementioned multi-source enterprise data retrieval method for intelligent agents.
[0015] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned method for recalling multi-source enterprise data of an intelligent agent.
[0016] As can be seen, in this invention, data events corresponding to changes in multi-source enterprise data are received, and a first knowledge fragment with a fragment version identifier is generated based on the data event, and the current corpus state version is determined; the current task state of the enterprise-level intelligent agent is determined, and a first qualification condition verification is performed on the first knowledge fragment based on the current task state to generate a qualification certificate; the first knowledge fragment that passes the verification, the current corpus state version, and the qualification certificate are assembled into an activity context snapshot, and a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot is established; if a new data event is received or the current task state changes, a second knowledge fragment affected by the data event or the current task state is determined based on the bidirectional mapping relationship; a second qualification condition verification is performed on the second knowledge fragment, and the knowledge fragment that needs to be supplemented is determined based on the verification result of the second qualification condition verification to determine the target knowledge fragment, and enterprise data retrieval is performed on the target knowledge fragment. That is, by introducing dual version management of corpus state version and task state version, and establishing a bidirectional mapping relationship between knowledge fragments and activity context snapshots, it is possible to accurately locate knowledge fragments affected by data events or task migrations, and perform supplementary retrieval only for context gaps. This significantly reduces the computational overhead of repeated recalls, while effectively preventing expired, unauthorized, or unsuitable fragments from remaining in the agent's context. This significantly improves the real-time performance, consistency, and security of enterprise data recall, providing a reliable guarantee for the stable operation of agents in dynamic and ever-changing enterprise environments. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 This application discloses a flowchart of a multi-source enterprise data retrieval method for an intelligent agent. Figure 2 This is a schematic diagram of a multi-source data event-based access process disclosed in this application; Figure 3 This is a flowchart disclosed in this application showing how a data event stream and a task state stream jointly drive an activity context snapshot; Figure 4 This is a schematic diagram illustrating a bidirectional mapping between a knowledge fragment, a corpus view, and an activity context snapshot as disclosed in this application. Figure 5 This is a schematic diagram of the data event impact set calculation and activity context failure process disclosed in this application; Figure 6 This is a schematic diagram of a task state transition triggering activity context differential update process disclosed in this application; Figure 7 This is a schematic diagram of an activity context snapshot consistency gating and execution feedback attribution disclosed in this application; Figure 8 This is a schematic diagram of a streaming semantic slicing process disclosed in this application; Figure 9 This is a schematic diagram of the structure of a multi-source enterprise data retrieval device for an intelligent agent disclosed in this application; Figure 10 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Before detailing each step, let's first describe the application scenario addressed in this application's embodiments. When enterprise-level intelligent agents execute tasks, they typically need to access a large amount of industry knowledge, business rules, project materials, historical cases, structured data, real-time business information, audit records, and tool execution logs. These data sources may be distributed across documents, tables, databases, interfaces, chat logs, project systems, audit systems, and generation systems, and their data formats, permission ranges, version statuses, and update frequencies all vary.
[0021] Existing knowledge bases or RAG (Retrieval-Augmented Generation) systems are capable of unified parsing, semantic slicing, and hybrid retrieval of multi-source documents, and have developed solutions for updating knowledge graphs based on user feedback, selecting cached results based on multi-turn dialogues, or gradually supplementing the retrieval context. However, these solutions typically focus on supplementing the knowledge base itself, reusing retrieval results, or improving the quality of the current response, without maintaining an activity context snapshot that simultaneously binds the corpus state version and the task state version for the running agent task.
[0022] During the execution of an intelligent body long-term task, the corpus may be modified, deleted, overwritten, or have its permissions changed. The task may also migrate from the planning phase to the data query, tool execution, content generation, or review phase. If a full recall is performed after each change, a large number of still valid contexts will be processed repeatedly; if no recall is performed, old versions, unauthorized or unsuitable fragments may continue to exist in the context. Using only semantic caching or query intent-based weighting cannot determine which active tasks and which context fragments are affected by a single data event or task state migration.
[0023] Furthermore, if the feedback is only associated with the query or knowledge fragment identifier, without recording the context snapshot, task steps, and knowledge fragment version actually used by the agent, then after data changes, success or failure results are easily attributed to fragments that were not actually used or incorrect versions. To solve the above-mentioned problems of full duplicate recall, activity context version drift, knowledge residue due to permission expiration, and incorrect attribution of execution feedback caused by changes in corpus state or task state, the embodiments of this application provide the following multi-source enterprise data recall method for agents.
[0024] See Figure 1 As shown in the figure, this application discloses a method for recalling multi-source enterprise data by an intelligent agent, including: Step S11: Receive data events corresponding to changes in multi-source enterprise data, generate a first knowledge fragment with a fragment version identifier based on the data events, and determine the current corpus state version.
[0025] In this embodiment, receiving data events corresponding to data changes from multiple enterprise sources, generating a first knowledge fragment with a fragment version identifier based on the data events, and determining the current corpus state version includes: receiving data changes from several data sources through connectors, listeners, database change subscriptions, interface polling, or message queues, and converting each received data change into a data event in a unified format; segmenting the source data corresponding to the data events to generate a first knowledge fragment with a unified fragment identifier and a fragment version identifier; and incrementing or replacing the corpus state version after the content, version, permissions, or lifecycle state of the first knowledge fragment changes and the state is successfully submitted to obtain the current corpus state version.
[0026] Specifically, such as Figure 2 As shown, the system receives multi-source data events through connectors, listeners, database change subscriptions, interface polling, or message queues. For events such as addition, modification, deletion, invalidation, overwriting, conflict, archiving, or permission change, the system first updates the specification knowledge fragments, version relationships, and corpus view mappings; after successful status submission, it updates corpus_epoch and publishes a corpus status change notification containing the affected source_object_id and the new corpus_epoch.
[0027] In this embodiment, data events can be represented as Data Events, which include at least event_id (event identifier), source_object_id (source object identifier), current_version_id (current version identifier), previous_version_id (previous version identifier), permission information, and change type. The change type includes at least one of addition, modification, deletion, invalidation, overwriting, conflict, archiving, and permission change. That is, regardless of the data source from which the data change originates, the system first classifies it as an event carrying version and permission semantics, allowing subsequent impact analysis to be performed on a unified event model without having to adapt to the original change formats of each data source individually.
[0028] Regarding the maintenance of corpus state versions, the system maintains the corpus_epoch. When a data event changes the content version, validity status, permissions, or relation status of a knowledge fragment and is committed, corpus_epoch is incremented. Concurrent data events are determined sequentially according to the source object version sequence or event number. Late events with versions earlier than the currently processed version do not overwrite the newer corpus state. Therefore, even if multiple data sources concurrently push changes at different frequencies, the corpus as a whole always corresponds to a monotonically advancing state version; late or out-of-order events will not revert the corpus to an old state.
[0029] At the segmentation and organization level, the first knowledge fragment is segmented based on business objects, rule boundaries, time boundaries, task boundaries, reference relationships, or contextual dependencies. Each knowledge fragment includes at least a unified fragment identifier (chunk_id), a fragment version identifier (chunk_version_id), a source_object_id, an applicable task, an applicable stage, an expiration date, a permission level, dependencies, reference relationships, coverage relationships, and conflict relationships, and is mapped to at least one of the following views: task view, time view, permission view, semantic view, process view, entity view, feedback view, and conflict view. Only one copy of the same fragment text is stored, and each corpus view and activity context snapshot references the fragment through the identifier. This organization method of storing the text in a single copy and referencing it by identifier in multiple views avoids the situation where multiple copies of the same content are stored in different views, resulting in version inconsistencies after data changes, and also provides a foundation for establishing a bidirectional mapping by identifier in the subsequent text.
[0030] Step S12: Determine the current task state of the enterprise-level intelligent agent, and perform a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate.
[0031] In this embodiment, determining the current task state of the enterprise-level intelligent agent and performing a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate includes: reading the task identifier, task step identifier, current execution stage, tool execution state, user role, permission scope, task time, output target, and risk level of the enterprise-level intelligent agent to obtain the current task state; determining the first qualification condition based on the current task state; using the first qualification condition, sequentially performing the first qualification condition verification on the permission level, fragment version identifier, validity period, and applicable stage of the first knowledge fragment to obtain the first knowledge fragment that passes the verification; generating a qualification certificate corresponding to the first knowledge fragment; the qualification certificate records the permission verification result of the first knowledge fragment during verification, the selected valid version, the applicable time interval, and the applicable task stage. Figure 3 As shown, corresponding to the corpus state version, the system also maintains a task state version, `task_epoch`. `task_epoch` increments when the current execution stage, tool execution state, permission scope, task time, or risk level changes, or when knowledge requirements or eligibility conditions change. The corpus state version and the task state version evolve independently: the former describes "the data has changed," and the latter describes "the task's requirements for the data have changed." Versioning these two types of changes separately allows for the determination of which knowledge fragments a change affects in subsequent steps, rather than a blanket recall of the entire context.
[0032] Step S13: Assemble the first knowledge fragment that has passed verification, the current corpus state version, and the qualification certificate into an activity context snapshot, and establish a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot.
[0033] In this embodiment, assembling the verified first knowledge fragment, the current corpus state version, and the qualification certificate into an activity context snapshot, and establishing a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot, includes: assembling the unified fragment identifier and corresponding fragment version identifier of the first knowledge fragment that passed the first qualification condition verification, along with the current corpus state version and the qualification certificate, into an activity context snapshot; establishing a first reverse mapping from the unified fragment identifier of the first knowledge fragment to the activity context snapshot identifier that references the first knowledge fragment, and a second reverse mapping from the activity context snapshot identifier to the fragment version identifier it contains; and determining the first reverse mapping and the second reverse mapping as a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot.
[0034] Specifically, such as Figure 4As shown, an activity context snapshot can be represented as ACS={snapshot_id, task_id, step_id, corpus_epoch, task_epoch, ContextRefs, EligibilityProofs, Budget, snapshot_token}. Here, ContextRefs records the chunk_id and chunk_version_id of the knowledge fragment; EligibilityProofs, i.e., qualification proof, records the permission verification result, the selected valid version, the applicable time interval, and the applicable task stage; snapshot_token is the snapshot verification token, calculated based on the snapshot identifier, corpus state version, task state version, and knowledge fragment version reference. The activity context snapshot may also include the current user identifier, project identifier, context budget, and fragment arrangement position.
[0035] When an agent begins a task step, the system filters candidate fragments based on the current corpus_epoch and task_epoch, execution permissions, version, time, and task applicability eligibility. It then performs multi-channel recall on the filtered candidate fragments, generating initial ContextRefs and EligibilityProofs, and forming an activity context snapshot. When creating or updating a snapshot, it synchronously maintains a reverse mapping from chunk_id to snapshot_id. The snapshot records the specific fragment version used for execution in that step, not just the logical identifier of a variable knowledge fragment. In other words, the activity context snapshot is not a simple cache of search results, but a verifiable execution input recording specific knowledge fragment version references, permissions and version eligibility proofs, corpus state version, and task state version. Because the snapshot is locked to a specific version and includes eligibility proofs, the knowledge content upon which any execution is based can be reviewed afterward. This is the premise for the consistency verification and accurate attribution feedback discussed later.
[0036] Step S14: If a new data event is received or the current task state changes, then determine the second knowledge fragment affected by the data event or the current task state based on the bidirectional mapping relationship.
[0037] In this embodiment, the step of determining the second knowledge fragment affected by the data event or the current task state based on the bidirectional mapping relationship if a new data event is received or the current task state changes includes: if a new data event is received, determining the source object identifier contained in the new data event, and determining the knowledge fragment whose source object identifier matches the source object identifier as the directly affected knowledge fragment set; determining the dependency closure based on the dependency, reference, coverage, and conflict relationships of each knowledge fragment in the directly affected knowledge fragment set; determining the activity context snapshot that references the knowledge fragments in the directly affected knowledge fragment set or the dependency closure according to the first reverse mapping, to obtain the affected snapshot set; and determining the activity context snapshot of each activity in the affected snapshot set based on the second reverse mapping. The first target version identifier contained in the snapshot below is used to determine the knowledge fragment corresponding to the first target version identifier as the second knowledge fragment; if the current task state is migrated from the old task state to the new task state, the task state version corresponding to the current task state is incremented to obtain the migrated task state version; the permission predicate, version predicate, time predicate, task stage predicate, required corpus view, tool constraint and context structure corresponding to the old task state and the new task state are compared to obtain the state difference; according to the second reverse mapping, the second target version identifier contained in the activity context snapshot corresponding to the current task step of the enterprise-level intelligent agent is determined, and the knowledge fragment related to the state difference in the knowledge fragment corresponding to the second target version identifier is determined as the second knowledge fragment.
[0038] Specifically, such as Figure 5 As shown, in response to the corpus state change notification, the system determines the set of directly affected knowledge fragments I_direct based on source_object_id, calculates the dependency closure I_closure along dependency, reference, coverage, and conflict relationships, and obtains the set of affected snapshots I_snapshot through the first reverse mapping from chunk_id to snapshot_id. Activity context snapshots that do not reference knowledge fragments in I_direct or I_closure are not re-recalled. It can be seen that the impact of a data event converges step-by-step along the "source object—knowledge fragment—dependency closure—activity snapshot" link, and is only affected when an activity task actually references an affected fragment or its dependency closure; the context of other tasks remains unchanged. This is precisely the source of the cost savings of differential updates compared to full recall.
[0039] When responding to a task state transition, the system re-verifies the credentials of each segment of the original activity context to identify segments that have become invalid or are no longer needed by the new task state due to changes in permissions, versions, time, stages, or tool requirements, and to identify context gaps that are required by the new task state but not covered by the original context.
[0040] Step S15: Perform a second qualification condition verification on the second knowledge fragment, and determine the knowledge fragments that need to be supplemented based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval on the target knowledge fragment.
[0041] In this embodiment, the step of performing a second qualification condition verification on the second knowledge fragment and determining the knowledge fragments that need to be supplemented based on the verification results of the second qualification condition verification, thereby determining the target knowledge fragment for enterprise data retrieval of the target knowledge fragment, includes: performing a second qualification condition verification on each fragment of the second knowledge fragment according to the current task status after migration, to obtain verification results; the verification results include a first verification result where the verification passed and the version identifier of the referenced fragment was not replaced, and a second verification result where the verification failed or the version identifier of the referenced fragment was replaced; determining the knowledge fragments in the second knowledge fragment corresponding to the first verification result as a retention set, and retaining the knowledge fragments in the second knowledge fragment corresponding to the second verification result. The elimination set is identified; the fragment version identifier and corresponding qualification certificate of the knowledge fragment in the elimination set are deleted from the activity context snapshot to obtain the deleted activity context snapshot; the context structure required for the current task state after migration is compared with the retention set, and the part of the context structure not covered by the retention set is identified as the context gap, and the knowledge fragment corresponding to the context gap is identified as the knowledge fragment to be supplemented to obtain the target knowledge fragment; multi-channel recall is performed on the target knowledge fragment to obtain candidate knowledge fragments; the multi-channel recall includes task stage recall, time version recall and permission filtering, as well as semantic recall, keyword recall, entity recall, historical successful sample recall and conflict avoidance recall. For ease of understanding, the above partitioning process can be formally described as follows: Let the set of knowledge fragments in the original activity context be C_old; the retention set R includes knowledge fragments in C_old whose credentials are still valid, whose chunk_version_id has not been replaced, and which are still needed by the new task state; the elimination set E is the difference between C_old and R, i.e., E = C_old - R; the supplementary set A consists of knowledge fragments recalled for the context gap in the new task state that do not belong to R, and the supplementary set A is determined from the candidate knowledge fragments that have passed the qualification filter based on the context budget; the updated activity context set C_new is obtained by merging R and A, i.e., C_new = R∪A. Compared with a full re-recall, this process preserves the order, reference relationships, and verified credentials of unaffected fragments, and only processes the fragments involved in E and A. In other words, the workload of recalculation depends on the number of fragments actually affected by this change, and is basically independent of the total size of the context. The longer the task runs and the larger the context, the more obvious the benefits of this difference method become.
[0042] After obtaining the updated activity context, the system assembles the knowledge fragments in the updated activity context snapshot into an agent context package that includes at least two of the following: task context, knowledge context, rule context, data context, case context, and constraint context, according to the context structure corresponding to the current task state. This package is then used by the enterprise agent when calling the generative model or tools.
[0043] In this embodiment, after performing enterprise data retrieval on the target knowledge fragment, the method further includes: updating the activity context snapshot to obtain an updated activity snapshot; and before the enterprise-level agent calls the generation model or tool, reading the current corpus state version and the current task state version to obtain the target corpus state version and the target task state version; performing a consistency check between the target corpus state version and the target task state version and the corpus state version and the task state version corresponding to the updated activity snapshot to obtain a consistency check result; based on the consistency check result, the enterprise-level agent calls the generation model or tool to obtain an execution result; the execution result includes manually retained, manually deleted, execution error, approved, business effect, expired marker, and conflict marker; binding the execution result with the usage trajectory record to obtain a feedback record, and based on the feedback record, sorting the candidate knowledge fragments when performing enterprise data retrieval on the target knowledge fragment.
[0044] It should be noted that, as Figure 6 As shown, the above update of the activity context snapshot adopts a conditional commit method: the context differential update uses the expected_corpus_epoch (expected corpus state version) and expected_task_epoch (expected task state version) read at the start of the calculation as the expected version; when committing the updated snapshot, the system compares the expected version with the current corpus_epoch and task_epoch. If any of them are inconsistent, the differential result is discarded, and the affected set, retained set, discarded set, and supplementary set are recalculated based on the new state version; a snapshot_token is generated after successful commit. The reason for this processing is that the differential calculation itself takes time, and the corpus or task state may change again during the calculation. If the old calculation result is directly committed, the snapshot will lag behind the actual state; using the expected version as the commit condition ensures that the final snapshot is calculated based on the latest state.
[0045] Accordingly, before the enterprise-level agent invokes the generation model or tool, the consistency gating compares the corpus state version and task state version recorded in the snapshot with the current corpus state version and current task state version, and verifies the qualification certificate and snapshot_token. If the versions are inconsistent, the qualification certificate is invalid, or the snapshot_token is inconsistent with the verification result recalculated based on the current state, the agent context packet is prohibited from being sent to the generation model or tool, and the above-mentioned impact set calculation and context difference update are re-executed until the verification passes before the invocation is allowed.
[0046] In terms of feedback and return, such as Figure 7 As shown, the system records the step_id and snapshot_id for each model generation or tool call, and only writes the chunk_version_id actually referenced during execution into the usage trace. Manual retention, manual deletion, execution errors, approval, business effects, expiration flags, and conflict flags are bound to the usage trace to form feedback records. Feedback weights are conditionally updated according to task type, execution stage, business object, and permission scope. This updates the conditional feedback weights or recall parameters for the same or similar task states, preventing unused segments or other versions of the same chunk_id from being incorrectly attributed as feedback. Because feedback is anchored to the snapshot identifier, task step identifier, and segment version identifier, even if the data changes subsequently, historical feedback can still accurately be attributed to the version segment that was actually used at that time.
[0047] The following examples illustrate the operation of this embodiment using several typical tasks. In content generation tasks, when the agent migrates from the planning phase to the content generation phase, task_epoch increments; the system retains applicable brand facts and task objective fragments, discards process templates used only for planning, and only recalls platform style rules and expression templates missing from the content generation phase; if a brand rule is overridden during the migration, corpus_epoch changes simultaneously, the old differential results cannot be submitted, and the system recalculates the supplementary set using the new brand rule version.
[0048] In data analysis tasks, the activity context snapshot contains the table structure, metric definitions, and rule versions that the current project has access to. If a user's project permissions are revoked during task execution, the permission change event updates `corpus_epoch`, and the activity snapshot that still references the restricted fragment is located through reverse mapping. Consistency gating prevents execution before the next query tool call, and differential updates add the restricted fragment to the eviction set, regardless of its semantic relevance score. It is evident that permission convergence does not depend on the randomness of retrieval ranking, but is forcibly guaranteed by state versions and gating mechanisms.
[0049] In historical replay tasks, the task status carries historical time. The system selects the valid chunk_version_id at that time based on the historical time predicate and writes it to the activity context snapshot. Even if the current rules are updated later, the historical replay snapshot still references the historical version. If the permissions or integrity status of the historical version changes, the system re-verifies whether continued use is allowed through corpus_epoch and qualification credentials.
[0050] As can be seen, in this embodiment, on the one hand, each change to multi-source enterprise data is uniformly characterized through data events and corpus state versions; on the other hand, the actual version of the knowledge fragment, qualification certificate, and corpus state version used in a certain task step are fixed through activity context snapshots, and a bidirectional searchable association is established between the knowledge fragment and the activity context snapshot using the first and second reverse mappings. When a new data event is received or the current task state changes, it is not necessary to re-recall all activity tasks. Instead, the affected second knowledge fragment and its snapshot are directly located along the bidirectional mapping relationship. Then, it is divided into a retention set and an elimination set through the second qualification condition verification. The target knowledge fragment is determined only for the context gap not covered by the retention set, and a multi-channel recall is performed. Since the arrangement position, reference relationship, and verified qualification certificate of the fragments in the retention set are all used, the repeated calculation is limited to a small number of fragments involved in elimination and supplementation. This reduces the recall overhead while ensuring that expired, unauthorized, or unsuitable fragments are promptly removed from the agent context. Therefore, this application unifies streaming corpus updates and agent task execution into a traceable, differentially updated, and verifiable consistency processing chain, which significantly improves the real-time performance, consistency, and security of enterprise data retrieval and enhances the accuracy of enterprise data management.
[0051] In addition, such as Figure 8As shown, this application discloses a streaming semantic slicing process. Specifically, it is a complete pipeline that gradually refines massive heterogeneous raw data streams (covering documents, tables, interface logs, etc.) into high-value-added structured knowledge units. First, the system performs deep semantic parsing on continuously input unstructured data, delineating semantic breakpoints by accurately identifying key boundaries such as heading levels, paragraph logic, field attributes, rule descriptions, and citation markers, thereby ensuring that each segment retains complete contextual information. Then, based on the identified semantic structure, the data content is subdivided into six categories of task-oriented segments with clear business orientations: task objectives, business rules, data definitions, process steps, review rules, and generation templates. Finally, at the end of the process, each segment is uniformly encapsulated with rich metadata tags including segment type, business object, applicable task and stage, permission level, version number, and dependency conflict reference relationships, transforming it into a standardized knowledge chunk, which directly serves the RAG (Retrieval Enhanced Generation) system. Through this refined deconstruction and business-oriented reorganization, it provides high-purity, strongly correlated, and controllable knowledge support for the subsequent retrieval and generation stages of the large language model.
[0052] refer to Figure 9 As shown in the illustration, this application also discloses a multi-source enterprise data retrieval device for intelligent agents, comprising: The corpus state version determination module 11 is used to receive data events corresponding to changes in multi-source enterprise data, generate a first knowledge fragment with a fragment version identifier based on the data events, and determine the current corpus state version. The qualification certificate generation module 12 is used to determine the current task state of the enterprise-level intelligent agent and perform a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate. The mapping relationship establishment module 13 is used to assemble the first knowledge fragment that has passed the verification, the current corpus state version, and the qualification certificate into an activity context snapshot, and establish a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot; The fragment determination module 14 is used to determine a second knowledge fragment affected by the data event or the current task state based on the bidirectional mapping relationship if a new data event is received or the current task state changes. The data retrieval module 15 is used to perform a second qualification condition verification on the second knowledge fragment, and determine the knowledge fragment that needs to be supplemented based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval on the target knowledge fragment.
[0053] As can be seen, the device provided in this application, through the cooperation of a corpus state version determination module, a qualification certificate generation module, a mapping relationship establishment module, a fragment determination module, and a data recall module, uniformly converts changes in multi-source enterprise data into data events carrying version and permission semantics, and implements them as the advancement of corpus state versions. It also implements changes in task-side stages, permissions, and risks as the advancement of task state versions. Using activity context snapshots and their bidirectional mapping relationships as a link, it accurately identifies the affected second knowledge fragment when any side changes. After verification by the second qualification condition, it only performs supplementary recall for context gaps. In this way, the computational overhead of repeated recalls can be significantly reduced, while effectively preventing expired, unauthorized, or unsuitable fragments from remaining in the agent's context, thus improving the accuracy of enterprise data management.
[0054] In some specific embodiments, the corpus state version determination module 11 may specifically include: The data receiving unit is used to receive data changes from several data sources through connectors, listeners, database change subscriptions, interface polling, or message queues, and to convert each received data change into a data event in a unified format. The first knowledge fragment generation unit is used to segment the source data corresponding to the data event and generate a first knowledge fragment with a unified fragment identifier and a fragment version identifier. The current corpus status version acquisition unit is used to increment or replace the corpus status version after the content, version, permission or life cycle status of the first knowledge segment changes and the status is successfully submitted, so as to obtain the current corpus status version.
[0055] In some specific embodiments, the qualification certificate generation module 12 may specifically include: The current task status acquisition unit is used to read the task identifier, task step identifier, current execution stage, tool execution status, user role, permission scope, task time, output target and risk level of the enterprise-level intelligent agent to obtain the current task status; The first qualification condition determination unit is used to determine the first qualification condition based on the current task status; The first knowledge fragment verification unit is used to use the first qualification conditions to sequentially verify the permission level, fragment version identifier, validity period and applicable stage of the first knowledge fragment, so as to obtain the first knowledge fragment that passes the verification. The qualification certificate generation unit is used to generate a qualification certificate corresponding to the first knowledge fragment; the qualification certificate records the permission verification result of the first knowledge fragment during verification, the selected valid version, the applicable time interval, and the applicable task stage.
[0056] In some specific embodiments, the mapping relationship establishment module 13 may specifically include: The snapshot assembly unit is used to assemble the unified fragment identifier and the corresponding fragment version identifier of the first knowledge fragment that has passed the first qualification condition verification, together with the current corpus state version and the qualification certificate, into an activity context snapshot. The mapping establishment unit is used to establish a first reverse mapping from the unified fragment identifier of the first knowledge fragment to the activity context snapshot identifier that references the first knowledge fragment, and a second reverse mapping from the activity context snapshot identifier to the fragment version identifier contained therein; The mapping relationship determination unit is used to determine the first reverse mapping and the second reverse mapping as a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot.
[0057] In some specific embodiments, the fragment determination module 14 may specifically include: The knowledge fragment set determination unit is used to determine the source object identifier contained in the new data event if a new data event is received, and to determine the knowledge fragments whose source object identifier is consistent with the source object identifier as the directly affected knowledge fragment set. The dependency closure determination unit is used to determine the dependency closure based on the dependency relationship, reference relationship, coverage relationship and conflict relationship of each knowledge fragment in the set of directly affected knowledge fragments; The snapshot set determination unit is used to determine, based on the first reverse mapping, the activity context snapshots that reference the directly affected knowledge fragment set or the knowledge fragments in the dependent closure, and obtain the affected snapshot set; The second knowledge fragment generation unit is used to determine the first target version identifier contained in each activity context snapshot in the affected snapshot set based on the second reverse mapping, and to determine the knowledge fragment corresponding to the first target version identifier as the second knowledge fragment. The state transition unit is used to increment the task state version corresponding to the current task state if the current task state is transitioned from an old task state to a new task state, so as to obtain the transitioned task state version. The task status comparison unit is used to compare the permission predicate, version predicate, time predicate, task stage predicate, required corpus view, tool constraints and context structure corresponding to the old task status and the new task status respectively, so as to obtain the status difference; The third knowledge fragment generation unit is used to determine the second target version identifier contained in the activity context snapshot corresponding to the current task step of the enterprise-level intelligent agent according to the second reverse mapping, and to determine the knowledge fragment related to the state difference in the knowledge fragment corresponding to the second target version identifier as the second knowledge fragment.
[0058] In some specific embodiments, the data retrieval module 15 may specifically include: The verification result determination unit is used to perform a second qualification condition verification on the second knowledge segment by segment according to the current task status after migration, so as to obtain a verification result; the verification result includes a first verification result in which the verification passes and the version identifier of the referenced segment is not replaced, and a second verification result in which the verification fails or the version identifier of the referenced segment is replaced. The fragment set determination unit is used to determine the knowledge fragments in the second knowledge fragment that correspond to the first verification result as the retention set, and to determine the knowledge fragments in the second knowledge fragment that correspond to the second verification result as the elimination set; The information deletion unit is used to delete the fragment version identifier and corresponding qualification certificate of the knowledge fragment in the elimination set from the activity context snapshot, so as to obtain the deleted activity context snapshot; The context gap determination unit is used to compare the context structure required by the current task state after migration with the retention set, determine the part of the context structure not covered by the retention set as the context gap, and determine the knowledge fragment corresponding to the context gap as the knowledge fragment that needs to be supplemented, so as to obtain the target knowledge fragment; The data retrieval unit is used to perform multi-channel retrieval for the target knowledge fragment to obtain candidate knowledge fragments; the multi-channel retrieval includes task stage retrieval, time version retrieval and permission filtering, as well as semantic retrieval, keyword retrieval, entity retrieval, historical successful sample retrieval and conflict avoidance retrieval.
[0059] In some specific embodiments, the multi-source enterprise data retrieval device for the intelligent agent may further include: The current information reading module is used to update the activity context snapshot to obtain the updated activity snapshot, and before the enterprise-level intelligent agent calls the generation model or tool, it reads the current corpus state version and the current task state version to obtain the target corpus state version and the target task state version. The consistency verification module is used to perform consistency verification between the target corpus state version and the target task state version and the corpus state version and task state version corresponding to the updated activity snapshot, so as to obtain the consistency verification result. The model tool invocation module is used for the enterprise-level intelligent agent to invoke the generated model or tool based on the consistency verification result to obtain the execution result; the execution result includes manually retained, manually deleted, execution error, approved, business effect, expired mark and conflict mark; The feedback recording module is used to bind the execution result with the usage trajectory record to obtain a feedback record, so as to sort the candidate knowledge fragments when performing enterprise data retrieval on the target knowledge fragment based on the feedback record.
[0060] Furthermore, embodiments of this application also disclose an electronic device, Figure 10 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0061] Figure 10 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multi-source enterprise data retrieval method for intelligent agents disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0062] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0063] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0064] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the multi-source enterprise data retrieval method for an intelligent agent executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0065] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for recalling multi-source enterprise data of an intelligent agent. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0066] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0067] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0068] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0069] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0070] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for recalling multi-source enterprise data by an intelligent agent, characterized in that, include: Receive data events corresponding to changes in multi-source enterprise data, generate a first knowledge fragment with a fragment version identifier based on the data events, and determine the current corpus state version; The current task state of the enterprise-level intelligent agent is determined, and the first qualification condition is verified based on the current task state to generate a qualification certificate; The first knowledge fragment that has passed verification, the current corpus state version, and the qualification certificate are assembled into an activity context snapshot, and a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot is established. If a new data event is received or the current task state changes, a second knowledge fragment affected by the data event or the current task state is determined based on the bidirectional mapping relationship. The second knowledge fragment is subjected to a second qualification condition verification, and the knowledge fragments that need to be supplemented are determined based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval for the target knowledge fragment.
2. The multi-source enterprise data retrieval method for intelligent agents according to claim 1, characterized in that, The process of receiving data events corresponding to changes in multi-source enterprise data, generating a first knowledge fragment with a fragment version identifier based on the data events, and determining the current corpus state version includes: Receive data changes from multiple data sources through connectors, listeners, database change subscriptions, interface polling, or message queues, and convert each received data change into a data event in a uniform format. The source data corresponding to the data event is segmented to generate a first knowledge segment with a unified segment identifier and a segment version identifier. After the content, version, permissions, or lifecycle status of the first knowledge fragment changes and the status is successfully submitted, the corpus status version is incremented or replaced to obtain the current corpus status version.
3. The multi-source enterprise data retrieval method for intelligent agents according to claim 1, characterized in that, The step of determining the current task state of the enterprise-level intelligent agent and performing a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate includes: Read the task identifier, task step identifier, current execution stage, tool execution status, user role, permission scope, task time, output target and risk level of the enterprise-level intelligent agent to obtain the current task status; The first eligibility condition is determined based on the current task status; Using the first qualification condition, the permission level, fragment version identifier, validity period and applicable stage of the first knowledge fragment are sequentially verified to obtain the first knowledge fragment that passes the verification. Generate a qualification certificate corresponding to the first knowledge fragment; the qualification certificate records the permission verification result of the first knowledge fragment during verification, the selected valid version, the applicable time interval, and the applicable task stage.
4. The multi-source enterprise data retrieval method for intelligent agents according to claim 1, characterized in that, The step of assembling the verified first knowledge fragment, the current corpus state version, and the qualification certificate into an activity context snapshot, and establishing a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot, includes: The unified fragment identifier and corresponding fragment version identifier of the first knowledge fragment that has passed the first qualification condition verification are assembled with the current corpus state version and the qualification certificate into an activity context snapshot; Establish a first reverse mapping from the unified fragment identifier of the first knowledge fragment to the activity context snapshot identifier that references the first knowledge fragment, and a second reverse mapping from the activity context snapshot identifier to the fragment version identifier contained therein; The first reverse mapping and the second reverse mapping are determined as a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot.
5. The multi-source enterprise data retrieval method for intelligent agents according to claim 4, characterized in that, If a new data event is received or the current task state changes, the second knowledge fragment affected by the data event or the current task state is determined based on the bidirectional mapping relationship, including: If a new data event is received, the source object identifier contained in the new data event is determined, and the knowledge fragments whose source object identifiers are consistent with the source object identifiers are determined as the set of directly affected knowledge fragments; Based on the dependency, reference, overriding, and conflict relationships of each knowledge fragment in the directly affected knowledge fragment set, the dependency closure is determined; Based on the first reverse mapping, determine the activity context snapshot that references the directly affected knowledge fragment set or the knowledge fragment in the dependent closure, and obtain the affected snapshot set; Based on the second reverse mapping, the first target version identifier contained in each activity context snapshot in the affected snapshot set is determined, and the knowledge fragment corresponding to the first target version identifier is determined as the second knowledge fragment; If the current task state is migrated from the old task state to the new task state, the task state version corresponding to the current task state is incremented to obtain the migrated task state version. The permission predicate, version predicate, time predicate, task stage predicate, required corpus view, tool constraints and context structure corresponding to the old task state and the new task state are compared to obtain the state differences; Based on the second reverse mapping, the second target version identifier contained in the activity context snapshot corresponding to the current task step of the enterprise-level intelligent agent is determined, and the knowledge fragment related to the state difference in the knowledge fragment corresponding to the second target version identifier is determined as the second knowledge fragment.
6. The multi-source enterprise data retrieval method for intelligent agents according to claim 1, characterized in that, The step of performing a second qualification condition verification on the second knowledge fragment and determining the knowledge fragments that need to be supplemented based on the verification result of the second qualification condition verification, thereby identifying the target knowledge fragment, and then performing enterprise data retrieval on the target knowledge fragment, includes: Based on the current task status after migration, the second qualification condition verification is performed on each of the second knowledge segments to obtain the verification results; the verification results include a first verification result where the verification passes and the version identifier of the referenced segment has not been replaced, and a second verification result where the verification fails or the version identifier of the referenced segment has been replaced. The knowledge segments in the second knowledge segment that correspond to the first verification result are determined as the retention set, and the knowledge segments in the second knowledge segment that correspond to the second verification result are determined as the elimination set; The fragment version identifier and corresponding qualification certificate of the knowledge fragment in the elimination set are deleted from the activity context snapshot to obtain the activity context snapshot after deletion; The context structure required for the current task state after migration is compared with the retention set. The part of the context structure not covered by the retention set is identified as a context gap, and the knowledge fragment corresponding to the context gap is identified as the knowledge fragment that needs to be supplemented, so as to obtain the target knowledge fragment. Multi-channel recall is performed on the target knowledge fragment to obtain candidate knowledge fragments; the multi-channel recall includes task stage recall, time version recall and permission filtering, as well as semantic recall, keyword recall, entity recall, historical successful sample recall and conflict avoidance recall.
7. The multi-source enterprise data retrieval method for intelligent agents according to claim 6, characterized in that, After performing enterprise data retrieval on the target knowledge fragment, the method further includes: The activity context snapshot is updated to obtain the updated activity snapshot. Before the enterprise-level agent calls the generation model or tool, the current corpus state version and the current task state version are read to obtain the target corpus state version and the target task state version. The target corpus state version and the target task state version are compared with the corpus state version and task state version corresponding to the updated activity snapshot to obtain the consistency verification result. Based on the consistency verification results, the enterprise-level intelligent agent invokes the generation model or tool to obtain the execution results; the execution results include manually retained, manually deleted, execution errors, approved, business effects, expired markers, and conflict markers; The execution result is bound to the usage trajectory record to obtain a feedback record. Based on the feedback record, the candidate knowledge fragments are sorted when enterprise data is retrieved for the target knowledge fragment.
8. A multi-source enterprise data retrieval device for an intelligent agent, characterized in that, include: The corpus state version determination module is used to receive data events corresponding to changes in multi-source enterprise data, generate a first knowledge fragment with a fragment version identifier based on the data events, and determine the current corpus state version. The qualification certificate generation module is used to determine the current task state of the enterprise-level intelligent agent and perform a first qualification condition verification on the first knowledge fragment based on the current task state to generate a qualification certificate. The mapping relationship establishment module is used to assemble the verified first knowledge fragment, the current corpus state version, and the qualification certificate into an activity context snapshot, and establish a bidirectional mapping relationship between the first knowledge fragment and the activity context snapshot; The fragment determination module is used to determine a second knowledge fragment affected by the data event or the current task state based on the bidirectional mapping relationship if a new data event is received or the current task state changes. The data retrieval module is used to perform a second qualification condition verification on the second knowledge fragment, and determine the knowledge fragments that need to be supplemented based on the verification result of the second qualification condition verification, so as to determine the target knowledge fragment and perform enterprise data retrieval on the target knowledge fragment.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the multi-source enterprise data retrieval method for an agent as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the multi-source enterprise data retrieval method for an intelligent agent as described in any one of claims 1 to 7.
