An adaptive AI agent generation method for knowledge base accurate calculation
By constructing a multi-source heterogeneous data acquisition interface matrix and a dynamic structure adjustment algorithm for an LSTM-GRU hybrid neural network, the problems of interface design and semantic network modeling in multi-source heterogeneous data acquisition and preprocessing are solved. This enables efficient, adaptive computation and resource optimization of the knowledge base, improving the efficiency and accuracy of precise computation of the knowledge base.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies face challenges in multi-source heterogeneous data acquisition and preprocessing, including difficulties in efficiently handling mixed access through interface design, insufficient robustness of data cleaning mechanisms, low efficiency in heterogeneous ontology alignment in semantic network modeling, and a lack of hierarchical decomposition in the computation framework. These issues result in challenges such as low efficiency in accurate knowledge base computation, insufficient model generalization ability, and low resource utilization.
A multi-source heterogeneous data acquisition interface matrix is constructed, a dynamic structure adjustment algorithm based on LSTM-GRU hybrid neural network is designed, an improved TransE model is used for knowledge embedding, a hierarchical task computing framework is established, and data format differences are handled through a distributed message queue to dynamically adjust the model structure, thereby achieving efficient semantic network modeling and resource allocation.
It improves the efficiency and accuracy of data acquisition and preprocessing, enhances the semantic alignment accuracy and entity disambiguation capability of heterogeneous ontologies, strengthens the adaptability and computational efficiency of the model, realizes the rational allocation of resources and the fine decomposition of computational tasks, and improves the overall processing performance.
Smart Images

