Methods, devices, equipment, and program products for optimizing the skill structure data of intelligent agents.
By generating access evidence datasets and applying structure editing operators to optimize skill structure data, the problem of skill organization relying on human experience in existing technologies is solved. This enables dynamic promotion of high-frequency, high-hit paths and sinking of low-frequency paths, thereby improving access efficiency and hit rate.
Patent Information
- Application Number
- CN202611611523.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-19
- Publication Date
- 2026-11-17
AI Technical Summary
Existing skills organization and optimization technologies rely on human experience and cannot be adaptively adjusted, resulting in high-frequency content being buried in deep layers and low-frequency content occupying shallow layers. Furthermore, the lack of structural optimization dimensions leads to low access depth and hit rate.
By generating an access evidence dataset, statistical analysis of access frequency, hit rate, and read cost is conducted. The skill structure data is optimized using a structure editing operator, which promotes high-frequency, high-hit paths to shallower layers and degrades low-frequency, low-hit paths to deeper layers. The read cost is defined as a weighted result of the combined access frequency, depth, and hit rate, enabling dynamic adaptive adjustment.
It improves the adaptability and optimization of skill structure data, reduces access depth and reading cost, and increases access hit rate and efficiency.
Smart Images

Figure CN123115098A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, device, and program product for optimizing the skill structure data of an intelligent agent. Background Technology
[0002] In the field of Artificial Intelligence (AI), skills, as reusable and modular capability units, encapsulate the operational procedures, tool usage strategies, applicable conditions, output format constraints, and failure avoidance experience of a certain domain. Intelligent agents can acquire procedural domain capabilities by calling or externally loading skill texts.
[0003] Currently, skill texts are usually organized in a tree structure. The content and hierarchical structure of skills are highly dependent on human experience. Which content to place at each level and which high-frequency content should be elevated to a shallow, direct access level are all predetermined by the developers based on taxonomy or domain experience.
[0004] The aforementioned organizational method makes it impossible for skill texts to effectively adapt to changes in usage distribution, resulting in poor performance of the agent. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, device, and program product for optimizing the skill structure data of an intelligent agent, so as to achieve adaptive optimization of skill structure data based on hierarchical structure.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for optimizing the skill structure data of an intelligent agent, including: Based on the access information of the target intelligent agent to the structural data of the target skill during the process of the user using the target intelligent agent to perform the target task, an access evidence dataset corresponding to each user is generated; the access evidence dataset includes at least: access path, access depth, cumulative number of lexical units read, and whether the correct leaf node is hit; Based on the access evidence dataset corresponding to each user, at least one path to be optimized in the structured data of the target skill is determined; Based on each path to be optimized and the access evidence dataset related to each path to be optimized, candidate structure data is generated using a preset structure editing operator. Based on the candidate structure data, the target structure data of the target skill is determined.
[0007] Secondly, embodiments of this application also provide a skill structure data optimization device for an intelligent agent, including: a generation module and a determination module; The generation module is used to generate an access evidence dataset for each user based on the access information of the target intelligent agent to the structural data of the target skill during the process of the user using the target intelligent agent to perform the target task; the access evidence dataset includes at least: access path, access depth, cumulative number of lexical units read, and whether the correct leaf node is hit; The determining module is used to determine at least one path to be optimized in the structure data of the target skill based on the access evidence dataset corresponding to each user. The generation module is used to generate candidate structure data based on each path to be optimized and the access evidence dataset related to each path to be optimized, using a preset structure editing operator. The determining module is used to determine the target structure data of the target skill based on the candidate structure data.
[0008] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to implement the skill structure data optimization method for intelligent agents as provided in the first aspect.
[0009] Fourthly, embodiments of this application provide a computer program product, the computer program product including computer program code, wherein when the computer program code is executed by a computing device, the computing device executes the skill structure data optimization method for an intelligent agent as provided in the first aspect.
[0010] The beneficial effects of this application are: This application provides a method, apparatus, device, and program product for optimizing the skill structure data of an intelligent agent. The method includes: generating access evidence datasets for each user based on the access information of the target intelligent agent to the structure data of a target skill during the execution of a target task by the target intelligent agent; determining at least one path to be optimized in the structure data of the target skill based on the access evidence datasets for each user; generating candidate structure data using a preset structure editing operator based on each path to be optimized and the access evidence datasets related to each path; and determining the target structure data of the target skill based on the candidate structure data. This method converts the drill-down access information of the intelligent agent to the structure data of the skill into a measurable structured evidence dataset. This allows for the determination of access frequency, hit rate, access depth, and reading cost of each access path based on the access evidence datasets for each user, thereby accurately selecting access paths with greater optimization value. Simultaneously, generating candidate structure data based on the access evidence datasets related to the paths to be optimized enables the structure data of the skill to adaptively adjust according to the usage distribution of the target skill's structure data, improving the optimization effect of the skill's structure data.
[0011] Secondly, the hierarchy depth is treated as an optimizable object. The weighted read cost, calculated by combining access frequency, access depth, read cost, and hit rate, is defined as the optimization objective. This allows high-frequency, high-hit, and low-cost paths to automatically rise to shallower layers, even generating direct entry points with an access depth of 1 at the top level; while low-frequency or low-hit paths sink downwards. This achieves the optimization effect of dynamically promoting high-frequency, high-hit content according to call distribution and automatically degrading and recycling failed entry points.
[0012] In addition, by verifying the generated candidate structure data, only candidate structure data with reduced read costs and no decrease in hit rate are accepted; while for candidate structure data that fails verification, rejection buffer data is recorded for repeated attempts of invalid operations in subsequent optimization processes, thereby reducing optimization time.
[0013] By generating long-term optimization guidance information through longitudinal comparison between adjacent iterations, the optimization process can benefit from more accurate historical optimization experience, thereby improving optimization efficiency and the accuracy of optimization results. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1This is a schematic diagram of an intelligent agent skill invocation scenario provided in an embodiment of this application; Figure 2 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 1 ; Figure 3 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 2 ; Figure 4 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 3 ; Figure 5 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 4 ; Figure 6 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 5 ; Figure 7 A complete flowchart illustrating the method for optimizing the skill structure data of an intelligent agent as provided in this application embodiment; Figure 8 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 6 ; Figure 9 A schematic diagram of a skill structure data optimization device for an intelligent agent provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0017] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0018] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0019] Large Language Models (LLMs) are rapidly evolving from single-round "hint-response" tools into intelligent agents capable of calling tools, reading and writing files, and interacting with the external environment in multiple steps. In this scenario, domain adaptation for intelligent agents is no longer solely concerned with model weights or single prompt words, but increasingly relies on a portable external natural language artifact called a "skill." A skill encapsulates the operational procedures, tool usage strategies, applicable conditions, output format constraints, and failure avoidance experience of a specific domain. This allows a frozen model to acquire procedural domain capabilities simply by loading external skill text, without needing to update its weights. Therefore, skills have become a key carrier for cutting-edge intelligent agents to adapt to different domains.
[0020] In engineering practice, a mature skill is often not a flat piece of text, but rather a hierarchical folder organized according to scenario experience, containing various types of files such as documentation, executable scripts, templates, and data resources. Because the model context window is limited, and loading all skill content at once would waste tokens and dilute attention, skills are generally organized using a progressive disclosure tree structure: the agent first reads the top-level index / overview, and then drills down the hierarchical tree as needed based on the current task (e.g., "first-level topic → second-level scope → specific leaf nodes / resources"), loading only the child node content truly needed for the current task into the context. This hierarchical organization with on-demand loading has significant advantages in dynamically managing context and saving tokens, and has become the mainstream form for large-scale skill and knowledge base navigation.
[0021] However, existing skills organization and optimization techniques still have the following three prominent problems: 1. The content and hierarchical structure of skills are highly dependent on human experience, making them static and subjective. How folders are divided, what content is placed in each level, and which high-frequency content should be elevated to shallow, directly accessible levels are all pre-defined by developers based on taxonomy or domain experience. Essentially, this is a static, expert-driven, manual arrangement. This arrangement is unrelated to the actual access distribution of skills; frequently used content may be buried in deeper levels, while low-frequency content occupies shallower levels. As the number of skills continues to grow, or as usage hotspots shift over time, manual maintenance becomes costly, difficult to maintain consistency, and unable to adaptively adjust to changes in usage distribution.
[0022] 2. Existing skill evolution and prompt optimization techniques only focus on the text content layer, lacking the optimization dimension of structure and depth. Recent methods such as trajectory distillation, reflective prompt evolution, text gradient optimization, and text space optimization for single skill documents (e.g., Distilling Local Lessons into Transferable Agent Skills (Trace2Skill) and Genetic-Pareto (GEPA)) all treat skills or prompts as a piece (or document) of rewriteable flat text. The optimization focuses on what content is written, i.e., adding, deleting, and modifying words and sentences. These methods do not address structural issues such as how the tree hierarchy should be arranged, where a particular item should be placed, or how deep the drill-down path should be. They do not include reading depth as an optimizable object, and therefore cannot optimize the progressively revealed tree structure itself.
[0023] 3. Existing memory technologies optimize "what to remember and how to recall," rather than the organizational structure of the memory skill itself. Existing technologies such as vector retrieval memory, retrieval-augmented generation (RAG), and virtual context management (MemGPT) mainly deal with declarative memories such as dialogue history, user preferences, and factual entries. The memory entries are relatively flat, and the recall cost is considered constant. Therefore, the optimization objects can only be the ranking and scoring of the retrieval machine or the writing and forgetting of entries, and there is no dimension of reading depth.
[0024] 4. Progressive disclosure suffers from a systematic mismatch between depth and frequency / accuracy, and lacks a data-driven, verifiable, and drift-resistant adaptive structure. The premise of progressive disclosure saving tokens is drill-down as needed, but since the depth is determined by static classification, high-frequency content located at deeper levels requires multiple drill-downs per call, leading to higher cumulative read tokens and slower response times. Furthermore, each step of drill-down involves selecting the correct branch from multiple child nodes; the deeper the level and the more intermediate branches, the greater the probability of selecting the wrong intermediate node and ultimately missing the target leaf, meaning the accuracy decreases as drill-down depth increases. To mitigate these issues, engineers typically maintain an additional list of shortcuts / high-frequency direct accesses manually, but this list is also static and easily becomes outdated, unable to automatically upgrade or downgrade based on access frequency.
[0025] This solution transforms the drilling process (access process) of each skill invocation by the agent into measurable access evidence, thereby statistically analyzing the access frequency, average hit rate, and reading cost of each access path to extract access paths to be optimized. Based on these paths, a preset structure editing operator is used to generate candidate structure data corresponding to the skill. The optimization objective is to minimize the weighted reading cost without reducing the hit rate. The skill's structure data is iteratively optimized, achieving dynamic promotion of high-frequency, high-hit content based on invocation distribution and automatic degradation and recycling of failed entry points. Specifically, the reading cost is defined as a weighted result of access frequency, access depth, reading cost, and hit rate. This effectively uses the hierarchical depth of the skill structure data as the optimization target, allowing the optimization of structure data to go beyond the text content level and fundamentally optimize the skill's structure data. This enables the skill's structure data to dynamically and adaptively adjust with changes in access usage, improving the access hit rate and reducing access depth and reading cost.
[0026] Figure 1 This illustration shows a scenario for invoking intelligent agent skills, provided in an embodiment of this application. A user can initiate task execution through an intelligent agent (e.g., by entering task information in an input box on the user interface). After receiving the task, the intelligent agent determines the domain to which the task belongs and then invokes the domain skills corresponding to the task to execute it. Typically, one task may correspond to the invocation of multiple skills. Each skill corresponds to structured data, which can be a skill directory tree. The intelligent agent follows a progressive disclosure principle during skill invocation, first loading the top-level index of the skill directory tree, and then drilling down layer by layer according to the task's keywords to read the final required data. For example, if the user's task is to find today's hot news from the database, drilling down layer by layer will ultimately retrieve all of today's hot news and provide it to the user.
[0027] It is worth noting that the intelligent agent is implemented through a pre-trained model. In practical applications, there can be multiple intelligent agents, and the appropriate intelligent agent can be selected to perform the task according to the usage requirements.
[0028] Figure 2 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 1 The implementing entity of this solution can be a computer device, which is equipped with an intelligent agent. This intelligent agent is pre-configured with skills to perform tasks in different domains. For example... Figure 2 As shown, the method includes: S101. Based on the access information of the target intelligent agent to the structural data of the target skill during the process of the user using the target intelligent agent to perform the target task, generate an access evidence dataset corresponding to each user.
[0029] The access evidence dataset should include at least: access path, access depth, cumulative number of tokens read, and whether the correct leaf node was hit.
[0030] Of course, the access evidence dataset is not limited to the data listed above.
[0031] This embodiment illustrates the use of a skill by an intelligent agent. Based on a target task initiated by a user to the target intelligent agent, the target intelligent agent can invoke the target skill corresponding to the target task to execute the task. During task execution, the target intelligent agent loads the structural data of the target skill and drills down layer by layer as needed, based on the hierarchical index relationship in the structural data, according to the current task. After the target intelligent agent completes the target task, it records the complete access information of the target intelligent agent to the structural data of the target skill under the user's target task. The target task is a task in the domain to which the target skill is adapted.
[0032] Based on access information, a structured dataset of access evidence corresponding to each user can be generated.
[0033] It is worth noting that this solution can continuously optimize the structural data of the target skill through iterative execution. This can be achieved through multiple rounds of iterative execution, with multiple batches nested within each round. Each batch will re-acquire new execution tasks from multiple users when calling the target skill, and re-execute drill-down access based on the structural data of the target skill optimized in the previous batch, thereby continuously optimizing the structural data of the target skill based on the access structure.
[0034] Steps S101-103 in this embodiment describe the execution process of any batch.
[0035] S102. Based on the access evidence dataset corresponding to each user, determine at least one path to be optimized in the structure data of the target skill.
[0036] Based on the access evidence dataset corresponding to each user, evaluation metrics can be generated for each access path involved by the user to measure the access efficiency and access hit rate of the access path under the current structural data of the target skill. Based on the measurement results, at least one path to be optimized can be identified from the current structural data of the target skill.
[0037] S103. Based on each path to be optimized and the access evidence dataset related to each path to be optimized, candidate structure data is generated using a preset structure editing operator.
[0038] If the access path in a user's access evidence dataset is a path to be optimized, then the user's access evidence dataset is used as a related access evidence dataset for that path to be optimized. When the access paths of multiple users are the same path to be optimized, the access evidence dataset related to the path to be optimized can include the corresponding access evidence datasets of these multiple users.
[0039] Each path to be optimized and the access evidence dataset associated with each path to be optimized are input into a pre-trained structural editing agent. The structural editing agent determines the optimization strategy for each path to be optimized based on a preset structural editing operator. Based on the optimization strategy, candidate structural editing information is generated. The candidate structural editing information is converted into specific executable editing operations. The editing operations are applied to the current structural data of the target skill to obtain candidate structural data.
[0040] The candidate structure data is a new version of the structure data, which is based on the current structure data and has been adjusted for the hierarchical position and / or access depth of some paths.
[0041] S104. Based on the candidate structure data, determine the target structure data for the target skill.
[0042] Based on the iterative execution results of this scheme, by calculating the reading cost of candidate structure data generated in each batch of an iteration, the optimal intermediate structure data of each iteration can be selected. By comparing the optimal intermediate structure data of each iteration, the globally optimal structure data with the lowest reading cost and no decrease in hit rate can be selected. The globally optimal structure data is exported as the target structure data of the target skill as the deployment product (best_tree). The best_tree is deployed on the target agent, thereby improving the hit rate and processing efficiency when the target agent performs the target task in the future.
[0043] In summary, the skill structure data optimization method for intelligent agents provided in this embodiment includes: generating access evidence datasets corresponding to each user based on the access information of the target intelligent agent to the structure data of the target skill during the user's execution of the target task; determining at least one path to be optimized in the structure data of the target skill based on the access evidence datasets corresponding to each user; generating candidate structure data using a preset structure editing operator based on each path to be optimized and the access evidence datasets related to each path to be optimized; and determining the target structure data of the target skill based on the candidate structure data. This method converts the drill-down access information of the intelligent agent to the structure data of the skill into a measurable structured evidence dataset, thereby determining the access frequency, hit rate, access depth, and reading cost of each access path based on the access evidence datasets of each user, thus accurately selecting access paths with more optimization value from each access path; at the same time, generating candidate structure data based on the access evidence datasets related to the paths to be optimized allows the structure data of the skill to adaptively adjust with the usage distribution of the structure data of the target skill itself, improving the optimization effect of the structure data of the skill.
[0044] Figure 3 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 2 Optionally, in step S101, based on the access information of the target intelligent agent to the structural data of the target skill during the user's use of the target intelligent agent to perform the target task, an access evidence dataset corresponding to each user is generated, including: S201. In the current batch of the current iteration round, based on the access path from the root node to the leaf node in the structural data of the target skill by the target agent during the user's execution of the target task using the target agent, determine the access path corresponding to each user.
[0045] An access path can refer to the sequence of all node identifiers that pass through from the root node of the target skill's structural data to the terminal node reached in this access, containing the complete query trajectory of this access.
[0046] S202. Determine the access depth for each user based on the number of node jumps from the root node to the leaf node in the access path corresponding to each user.
[0047] Access depth refers to the number of hops from the root node to the terminal node, which can also be understood as the number of drill-downs. For example, if it takes 3 nodes to reach the terminal node from the top-level index node, then the access depth can be 3.
[0048] S203. Based on the cumulative count of the words read on each access page during the jump from the root node to the leaf node in the access path corresponding to each user, determine the cumulative number of words read for each user.
[0049] The cumulative number of tokens read refers to the total number of tokens loaded into the context processing during the drilling down along the access path, including the sum of tokens from each index node.
[0050] For example, when drilling down from the root node to the leaf node, multiple pages need to be navigated to, and the total number of tokens on each page can be used as the cumulative number of tokens read.
[0051] S204. Determine whether the correct leaf node has been hit based on whether the leaf node in the access path corresponding to each user is the required target leaf node.
[0052] Whether the correct leaf node was hit refers to whether the current access finally reached the desired target leaf node. For example, if the user's task is to search for English learning materials, and the leaf node that is finally drilled down to retrieves math learning materials, then the correct leaf node was not hit. However, if the leaf node that is finally drilled down to retrieves the desired English learning materials, then the current access was considered to have hit the correct leaf node.
[0053] S205. Generate an access evidence dataset for each user based on the user's access identifier, the user's corresponding access path, the user's corresponding access depth, the user's corresponding cumulative number of read terms, and whether the correct leaf node was hit.
[0054] A user's access identifier can indicate the user's query record, such as the query content entered by the user; the user's access evidence dataset is composed of multiple pieces of information, including the user's access identifier, the user's corresponding access path, access depth, the cumulative number of tokens read, and whether the correct leaf node was hit.
[0055] Figure 4 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 3 Optionally, in step S102, based on the access evidence dataset corresponding to each user, at least one path to be optimized in the structured data of the target skill is determined, including: S301. In the current batch of the current iteration round, based on the access evidence dataset corresponding to each user, determine the access frequency, average hit rate, and access depth of each access path.
[0056] Based on the access paths in the access evidence dataset for each user, the access frequency and average hit rate of the same access path can be statistically analyzed. Since the access paths are identical, the access depth of the access path can be directly obtained without statistical or averaging calculations.
[0057] S302. Based on the access frequency of each access path, the average hit rate of each access path, and the access depth of each access path, determine at least one path to be optimized in the current structural data of the target skill.
[0058] Define the promotion value indicators for the path.
[0059] in, Indicates the frequency of path access. This represents the average hit rate of the path. Indicates the access depth of the path.
[0060] The promotion value index for each access path can be calculated using the formula above. .
[0061] The higher the promotion value index, the more frequent and accurate the path is, and the deeper it is currently buried. The more reading costs can be reduced by promoting it from deep to shallow, the more priority should be given to promoting it. Conversely, the lower the promotion value index, the more frequent and accurate the path is, and the more it should be demoted to release the limited attention budget at the shallow level.
[0062] Based on this, access paths whose promotion value indicators exceed a preset threshold can be selected as paths to be optimized, according to the promotion value indicators of each access path; or, the top N access paths in terms of promotion value indicators can be selected as paths to be optimized.
[0063] Figure 5 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 4 Optionally, in step S103, based on each path to be optimized and the access evidence dataset related to each path to be optimized, a preset structure editing operator is used to generate candidate structure data, including: S401. In the current batch of the current iteration round, determine the structural adjustment mode of each path to be optimized based on the access evidence dataset related to each path to be optimized.
[0064] Structural adjustment modes include any of the following: promotion adjustment, demotion adjustment, reassignment adjustment, and merger adjustment.
[0065] S402. Based on the structural adjustment mode of each path to be optimized, the adjustment strategy corresponding to each structural adjustment mode, and the preset adjustment constraint information, perform hierarchical structural adjustment on each path to be optimized in the current structural data of the target skill to generate candidate structural data.
[0066] Adjustment constraint information is used to constrain the number of structural adjustments that are allowed to be performed.
[0067] Based on the access evidence dataset related to each path to be optimized, the structural adjustment pattern of each path can be determined. Among them, the adjustment strategies corresponding to promotion adjustment include: adding the paths to be optimized with high access frequency and high hit rate to the top-level direct access table of the structural data, so that the access depth of the paths to be optimized is adjusted to the preset value; the adjustment strategies corresponding to sinking adjustment include: removing or collapsing the paths to be optimized with low access frequency and low hit rate from the shallow layer; the adjustment strategies corresponding to re-hanging adjustment include: migrating the child nodes of the paths to be optimized across parent nodes and changing the node index relationship; the adjustment strategies corresponding to merging adjustment include: merging the access entry points of multiple paths to be optimized that are semantically similar and have low access frequency.
[0068] For paths with high frequency and high hit rate to be optimized, promotion adjustments can be performed to move them to a shallower level (root node direction) to reduce access depth and improve access efficiency. Specifically, the access entry for the path to be optimized can be directly appended to the top-level direct access table of the structure data, for example, by adding an entry (scene name-full path-leaf node representation), which reduces the access depth to 1.
[0069] For low-frequency, low-hit-rate paths to be optimized, they can be moved deeper to free up more shallow attention budget for higher-priority paths; or they can be collapsed, for example, by collapsing nodes from the first-level index into the second-level expansion items.
[0070] For paths that are too long or prone to errors in branch selection, the mounting relationships of index nodes can be adjusted. This involves adjusting the affiliation or sorting of intermediate branches, migrating subtrees across parent nodes, and rewriting reference relationships to reduce the probability of selecting the wrong branch during drill-down. For example, the target leaf node (or intermediate index node) can be moved from its original category B to a more prominent position under category A.
[0071] For multiple paths that are semantically similar and have low access frequency, they can be merged into branches under the same entry path, or some nodes on their access paths can be merged.
[0072] Optionally, during the adjustment process based on the adjustment strategy, the adjustment intensity can be constrained by preset adjustment constraint information, so that the structural data before and after adjacent adjustments remain close in structural distance, which is equivalent to the learning rate in gradient descent.
[0073] For example, if the constraint information is adjusted to 3, then a maximum of 3 edit operations can be output. Adjusting the constraint information too large will lead to a large-scale reordering at once, making it difficult to locate unfavorable changes and incurring high rollback costs; adjusting the constraint information too small will result in slow convergence. In this embodiment, the adjustment constraint information supports dynamic scheduling methods such as constant, linear decay, or cosine annealing, which can tighten as the iteration rounds progress, achieving coarse adjustment followed by fine-tuning.
[0074] In practical applications, the structural adjustment modes used are not limited to those listed above. More structural adjustment modes and better adjustment strategies can be configured according to specific optimization needs.
[0075] It is worth noting that when performing structural adjustments, the main carrier of the adjustment is the index layer pointer pointing to the leaf node (leaf file), rather than the leaf entity file itself. That is, what is adjusted is the addition and deletion of direct table entries, the mounting position and sorting of nodes in the index, and equivalent index-level remounting / merging. The leaf file remains in its original position by default, so the reference relationship is naturally complete.
[0076] Figure 6 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 5 Optionally, in step S104, the target structure data of the target skill is determined based on the candidate structure data, including: S501. In the current batch of the current iteration round, verify the candidate structure data.
[0077] This embodiment describes the complete optimization process. For the current batch in the current iteration round, the candidate structure data generated in the current batch can be verified to determine whether to accept the candidate structure data.
[0078] S502. If the verification is successful, the candidate structure data is accepted, and the current structure data of the target skill is updated based on the candidate structure data to obtain the first temporary structure data of the target skill, and then the next batch of the current iteration round is entered.
[0079] If the verification passes, the current structure data of the target skill is updated using the candidate structure data of the current batch to obtain the first temporary structure data of the target skill, and the processing of the next batch of the current iteration is performed based on the first temporary structure data of the target skill.
[0080] In the next batch, a new batch of access evidence datasets will be collected, generated from the first temporary structure data of the target agent calling the target skill during the process of users using the target agent to perform the target domain task. This dataset will then be used to generate candidate structure data for the next batch in the current iteration round.
[0081] S503. When the batch execution stop condition of the current iteration round is met, determine the intermediate structure data corresponding to the current iteration round from the candidate structure data of each batch, update the current structure data of the target skill based on the intermediate structure data corresponding to the current iteration round, obtain the second temporary structure data of the target skill, and enter the next iteration round.
[0082] In the current iteration round, batch iteration is performed cyclically. When the batch execution stop condition is met, the intermediate structure data corresponding to the current iteration round is determined from the candidate structure data of all batches.
[0083] The batch execution stopping condition can be that as the batch iterates, the read cost of the generated candidate structure data when it is called gradually converges (the change does not exceed a preset range), or the batch iteration count reaches a preset number.
[0084] When determining the intermediate structure data corresponding to the current iteration from the candidate structure data of each batch, the candidate structure data with the lowest read cost and no decrease in hit rate can be used as the intermediate structure data corresponding to the current iteration.
[0085] In this embodiment, the read cost is defined as:
[0086] in, This refers to the cost of reading. and As explained above, This refers to the cost of reading data. These are non-negative weights, which respectively characterize the relative importance of access depth, read cost, and miss penalty.
[0087] In this embodiment, the definition of read cost is to add read cost and miss penalty to the access depth, so that the optimization direction not only pursues short drill-down of high-frequency paths, but also requires high-frequency paths to be paths with high hit rate and low read cost.
[0088] Based on the intermediate structure data corresponding to the current iteration round, the current structure data of the target skill (which changes in real time as the iteration proceeds) can be updated to obtain the second temporary structure data of the target skill. Based on the second temporary structure data of the target skill, the next iteration round is entered. In the next round, the access evidence dataset generated by the target agent calling the second temporary structure data of the target skill during the process of the first batch of users using the target agent to perform the target domain task is collected, and the first batch of candidate structure data in the next iteration round is generated from this.
[0089] S504. When the iteration stop condition is met, the intermediate structure data with the lowest reading cost and no decrease in hit rate generated based on the intermediate structure data corresponding to each iteration round shall be used as the target structure data of the target skill.
[0090] The stopping condition for each iteration can also be: as the iteration continues, the reading cost generated by the intermediate structure data corresponding to the iteration gradually converges, or the iteration reaches the preset number of iterations.
[0091] Based on the intermediate structure data corresponding to each iteration round, the intermediate structure data with the lowest reading cost and no decrease in hit rate can be selected as the final target structure data. This data is then exported as a deployment artifact and deployed in the target agent. Subsequently, when the target agent performs a target domain task, it loads the target structure data of the target skill to execute the task.
[0092] It is worth noting that the first temporary structural data, the second temporary structural data, and the intermediate structural data mentioned above are all temporary products in the optimization process, used to update the structural data of the target skill in real time so that the iterative optimization is continuously executed. These temporary products only temporarily update the structural data of the target skill in order to collect the updated access information. Only the final determined target structural data is used as the real product and is ultimately used to update the structural data of the target skill before optimization.
[0093] Figure 7 This is a complete flowchart illustrating the method for optimizing the skill structure data of an intelligent agent according to an embodiment of this application. The specific details of each step have been described above and will not be repeated here.
[0094] Figure 8 A flowchart illustrating the skill structure data optimization method for an intelligent agent provided in this application embodiment. Figure 6 Optionally, in step S501, the candidate structure data is validated, including: S601. In the current batch of the current iteration round, based on the access information of the target agent to the candidate structure data of the target skill during the process of each verification user in the verification user set using the target agent to perform the verification task, generate the verification access evidence dataset corresponding to each verification user.
[0095] When validating candidate structure data generated in any batch, a pre-reserved validation query dataset can be used. The validation query dataset contains validation query tasks that are different from the query tasks executed during the optimization process. These validation query tasks are also tasks in the domain to which the target skill belongs.
[0096] Based on the access information generated during the execution of the verification query task by the target intelligent agent, a verification access evidence dataset corresponding to each verification user can be generated.
[0097] S602. Based on the access frequency, access depth, average hit accuracy, and average read cost of each verification access path in the verification access evidence dataset corresponding to each verification user, determine the read cost generated based on the candidate structure data.
[0098] The cost of reading candidate structure data is calculated using the reading cost calculation formula defined above.
[0099] S603. If the reading cost based on the candidate structure data is less than the reading cost based on the candidate structure data of the previous batch in the current batch, and the hit rate based on the candidate structure data is greater than or equal to the hit rate based on the candidate structure data of the previous batch in the current batch, then the candidate structure data verification is confirmed to be successful.
[0100] If the reading cost based on the candidate structure data of the current batch is less than the reading cost based on the candidate structure data of the previous batch, and the hit rate based on the candidate structure data of the current batch does not decrease, then the candidate structure data of the current batch is determined to have passed the verification.
[0101] Conversely, if neither of the above two conditions is met simultaneously, the candidate structure data for the current batch is deemed to have failed verification. That is, even if the read cost of the candidate structure data in the current batch is less than that in the previous batch, if the hit rate based on the candidate structure data in the current batch is less than that based on the previous batch, the verification is still considered unsuccessful. This verification method ensures that the final optimized high-frequency path not only reduces access depth but also maintains a high hit rate, without sacrificing hit rate while reducing access depth.
[0102] Optionally, the method further includes: if the candidate structure data verification fails, the hierarchical structure adjustment method corresponding to the candidate structure data, the change in read cost based on the candidate structure data, and the change in hit rate are recorded so that the hierarchical structure adjustment method corresponding to the candidate structure data will not be adopted when candidate structure data is generated in subsequent batches or rounds.
[0103] In some embodiments, when the candidate structure data verification fails, the current structure data of the target skill is not updated, and the candidate structure data is recorded in a structured way in the rejection buffer. The information that can be recorded includes, but is not limited to: the hierarchical structure adjustment method (i.e., the specific editing operation) corresponding to the candidate structure data, the change in reading cost based on the candidate structure data, the change in hit rate, the timestamp of verification failure, and the reason for verification failure.
[0104] In some embodiments, based on the information recorded in the rejection buffer, the relevant access evidence dataset of the path to be optimized can be used as input to the result editing agent during the subsequent generation of candidate structure data. This is used to correct the editing tendencies of the subsequent structure editing agent, so as to avoid repeatedly trying editing methods that have been proven to be ineffective when generating candidate structure data.
[0105] Of course, based on the information of each candidate structure data recorded in the rejection cache, if it is found that multiple different editing results corresponding to the same path are rejected, the path can be marked as a difficult-to-optimize path, and other new editing methods or delayed processing can be tried first for the path in the future.
[0106] Data in the rejection buffer can also be used to identify stubborn structural regions that require human intervention.
[0107] Optionally, the method further includes: generating first optimization guidance information and second optimization guidance information corresponding to the structural data of the target skill based on the access result data generated from the intermediate structural data corresponding to adjacent iteration rounds; the first optimization guidance information is used to indicate the access path that is protected and not arbitrarily adjusted; the second optimization guidance information is used to indicate the structural adjustment operation to be avoided.
[0108] In some embodiments, through round-level updates, the access result data of adjacent iteration rounds can be compared longitudinally based on the access result data generated by the intermediate structure data corresponding to adjacent iteration rounds, so as to learn long-term structural optimization patterns.
[0109] The access results data for each iteration round can be categorized as follows: Improved: Paths that were originally deep-drilled or mishit but are now shallowly accessible and hit; Regressed: Paths that were originally good but have deteriorated in depth or hit rate after reconstruction; Continuous deep drilling: High-frequency paths that have not been resolved and have been deep-drilled across rounds; Stable access: Paths that have maintained a stable shallow hit rate across rounds.
[0110] Based on the above classification results, we can extract first and second optimization guidance information. The first optimization guidance information indicates protected access paths that should not be arbitrarily adjusted. For example, a high-frequency topic should remain visible at level one for an extended period, and two types of indicators with semantically similar origins should have their entry points merged. The second optimization guidance information indicates structural adjustment operations to avoid. For example, which types of editing operations (such as certain types of push-up operations or certain types of merge operations) are repeatedly generated and repeatedly fail verification in multiple rounds. If the rejection rate of a certain type of operation consistently exceeds a preset threshold in consecutive rounds, it is identified as an inefficient editing type and should be avoided in subsequent uses.
[0111] In some embodiments, when generating candidate structure data, the first optimization guidance information and the second optimization guidance information are also used together with the access evidence dataset related to the path to be optimized as input to the structure editing agent to guide the generation of candidate structure data.
[0112] In summary, the skill structure data optimization method for intelligent agents provided in this embodiment includes: generating access evidence datasets corresponding to each user based on the access information of the target intelligent agent to the structure data of the target skill during the user's execution of the target task; determining at least one path to be optimized in the structure data of the target skill based on the access evidence datasets corresponding to each user; generating candidate structure data using a preset structure editing operator based on each path to be optimized and the access evidence datasets related to each path to be optimized; and determining the target structure data of the target skill based on the candidate structure data. This method converts the drill-down access information of the intelligent agent to the structure data of the skill into a measurable structured evidence dataset, thereby determining the access frequency, hit rate, access depth, and reading cost of each access path based on the access evidence datasets of each user, thus accurately selecting access paths with more optimization value from each access path; at the same time, generating candidate structure data based on the access evidence datasets related to the paths to be optimized allows the structure data of the skill to adaptively adjust with the usage distribution of the structure data of the target skill itself, improving the optimization effect of the structure data of the skill.
[0113] Secondly, the hierarchy depth is treated as an optimizable object. The weighted read cost, calculated by combining access frequency, access depth, read cost, and hit rate, is defined as the optimization objective. This allows high-frequency, high-hit, and low-cost paths to automatically rise to shallower layers, even generating direct entry points with an access depth of 1 at the top level; while low-frequency or low-hit paths sink downwards. This achieves the optimization effect of dynamically promoting high-frequency, high-hit content according to call distribution and automatically degrading and recycling failed entry points.
[0114] In addition, by verifying the generated candidate structure data, only candidate structure data with reduced read costs and no decrease in hit rate are accepted; while for candidate structure data that fails verification, rejection buffer data is recorded for repeated attempts of invalid operations in subsequent optimization processes, thereby reducing optimization time.
[0115] By generating long-term optimization guidance information through longitudinal comparison between adjacent iterations, the optimization process can benefit from more accurate historical optimization experience, thereby improving optimization efficiency and the accuracy of optimization results.
[0116] The following describes the apparatus, device, and storage medium used to implement the skill structure data optimization method for intelligent agents provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0117] Figure 9 This diagram illustrates a skill structure data optimization device for an intelligent agent, as provided in an embodiment of this application. The function implemented by this device corresponds to the steps executed in the aforementioned method. This device can be understood as the aforementioned computer equipment, such as… Figure 9 As shown, it includes: a generation module 100 and a determination module 200; The generation module 100 is used to generate an access evidence dataset for each user based on the access information of the target intelligent agent to the structural data of the target skill during the process of the user using the target intelligent agent to perform the target task. The access evidence dataset includes at least: access path, access depth, cumulative number of lexical units read, and whether the correct leaf node is hit. The determination module 200 is used to determine at least one path to be optimized in the structured data of the target skill based on the access evidence dataset corresponding to each user. The generation module 100 is used to generate candidate structure data based on each path to be optimized and the access evidence dataset related to each path to be optimized, using a preset structure editing operator. The determination module 200 is used to determine the target structure data of the target skill based on the candidate structure data.
[0118] Optionally, the generation module 100 is specifically used to determine the access path corresponding to each user in the current batch of the current iteration round, based on the access path from the root node to the leaf node in the structural data of the target skill by the target intelligent agent during the user's execution of the target task using the target intelligent agent. The access depth for each user is determined based on the number of node jumps from the root node to the leaf node in the access path for each user. Based on the cumulative count of words read on each access page during the jump from the root node to the leaf node in the access path corresponding to each user, the cumulative number of words read by each user is determined. Determine whether the correct leaf node has been hit based on whether the leaf node in each user's access path is the required target leaf node; Based on each user's access identifier, access path, access depth, cumulative number of terms read, and whether the correct leaf node was hit, an access evidence dataset is generated for each user.
[0119] Optionally, the determining module 200 is specifically used to determine the access frequency, average hit rate and access depth of each access path in the current batch of the current iteration round, based on the access evidence dataset corresponding to each user. Based on the access frequency, average hit rate, and access depth of each access path, at least one path to be optimized is identified in the current structural data of the target skill.
[0120] Optionally, the generation module 100 is specifically used to determine the structural adjustment mode of each path to be optimized in the current batch of the current iteration round, based on the access evidence dataset related to each path to be optimized. The structural adjustment mode includes any one of the following: promotion adjustment, demotion adjustment, re-attachment adjustment, and merging adjustment. Based on the structural adjustment mode of each path to be optimized, the adjustment strategy corresponding to each structural adjustment mode, and the preset adjustment constraint information, hierarchical structural adjustment is performed on each path to be optimized in the current structural data of the target skill to generate candidate structural data; the adjustment constraint information is used to constrain the number of structural adjustments that can be performed.
[0121] Optionally, the adjustment strategy corresponding to the promotion adjustment includes: adding the high-frequency and high-hit-rate paths to be optimized to the top-level direct access table of the structure data, so that the access depth of the paths to be optimized is adjusted to a preset value; The corresponding adjustment strategies for sinking include: removing or collapsing the low-frequency and low-hit-rate paths to be optimized from the shallow layer; The adjustment strategies corresponding to the re-hanging adjustment include: migrating child nodes across parent nodes for the path to be optimized and changing the node index relationship; The adjustment strategies corresponding to the merging and adjustment include merging the access entry points of multiple paths to be optimized that are semantically similar and have low access frequency.
[0122] Optionally, module 200 is specifically used to verify candidate structure data in the current batch of the current iteration round; If the verification passes, the candidate structure data is accepted, and the current structure data of the target skill is updated based on the candidate structure data to obtain the first temporary structure data of the target skill, and then it enters the next batch of the current iteration round; When the batch execution stop condition of the current iteration round is met, the intermediate structure data corresponding to the current iteration round is determined from the candidate structure data of each batch, and the current structure data of the target skill is updated based on the intermediate structure data corresponding to the current iteration round to obtain the second temporary structure data of the target skill, and then the next iteration round is entered. When the iteration stop condition is met, the intermediate structure data with the lowest reading cost and no decrease in hit rate generated based on the intermediate structure data corresponding to each iteration round is taken as the target structure data of the target skill.
[0123] Optionally, the determining module 200 is specifically used to generate a verification access evidence dataset corresponding to each verification user in the current batch of the current iteration round, based on the access information of the target intelligent agent to the candidate structure data of the target skill during the process of each verification user in the verification user set using the target intelligent agent to perform the verification task. Based on the access frequency, access depth, average hit accuracy, and average read cost of each verification access path in the verification access evidence dataset corresponding to each verification user, the read cost generated based on the candidate structure data is determined. If the reading cost based on the candidate structure data is less than the reading cost based on the candidate structure data of the previous batch in the current batch, and the hit rate based on the candidate structure data is greater than or equal to the hit rate based on the candidate structure data of the previous batch in the current batch, then the candidate structure data is determined to have passed the verification.
[0124] Optionally, the determining module 200 is further configured to record, if the candidate structure data verification fails, the hierarchical structure adjustment method corresponding to the candidate structure data, the change in reading cost based on the candidate structure data, and the change in hit rate, so that the hierarchical structure adjustment method corresponding to the candidate structure data will not be adopted when generating candidate structure data in subsequent batches or rounds.
[0125] Optionally, the generation module 100 is further configured to generate first optimization guidance information and second optimization guidance information corresponding to the structural data of the target skill based on the access result data generated from the intermediate structural data corresponding to adjacent iteration rounds. The first optimization guidance information is used to indicate the access path that is protected and not arbitrarily adjusted; the second optimization guidance information is used to indicate the structural adjustment operation to be avoided.
[0126] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0127] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0128] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections may include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections may include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more units can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.
[0129] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The device may be a computing device with data processing capabilities.
[0130] The device includes a processor 801, a storage medium 802, and a bus 803. The storage medium 802 stores program instructions that can be executed by the processor 801. When the electronic device is running, the processor 801 communicates with the storage medium 802 through the bus 803. The processor 801 executes the program instructions to implement the skill structure data optimization method of the intelligent agent as described in the embodiment.
[0131] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the skill structure data optimization method for an intelligent agent according to various exemplary embodiments of this application, as described in the "Exemplary Methods" section above.
[0132] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0133] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The storage medium can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type storage medium, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage medium, magnetic disk, optical disk, etc. The storage medium is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, storage medium 802 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0134] Optionally, this application also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, performs the above-described method embodiments.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0137] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0138] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for optimizing the skill structure data of an intelligent agent, characterized in that, include: Based on the access information of the target intelligent agent to the structural data of the target skill during the process of the user using the target intelligent agent to perform the target task, an access evidence dataset corresponding to each user is generated. The access evidence dataset includes at least: access path, access depth, cumulative number of tokens read, and whether the correct leaf node was hit; Based on the access evidence dataset corresponding to each user, at least one path to be optimized in the structured data of the target skill is determined; Based on each path to be optimized and the access evidence dataset related to each path, a preset structure editing operator is used to generate candidate structure data. The preset structure editing operator is used to determine the adjustment strategy of the structure adjustment mode corresponding to the path to be optimized. The structure adjustment mode includes any one of the following: promotion adjustment, sinking adjustment, re-attachment adjustment, and merging adjustment. The adjustment strategy corresponding to promotion adjustment includes: adding the path to be optimized with high access frequency and high hit rate to the top-level direct access table of the structure data, so that the access depth of the path to be optimized is adjusted to a preset value. The adjustment strategy corresponding to sinking adjustment includes: removing or collapsing the path to be optimized with low access frequency and low hit rate from the shallow layer. The adjustment strategy corresponding to re-attachment adjustment includes: migrating the child nodes of the path to be optimized across parent nodes and changing the node index relationship. The adjustment strategy corresponding to merging adjustment includes: merging the access entrances of multiple paths to be optimized that are semantically similar and have low access frequency. Based on the candidate structure data, the target structure data of the target skill is determined.
2. The method according to claim 1, characterized in that, The step of generating an access evidence dataset for each user based on the access information of the target intelligent agent to the structural data of the target skill during the user's execution of the target task using the target intelligent agent includes: In the current batch of the current iteration round, based on the access path from the root node to the leaf node in the structural data of the target skill by the target agent during the process of the user using the target agent to perform the target task, the access path corresponding to each user is determined. The access depth for each user is determined based on the number of node jumps from the root node to the leaf node in the access path corresponding to each user. Based on the cumulative count of the words read on each access page during the jump from the root node to the leaf node in the access path corresponding to each user, the cumulative number of words read by each user is determined. Determine whether the correct leaf node has been hit based on whether the leaf node in the access path corresponding to each user is the required target leaf node. Based on each user's access identifier, access path, access depth, cumulative number of terms read, and whether the correct leaf node was hit, an access evidence dataset is generated for each user.
3. The method according to claim 1, characterized in that, The step of determining at least one path to be optimized in the structured data of the target skill based on the access evidence dataset corresponding to each user includes: In the current batch of the current iteration round, based on the access evidence dataset corresponding to each user, determine the access frequency, average hit rate and access depth of each access path. Based on the access frequency, average hit rate, and access depth of each access path, at least one path to be optimized is determined from the current structural data of the target skill.
4. The method according to claim 1, characterized in that, The step of generating candidate structure data based on each path to be optimized and the access evidence dataset related to each path to be optimized, using a preset structure editing operator, includes: In the current batch of the current iteration round, the structural adjustment mode of each path to be optimized is determined based on the access evidence dataset related to each path to be optimized. Based on the structural adjustment mode of each path to be optimized, the adjustment strategy corresponding to each structural adjustment mode, and the preset adjustment constraint information, hierarchical structural adjustment is performed on each path to be optimized in the current structural data of the target skill to generate the candidate structural data; the adjustment constraint information is used to constrain the number of structural adjustments that can be performed.
5. The method according to claim 1, characterized in that, The step of determining the target structure data of the target skill based on the candidate structure data includes: In the current batch of the current iteration round, the candidate structure data is verified; If the verification is successful, the candidate structure data is accepted, and the current structure data of the target skill is updated based on the candidate structure data to obtain the first temporary structure data of the target skill, and then the next batch of the current iteration round is entered. When the batch execution stop condition of the current iteration round is met, the intermediate structure data corresponding to the current iteration round is determined from the candidate structure data of each batch, and the current structure data of the target skill is updated based on the intermediate structure data corresponding to the current iteration round to obtain the second temporary structure data of the target skill, and then the next iteration round is entered. When the iteration stop condition is met, the intermediate structure data with the lowest reading cost and no decrease in hit rate generated based on the intermediate structure data corresponding to each iteration round is taken as the target structure data of the target skill.
6. The method according to claim 5, characterized in that, The verification of the candidate structure data includes: In the current batch of the current iteration round, based on the access information of the target agent to the candidate structure data of the target skill during the process of each verification user in the verification user set using the target agent to perform the verification task, a verification access evidence dataset corresponding to each verification user is generated. Based on the access frequency, access depth, average hit accuracy, and average read cost of each verification access path in the verification access evidence dataset corresponding to each verification user, the read cost generated based on the candidate structure data is determined. If the read cost generated based on the candidate structure data is less than the read cost generated based on the candidate structure data of the previous batch of the current batch, and the hit rate generated based on the candidate structure data is greater than or equal to the hit rate generated based on the candidate structure data of the previous batch of the current batch, then the candidate structure data is determined to have passed verification.
7. The method according to claim 5, characterized in that, Also includes: If the candidate structure data verification fails, the hierarchical structure adjustment method corresponding to the candidate structure data, the change in read cost based on the candidate structure data, and the change in hit rate will be recorded so that the hierarchical structure adjustment method corresponding to the candidate structure data will not be adopted when candidate structure data is generated in subsequent batches or rounds.
8. The method according to claim 5, characterized in that, Also includes: Based on the access result data generated from the intermediate structure data corresponding to adjacent iteration rounds, first optimization guidance information and second optimization guidance information corresponding to the structure data of the target skill are generated. The first optimization guidance information is used to indicate the protected access path that is not arbitrarily adjusted. The second optimization guidance information is used to indicate structural adjustment operations to be avoided.
9. A device for optimizing the skill structure data of an intelligent agent, characterized in that, include: Generate module and determine module; The generation module is used to generate an access evidence dataset for each user based on the access information of the target intelligent agent to the structural data of the target skill during the process of the user using the target intelligent agent to perform the target task. The access evidence dataset includes at least: access path, access depth, cumulative number of tokens read, and whether the correct leaf node was hit; The determining module is used to determine at least one path to be optimized in the structure data of the target skill based on the access evidence dataset corresponding to each user. The generation module is used to generate candidate structure data based on each path to be optimized and the access evidence dataset related to each path to be optimized, using a preset structure editing operator. The preset structure editing operator is used to determine the adjustment strategy of the structure adjustment mode corresponding to the path to be optimized. The structure adjustment mode includes any one of the following: promotion adjustment, sinking adjustment, re-attachment adjustment, and merging adjustment. The adjustment strategy corresponding to the promotion adjustment includes: adding the path to be optimized with high access frequency and high hit rate to the top-level direct access table of the structure data, so that the access depth of the path to be optimized is adjusted to a preset value. The adjustment strategy corresponding to the sinking adjustment includes: removing or collapsing the path to be optimized with low access frequency and low hit rate from the shallow layer. The adjustment strategy corresponding to the re-attachment adjustment includes: migrating the child nodes of the path to be optimized across parent nodes and changing the node index relationship. The adjustment strategy corresponding to the merging adjustment includes: merging the access entries of multiple paths to be optimized that are semantically similar and have low access frequency. The determining module is used to determine the target structure data of the target skill based on the candidate structure data.
10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the method as described in any one of claims 1 to 8.
11. A computer program product, characterized in that, The computer program product includes computer program code, which, when executed by a computing device, performs the method as described in any one of claims 1 to 8.
