Agent-based skill package generation method and apparatus
Patent Information
- Application Number
- CN202611424106.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-10-27
AI Technical Summary
然而,这种方式需要开发者手动阅读文档、提炼要点、编写知识文件,不仅耗时,编写效率低下,而且主观性较强,难以保证编写文件的一致性
[0029]借由上述技术方案,本申请提供的一种基于智能体的技能包生成方法及装置,与现有的人工编写整理方式相比,通过利用结构化配置文件统一描述数据源类型和技能包文件输出路径,并利用智能体按照数据源类型分别调用相应的数据获取策略获取数据源,能够自动生成包含知识文件的技能包文件,本申请在技能包文件生成过程中不需要人工手动阅读文档和提炼要点,因此能够提高知识文件的编写效率,同时能够保证知识文件的一致性。
Smart Images

Figure CN122985236A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and apparatus for generating skill packs based on intelligent agents. Background Technology
[0002] LLM (Large Language Model) is widely used in the field of software development. It performs well in general knowledge domains, but there are obvious knowledge blind spots in specific technical domains. To make up for this deficiency, it is necessary to inject domain-specific structured knowledge.
[0003] Currently, the common approach is to manually compile documents and maintain the knowledge base. However, this method requires developers to manually read documents, extract key points, and write knowledge files, which is not only time-consuming and inefficient, but also highly subjective and makes it difficult to ensure the consistency of the written files. Summary of the Invention
[0004] In view of this, this application provides a method and apparatus for generating skill packs based on intelligent agents, the main purpose of which is to improve the efficiency of knowledge document writing and ensure the consistency of knowledge documents.
[0005] According to a first aspect of this application, a method for generating skill packs based on intelligent agents is provided, the method comprising: In response to the skill generation command, obtain the configuration file corresponding to the target skill; Based on the configuration file, the intelligent agent determines the output path of the skill package file and the data source type corresponding to the target skill, wherein the data source type includes at least one of the following: repository data source, document data source, and synchronous data source. Based on the data source type, the agent uses a corresponding data acquisition strategy to obtain the data source corresponding to the target skill. Based on the skill package file output path and the data source, the agent generates a skill package file containing knowledge files.
[0006] Optionally, based on the configuration file, the intelligent agent determines the output path of the skill package file and the data source type corresponding to the target skill, including: The intelligent agent reads the skill output mode and the data source type corresponding to the target skill from the configuration file. The skill output mode includes single skill mode and multi-skill mode. The skill package file output path is determined based on the skill output mode, wherein the skill package file output path is different for different skill output modes.
[0007] Optionally, the step of obtaining the data source corresponding to the target skill using the agent with an appropriate data acquisition strategy based on the data source type includes: When the data source type is a warehouse-type data source, the agent constructs a data warehouse data snapshot of the corresponding warehouse at the current moment by executing shell commands, and obtains warehouse data from the corresponding warehouse based on the data warehouse data snapshot; When the data source type is a document-type data source, the agent creates a local storage document directory by executing shell commands and stores the documents downloaded from the corresponding document platform in the local storage document directory; When the data source type is a synchronous data source, the agent constructs a snapshot of the existing skill package at the current moment by executing shell commands, and copies and stores the existing skill package based on the skill package snapshot.
[0008] Optionally, the step of generating a skill package file containing knowledge files using the agent based on the skill package file output path and the data source includes: The data source corresponding to the target skill is input into the agent, and a knowledge file corresponding to the target skill is generated in the skill package file output path; When the knowledge file includes multiple topic knowledge files, a skill package index file is generated in the skill package file output path; The skill package file is determined based on the multiple topic knowledge files and the skill package index file.
[0009] Optionally, after generating a skill package file containing knowledge files using the agent based on the skill package file output path and the data source, the method further includes: Create a tracking file corresponding to the target skill, and generate a modification time field and a status field in the tracking file; Calculate the hash value of the data source corresponding to the target skill, and store the hash value of the data source as a file version identifier in the tracking file.
[0010] Optionally, the hash value includes a commit hash and a content hash, the commit hash includes a first commit hash and a second commit hash, the tracking file includes a first tracking file, a second tracking file, and a third tracking file, and the step of calculating the hash value of the data source corresponding to the target skill and storing the hash value of the data source as a file version identifier in the tracking file includes: When the data source type is a warehouse data source, calculate the first commit hash corresponding to the warehouse data and store the first commit hash in the created first trace file; When the data source type is a document-type data source, calculate the content hash corresponding to the document and store the content hash in the created second tracking file; When the data source type is a synchronous data source, calculate the second commit hash corresponding to the existing skill pack and store the second commit hash in the created third tracking file.
[0011] Optionally, the method further includes: In response to a skill update command, based on the data source type, the agent uses an appropriate data acquisition strategy to obtain the latest data source corresponding to the target skill. Determine whether the latest data source corresponding to the target skill has been incrementally updated; If the latest data source corresponding to the target skill has an incremental update, then the incremental data source to be processed is determined; Based on the incremental data source, the agent updates the skill pack file and the tracking file.
[0012] Optionally, the step of obtaining the latest data source corresponding to the target skill using the agent with an appropriate data acquisition strategy based on the data source type includes: When the data source type is a warehouse-type data source, determine whether there is a data warehouse data snapshot in the data source file; If the data warehouse data snapshot exists, the data warehouse data snapshot is updated to obtain an updated data warehouse data snapshot, and the latest warehouse data is obtained from the corresponding warehouse based on the updated data warehouse data snapshot; When the data source type is a document-type data source, obtain the document resource locator, and determine the latest document based on the document resource locator; When the data source type is a synchronous data source, determine whether a skill pack snapshot exists in the data source file; If the skill pack snapshot exists, the skill pack snapshot is updated to obtain an updated skill pack snapshot, and the latest existing skill pack is obtained based on the updated skill pack snapshot.
[0013] Optionally, determining whether the latest data source corresponding to the target skill has been incrementally updated includes: When the data source type is a warehouse data source, calculate the latest first commit hash corresponding to the latest warehouse data, read the first commit hash from the first tracking file, and compare the latest first commit hash with the first commit hash; If the latest first commit hash is different from the first commit hash, then it is determined that the latest warehouse data has been incrementally updated; When the data source type is a document-type data source, determine whether the document collaboration platform interface is available; If the document collaboration platform interface is available, the document metadata interface is called to obtain the latest modification time of the document, and the document modification time in the second tracking file is read. The latest modification time of the document is then compared with the document modification time. If the latest modification time of the document is different from the document modification time, then download the latest document, calculate the latest content hash corresponding to the latest document, read the content hash of the second tracking file, and compare the latest content hash with the content hash; If the latest content hash is different from the content hash, then it is determined that the latest document has undergone incremental updates; If the document collaboration platform interface is unavailable, the latest content hash corresponding to the latest document is calculated directly, and the content hash in the second tracking file is read. The latest content hash is then compared with the content hash. When the data source type is a synchronous data source, calculate the latest second commit hash corresponding to the latest existing skill pack, read the second commit hash from the third tracking file, and compare the latest second commit hash with the second commit hash; If the latest second submission hash is different from the second submission hash, it is determined that the latest existing skill pack has undergone incremental updates.
[0014] Optionally, after determining the incremental data source to be processed, the method further includes: Determine whether the incremental data source contains general knowledge at the example level; If the general knowledge is included, then the general knowledge is filtered out from the incremental data source to obtain a filtered incremental data source. Determine whether the filtered incremental data source contains at least one of the following: version-specific interface information, trap information, and non-intuitive behavior information; If the data contains at least one of the version-specific interface information, the trap information, and the non-intuitive behavior information, then the filtered incremental data source retains the information to obtain the incremental data source with retained information. Determine whether the incremental data source after the information is retained contains private internal knowledge; If it contains the private internal knowledge, then the incremental data source after the information is retained will continue to retain information to obtain an incremental data source after the information is retained a second time; The step of updating the skill pack file and the tracking file using the intelligent agent based on the incremental data source includes: Based on the incremental data source after the information is retained twice, the agent updates the skill pack file and the tracking file.
[0015] Optionally, updating the skill pack file and the tracking file using the intelligent agent based on the incremental data source includes: The incremental data source is input into the agent to update the skill package file; Write the hash value corresponding to the latest data source as the latest file version identifier into the tracking file; Update the modification time field in the written trace file, and update the status field in the trace file from processing start to completion.
[0016] According to a second aspect of this application, an agent-based skill pack generation apparatus is provided, comprising: The acquisition unit is used to acquire the configuration file corresponding to the target skill in response to the skill generation command; The determining unit is used to determine the output path of the skill package file and the data source type corresponding to the target skill based on the configuration file using an intelligent agent, wherein the data source type includes at least one of the following: repository data source, document data source, and synchronous data source. The acquisition unit is further configured to acquire the data source corresponding to the target skill by using the intelligent agent with a corresponding data acquisition strategy based on the data source type. The generation unit is used to generate a skill package file containing knowledge files using the agent, based on the skill package file output path and the data source.
[0017] Optionally, the determining unit is specifically used to use the intelligent agent to read the skill output mode and the data source type corresponding to the target skill in the configuration file, wherein the skill output mode includes a single skill mode and a multi-skill mode; and to determine the skill package file output path according to the skill output mode, wherein the skill package file output path is different for different skill output modes.
[0018] Optionally, the acquisition unit is specifically configured to: when the data source type is a warehouse-type data source, the agent executes a shell command to construct a data warehouse data snapshot of the corresponding warehouse at the current moment, and acquire warehouse data from the corresponding warehouse based on the data warehouse data snapshot; when the data source type is a document-type data source, the agent executes a shell command to create a local storage document directory, and stores the documents downloaded from the corresponding document platform in the local storage document directory; when the data source type is a synchronization-type data source, the agent executes a shell command to construct a skill package snapshot of the existing skill package at the current moment, and copy and store the existing skill package based on the skill package snapshot.
[0019] Optionally, the generation unit is specifically configured to input the data source corresponding to the target skill into the agent, generate a knowledge file corresponding to the target skill in the skill package file output path; when the knowledge file includes multiple topic knowledge files, generate a skill package index file in the skill package file output path; and determine the skill package file based on the multiple topic knowledge files and the skill package index file.
[0020] Optionally, the device further includes: A creation unit is used to create a tracking file corresponding to the target skill, and generate a modification time field and a status field in the tracking file; The calculation unit is used to calculate the hash value of the data source corresponding to the target skill, and store the hash value of the data source as a file version identifier in the tracking file.
[0021] Optionally, the hash value includes a commit hash and a content hash, the commit hash includes a first commit hash and a second commit hash, and the tracking file includes a first tracking file, a second tracking file, and a third tracking file. The calculation unit is specifically used to calculate the first commit hash corresponding to the warehouse data when the data source type is a warehouse data source, and store the first commit hash in the created first tracking file; when the data source type is a document data source, calculate the content hash corresponding to the document, and store the content hash in the created second tracking file; when the data source type is a synchronous data source, calculate the second commit hash corresponding to the existing skill pack, and store the second commit hash in the created third tracking file.
[0022] Optionally, the device further includes: The acquisition unit is further configured to, in response to a skill update instruction, acquire the latest data source corresponding to the target skill using the agent with a corresponding data acquisition strategy based on the data source type; The determination unit is used to determine whether there is an incremental update in the latest data source corresponding to the target skill; The determining unit is further configured to determine the incremental data source to be processed if there is an incremental update in the latest data source corresponding to the target skill; An update unit is used to update the skill pack file and the tracking file using the agent based on the incremental data source.
[0023] Optionally, the acquisition unit is further configured to: when the data source type is a warehouse-type data source, determine whether a data warehouse data snapshot exists in the data source file; if the data warehouse data snapshot exists, update the data warehouse data snapshot to obtain an updated data warehouse data snapshot, and acquire the latest warehouse data from the corresponding warehouse based on the updated data warehouse data snapshot; when the data source type is a document-type data source, acquire a document resource locator, and determine the latest document based on the document resource locator; when the data source type is a synchronization-type data source, determine whether a skill pack snapshot exists in the data source file; if the skill pack snapshot exists, update the skill pack snapshot to obtain an updated skill pack snapshot, and acquire the latest existing skill pack based on the updated skill pack snapshot.
[0024] Optionally, the determination unit is specifically configured to, when the data source type is a warehouse-type data source, calculate the latest first commit hash corresponding to the latest warehouse data, read the first commit hash from the first tracking file, and compare the latest first commit hash with the first commit hash; if the latest first commit hash is different from the first commit hash, then determine that the latest warehouse data has an incremental update; when the data source type is a document-type data source, determine whether the document collaboration platform interface is available; if the document collaboration platform interface is available, then call the document metadata interface to obtain the latest document modification time, and read the document modification time from the second tracking file, comparing the latest document modification time with the document modification time; if the latest document modification time is different from the document modification time, then download the latest document and calculate the latest first commit hash. The system calculates the latest content hash corresponding to the new document, reads the content hash from the second tracking file, and compares the latest content hash with the content hash. If the latest content hash and the content hash are different, it determines that the latest document has undergone an incremental update. If the document collaboration platform interface is unavailable, the system directly calculates the latest content hash corresponding to the latest document, reads the content hash from the second tracking file, and compares the latest content hash with the content hash. When the data source type is a synchronous data source, the system calculates the latest second commit hash corresponding to the latest existing skill pack, reads the second commit hash from the third tracking file, and compares the latest second commit hash with the second commit hash. If the latest second commit hash and the second commit hash are different, it determines that the latest existing skill pack has undergone an incremental update.
[0025] Optionally, the device further includes: The determination unit is also used to determine whether the incremental data source contains general knowledge at the example level; A filtering unit is configured to filter out the general knowledge from the incremental data source if the general knowledge is included, thereby obtaining a filtered incremental data source. The determination unit is also used to determine whether the filtered incremental data source contains at least one of the following: version-specific interface information, trap information, and non-intuitive behavior information. The retention unit is used to retain information from the filtered incremental data source if it contains at least one of the version-specific interface information, the trap information, and the non-intuitive behavior information, so as to obtain an incremental data source with retained information. The determination unit is also used to determine whether the incremental data source after the information is retained contains private internal knowledge; The retention unit is further configured to, if it contains the private internal knowledge, continue to retain information on the incremental data source after the information retention, to obtain an incremental data source after secondary information retention; The update unit is specifically used to update the skill pack file and the tracking file using the agent based on the incremental data source after the information is retained twice.
[0026] Optionally, the update unit is further configured to input the incremental data source into the agent to update the skill package file; write the hash value corresponding to the latest data source as the latest file version identifier into the tracking file; update the modification time field in the tracking file after writing; and update the status field in the tracking file from processing start to completion.
[0027] According to a third aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described agent-based skill pack generation method.
[0028] According to a fourth aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the above-described agent-based skill pack generation method.
[0029] By utilizing the above technical solutions, this application provides a skill package generation method and apparatus based on intelligent agents. Compared with existing manual writing and organization methods, this method and apparatus utilizes structured configuration files to uniformly describe the data source type and skill package file output path, and uses intelligent agents to call corresponding data acquisition strategies according to the data source type to obtain the data source. This enables the automatic generation of skill package files containing knowledge files. This application eliminates the need for manual reading of documents and extraction of key points during the skill package file generation process, thus improving the efficiency of knowledge file writing and ensuring the consistency of knowledge files.
[0030] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0031] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1A flowchart illustrating a skill pack generation method based on an agent provided in an embodiment of this application is shown. Figure 2 A flowchart illustrating the skill pack update method provided in an embodiment of this application is shown; Figure 3 This paper illustrates the overall process of skill pack updates provided in an embodiment of this application. Figure 4 This paper illustrates a schematic diagram of the interaction process during skill pack updates provided in an embodiment of this application. Figure 5 A schematic diagram of the structure of a skill pack generation device based on an agent provided in an embodiment of this application is shown. Detailed Implementation
[0032] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0033] Existing technologies require developers to manually read documents, extract key points, and write knowledge files, which is not only time-consuming and inefficient, but also highly subjective and makes it difficult to ensure the consistency of the written files.
[0034] To overcome the aforementioned technical problems, this embodiment provides a skill pack generation method based on intelligent agents, such as... Figure 1 As shown, the method includes: Step 10: In response to the skill generation command, obtain the configuration file corresponding to the target skill.
[0035] The target skill refers to any skill in a specific domain based on various tools of a large language model. Specific domains include technical fields such as software development, finance, biomedicine, and logistics. The target skill can be software programming, semantic parsing, task planning, logical reasoning, knowledge retrieval, etc. It should be noted that this embodiment of the invention does not specifically limit the specific domain and skill type; it includes all specific domains and skills applicable to the technical solutions of this embodiment. Furthermore, the configuration file includes configuration information such as the target skill name, data source type, and output mode.
[0036] The embodiments of the present invention are mainly applicable to scenarios in which intelligent agents are used to generate or update skill package files. The execution subject of the embodiments of the present invention is a device that can generate or update skill package files using intelligent agents, which can be set on the server side.
[0037] In this embodiment of the invention, when a skill generation instruction is received, the configuration file carried by the skill generation instruction is obtained. The configuration file is a declarative structured configuration file, which records configuration information such as the target skill name, data source type, and output mode. The configuration file can uniformly describe multiple heterogeneous data sources such as repository type, document type, and synchronous type, and the data source type can be described through enumerated fields.
[0038] Step 20: Based on the configuration file, use an intelligent agent to determine the output path of the skill package file and the data source type corresponding to the target skill.
[0039] The data source types include at least one of the following: repository-type data source, document-type data source, and synchronous data source. The skill package file output path is used to store the final generated skill package file. Furthermore, the agent is based on a Large Language Model (LLM).
[0040] In this embodiment of the invention, after obtaining the configuration file, the agent parses the configuration file to read the data source type described in the configuration file and determine the skill package file output path. Specifically, step 20 includes: using the agent to read the skill output mode and the data source type corresponding to the target skill in the configuration file; and determining the skill package file output path based on the skill output mode.
[0041] The output modes include single-skill mode and multi-skill mode. The output paths of the skill pack files are different for different skill output modes. Single-skill mode means that only one skill is described in the configuration file, and one skill pack file will be output in the end. Multi-skill mode means that at least two skills are described in the configuration file, and at least two skill pack files will be output in the end.
[0042] The embodiments of the present invention use a single configuration file to uniformly describe multiple heterogeneous data sources, eliminating the complexity of multi-source management.
[0043] Step 30: Based on the data source type, the agent uses the corresponding data acquisition strategy to obtain the data source corresponding to the target skill.
[0044] In the embodiments of the present invention, when initially constructing the skill package file corresponding to the target skill, it is necessary to obtain the data source according to the data source type and adopt the corresponding data acquisition strategy. Different data source types correspond to different data acquisition strategies.
[0045] When the data source type is a warehouse-type data source, the agent executes shell commands to construct a snapshot of the corresponding warehouse data at the current moment, and retrieves warehouse data from the corresponding warehouse based on the data warehouse data snapshot; when the data source type is a document-type data source, the agent executes shell commands to create a local storage document directory, and stores the documents downloaded from the corresponding document platform in the local storage document directory; when the data source type is a synchronization-type data source, the agent executes shell commands to construct a snapshot of the existing skill package at the current moment, and copies and stores the existing skill package based on the skill package snapshot.
[0046] Among them, data warehouse snapshots can reflect the content of the corresponding sub-warehouse at a certain moment, and skill pack snapshots can reflect the content of the existing skill pack database at a certain moment.
[0047] When acquiring data sources, for warehouse-type data sources, an agent is used to pull a snapshot of the data warehouse data from the corresponding sub-warehouse. This snapshot is stored in the `source` folder. The snapshot maps to the data in the corresponding sub-warehouse, allowing data to be retrieved and thus the data warehouse data obtained. For document-type data sources, documents are downloaded from the corresponding document platform based on document resource locators (such as URLs) and stored in the corresponding document directory, thus obtaining the document data. For synchronous data sources, an agent is used to pull a snapshot of the skill pack. This snapshot is stored in the `source` folder, mapping to existing skill packs in the existing skill pack database. This snapshot locates the existing skill pack, and copying it yields the existing skill pack file. Therefore, following these methods, appropriate data acquisition strategies can be used to obtain the data sources needed to generate skill packs, depending on the data source type.
[0048] It should be noted that if a sub-repository is specified in the configuration file, then the sub-repository must be specified when building the data warehouse snapshot; otherwise, the default sub-repository will be used.
[0049] In this embodiment of the invention, only data warehouse data snapshots and skill pack snapshots need to be stored in the source folder. It is not necessary to directly store data warehouse data and all existing skill packs. When building a skill pack, the data source can be directly retrieved based on the snapshot, thus saving storage space. Furthermore, in this embodiment of the invention, the data source preparation operations are all executed directly by the agent through shell commands, without the need for pre-installation of dedicated CLI tools.
[0050] Step 40: Based on the skill package file output path and the data source, use the agent to generate a skill package file containing knowledge files.
[0051] The skill pack files include knowledge files and skill pack index files.
[0052] In this embodiment of the invention, after acquiring the data source, the data source corresponding to the target skill is input into the agent. A knowledge file corresponding to the target skill is generated under the skill package file output path. When the knowledge file includes multiple topic knowledge files, a skill package index file is generated under the skill package file output path. For example, topic knowledge files include UI component files, service logic files, etc. The skill package index file includes an index table of all topic knowledge files. Finally, the skill package file is determined based on the multiple topic knowledge files and the skill package index file. If the skill output mode is a single-skill mode, only a skill package file corresponding to a single skill is generated; if the skill output mode is a multi-skill mode, multiple skill package files are generated based on the topic knowledge files and skill package index files under multiple skills.
[0053] For the generation of a single skill pack file, this embodiment of the invention can configure multiple types of data sources simultaneously. After obtaining multiple data sources, the agent merges the contents of all data sources to generate a unified skill pack file.
[0054] This invention combines declarative configuration with autonomous agent execution, transforming skill pack maintenance from manual operation to a configuration-driven automated process, thereby improving the efficiency of skill pack file generation.
[0055] In some embodiments, after generating the skill package file, a tracking file needs to be created to facilitate incremental comparison during subsequent incremental updates. Based on this, the method further includes: creating a tracking file corresponding to the target skill, and generating a modification time field and a status field in the tracking file; calculating the hash value of the data source corresponding to the target skill, and storing the hash value of the data source as a file version identifier in the tracking file.
[0056] The hash value includes a commit hash and / or a content hash, the commit hash includes a first commit hash and / or a second commit hash, and the tracking file includes at least one of a first tracking file, a second tracking file, and a third tracking file.
[0057] When the data source type is a repository data source, calculate the first commit hash corresponding to the repository data and store the first commit hash in the created first tracking file; when the data source type is a document data source, calculate the content hash corresponding to the document and store the content hash in the created second tracking file; when the data source type is a synchronization data source, calculate the second commit hash corresponding to the existing skill pack and store the second commit hash in the created third tracking file.
[0058] Specifically, when the data source type is a repository-type data source, the first commit hash corresponding to the repository data is stored as the file version identifier in the created first tracking file, and a modification time field and a status field are generated based on the current time. When the data source type is a document-type data source, the content hash is stored as the file version identifier in the created second tracking file, and a modification time field and a status field are generated. The second tracking file also records the document resource locator (URL). When the data source type is a synchronous data source, the second commit hash corresponding to the existing skill pack is stored as the file version identifier in the created third tracking file, and a modification time field and a status field are generated based on the current time.
[0059] Among them, the three types of trace files use status fields to record the processing status of various data sources, including processing start (Pending) and completion (Done), thus forming an observable state machine.
[0060] It should be noted that if the configuration file involves multiple data source types, then a corresponding tracing file needs to be built for each data source type.
[0061] This invention provides a foundation for subsequent incremental update mechanisms by persistently storing tracking files, thus ensuring the accuracy of subsequent skill pack file updates.
[0062] Furthermore, embodiments of the present invention also provide an incremental update mechanism for skill data package files, such as... Figure 2 and Figure 3 As shown, it includes: Step 50: In response to the skill update command, based on the data source type, the agent uses the corresponding data acquisition strategy to obtain the latest data source corresponding to the target skill.
[0063] In this embodiment of the invention, an incremental update of the skill pack file can be triggered every certain period of time. When a skill update instruction is received, the latest data source is obtained by using an intelligent agent with the corresponding data acquisition strategy based on the data source type described in the configuration file.
[0064] When acquiring the latest data source, if the data source type is a warehouse-type data source, it is determined whether a data warehouse data snapshot exists in the data source file. If the data warehouse data snapshot exists, it is updated to obtain an updated data warehouse data snapshot, and the latest warehouse data is acquired from the corresponding warehouse based on the updated data warehouse data snapshot. If the data source type is a document-type data source, a document resource locator is acquired, and the latest document is determined based on the document resource locator. If the data source type is a synchronization-type data source, it is determined whether a skill pack snapshot exists in the data source file. If the skill pack snapshot exists, it is updated to obtain an updated skill pack snapshot, and the latest existing skill pack is acquired based on the updated skill pack snapshot.
[0065] Specifically, for warehouse-type data sources, it is determined whether a data warehouse data snapshot already exists in the data source file. If it does not exist, an agent is used to construct a data warehouse data snapshot of the corresponding sub-warehouse at the current moment, and the latest warehouse data is retrieved from the corresponding sub-warehouse based on this snapshot. If it exists, a new data warehouse data snapshot is fetched, i.e., the data warehouse data snapshot is updated, and the latest warehouse data is retrieved from the corresponding sub-warehouse based on the updated snapshot. It should be noted that if a sub-warehouse is specified in the configuration file, it must be specified when constructing the data warehouse data snapshot; otherwise, the default sub-warehouse is used.
[0066] For document-based data sources, the document resource locator (URL) is read from the second tracking file, which can be used to locate the document on the document platform.
[0067] For synchronous data sources, determine whether a skill pack snapshot already exists in the data source file. If it does not exist, use the agent to construct a skill pack snapshot at the current moment, and copy and store the latest existing skill pack based on the skill pack snapshot. If it exists, re-fetch the skill pack snapshot, i.e. update the skill pack snapshot, and copy and store the latest existing skill pack based on the updated skill pack snapshot.
[0068] Step 60: Determine whether there is an incremental update in the latest data source corresponding to the target skill.
[0069] In this embodiment of the invention, after determining the latest data source, it is necessary to determine whether there is an incremental update compared with the previous data source. The determination method for incremental updates varies for different types of data sources.
[0070] When the data source type is a warehouse data source, calculate the latest first commit hash corresponding to the latest warehouse data, read the first commit hash from the first trace file, and compare the latest first commit hash with the first commit hash; if the latest first commit hash is different from the first commit hash, it is determined that the latest warehouse data has been incrementally updated.
[0071] Specifically, the latest first commit hash is compared with the old first commit hash recorded in the first tracking file. If they match, it means that there is no incremental update to the latest warehouse data; if they do not match, it means that there is no incremental update to the latest warehouse data. By comparing the latest first commit hash with the old first commit hash, the list of data warehouse data change files is determined so that the change files can be processed in the future.
[0072] When the data source type is a document-based data source, determine whether the document collaboration platform interface is available. If the document collaboration platform interface is available, call the document metadata interface to obtain the latest modification time of the document, and read the document modification time from the second tracking file. Compare the latest modification time of the document with the document modification time. If the latest modification time of the document is different from the document modification time, download the latest document, calculate the latest content hash corresponding to the latest document, and read the content hash from the second tracking file. Compare the latest content hash with the content hash. If the latest content hash is different from the content hash, determine that the latest document has undergone incremental updates. If the document collaboration platform interface is unavailable, directly calculate the latest content hash corresponding to the latest document, and read the content hash from the second tracking file. Compare the latest content hash with the content hash.
[0073] Specifically, the document metadata interface can be the MCP interface of the document collaboration platform.
[0074] Specifically, the system determines whether the document collaboration platform's MCP interface is available. If available, it calls the document metadata interface to obtain the last-modified timestamp (the document's latest modification time) and compares it with the time recorded in the second tracking file. If the times are the same, it means the latest document has not undergone incremental updates, and the process is skipped without performing subsequent hash calculations. If the times are different, the system downloads the latest document and calculates the hash of the latest content corresponding to the latest document. If the hash of the latest content is the same as the hash recorded in the second tracking file, it means the latest document has not undergone incremental updates, and the process is skipped. If the hash of the latest content is different from the hash recorded in the second tracking file, it means the latest document has undergone incremental updates, and a list of document changes is obtained through hash comparison for subsequent processing of the changed documents.
[0075] When the data source type is a synchronous data source, calculate the latest second commit hash corresponding to the latest existing skill pack, and read the second commit hash from the third tracking file. Compare the latest second commit hash with the second commit hash. If the latest second commit hash is different from the second commit hash, it is determined that the latest existing skill pack has an incremental update.
[0076] Specifically, the latest calculated second commit hash is compared with the old second commit hash recorded in the third tracking file. If they match, it means that there is no incremental update to the latest existing skill pack; if they do not match, it means that there is an incremental update to the latest existing skill pack. By comparing the latest second commit hash with the old second commit hash, the list of existing skill pack change files is determined so that the change files can be processed in the future.
[0077] The incremental update mechanism of this invention processes only the actually changed data in each update, which reduces the amount of data processed by more than 80% compared to the full regeneration method, thus improving the update efficiency of skill pack files.
[0078] Step 70: If the latest data source corresponding to the target skill has an incremental update, then determine the incremental data source to be processed.
[0079] In this embodiment of the invention, when the data source type is a warehouse-type data source, new warehouse data is determined based on the latest first commit hash and the read first commit hash; when the data source type is a document-type data source, new documents are determined based on the latest content hash and the read content hash; when the data source type is a synchronization-type data source, existing skill packs are determined based on the latest second commit hash and the read second commit hash.
[0080] In some embodiments, to ensure that the generated skill pack focuses on the knowledge blind spots of the large model and effectively improves context utilization efficiency, knowledge filtering can be performed on the incremental data source. The knowledge filtering process includes: determining whether the incremental data source contains example-level general knowledge; if it contains such general knowledge, filtering it out to obtain a filtered incremental data source; determining whether the filtered incremental data source contains at least one of version-specific interface information, trap information, and non-intuitive behavior information; if it contains at least one of these, retaining the information in the filtered incremental data source to obtain an information-retained incremental data source; determining whether the information-retained incremental data source contains private internal knowledge; if it contains such private internal knowledge, continuing to retain the information in the information-retained incremental data source to obtain an information-secondarily retained incremental data source. Simultaneously, based on the information-secondarily retained incremental data source, the agent updates the skill pack file and the tracking file.
[0081] Specifically, the process first determines whether the incremental data source contains general knowledge at the example level of the official documentation homepages of mainstream open-source libraries, such as basic usage of standard components and introductory tutorials. If so, this general knowledge is filtered out. This can be achieved through feature matching using a pre-defined general knowledge feature library (such as a list of keywords / patterns from the official documentation homepages of mainstream open-source libraries) to identify the general knowledge in the incremental data source. Next, it determines whether the filtered incremental data source contains version-specific APIs, known pitfalls, or indirect behaviors. If so, this information is retained. Known pitfalls include FAQs, notes, and warnings specifically marked in the official documentation. In this determination, the presence of such information can be identified using tags like "FAQ," "Note," "Warning," and "Known Issues," or version-specific API signatures. Finally, it determines whether the incremental data source contains proprietary internal knowledge. This is done by comparing the documentation content with a pre-defined list of proprietary component libraries / APIs. If so, this knowledge is retained. Proprietary internal knowledge includes internal component libraries and proprietary APIs that do not exist in the LLM training data.
[0082] The built-in filtering strategy in this embodiment of the invention is specifically designed to optimize content quality for the consumption characteristics of large LLM models. Simultaneously, this embodiment of the invention autonomously performs content understanding, filtering, and re-processing by an intelligent agent, requiring no manual intervention. Furthermore, this embodiment of the invention utilizes an incremental update mechanism to automatically detect and synchronize new data when the upstream data source is updated, resulting in near-zero maintenance costs.
[0083] Step 80: Based on the incremental data source, use the agent to update the skill pack file and the tracking file.
[0084] In this embodiment of the invention, during the update, the incremental data source is input into the agent to update the skill package file; the hash value corresponding to the latest data source is written into the tracking file as the latest file version identifier; the modification time field in the tracking file after writing is updated, and the status field in the tracking file is updated from processing start to completion.
[0085] Specifically, for repository-type data sources, the latest first commit hash is written as the latest file version identifier to the first tracking file; for document-type data sources, the latest content hash is written as the latest file version identifier to the second tracking file; and for synchronization-type data sources, the latest second commit hash is written as the latest file version identifier to the third tracking file. In addition, the modification time and status fields in the first, second, and third tracking files also need to be updated.
[0086] The structured skill package files generated in this embodiment of the invention organize knowledge by topic, ensuring completeness and consistency. The generated topic knowledge files not only retain the hierarchical structure of the document and the integrity of the code examples, but also avoid the loss of document structure information during vectorization. Furthermore, this embodiment of the invention achieves version awareness by tracking files; when a document is updated, only the affected knowledge files need to be regenerated. Further, an efficient incremental update can be achieved through a file version identification mechanism. This embodiment of the invention employs different version identification strategies for different data source types, avoiding the problems of full processing and unreliable timestamps.
[0087] To make the technical solutions of the embodiments of the present invention clearer, the following are now combined with Figure 4 Provide a detailed description of the skill pack file update process.
[0088] When the agent receives a skill update command, it reads the data source type and skill output mode from the configuration file and determines the file output path based on the skill output mode. Then, it reads the old version identifier (old commit hash and content hash) from the tracking file. When the data source type is a warehouse-type data source, it updates the data warehouse snapshot and compares the latest first commit hash with the old first commit hash to determine the list of changed files. When the data source type is a document-type data source, it determines whether the document collaboration platform interface is available. If the interface is available, it obtains the latest modification time of the document. If the latest modification time of the document differs from the modification time of the old document, it downloads the latest document and calculates the latest content hash corresponding to the latest document. If the interface is unavailable, it directly calculates the latest content hash corresponding to the latest document and performs a content hash comparison. When the data source type is a synchronous data source, it updates the skill package snapshot and compares the latest second commit hash with the old second commit hash to determine the list of changed files. Next, it performs knowledge blind spot filtering and information retention on the incremental data source (the list of changed files), generates a topic knowledge file and a skill package index file in the file output path, updates the version identifier and status, and finally provides feedback to the user that the generation is complete.
[0089] This invention provides a skill package generation method based on intelligent agents. By using structured configuration files to uniformly describe the data source type and the skill package file output path, and by using intelligent agents to call corresponding data acquisition strategies according to the data source type to obtain the data source, it can automatically generate skill package files containing knowledge files. This invention eliminates the need for manual reading of documents and extraction of key points during the skill package file generation process, thus improving the efficiency of knowledge file writing and ensuring the consistency of knowledge files.
[0090] Furthermore, as Figure 1 and Figure 2 The specific implementation of the method shown in this embodiment provides a skill pack generation device based on an intelligent agent, such as... Figure 5 As shown, the device includes: an acquisition unit 101, a determination unit 102, and a generation unit 103.
[0091] The acquisition unit 101 can be used to acquire the configuration file corresponding to the target skill in response to the skill generation instruction.
[0092] The determining unit 102 can be used to determine the skill package file output path and the data source type corresponding to the target skill based on the configuration file using an intelligent agent. The data source type includes at least one of the following: warehouse data source, document data source and synchronous data source.
[0093] The acquisition unit 101 can also be used to acquire the data source corresponding to the target skill by using the agent with a corresponding data acquisition strategy based on the data source type.
[0094] The generation unit 103 can be used to generate a skill package file containing knowledge files using the agent based on the skill package file output path and the data source.
[0095] In some embodiments, the determining unit 102 may be specifically used to use the agent to read the skill output mode in the configuration file and the data source type corresponding to the target skill, wherein the skill output mode includes a single skill mode and a multi-skill mode; and determine the skill package file output path according to the skill output mode, wherein the skill package file output path is different for different skill output modes.
[0096] In some embodiments, the acquisition unit 101 can be specifically used to: when the data source type is a warehouse-type data source, the agent executes a shell command to create a data warehouse data snapshot of the corresponding warehouse at the current moment, and acquire warehouse data from the corresponding warehouse based on the data warehouse data snapshot; when the data source type is a document-type data source, the agent executes a shell command to create a local storage document directory, and stores the documents downloaded from the corresponding document platform in the local storage document directory; when the data source type is a synchronization-type data source, the agent executes a shell command to construct a skill package snapshot of the existing skill package at the current moment, and copy and store the existing skill package based on the skill package snapshot.
[0097] In some embodiments, the generation unit 103 may be specifically used to input the data source corresponding to the target skill into the agent, generate a knowledge file corresponding to the target skill under the skill package file output path; when the knowledge file includes multiple topic knowledge files, generate a skill package index file under the skill package file output path; and determine the skill package file based on the multiple topic knowledge files and the skill package index file.
[0098] In some embodiments, the apparatus further includes a creation unit and a calculation unit.
[0099] The creation unit can be used to create a tracking file corresponding to the target skill, and generate a modification time field and a status field in the tracking file.
[0100] The computing unit can be used to calculate the hash value of the data source corresponding to the target skill, and store the hash value of the data source as a file version identifier in the tracking file.
[0101] In some embodiments, the hash value includes a commit hash and a content hash, the commit hash includes a first commit hash and a second commit hash, and the tracking file includes a first tracking file, a second tracking file, and a third tracking file. Specifically, the calculation unit can be used to: calculate the first commit hash corresponding to the repository data when the data source type is a repository-type data source, and store the first commit hash in the created first tracking file; calculate the content hash corresponding to the document when the data source type is a document-type data source, and store the content hash in the created second tracking file; and calculate the second commit hash corresponding to the existing skill pack when the data source type is a synchronization-type data source, and store the second commit hash in the created third tracking file.
[0102] In some embodiments, the apparatus further includes a determination unit and an update unit.
[0103] The acquisition unit 101 can also be used to respond to a skill update instruction and, based on the data source type, use the agent to acquire the latest data source corresponding to the target skill using a corresponding data acquisition strategy.
[0104] The determination unit can be used to determine whether there is an incremental update to the latest data source corresponding to the target skill.
[0105] The determining unit 102 can also be used to determine the incremental data source to be processed if there is an incremental update of the latest data source corresponding to the target skill.
[0106] The update unit can be used to update the skill pack file and the tracking file using the agent based on the incremental data source.
[0107] In some embodiments, the acquisition unit 101 can also be specifically used to determine whether a data warehouse data snapshot exists in the data source file when the data source type is a warehouse-type data source; if the data warehouse data snapshot exists, the data warehouse data snapshot is updated to obtain an updated data warehouse data snapshot, and the latest warehouse data is obtained from the corresponding warehouse based on the updated data warehouse data snapshot; when the data source type is a document-type data source, a document resource locator is obtained, and the latest document is determined based on the document resource locator; when the data source type is a synchronization-type data source, it is determined whether a skill pack snapshot exists in the data source file; if the skill pack snapshot exists, the skill pack snapshot is updated to obtain an updated skill pack snapshot, and the latest existing skill pack is obtained based on the updated skill pack snapshot.
[0108] In some embodiments, the determination unit may be specifically used to: when the data source type is a warehouse-type data source, calculate the latest first commit hash corresponding to the latest warehouse data, read the first commit hash from the first tracking file, and compare the latest first commit hash with the first commit hash; if the latest first commit hash is different from the first commit hash, then determine that the latest warehouse data has an incremental update; when the data source type is a document-type data source, determine whether the document collaboration platform interface is available; if the document collaboration platform interface is available, call the document metadata interface to obtain the latest document modification time, and read the document modification time from the second tracking file, comparing the latest document modification time with the document modification time; if the latest document modification time is different from the document modification time, download the latest document and calculate... The latest content hash corresponding to the latest document is calculated, and the content hash in the second tracking file is read. The latest content hash is compared with the content hash. If the latest content hash and the content hash are different, it is determined that the latest document has an incremental update. If the document collaboration platform interface is unavailable, the latest content hash corresponding to the latest document is directly calculated, and the content hash in the second tracking file is read. The latest content hash is compared with the content hash. When the data source type is a synchronous data source, the latest second commit hash corresponding to the latest existing skill pack is calculated, and the second commit hash in the third tracking file is read. The latest second commit hash is compared with the second commit hash. If the latest second commit hash and the second commit hash are different, it is determined that the latest existing skill pack has an incremental update.
[0109] In some embodiments, the device further includes a filtering unit and a retention unit.
[0110] The determination unit can also be used to determine whether the incremental data source contains general knowledge at the example level.
[0111] The filtering unit can be used to filter out the general knowledge from the incremental data source if it contains the general knowledge, so as to obtain a filtered incremental data source.
[0112] The determination unit can also be used to determine whether the filtered incremental data source contains at least one of the following: version-specific interface information, trap information, and non-intuitive behavior information.
[0113] The retention unit can be used to retain information from the filtered incremental data source if it contains at least one of the version-specific interface information, the trap information, and the non-intuitive behavior information, thus obtaining an incremental data source with retained information.
[0114] The determination unit can also be used to determine whether the incremental data source after the information is retained contains private internal knowledge.
[0115] The retention unit can also be used to retain information in the incremental data source after the information is retained if it contains the private internal knowledge, so as to obtain an incremental data source after the information is retained for the second time.
[0116] Specifically, the update unit can be used to update the skill pack file and the tracking file using the agent based on the incremental data source after the information is retained twice.
[0117] In some embodiments, the update unit may also be specifically used to input the incremental data source into the agent to update the skill package file; write the hash value corresponding to the latest data source as the latest file version identifier into the tracking file; update the modification time field in the tracking file after writing, and update the status field in the tracking file from processing start to completion.
[0118] It should be noted that other corresponding descriptions of the functional units involved in the agent-based skill pack generation device provided in this embodiment can be found in [reference]. Figure 1 and Figure 2 The corresponding description in [the document] will not be repeated here.
[0119] Based on the above, Figure 1 and Figure 2 Accordingly, this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described method. Figure 1 and Figure 2 The method for generating skill packs based on intelligent agents is shown.
[0120] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive) and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods of various implementation scenarios of this application.
[0121] Based on the above, Figure 1 and Figure 2 The method shown, and Figure 5 To achieve the above objectives, the present application also provides a computer device, specifically a tablet computer, smartphone, smartwatch, smart bracelet, or other network device, as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figure 1 and Figure 2 The method for generating skill packs based on intelligent agents is shown.
[0122] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0123] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on such physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0124] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the two physical devices mentioned above, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0125] This invention utilizes a structured configuration file to uniformly describe the data source type and the skill package file output path, and uses an intelligent agent to call the corresponding data acquisition strategy according to the data source type to obtain the data source. This enables the automatic generation of skill package files containing knowledge files. This invention eliminates the need for manual reading of documents and extraction of key points during the skill package file generation process, thus improving the efficiency of knowledge file writing and ensuring the consistency of knowledge files.
[0126] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0127] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for generating skill packs based on intelligent agents, characterized in that, include: In response to the skill generation command, obtain the configuration file corresponding to the target skill; Based on the configuration file, the intelligent agent determines the output path of the skill package file and the data source type corresponding to the target skill, wherein the data source type includes at least one of the following: repository data source, document data source, and synchronous data source. Based on the data source type, the agent uses a corresponding data acquisition strategy to obtain the data source corresponding to the target skill. Based on the skill package file output path and the data source, the agent generates a skill package file containing knowledge files.
2. The method according to claim 1, characterized in that, Based on the configuration file, the intelligent agent determines the output path of the skill package file and the data source type corresponding to the target skill, including: The intelligent agent reads the skill output mode and the data source type corresponding to the target skill from the configuration file. The skill output mode includes single skill mode and multi-skill mode. The skill package file output path is determined based on the skill output mode, wherein the skill package file output path is different for different skill output modes.
3. The method according to claim 1, characterized in that, The step of obtaining the data source corresponding to the target skill using the agent with a corresponding data acquisition strategy based on the data source type includes: When the data source type is a warehouse-type data source, the agent constructs a data warehouse data snapshot of the corresponding warehouse at the current moment by executing shell commands, and obtains warehouse data from the corresponding warehouse based on the data warehouse data snapshot; When the data source type is a document-type data source, the agent creates a local storage document directory by executing shell commands and stores the documents downloaded from the corresponding document platform in the local storage document directory; When the data source type is a synchronous data source, the agent constructs a snapshot of the existing skill package at the current moment by executing shell commands, and copies and stores the existing skill package based on the skill package snapshot.
4. The method according to claim 1, characterized in that, The step of generating a skill package file containing knowledge files using the agent based on the skill package file output path and the data source includes: The data source corresponding to the target skill is input into the agent, and a knowledge file corresponding to the target skill is generated in the skill package file output path; When the knowledge file includes multiple topic knowledge files, a skill package index file is generated in the skill package file output path; The skill package file is determined based on the multiple topic knowledge files and the skill package index file.
5. The method according to claim 1, characterized in that, After generating a skill package file containing knowledge files using the agent based on the skill package file output path and the data source, the method further includes: Create a tracking file corresponding to the target skill, and generate a modification time field and a status field in the tracking file; Calculate the hash value of the data source corresponding to the target skill, and store the hash value of the data source as a file version identifier in the tracking file.
6. The method according to claim 5, characterized in that, The hash value includes a commit hash and a content hash. The commit hash includes a first commit hash and a second commit hash. The tracking file includes a first tracking file, a second tracking file, and a third tracking file. The step of calculating the hash value of the data source corresponding to the target skill and storing the hash value of the data source as a file version identifier in the tracking file includes: When the data source type is a warehouse data source, calculate the first commit hash corresponding to the warehouse data and store the first commit hash in the created first trace file; When the data source type is a document-type data source, calculate the content hash corresponding to the document and store the content hash in the created second tracking file; When the data source type is a synchronous data source, calculate the second commit hash corresponding to the existing skill pack and store the second commit hash in the created third tracking file.
7. The method according to claim 5, characterized in that, The method further includes: In response to a skill update command, based on the data source type, the agent uses an appropriate data acquisition strategy to obtain the latest data source corresponding to the target skill. Determine whether the latest data source corresponding to the target skill has been incrementally updated; If the latest data source corresponding to the target skill has an incremental update, then the incremental data source to be processed is determined; Based on the incremental data source, the agent updates the skill pack file and the tracking file.
8. The method according to claim 7, characterized in that, The step of obtaining the latest data source corresponding to the target skill using the agent with a corresponding data acquisition strategy based on the data source type includes: When the data source type is a warehouse-type data source, determine whether there is a data warehouse data snapshot in the data source file; If the data warehouse data snapshot exists, the data warehouse data snapshot is updated to obtain an updated data warehouse data snapshot, and the latest warehouse data is obtained from the corresponding warehouse based on the updated data warehouse data snapshot; When the data source type is a document-type data source, obtain the document resource locator, and determine the latest document based on the document resource locator; When the data source type is a synchronous data source, determine whether a skill pack snapshot exists in the data source file; If the skill pack snapshot exists, the skill pack snapshot is updated to obtain an updated skill pack snapshot, and the latest existing skill pack is obtained based on the updated skill pack snapshot.
9. The method according to claim 8, characterized in that, The determination of whether the latest data source corresponding to the target skill has been incrementally updated includes: When the data source type is a warehouse data source, calculate the latest first commit hash corresponding to the latest warehouse data, read the first commit hash from the first tracking file, and compare the latest first commit hash with the first commit hash; If the latest first commit hash is different from the first commit hash, then it is determined that the latest warehouse data has been incrementally updated; When the data source type is a document-type data source, determine whether the document collaboration platform interface is available; If the document collaboration platform interface is available, the document metadata interface is called to obtain the latest modification time of the document, and the document modification time in the second tracking file is read. The latest modification time of the document is then compared with the document modification time. If the latest modification time of the document is different from the document modification time, then download the latest document, calculate the latest content hash corresponding to the latest document, read the content hash of the second tracking file, and compare the latest content hash with the content hash; If the latest content hash is different from the content hash, then it is determined that the latest document has undergone incremental updates; If the document collaboration platform interface is unavailable, the latest content hash corresponding to the latest document is calculated directly, and the content hash in the second tracking file is read. The latest content hash is then compared with the content hash. When the data source type is a synchronous data source, calculate the latest second commit hash corresponding to the latest existing skill pack, read the second commit hash from the third tracking file, and compare the latest second commit hash with the second commit hash; If the latest second submission hash is different from the second submission hash, it is determined that the latest existing skill pack has undergone incremental updates.
10. The method according to claim 7, characterized in that, After determining the incremental data source to be processed, the method further includes: Determine whether the incremental data source contains general knowledge at the example level; If the general knowledge is included, then the general knowledge is filtered out from the incremental data source to obtain a filtered incremental data source. Determine whether the filtered incremental data source contains at least one of the following: version-specific interface information, trap information, and non-intuitive behavior information; If the data contains at least one of the version-specific interface information, the trap information, and the non-intuitive behavior information, then the filtered incremental data source retains the information to obtain the incremental data source with retained information. Determine whether the incremental data source after the information is retained contains private internal knowledge; If it contains the private internal knowledge, then the incremental data source after the information is retained will continue to retain information to obtain an incremental data source after the information is retained a second time; The step of updating the skill pack file and the tracking file using the intelligent agent based on the incremental data source includes: Based on the incremental data source after the information is retained twice, the agent updates the skill pack file and the tracking file.
11. The method according to claim 7, characterized in that, The step of updating the skill pack file and the tracking file using the intelligent agent based on the incremental data source includes: The incremental data source is input into the agent to update the skill package file; Write the hash value corresponding to the latest data source as the latest file version identifier into the tracking file; Update the modification time field in the written trace file, and update the status field in the trace file from processing start to completion.
12. A skill pack generation device based on intelligent agents, characterized in that, include: The acquisition unit is used to acquire the configuration file corresponding to the target skill in response to the skill generation command; The determining unit is used to determine the output path of the skill package file and the data source type corresponding to the target skill based on the configuration file using an intelligent agent, wherein the data source type includes at least one of the following: repository data source, document data source, and synchronous data source. The acquisition unit is further configured to acquire the data source corresponding to the target skill by using the intelligent agent with a corresponding data acquisition strategy based on the data source type. The generation unit is used to generate a skill package file containing knowledge files using the agent, based on the skill package file output path and the data source.