Figure CN120633857B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an adaptive AI agent generation method for precise computation of knowledge bases. Background Technology
[0002] With the rapid development of information technology, knowledge bases, as the core infrastructure for intelligent applications, play a crucial role in supporting accurate computation and decision-making in complex scenarios. Accurate computation based on knowledge bases requires integrating multi-source heterogeneous data, constructing semantic association networks, and achieving dynamic processing and reasoning of knowledge through efficient algorithms. Existing technologies have made some progress in data acquisition, knowledge representation, and model optimization, such as data access via API interfaces, semantic modeling using knowledge graphs, and handling complex computational tasks using neural networks. These technologies provide basic capabilities for scenarios such as intelligent question answering, data analysis, and decision support. However, with the explosive growth of data scale and the increasing complexity of knowledge structures, traditional methods are gradually showing limitations in handling dynamically changing multi-source data, adaptively adjusting model structures, and hierarchical task decomposition.
[0003] In practical applications, the acquisition and preprocessing of multi-source heterogeneous data faces challenges such as significant format differences and inconsistent quality. Existing interface designs struggle to efficiently handle the mixed access of streaming and batch data, and the robustness of data cleaning and quality assessment mechanisms is insufficient, making it difficult to guarantee the accuracy and completeness of knowledge input. In the semantic network modeling stage, the semantic alignment efficiency of heterogeneous ontologies is low, and the accuracy of entity disambiguation and relation reasoning is limited by a fixed model structure, making it impossible to dynamically optimize the embedding space based on the knowledge scale. Furthermore, traditional computing frameworks lack effective support for hierarchical task decomposition, making it difficult to balance resource allocation for tasks of varying complexity. Model structure adjustments also rely on human experience, failing to respond in real-time to dynamic demands arising from data updates and task changes. These issues lead to challenges in existing methods when handling large-scale, highly dynamic knowledge base precision computation tasks, including low computational efficiency, insufficient model generalization ability, and low resource utilization. To address these challenges, we propose an adaptive AI agent generation method for knowledge base precision computation. Summary of the Invention
[0004] To address the aforementioned technical challenges, this paper presents an adaptive AI agent generation method for precise computation of knowledge bases. This solution resolves the problems of inefficient interface handling of mixed access in multi-source heterogeneous data acquisition and preprocessing, insufficient robustness of data cleaning mechanisms, low efficiency of heterogeneous ontology alignment in semantic network modeling, and limited accuracy of entity disambiguation due to fixed models. Furthermore, the computational framework lacks hierarchical decomposition, resource allocation is unreasonable, and model structure adjustment relies on manual intervention.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] An adaptive AI agent generation method for precise computation of knowledge bases includes the following steps:
[0007] Establish a multi-source heterogeneous data acquisition interface matrix, construct a semantic network modeling engine containing an RDF triple parser, design a dynamic structure adjustment algorithm based on an LSTM-GRU hybrid neural network, and develop a task-hierarchical computing framework.
[0008] The multi-source heterogeneous data acquisition interface matrix consists of an API gateway service cluster, a streaming data ingestion pipeline, and a batch data import channel. Data buffering is achieved through a distributed message queue, and a pattern matching algorithm is used to eliminate data format differences.
[0009] The semantic network modeling engine includes an ontology parsing module, an entity disambiguation module, and a relation reasoning module. It uses an improved TransE model for knowledge embedding, and the embedding vector dimension is dynamically adjusted according to the logarithm of the total number of entities and the number of relation types.
[0010] The dynamic structure adjustment algorithm constructs a two-layer attention mechanism network. The upper layer network generates a complexity index by comprehensively considering the number of task nodes, semantic relevance, and data update frequency. The lower layer network generates structure adjustment parameters based on the complexity index.
[0011] The hierarchical computing framework adopts a semantic-driven workflow engine, which decomposes computing tasks into three sub-modules: concept layer operations, entity layer operations, and relation layer operations. Each sub-module is configured with an independent adaptive computing unit.
[0012] Preferably, the multi-source heterogeneous data acquisition interface matrix is specifically implemented as follows:
[0013] Build a data acquisition terminal cluster that includes a RESTful API adapter, a WebSocket real-time listener, and an FTP batch downloader, where each terminal completes security authentication through the OAuth2.0 protocol;
[0014] A data quality assessment model is established. This model calculates a quality index by weighted summation of integrity score, accuracy score, and timeliness score. When the quality index is lower than the threshold, a data re-collection process is triggered.
[0015] Design a data cleaning module based on a hybrid parser of regular expressions and XPath. This module defines data templates through pattern expressions, processes abnormal data through cleaning functions, and calculates data confidence based on a weighted similarity algorithm.
[0016] Deploy a distributed caching middleware, adopt a dynamic eviction mechanism that combines the LRU algorithm and access frequency statistics, and optimize the caching strategy by monitoring the cache hit rate in real time.
[0017] Preferably, the workflow of the semantic network modeling engine includes:
[0018] An ontology parser is built based on the OWL language. By defining an ontology mapping rule set that includes source concepts, target concepts, mapping relationships, and confidence parameters, semantic alignment of heterogeneous ontology is achieved.
[0019] In the entity disambiguation stage, a hybrid similarity calculation method that combines the improved edit distance algorithm and the enhanced prefix weight algorithm is adopted, and the contribution of the two algorithms is balanced by dynamically adjusting the parameters.
[0020] For relational reasoning tasks, the path confidence is first calculated by multiplying the path weight and the relational reliability index, and the path with the highest confidence is selected as the reasoning result.
[0021] In the knowledge embedding process, the TransE model with type constraints is adopted. The loss function is constructed by optimizing the difference between positive and negative sample vectors, and the negative sampling weight coefficient is dynamically adjusted in combination with the frequency of relationship occurrence.
[0022] Preferably, the dynamic structure adjustment algorithm is as follows:
[0023] A bidirectional LSTM network is constructed to capture temporal features, wherein the number of hidden layer units is dynamically configured according to the logarithm of the input dimension and the output dimension;
[0024] Design a gated loop unit with a composite structure. Update the gate to control the retention ratio of historical states, use the reset gate to adjust the candidate state generation process, and finally combine the two to output the optimized state vector.
[0025] A hierarchical attention mechanism network is established. The first-level attention layer calculates the weight distribution of task features, and the second-level attention layer generates structural parameter adjustment coefficients based on the feature weights.
[0026] Based on the above mechanism, a dynamic structure regulator is constructed. This regulator dynamically adjusts the number of hidden layers and the number of neurons in each layer of the neural network according to the complexity index of real-time calculation and the preset upper limit of network size.
[0027] Preferably, the construction process of the hierarchical task computing framework is as follows:
[0028] In the concept layer operation module, the implication relationship between concepts is deduced based on the reasoning rules of description logic, and complex concept calculations are completed through rule chain expansion;
[0029] The entity layer computation module adopts a graph neural network architecture, constructs a normalized adjacency matrix, and realizes hierarchical propagation of node features through multi-hop graph convolutional layers;
[0030] The relational layer operation module designs a three-dimensional tensor decomposition model, which combines the core tensor with multiple factor matrices to predict the probability of the existence of potential relations.
[0031] The task scheduler calculates the time sensitivity and criticality of tasks to generate a priority queue, and dynamically allocates computing resources based on a linear combination of the logarithm of task complexity and the number of nodes.
[0032] Preferably, the enhancement method for the data cleaning module is as follows:
[0033] A conditional random field model is constructed for sequence labeling, and a composite feature function set including word form features, part-of-speech features, and context window features is defined.
[0034] A bidirectional LSTM network is cascaded with a conditional random field model. After extracting deep features of the sequence through LSTM, the features are input into the CRF layer to calculate the optimal labeled sequence.
[0035] Develop an incremental rule learning mechanism that triggers a rule optimization process to generate new rule combinations when the applicability index of a cleaning rule is detected to be lower than a set threshold.
[0036] At the same time, a timestamp-data digest mapping table based on the SHA-256 hash algorithm is established to realize version tracking of data changes and rollback of abnormal states.
[0037] Preferably, the optimization steps of the knowledge embedding process are as follows:
[0038] Add a compatibility constraint term between entity type vectors and concept sets to the loss function of the TransE model, and optimize the embedding space distribution through type matching error;
[0039] Design an adaptive negative sampling strategy based on relation frequency, dynamically adjusting the negative sample generation probability distribution according to the smoothed statistical value of relation occurrence frequency;
[0040] A hierarchical embedded spatial architecture is constructed, and a projection matrix is established between the concept layer and the entity layer to achieve an interpretable mapping from concept vectors to entity vectors;
[0041] Finally, a dynamic dimension expansion mechanism is introduced. When the entity size growth exceeds the threshold, the embedded vector dimension is automatically expanded according to the logarithmic function relationship.
[0042] Preferably, the improvement to the attention mechanism includes:
[0043] The standard attention mechanism is extended to a multi-head structure. The feature vector is divided according to the preset ratio of model dimension and number of attention heads. The sine and cosine functions are used in the position encoding layer to generate relative position vectors, thereby enhancing the model's ability to model the positional relationship of sequences.
[0044] We construct a hybrid network of content attention and structure attention, dynamically adjust the fusion ratio of the two attention weights through trainable parameters, and implement a sparsification strategy based on a logarithmic function to retain only key connections with attention weights higher than the dynamic threshold to improve computational efficiency.
[0045] Preferably, the optimization method for the entity layer computation module includes:
[0046] Design an edge-type sensitive attention network and calculate attention weight coefficients by concatenating node feature vectors and edge type vectors;
[0047] A hierarchical sampling strategy is adopted, which dynamically adjusts the neighbor sampling range by combining the degree centrality index of the node and the random walk path length; for newly added entity nodes, the initial embedding vector is generated by aggregating the weighted average of the features of its direct neighbor nodes.
[0048] Block computation optimization is implemented in the matrix operation layer. The size of the matrix block is dynamically adjusted according to the logarithm of the current number of nodes to improve parallel efficiency.
[0049] Preferably, the overall optimization strategy includes:
[0050] A composite loss function is constructed, which includes a task loss term, a structural complexity loss term, and an L2 regularization term. Multi-objective optimization is used to balance model performance and computational cost.
[0051] Implement a hot restart training mechanism: when the validation loss does not decrease for three consecutive epochs, save the current best model and reset the optimizer parameters.
[0052] Design a multi-granularity knowledge distillation framework to extract knowledge from the concept layer, entity layer, and relation layer into a lightweight model;
[0053] Develop an elastic resource scheduling algorithm that combines task priority scoring and resource utilization decay coefficient to dynamically allocate GPU memory and computing core resources.
[0054] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0055] The adaptive AI agent generation method proposed in this invention effectively solves the problems of large differences in data format and inconsistent quality by constructing a multi-source heterogeneous data acquisition interface matrix, thereby improving the efficiency and accuracy of data acquisition and preprocessing. Utilizing a semantic network modeling engine, it achieves efficient semantic alignment of heterogeneous ontologies, as well as improved accuracy in entity disambiguation and relational reasoning, providing strong support for dynamic knowledge processing and reasoning. The dynamic structure adjustment algorithm based on the LSTM-GRU hybrid neural network can adaptively adjust the model structure according to the complexity of the task and the data update frequency, thus improving the model's generalization ability and computational efficiency. The introduction of a hierarchical task computation framework enables fine decomposition of computational tasks and rational allocation of resources, further enhancing overall processing performance. Attached Figure Description
[0056] Figure 1 This is a flowchart of the method of the present invention;
[0057] Figure 2 This is a diagram showing the key technical nodes of the present invention. Detailed Implementation
[0058] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0059] Reference Figure 1 As shown, an adaptive AI agent generation method for precise computation of knowledge bases includes the following steps:
[0060] A multi-source heterogeneous data acquisition interface matrix is established, a semantic network modeling engine containing an RDF triple parser is constructed, a dynamic structure adjustment algorithm based on an LSTM-GRU hybrid neural network is designed, and a hierarchical computing framework for tasks is developed. This hierarchical architecture design can effectively cope with data diversity and improve system scalability.
[0061] The multi-source heterogeneous data acquisition interface matrix consists of an API gateway service cluster, a streaming data ingestion pipeline, and a batch data import channel. Data buffering is achieved through a distributed message queue, and a pattern matching algorithm is used to eliminate data format differences. This design ensures data stability and format uniformity under high throughput environments.
[0062] The semantic network modeling engine includes an ontology parsing module, an entity disambiguation module, and a relation reasoning module. It uses an improved TransE model for knowledge embedding, and the embedding vector dimension is dynamically adjusted according to the logarithm of the total number of entities and the number of relation types. This dynamic adjustment mechanism effectively controls computational complexity while maintaining the model's expressive power.
[0063] The dynamic structure adjustment algorithm constructs a two-layer attention mechanism network. The upper layer network generates a complexity index by comprehensively considering the number of task nodes, semantic relevance, and data update frequency. The lower layer network generates structure adjustment parameters based on the complexity index. This two-layer mechanism enables intelligent adaptation of network structure to task characteristics.
[0064] The hierarchical computing framework adopts a semantic-driven workflow engine, which decomposes computing tasks into three sub-modules: concept layer operations, entity layer operations, and relation layer operations. Each sub-module is configured with an independent adaptive computing unit. This decoupling design improves the system's parallel processing capability and module reusability.
[0065] Reference Figure 2 As shown, the specific implementation of the multi-source heterogeneous data acquisition interface matrix is as follows: a data acquisition terminal cluster is constructed, which includes a RESTful API adapter, a WebSocket real-time listener, and an FTP batch downloader. Each terminal completes security authentication through the OAuth2.0 protocol. Support for multiple protocols ensures the broad compatibility and access security of the data source.
[0066] A data quality assessment model was established. This model calculates a quality index by weighted summation of integrity score, accuracy score, and timeliness score. When the quality index is lower than the threshold, a data re-collection process is triggered. The quantitative assessment mechanism ensures the reliability of data input.
[0067] Design a data cleaning module based on a hybrid parser of regular expressions and XPath. This module defines data templates through pattern expressions, handles abnormal data through cleaning functions, and calculates data confidence based on a weighted similarity algorithm. The hybrid parsing strategy improves the processing accuracy of unstructured data.
[0068] A distributed caching middleware is deployed, employing a dynamic eviction mechanism that combines the LRU algorithm with access frequency statistics. Simultaneously, caching strategies are optimized by real-time monitoring of cache hit rates. This hybrid eviction strategy achieves a better balance between memory utilization and access efficiency. A multi-protocol acquisition terminal cluster ensures broad compatibility and security authentication, a data quality assessment model guarantees input reliability, a hybrid parser improves the accuracy of unstructured data processing, and the distributed caching dynamic eviction strategy balances memory usage and efficiency, thus enhancing the overall system compatibility, reliability, processing accuracy, and operational efficiency.
[0069] The workflow of the semantic network modeling engine includes: building an ontology parser based on the OWL language; defining an ontology mapping rule set that includes source concepts, target concepts, mapping relationships and confidence parameters; achieving semantic alignment of heterogeneous ontology; and standardizing mapping rules to reduce the semantic gap in knowledge fusion.
[0070] In the entity disambiguation stage, a hybrid similarity calculation method that combines the improved edit distance algorithm and the enhanced prefix weight algorithm is adopted. By dynamically adjusting the parameters to balance the contribution of the two algorithms, this composite algorithm can maintain a high accuracy in both short and long text scenarios.
[0071] For relational reasoning tasks, the path confidence is first calculated by multiplying the path weight and the relation reliability index. The path with the highest confidence is then selected as the reasoning result. The path selection mechanism effectively improves the interpretability of the reasoning result.
[0072] In the knowledge embedding process, a TransE model with type constraints is adopted. A loss function is constructed by optimizing the difference between positive and negative sample vectors, and the negative sampling weight coefficients are dynamically adjusted based on the frequency of relation occurrence. This loss function maintains the translation properties while strengthening the type constraints. The expression for the loss function is as follows:
[0073] ;
[0074] In the formula, This is the embedding vector of the HeadEntity. For the embedding vector of the relation, This is the embedding vector of the TailEntity. The head entity embedding vector in the negative sample (generated by replacing the real head entity). The embedding vector for the tail entity in the negative sample (generated by replacing the real tail entity). This is a distance function (usually an L1 or L2 norm, used to measure the distance between vectors). This is the interval hyperparameter (the minimum safe interval used to control the distance between positive and negative samples). For a piecewise function, take The larger of the two values (i.e., the ReLU function) is 0. This is the regularization parameter (used to balance the weights of the main loss term and the constraint term). An EntityTypeVector represents the concept type to which an entity belongs. ConceptSetVector is a vector representing the semantic features of the target concept.
[0075] The specific dynamic structure adjustment algorithm is as follows: a bidirectional LSTM network is constructed to capture temporal features, wherein the number of hidden layer units is dynamically configured according to the logarithm of the input dimension and the output dimension. This adaptive configuration avoids insufficient model capacity or excessive redundancy.
[0076] The design incorporates a gated recurrent unit with a composite structure. By updating the gates to control the retention ratio of historical states and using the reset gates to adjust the candidate state generation process, the optimized state vector is finally output by combining the two. This dual-gating mechanism enhances the model's ability to model long-distance dependencies.
[0077] A hierarchical attention mechanism network is established. The first-level attention layer calculates the weight distribution of task features, and the second-level attention layer generates structural parameter adjustment coefficients based on the feature weights. The hierarchical attention mechanism realizes the granular transformation from features to structure.
[0078] Based on the above mechanism, a dynamic structure regulator is constructed. This regulator dynamically adjusts the number of hidden layers and the number of neurons in each layer of the neural network according to the complexity index of real-time computation and the preset upper limit of network size. This dynamic adjustment capability enables the model to adapt to computational tasks of different scales.
[0079] The construction process of the hierarchical computing framework is as follows: In the concept layer operation module, the implication relationship between concepts is deduced based on the reasoning rules of description logic, and complex concept calculation is completed through rule chain expansion. The formal reasoning mechanism ensures the logical rigor of concept calculation.
[0080] The entity layer computation module adopts a graph neural network architecture, constructs a normalized adjacency matrix, and realizes hierarchical propagation of node features through multi-hop graph convolutional layers. Graph structure modeling effectively captures the topological relationships between entities.
[0081] The relation layer operation module designs a three-dimensional tensor decomposition model, which combines the core tensor with multiple factor matrices to predict the probability of the existence of potential relations. The tensor decomposition method shows better mathematical expression in relation prediction tasks.
[0082] By using a task scheduler to comprehensively calculate the time sensitivity and criticality of tasks to generate a priority queue, and dynamically allocating computing resources based on a linear combination of the logarithm of task complexity and the number of nodes, this scheduling strategy optimizes the global utilization of system resources.
[0083] The enhancement method for the data cleaning module is as follows: A Conditional Random Field (CRF) model is constructed for sequence labeling, defining a composite feature function set including word form features, part-of-speech features, and context window features. This enriches the feature set and improves the context-awareness of sequence labeling. A bidirectional LSTM network is cascaded with the CRF model. After extracting deep sequence features through LSTM, the data is input into the CRF layer to calculate the optimal labeled sequence. This cascaded architecture combines the advantages of deep learning and probabilistic graphical models. An incremental rule learning mechanism is developed. When the applicability index of a cleaning rule is detected to be lower than a set threshold, a rule optimization process is triggered to generate a new rule combination. This adaptive learning mechanism enables the cleaning rules to continuously adapt to changes in data distribution. Simultaneously, a timestamp-data digest mapping table based on the SHA-256 hash algorithm is established to realize version tracking of data changes and rollback of abnormal states. The hash digest technology ensures the verifiability and integrity of data versions.
[0084] The optimization steps of the knowledge embedding process are as follows: First, a compatibility constraint term between entity type vectors and concept sets is added to the TransE model loss function. The embedding space distribution is optimized through type matching error, which enhances the semantic consistency of the embedding vectors. Second, an adaptive negative sampling strategy based on relation frequency is designed. This strategy dynamically adjusts the negative sample generation probability distribution according to the smoothed statistical value of relation occurrence frequency, mitigating the impact of long-tail distribution on model training. Third, a hierarchical embedding space architecture is constructed, establishing a projection matrix between the concept layer and the entity layer to achieve interpretable mapping from concept vectors to entity vectors. This hierarchical design supports cross-granularity reasoning of knowledge. Finally, a dynamic dimension expansion mechanism is introduced. When the entity size growth exceeds a threshold, the embedding vector dimension is automatically expanded according to a logarithmic function relationship. This elastic expansion strategy adapts to the dynamic growth characteristics of the knowledge base.
[0085] The improvements to the attention mechanism include: extending the standard attention mechanism to a multi-head structure, dividing the feature vector according to a preset ratio of model dimension to the number of attention heads, using sine and cosine functions to generate relative position vectors in the position encoding layer to enhance the model's ability to model the positional relationships of sequences, and the multi-head mechanism enabling the model to pay attention to feature patterns in different subspaces in parallel; constructing a hybrid network of content attention and structural attention, dynamically adjusting the fusion ratio of the two attention weights through trainable parameters, implementing a sparsity strategy based on a logarithmic function, and retaining only key connections with attention weights higher than a dynamic threshold to improve computational efficiency, thus reducing computational overhead while maintaining the focus of attention.
[0086] The optimization methods for the entity layer computation module include: designing an edge-type sensitive attention network, calculating attention weight coefficients by concatenating node feature vectors and edge type vectors, which integrates edge semantic information into the attention calculation process; adopting a hierarchical sampling strategy, dynamically adjusting the neighbor sampling range by combining the degree centrality index of nodes and the length of random walk paths, which balances the capture requirements of local and global features; for newly added entity nodes, generating an initial embedding vector by aggregating the weighted average of the features of its direct neighbor nodes, which improves the system's adaptability to new entities; and implementing block computation optimization in the matrix operation layer, dynamically adjusting the matrix block size according to the logarithm of the current number of nodes to improve parallel efficiency, which fully utilizes the parallel computing characteristics of modern computing hardware.
[0087] The overall system optimization strategy includes: constructing a composite loss function that includes a task loss term, a structural complexity loss term, and an L2 regularization term; balancing model performance and computational cost through multi-objective optimization; and achieving joint optimization of model performance and efficiency through this composite objective function, the expression of which is as follows:
[0088] ;
[0089] In the formula, These are weighting parameters (used to balance the importance of different loss terms). The Task Loss term measures the model's prediction error on a specific task. The StructureComplexityLoss term controls the complexity of the model structure (such as the number of neural network layers and parameters). This is the L2 regularization term, used to prevent overfitting by penalizing the sum of the squares of the absolute values of the model parameters.
[0090] A hot-restart training mechanism is implemented, which saves the current best model and resets the optimizer parameters when the validation loss does not decrease for three consecutive epochs. This mechanism effectively avoids local optima traps and accelerates model convergence. A multi-granularity knowledge distillation framework is designed to extract knowledge from the concept layer, entity layer, and relation layer into a lightweight model. The hierarchical distillation strategy retains key semantic information during model compression. An elastic resource scheduling algorithm is developed, which dynamically allocates GPU memory and computing core resources by combining task priority scoring and resource utilization decay coefficient. This scheduling algorithm achieves efficient utilization of hardware resources.
[0091] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. An adaptive AI agent generation method for precise computation of knowledge bases, characterized in that, Includes the following steps: Establish a multi-source heterogeneous data acquisition interface matrix, construct a semantic network modeling engine containing an RDF triple parser, design a dynamic structure adjustment algorithm based on an LSTM-GRU hybrid neural network, and develop a task-hierarchical computing framework. The multi-source heterogeneous data acquisition interface matrix consists of an API gateway service cluster, a streaming data ingestion pipeline, and a batch data import channel. Data buffering is achieved through a distributed message queue, and a pattern matching algorithm is used to eliminate data format differences. The semantic network modeling engine includes an ontology parsing module, an entity disambiguation module, and a relation reasoning module. It uses the TransE model, which employs entity type constraints, adaptive negative sampling based on relation frequency, a hierarchical embedding space architecture, and a dynamic dimension expansion mechanism, for knowledge embedding. The embedding vector dimension is dynamically adjusted according to the logarithm of the total number of entities and the number of relation types. The dynamic structure adjustment algorithm constructs a two-layer attention mechanism network. The upper layer network generates a complexity index by comprehensively considering the number of task nodes, semantic relevance, and data update frequency. The lower layer network generates structure adjustment parameters based on the complexity index. The hierarchical computing framework adopts a semantic-driven workflow engine, which decomposes computing tasks into three sub-modules: concept layer operations, entity layer operations, and relation layer operations. Each sub-module is configured with an independent adaptive computing unit.
2. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 1, characterized in that, The specific implementation method of the multi-source heterogeneous data acquisition interface matrix is as follows: Build a data acquisition terminal cluster that includes a RESTful API adapter, a WebSocket real-time listener, and an FTP batch downloader, where each terminal completes security authentication through the OAuth2.0 protocol; A data quality assessment model is established. This model calculates a quality index by weighted summation of integrity score, accuracy score, and timeliness score. When the quality index is lower than the threshold, a data re-collection process is triggered. Design a data cleaning module based on a hybrid parser of regular expressions and XPath. This module defines data templates through pattern expressions, processes abnormal data through cleaning functions, and calculates data confidence based on a weighted similarity algorithm. Deploy a distributed caching middleware, adopt a dynamic eviction mechanism that combines the LRU algorithm and access frequency statistics, and optimize the caching strategy by monitoring the cache hit rate in real time.
3. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 1, characterized in that, The workflow of the semantic network modeling engine includes: An ontology parser is built based on the OWL language. By defining an ontology mapping rule set that includes source concepts, target concepts, mapping relationships, and confidence parameters, semantic alignment of heterogeneous ontology is achieved. In the entity disambiguation stage, a hybrid similarity calculation method that combines the improved edit distance algorithm and the enhanced prefix weight algorithm is adopted, and the contribution of the two algorithms is balanced by dynamically adjusting the parameters. For relational reasoning tasks, the path confidence is first calculated by multiplying the path weight and the relational reliability index, and the path with the highest confidence is selected as the reasoning result. In the knowledge embedding process, the TransE model with type constraints is adopted. The loss function is constructed by optimizing the difference between positive and negative sample vectors, and the negative sampling weight coefficient is dynamically adjusted in combination with the frequency of relationship occurrence.
4. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 1, characterized in that, The specific details of the dynamic structure adjustment algorithm are as follows: A bidirectional LSTM network is constructed to capture temporal features, wherein the number of hidden layer units is dynamically configured according to the logarithm of the input dimension and the output dimension; Design a gated loop unit with a composite structure. Update the gate to control the retention ratio of historical states, use the reset gate to adjust the candidate state generation process, and finally combine the two to output the optimized state vector. A hierarchical attention mechanism network is established. The first-level attention layer calculates the weight distribution of task features, and the second-level attention layer generates structural parameter adjustment coefficients based on the feature weights. Based on the above mechanism, a dynamic structure regulator is constructed. This regulator dynamically adjusts the number of hidden layers and the number of neurons in each layer of the neural network according to the complexity index of real-time calculation and the preset upper limit of network size.
5. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 1, characterized in that, The construction process of the hierarchical computing framework for the task is as follows: In the concept layer operation module, the implication relationship between concepts is deduced based on the reasoning rules of description logic, and complex concept calculations are completed through rule chain expansion; The entity layer computation module adopts a graph neural network architecture, constructs a normalized adjacency matrix, and realizes hierarchical propagation of node features through multi-hop graph convolutional layers; The relational layer operation module designs a three-dimensional tensor decomposition model, which combines the core tensor with multiple factor matrices to predict the probability of the existence of potential relations. The task scheduler calculates the time sensitivity and criticality of tasks to generate a priority queue, and dynamically allocates computing resources based on a linear combination of the logarithm of task complexity and the number of nodes.
6. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 2, characterized in that, The enhancement method for the data cleaning module is as follows: A conditional random field model is constructed for sequence labeling, and a composite feature function set including word form features, part-of-speech features, and context window features is defined. A bidirectional LSTM network is cascaded with a conditional random field model. After extracting deep features of the sequence through LSTM, the features are input into the CRF layer to calculate the optimal labeled sequence. Develop an incremental rule learning mechanism that triggers a rule optimization process to generate new rule combinations when the applicability index of a cleaning rule is detected to be lower than a set threshold. At the same time, a timestamp-data digest mapping table based on the SHA-256 hash algorithm is established to realize version tracking of data changes and rollback of abnormal states.
7. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 3, characterized in that, The optimization steps of the knowledge embedding process are as follows: Add a compatibility constraint term between entity type vectors and concept sets to the loss function of the TransE model, and optimize the embedding space distribution through type matching error; Design an adaptive negative sampling strategy based on relation frequency, dynamically adjusting the negative sample generation probability distribution according to the smoothed statistical value of relation occurrence frequency; A hierarchical embedded spatial architecture is constructed, and a projection matrix is established between the concept layer and the entity layer to achieve an interpretable mapping from concept vectors to entity vectors; Finally, a dynamic dimension expansion mechanism is introduced. When the entity size growth exceeds the threshold, the embedded vector dimension is automatically expanded according to the logarithmic function relationship.
8. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 4, characterized in that, The improvements to the attention mechanism include: The standard attention mechanism is extended to a multi-head structure. The feature vector is divided according to the preset ratio of model dimension and number of attention heads. The sine and cosine functions are used in the position encoding layer to generate relative position vectors, thereby enhancing the model's ability to model the positional relationship of sequences. We construct a hybrid network of content attention and structure attention, dynamically adjust the fusion ratio of the two attention weights through trainable parameters, and implement a sparsification strategy based on a logarithmic function to retain only key connections with attention weights higher than the dynamic threshold to improve computational efficiency.
9. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 5, characterized in that, The optimization method for the entity layer computation module includes: Design an edge-type sensitive attention network and calculate attention weight coefficients by concatenating node feature vectors and edge type vectors; A hierarchical sampling strategy is adopted, which dynamically adjusts the neighbor sampling range by combining the degree centrality index of the node and the random walk path length; for newly added entity nodes, the initial embedding vector is generated by aggregating the weighted average of the features of its direct neighbor nodes. Block computation optimization is implemented in the matrix operation layer. The size of the matrix block is dynamically adjusted according to the logarithm of the current number of nodes to improve parallel efficiency.
10. The adaptive AI agent generation method for precise computation based on knowledge base as described in claim 1, characterized in that, The overall optimization strategy includes: A composite loss function is constructed, which includes a task loss term, a structural complexity loss term, and an L2 regularization term. Multi-objective optimization is used to balance model performance and computational cost. Implement a hot restart training mechanism: when the validation loss does not decrease for three consecutive epochs, save the current best model and reset the optimizer parameters. Design a multi-granularity knowledge distillation framework to extract knowledge from the concept layer, entity layer, and relation layer into a lightweight model; Develop an elastic resource scheduling algorithm that combines task priority scoring and resource utilization decay coefficient to dynamically allocate GPU memory and computing core resources.
Citation Information
Patent Citations
Dynamic gesture recognition method based on hand key point and double-layer bidirectional LSTM network
CN117576783A
Intelligent data production method and system based on graph neural network and adaptive learning
CN119988647A