Adaptive enhancement method and system for streaming query semantic graph based on cognitive computing

Through the adaptive enhancement method of streaming query semantic graphs based on cognitive computing, the problem of insufficient semantic understanding and adaptive optimization capabilities in traditional streaming query processing is solved, efficient semantic understanding and query optimization are achieved, and distributed collaborative optimization and knowledge sharing are supported.

CN119669298BActive Publication Date: 2025-05-16北京科杰科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510193361.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-05-16
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

Traditional streaming query processing methods lack semantic understanding and adaptive optimization capabilities, and are difficult to deal with complex and changeable query scenarios, and lack of knowledge sharing and reuse.

Method used

The streaming query semantic map adaptive enhancement method based on cognitive computing is adopted to extract syntax features, semantic features and execution features to form quantum state feature representations, and enhance them using a dual-path cognitive processing system to generate cognitive feature tensors and semantic maps to realize parallel semantic understanding and query optimization.

Benefits of technology

It improves the accuracy and efficiency of semantic understanding, realizes adaptive enhancement and optimization of semantic maps, supports distributed collaborative optimization and knowledge sharing, and improves the learning efficiency and adaptability of the overall system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669298B_ABST
    Figure CN119669298B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for adaptively enhancing a streaming query semantic graph based on cognitive computing, which relates to the field of semantic graph technology, including calculating node affinity through a graph attention mechanism, identifying knowledge clusters using a community discovery algorithm, and using them as basic units for knowledge deduction, predicting and completing potential semantic relationships, and outputting an enhanced semantic graph and a credibility score table after multi-agent reinforcement learning optimization and verification. The enhanced graph is deployed to the edge network for parallel semantic understanding and query optimization suggestion generation, and the optimization suggestions are integrated through federated learning, and the central cognitive model is updated and distributed to the edge network. The present invention enhances the semantic graph through cognitive computing to achieve more accurate semantic understanding and more efficient query optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to semantic graph technology, and in particular to a method and system for adaptively enhancing a streaming query semantic graph based on cognitive computing. Background Art

[0002] Streaming query processing is a key technology in the field of big data, which aims to analyze high-speed data streams in real time. With the popularization of applications such as the Internet of Things and social media, the scale and complexity of streaming queries are increasing, which puts higher requirements on the efficiency and intelligence of query processing. Traditional streaming query processing methods mainly rely on syntax parsing and rule matching, which are difficult to cope with complex and changing query scenarios and lack semantic understanding and adaptive optimization capabilities.

[0003] Insufficient semantic understanding ability: Traditional streaming query processing methods lack in-depth understanding of query semantics and find it difficult to capture the true intent behind the query, resulting in inaccurate query optimization strategies and affecting query efficiency.

[0004] Limited adaptive optimization capabilities: Faced with dynamically changing data streams and query loads, traditional streaming query processing methods find it difficult to adaptively adjust query execution plans and cannot guarantee optimal query performance.

[0005] Insufficient knowledge sharing and reuse: Existing streaming query systems usually operate in isolation and lack knowledge sharing and reuse mechanisms, resulting in the inability to effectively use historical query experience and expert knowledge to guide current query processing, limiting the intelligence level of the query system. Summary of the invention

[0006] The embodiments of the present invention provide a method and system for adaptively enhancing a streaming query semantic graph based on cognitive computing, which can solve the problems in the prior art.

[0007] According to a first aspect of the embodiments of the present invention,

[0008] Provides a method for adaptively enhancing the semantic graph of streaming queries based on cognitive computing, including:

[0009] Extract grammatical features, semantic features, and execution features from the streaming query language code repository, performance logs, and expert knowledge base to form an original feature set; map the original feature set to a quantum state feature representation based on a quantum encoder; enhance the quantum state feature representation using a dual-path cognitive processing system, wherein a fast path captures explicit associations between features through an attention network, and a deep path mines implicit patterns between features through a memory neural network; adaptively fuse the explicit associations output by the fast path with the implicit patterns output by the deep path to generate a cognitive feature tensor containing feature importance, association strength, and timing constraints, and establish a feature importance ranking table;

[0010] An initial semantic knowledge graph is constructed according to the cognitive feature tensor and the feature importance ranking table, and nodes with feature importance higher than a preset feature threshold are set as core knowledge nodes; the degree of association between the core knowledge nodes and other nodes is calculated based on the graph attention mechanism to generate a node affinity matrix; the node affinity matrix is ​​analyzed using a community discovery algorithm to identify knowledge clusters whose association is greater than a preset association threshold; a hybrid reasoning engine is constructed to perform knowledge deduction based on the knowledge clusters as basic units to predict potential semantic relationships in the completion graph; the predicted semantic relationships are optimized and verified based on multi-agent reinforcement learning to output an enhanced semantic graph with a hierarchical structure and a credibility score table;

[0011] The enhanced semantic graph and the credibility score table are deployed to a distributed edge computing network, and parallel semantic understanding is performed based on the enhanced semantic graph; query optimization suggestions are generated according to the deployed knowledge content, and suggestions are screened through credibility scores; optimization suggestions whose credibility is higher than a preset optimization threshold are integrated using federated learning, and the central cognitive model is updated; the updated central cognitive model is distributed to the distributed edge computing network through knowledge distillation.

[0012] The initial semantic knowledge graph is constructed according to the cognitive feature tensor and the feature importance ranking table, and nodes whose feature importance is higher than a preset feature threshold are set as core knowledge nodes; the degree of association between the core knowledge nodes and other nodes is calculated based on the graph attention mechanism, and the node affinity matrix is ​​generated, including:

[0013] The cognitive feature tensor represents the multi-dimensional correlation strength between feature nodes, and the feature importance ranking table records the importance scores of nodes; constructs an associated feature evaluation index system and calculates a preset feature threshold; selects core knowledge nodes from the feature importance ranking table according to the preset feature threshold; and constructs an initial semantic knowledge graph centered on the core knowledge node using the correlation strength information in the cognitive feature tensor;

[0014] Based on the initial semantic knowledge graph, a structural feature extractor is used to analyze the topological structure of the graph to obtain local features of nodes, and a semantic feature extractor is used to analyze node attribute information to obtain semantic features; the local features are adaptively fused with the semantic features through a feature fusion module to form an enhanced feature representation of the node;

[0015] For the enhanced feature representation, the node feature weights are calculated in turn through the self-attention layer, the interactive attention layer analyzes the influence relationship between nodes, and the global attention layer obtains the overall importance of the nodes; the outputs of the three-layer attention mechanism are feature aggregated to obtain the preliminary correlation strength between nodes;

[0016] A multi-dimensional analysis is performed on the preliminary association strength, and multi-dimensional similarity calculation, path complexity analysis and time-series dependency modeling are performed in sequence to obtain the similarity degree, direct and indirect connection relationship and dynamic evolution characteristics of the nodes in the feature space respectively; the analysis results of the similarity degree, the direct and indirect connection relationship and the dynamic evolution characteristics are integrated to generate a node affinity matrix.

[0017] The node affinity matrix is ​​analyzed by using a community discovery algorithm to identify knowledge clusters whose correlation is greater than a preset correlation threshold; a hybrid reasoning engine is constructed to perform knowledge deduction based on the knowledge clusters as basic units to predict the potential semantic relationships in the completion graph; the predicted semantic relationships are optimized and verified based on multi-agent reinforcement learning, and an enhanced semantic graph with a hierarchical structure and a credibility score table are output, including:

[0018] The node affinity matrix records the semantic association strength between nodes in the knowledge graph; a multidimensional feature evaluation index system is established, and the structural similarity, content similarity and time domain similarity between nodes are extracted from the node affinity matrix based on the multidimensional feature evaluation index system;

[0019] The structural similarity, the content similarity and the time domain similarity are input into an adaptive weight fusion module, and the adaptive weight fusion module calculates the comprehensive affinity coefficient between nodes; a node density distribution field is constructed based on the comprehensive affinity coefficient, and the node density distribution field models the local connection relationship of nodes through a density attenuation function;

[0020] The node density distribution field is input into a density-aware community discovery module, and the density-aware community discovery module uses an improved modularity calculation method to iteratively optimize the community structure; an initial community division is obtained based on the optimization result of the improved modularity calculation method, and a node group whose association strength exceeds a preset association threshold in the initial community division is marked as a candidate knowledge cluster group;

[0021] Perform multi-level filtering on the candidate knowledge clusters to obtain stable knowledge clusters; construct a hybrid reasoning engine based on the stable knowledge clusters, wherein the hybrid reasoning engine integrates a rule reasoning unit, a statistical reasoning unit, and a deep reasoning unit, wherein the rule reasoning unit performs symbolic reasoning based on an ontology rule base, the statistical reasoning unit calculates conditional probability distribution based on a probabilistic graph model, and the deep reasoning unit extracts implicit features using a graph neural network;

[0022] Inputting the multi-source reasoning results output by the hybrid reasoning engine into an adaptive fusion network, the adaptive fusion network dynamically assigns fusion weights according to the prediction accuracy of different reasoning units; performing weighted combination on the multi-source reasoning results based on the fusion weights to obtain a completed latent semantic relationship;

[0023] Constructing a multi-agent verification framework to evaluate the credibility of the potential semantic relationship, the multi-agent verification framework includes an evaluation agent, an optimization agent and a coordination agent, the evaluation agent generates a multi-dimensional score based on factual consistency, logical coherence and temporal rationality, the optimization agent adjusts the verification strategy according to the multi-dimensional score, and the coordination agent integrates the decision results of multiple agents;

[0024] The output results of the multi-agent verification framework are input into a hierarchical storage module, and the hierarchical storage module stores them hierarchically in the core knowledge layer, the extended knowledge layer or the associated knowledge layer according to the credibility of the potential semantic relationship; at the same time, a credibility quantification table is generated, and the credibility quantification table records the score and uncertainty of each semantic relationship.

[0025] Inputting the node density distribution field into a density-aware community discovery module, the density-aware community discovery module adopts an improved modularity calculation method to iteratively optimize the community structure; obtaining an initial community division based on the optimization result of the improved modularity calculation method, and marking a node group whose association strength exceeds a preset association threshold in the initial community division as a candidate knowledge cluster group includes:

[0026] In the node density distribution field, the topological features and semantic features of the nodes are integrated; a dual density feature is calculated for each node, wherein the dual density feature includes: a local structure density calculated based on a nonlinear density decay function, and a semantic association density calculated based on a semantic similarity matrix; and the dual density features are combined to form a density feature vector of the node;

[0027] The density feature vector is input into a density-aware community discovery module, the density-aware community discovery module adopts an improved hierarchical modularity calculation method; the improved hierarchical modularity calculation method introduces an adaptive density adjustment factor, the adaptive density adjustment factor calculates a density difference matrix based on the density feature vector of the node pair; the modularity gain between communities is dynamically adjusted using the density difference matrix;

[0028] Based on the dynamically adjusted modularity gain, a hierarchical community optimization framework is constructed; in the hierarchical community optimization framework, density peak clustering is performed in a local neighborhood to obtain micro communities, and the micro communities are adaptively merged based on the dynamically adjusted modularity gain; when the modularity gain in the merging process is less than a dynamic threshold, an initial community division result is output;

[0029] A multi-dimensional correlation analysis is performed on the initial community division results to construct a community correlation tensor; each dimension of the community correlation tensor respectively characterizes the structural correlation strength, semantic similarity and evolutionary correlation between communities; a comprehensive correlation score is calculated based on the community correlation tensor, and community combinations that are higher than a preset correlation threshold are marked as candidate knowledge clusters.

[0030] The enhanced semantic graph and the credibility score table are deployed to a distributed edge computing network, and parallel semantic understanding is performed based on the enhanced semantic graph; query optimization suggestions are generated according to the deployed knowledge content, and suggestions are screened by credibility score; optimization suggestions with credibility higher than a preset optimization threshold are integrated by using federated learning, and the central cognitive model is updated, including:

[0031] Divide the enhanced semantic graph into multiple sub-graphs, and divide the enhanced semantic graph based on edge weight factors; the edge weight factors are calculated by the original weight of the edge, the semantic similarity between nodes, and the intersection and union ratio of the node neighborhood set; deploy the sub-graphs and the credibility score table to the edge computing nodes in the distributed edge computing network;

[0032] A graph attention network is deployed on the edge computing node for parallel semantic understanding, and the graph attention network extracts features of different types of semantic relationships through a multi-head attention mechanism; the graph attention network includes a relational attention layer, and the relational attention layer dynamically adjusts the attention weight based on the relationship type and extracts semantic features based on the sub-graph;

[0033] A knowledge completion module and a relational reasoning module are constructed based on the semantic features; the knowledge completion module calculates the knowledge path score using a path reliability evaluation method; the relational reasoning module performs pattern matching in combination with a rule template; query optimization suggestions are generated based on the knowledge path score and the pattern matching result; the query optimization suggestions are screened based on the credibility score table, and query optimization suggestions that are higher than a preset optimization threshold are retained;

[0034] A federated learning method is used to integrate the query optimization suggestions after screening; a differential privacy mechanism is introduced in the parameter aggregation process, and Gaussian noise is used to protect the model parameters from disturbances; the noise scale and sensitivity parameters are dynamically adjusted based on the validation set performance; and the integrated parameters are used to update the central cognitive model through a soft update mechanism.

[0035] The method further comprises:

[0036] Distribute the updated central cognitive model to the distributed edge computing network through knowledge distillation; build a blockchain-based verification system to verify the optimization plan through consensus; write the verified optimization plan, reasoning path and credibility score into the blockchain account book, and feed back the verification result to the feature extraction network for updating the feature importance ranking table to realize the dynamic evolution of knowledge;

[0037] Construct a teacher-student network architecture, where the teacher network is a central cognitive model and the student network is an edge node model; distribute the central cognitive model to the distributed edge computing network through knowledge distillation; the knowledge distillation method includes soft label migration, feature graph migration and relationship structure migration; the soft label migration calculates the output probability distribution difference between the teacher network and the student network based on the temperature parameter, the feature graph migration aligns the middle layer features of the two networks through the attention mapping function, and the relationship structure migration calculates the consistency loss of the relationship between instances based on the semantic relationship mapping function; update the parameters of the edge node model based on the weighted combination of the output probability distribution difference, the middle layer features and the consistency loss;

[0038] Performing consensus verification on the optimization scheme generated by the edge node model; encapsulating the optimization scheme, the corresponding reasoning path and the credibility score as a blockchain transaction; using an improved practical Byzantine fault tolerance algorithm for verification, and calculating a consensus judgment value based on the logic verification score of the reasoning path, the credibility score and historical verification performance; and determining a verification result according to the consensus judgment value;

[0039] Divide storage shards according to knowledge domains, and maintain independent Merkle trees for the storage shards; construct a global index table to record the knowledge association relationship between shards; write the verified optimization scheme, the reasoning path, and the credibility score into the blockchain account book of the corresponding knowledge domain; establish association records of cross-domain knowledge based on the global index table; and update the blockchain account book using an incremental storage strategy;

[0040] Feeding the verification result back to the feature extraction network; calculating the feedback score of each feature based on the verification result; updating the feature importance by combining the basic importance of the feature and the feedback score; fusing the updated feature importance with the calculation result of the time decay function to generate a feature importance ranking table;

[0041] Dynamically adjust feature weights according to changes in the feature importance ranking table; adaptively optimize the network structure of the central cognitive model based on the adjusted feature weights, including expanding the representation dimension of importance features and compressing the network layer of importance features; use the optimized network structure to update the central cognitive model; and redistribute the updated central cognitive model to the distributed edge computing network through the knowledge distillation method to form a closed loop of dynamic knowledge evolution.

[0042] The improved practical Byzantine fault tolerance algorithm is used for verification, and the consensus judgment value is calculated based on the logic verification score of the reasoning path, the credibility score and the historical verification performance; the verification result is determined according to the consensus judgment value, including:

[0043] Construct multi-dimensional evaluation indicators, calculate the logic verification score of the reasoning path based on the integrity, rule compliance and semantic coherence of the reasoning path; calculate the credibility score based on the entity relationship credibility, attribute value credibility and timeliness score; calculate the historical verification performance based on the verification accuracy, judgment consistency level and response timeliness;

[0044] An improved practical Byzantine fault-tolerant algorithm is used for verification, and a dynamic weight adjustment mechanism is constructed based on the multi-dimensional evaluation indicators; the initial weight coefficients of the logic verification score, the credibility score and the historical verification performance are determined according to the type characteristics of the knowledge to be verified and the professional field characteristics of the verification node; the initial weight coefficients are dynamically adjusted according to the historical verification effect using an adaptive learning rate; the logic verification score, the credibility score and the historical verification performance are weighted with the corresponding dynamically adjusted weight coefficients to obtain a consensus judgment value;

[0045] Based on the consensus judgment value, three-level verification thresholds are set, including a fast pass threshold, a regular verification threshold and a strict review threshold; a verification node reputation scoring model is constructed, and the verification node reputation scoring model calculates the reputation score based on the node's historical verification performance; verification nodes are selected according to the reputation score; the diversity of the verification group is ensured based on the professional field distribution of the verification nodes; the verification task is divided into multiple independent subtasks according to the knowledge field; a parallel verification mechanism is used to process the independent subtasks simultaneously; a result merging strategy is designed based on the verification results of each subtask to generate a final verification result.

[0046] According to a second aspect of the embodiments of the present invention,

[0047] Provides a streaming query semantic graph adaptive enhancement system based on cognitive computing, including:

[0048] The first unit is used to extract grammatical features, semantic features, and execution features from a streaming query language code repository, performance logs, and an expert knowledge base to form an original feature set; map the original feature set to a quantum state feature representation based on a quantum encoder; enhance the quantum state feature representation using a dual-path cognitive processing system, wherein a fast path captures explicit associations between features through an attention network, and a deep path mines implicit patterns between features through a memory neural network; adaptively fuse the explicit associations output by the fast path with the implicit patterns output by the deep path to generate a cognitive feature tensor containing feature importance, association strength, and timing constraints, and establish a feature importance ranking table;

[0049] The second unit is used to construct an initial semantic knowledge graph based on the cognitive feature tensor and the feature importance ranking table, set nodes with feature importance higher than a preset feature threshold as core knowledge nodes; calculate the degree of association between the core knowledge nodes and other nodes based on the graph attention mechanism, and generate a node affinity matrix; use a community discovery algorithm to analyze the node affinity matrix to identify knowledge clusters with a correlation greater than a preset correlation threshold; build a hybrid reasoning engine, use the knowledge clusters as basic units to perform knowledge deduction, and predict potential semantic relationships in the completion graph; optimize and verify the predicted semantic relationships based on multi-agent reinforcement learning, and output an enhanced semantic graph with a hierarchical structure and a credibility score table;

[0050] The third unit is used to deploy the enhanced semantic graph and the credibility rating table to a distributed edge computing network, perform parallel semantic understanding based on the enhanced semantic graph; generate query optimization suggestions based on the deployed knowledge content, and screen the suggestions through credibility ratings; use federated learning to integrate optimization suggestions whose credibility is higher than a preset optimization threshold, and update the central cognitive model; and distribute the updated central cognitive model to the distributed edge computing network through knowledge distillation.

[0051] According to a third aspect of the embodiments of the present invention,

[0052] An electronic device is provided, comprising:

[0053] processor;

[0054] a memory for storing processor-executable instructions;

[0055] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0056] According to a fourth aspect of the embodiments of the present invention,

[0057] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0058] The beneficial effects of this application are as follows:

[0059] 1. Improve the accuracy and efficiency of semantic understanding: This method can more comprehensively extract and understand the syntax, semantics, and execution features of streaming queries by combining quantum coding, a dual-path cognitive processing system, and an adaptive fusion mechanism, and build a more accurate enhanced semantic graph. Parallel semantic understanding based on this graph can significantly improve the accuracy and efficiency of query understanding.

[0060] 2. Adaptive enhancement and optimization of semantic graphs: This method uses a hybrid reasoning engine and multi-agent reinforcement learning technology to predict and complete the potential semantic relationships in the graph, and optimizes and verifies the prediction results, thereby achieving adaptive enhancement and dynamic evolution of the semantic graph. Combined with the community discovery algorithm, it can identify knowledge clusters with strong correlations, further improving the structured and hierarchical expression capabilities of the graph.

[0061] 3. Support distributed collaborative optimization and knowledge sharing: This method adopts a federated learning mechanism to integrate optimization suggestions from distributed edge computing networks, update the central cognitive model, and distribute the updated model through knowledge distillation. This distributed collaborative optimization mechanism can effectively utilize the computing resources and local knowledge of edge nodes, improve the learning efficiency and adaptability of the overall system, and promote knowledge sharing and continuous improvement of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flow chart of a method for adaptively enhancing a streaming query semantic graph based on cognitive computing according to an embodiment of the present invention;

[0063] Figure 2 It is a structural diagram of a streaming query semantic graph adaptive enhancement system based on cognitive computing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0066] Figure 1 FIG. 1 is a flow chart of a method for adaptively enhancing a stream query semantic graph based on cognitive computing according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0067] S11. Extract grammatical features, semantic features, and execution features from the streaming query language code repository, performance logs, and expert knowledge base to form an original feature set; map the original feature set to a quantum state feature representation based on a quantum encoder; enhance the quantum state feature representation using a dual-path cognitive processing system, wherein the fast path captures explicit associations between features through an attention network, and the deep path mines implicit patterns between features through a memory neural network; adaptively fuse the explicit associations output by the fast path with the implicit patterns output by the deep path to generate a cognitive feature tensor containing feature importance, association strength, and timing constraints, and establish a feature importance ranking table;

[0068] S12. Construct an initial semantic knowledge graph based on the cognitive feature tensor and the feature importance ranking table, set nodes with feature importance higher than a preset feature threshold as core knowledge nodes; calculate the degree of association between the core knowledge nodes and other nodes based on the graph attention mechanism, and generate a node affinity matrix; use a community discovery algorithm to analyze the node affinity matrix, and identify knowledge clusters whose association is greater than a preset association threshold; construct a hybrid reasoning engine, use the knowledge clusters as basic units to perform knowledge deduction, and predict the potential semantic relationships in the completion graph; optimize and verify the predicted semantic relationships based on multi-agent reinforcement learning, and output an enhanced semantic graph with a hierarchical structure and a credibility score table;

[0069] S13. Deploy the enhanced semantic graph and the credibility rating table to a distributed edge computing network, and perform parallel semantic understanding based on the enhanced semantic graph; generate query optimization suggestions based on the deployed knowledge content, and screen the suggestions through credibility ratings; use federated learning to integrate optimization suggestions whose credibility is higher than a preset optimization threshold, and update the central cognitive model; distribute the updated central cognitive model to the distributed edge computing network through knowledge distillation.

[0070] In an optional implementation, an initial semantic knowledge graph is constructed according to the cognitive feature tensor and the feature importance ranking table, and nodes whose feature importance is higher than a preset feature threshold are set as core knowledge nodes; the degree of association between the core knowledge nodes and other nodes is calculated based on the graph attention mechanism, and a node affinity matrix is ​​generated, including:

[0071] The cognitive feature tensor represents the multi-dimensional correlation strength between feature nodes, and the feature importance ranking table records the importance scores of nodes; constructs an associated feature evaluation index system and calculates a preset feature threshold; selects core knowledge nodes from the feature importance ranking table according to the preset feature threshold; and constructs an initial semantic knowledge graph centered on the core knowledge node using the correlation strength information in the cognitive feature tensor;

[0072] Based on the initial semantic knowledge graph, a structural feature extractor is used to analyze the topological structure of the graph to obtain local features of nodes, and a semantic feature extractor is used to analyze node attribute information to obtain semantic features; the local features are adaptively fused with the semantic features through a feature fusion module to form an enhanced feature representation of the node;

[0073] For the enhanced feature representation, the node feature weights are calculated in turn through the self-attention layer, the interactive attention layer analyzes the influence relationship between nodes, and the global attention layer obtains the overall importance of the nodes; the outputs of the three-layer attention mechanism are feature aggregated to obtain the preliminary correlation strength between nodes;

[0074] A multi-dimensional analysis is performed on the preliminary association strength, and multi-dimensional similarity calculation, path complexity analysis and time-series dependency modeling are performed in sequence to obtain the similarity degree, direct and indirect connection relationship and dynamic evolution characteristics of the nodes in the feature space respectively; the analysis results of the similarity degree, the direct and indirect connection relationship and the dynamic evolution characteristics are integrated to generate a node affinity matrix.

[0075] First, prepare the cognitive feature tensor and feature importance ranking table. The cognitive feature tensor is a multidimensional array, for example, it can be represented by a three-dimensional array, where each dimension represents the feature, the feature, and the strength of the association between them. Assuming there are three features A, B, and C, AB-0.8 in the tensor means that the strength of the association between feature A and feature B is 0.8. The feature importance ranking table records the importance score of each feature, for example, feature A is scored 0.9, feature B is scored 0.7, and feature C is scored 0.5.

[0076] Next, construct an associated feature evaluation index system and calculate the preset feature threshold. The index system can take into account factors such as feature frequency, coverage, and discrimination. For example, the three indicators can be weighted averaged to obtain the final feature importance score. Assuming that feature A has a frequency of 0.8, a coverage of 0.9, and a discrimination of 0.7, and weights of 0.3, 0.4, and 0.3, respectively, the final score of A is 0.8*0.3 + 0.9*0.4 + 0.7*0.3 = 0.81. The preset feature threshold can be set according to the actual situation, for example, the threshold is set to 0.8.

[0077] Then, the core knowledge nodes are screened according to the preset feature threshold. The nodes with scores higher than the threshold in the feature importance ranking table are set as core knowledge nodes. For example, assuming that only feature A has a score of 0.81 higher than the threshold of 0.8, then A is set as a core knowledge node.

[0078] The association strength information in the cognitive feature tensor is used to construct the initial semantic knowledge graph centered on the core knowledge node. The association strength between the core knowledge node and other nodes is used as the weight of the edge to construct the initial graph. For example, AB-0.8 and AC-0.6 indicate that there are edges between A and B and C, with weights of 0.8 and 0.6 respectively.

[0079] Based on the initial semantic knowledge graph, the enhanced feature representation of the node is extracted. First, the structural feature extractor is used to analyze the topological structure of the graph to obtain the local features of the node. For example, the degree, centrality, and clustering coefficient of the node can be calculated. Then, the semantic feature extractor is used to analyze the node attribute information to obtain the semantic features. For example, the name, description, and category of the feature can be extracted. Finally, the local features and semantic features are adaptively fused through the feature fusion module to form an enhanced feature representation of the node. For example, the local features and semantic features can be spliced ​​together to form a new vector representation.

[0080] For enhanced feature representation, the preliminary association strength between nodes is calculated through the three-layer attention mechanism in turn. The self-attention layer calculates the node feature weight, the interactive attention layer analyzes the influence relationship between nodes, and the global attention layer obtains the overall importance of the node. The output of the three-layer attention mechanism is feature aggregated to obtain the preliminary association strength between nodes. For example, the output of the three attention layers can be weighted averaged to obtain the preliminary association strength.

[0081] Perform a multi-dimensional analysis of the preliminary association strength to generate a node affinity matrix. First, calculate the similarity of nodes in the feature space. For example, cosine similarity can be used to calculate the similarity between nodes. Then, analyze the direct and indirect connection relationships between nodes. For example, the shortest path length between nodes can be calculated. Next, perform temporal dependency modeling. For example, the activity of nodes in different time periods can be analyzed. Finally, the analysis results of similarity, direct and indirect connection relationships, and dynamic evolution characteristics are combined to generate a node affinity matrix. For example, the three analysis results can be weighted averaged to obtain the final affinity score.

[0082] The solution of this application can:

[0083] Improve the efficiency of knowledge graph construction: By sorting the feature importance and filtering the core nodes by preset thresholds, the amount of calculation can be effectively reduced and the efficiency of knowledge graph construction can be improved. For example, in a data set containing 1,000 features, filtering out 100 core nodes by preset thresholds can reduce the amount of calculation by 90%. Enhance the semantic expression ability of knowledge graphs: By combining the structural features, semantic features, and dynamic evolution features of nodes, the association between nodes can be more comprehensively characterized, and the semantic expression ability of knowledge graphs can be enhanced. For example, in a social network knowledge graph, the relationship between users can be more accurately described by combining information such as users' social relationships, personal information, and activity. Improve the accuracy of node affinity calculation: By analyzing the association between nodes in multiple dimensions and combining a multi-layer attention mechanism, the affinity between nodes can be more accurately calculated, providing more reliable input for downstream tasks. For example, in a recommendation system, more accurate node affinity can improve the accuracy and personalization of recommendations.

[0084] In an optional implementation, a community discovery algorithm is used to analyze the node affinity matrix to identify knowledge clusters whose correlation is greater than a preset correlation threshold; a hybrid reasoning engine is constructed to perform knowledge deduction based on the knowledge clusters as basic units to predict potential semantic relationships in the completion graph; the predicted semantic relationships are optimized and verified based on multi-agent reinforcement learning, and an enhanced semantic graph with a hierarchical structure and a credibility score table are output, including:

[0085] The node affinity matrix records the semantic association strength between nodes in the knowledge graph; a multidimensional feature evaluation index system is established, and the structural similarity, content similarity and time domain similarity between nodes are extracted from the node affinity matrix based on the multidimensional feature evaluation index system;

[0086] The structural similarity, the content similarity and the time domain similarity are input into an adaptive weight fusion module, and the adaptive weight fusion module calculates the comprehensive affinity coefficient between nodes; a node density distribution field is constructed based on the comprehensive affinity coefficient, and the node density distribution field models the local connection relationship of nodes through a density attenuation function;

[0087] The node density distribution field is input into a density-aware community discovery module, and the density-aware community discovery module uses an improved modularity calculation method to iteratively optimize the community structure; an initial community division is obtained based on the optimization result of the improved modularity calculation method, and a node group whose association strength exceeds a preset association threshold in the initial community division is marked as a candidate knowledge cluster group;

[0088] Perform multi-level filtering on the candidate knowledge clusters to obtain stable knowledge clusters; construct a hybrid reasoning engine based on the stable knowledge clusters, wherein the hybrid reasoning engine integrates a rule reasoning unit, a statistical reasoning unit, and a deep reasoning unit, wherein the rule reasoning unit performs symbolic reasoning based on an ontology rule base, the statistical reasoning unit calculates conditional probability distribution based on a probabilistic graph model, and the deep reasoning unit extracts implicit features using a graph neural network;

[0089] Inputting the multi-source reasoning results output by the hybrid reasoning engine into an adaptive fusion network, the adaptive fusion network dynamically assigns fusion weights according to the prediction accuracy of different reasoning units; performing weighted combination on the multi-source reasoning results based on the fusion weights to obtain a completed latent semantic relationship;

[0090] Constructing a multi-agent verification framework to evaluate the credibility of the potential semantic relationship, the multi-agent verification framework includes an evaluation agent, an optimization agent and a coordination agent, the evaluation agent generates a multi-dimensional score based on factual consistency, logical coherence and temporal rationality, the optimization agent adjusts the verification strategy according to the multi-dimensional score, and the coordination agent integrates the decision results of multiple agents;

[0091] The output results of the multi-agent verification framework are input into a hierarchical storage module, and the hierarchical storage module stores them hierarchically in the core knowledge layer, the extended knowledge layer or the associated knowledge layer according to the credibility of the potential semantic relationship; at the same time, a credibility quantification table is generated, and the credibility quantification table records the score and uncertainty of each semantic relationship.

[0092] In order to more effectively construct and improve the knowledge graph, the present invention proposes a knowledge graph enhancement method and system based on community discovery and multi-agent reinforcement learning, which can automatically discover potential semantic relationships and perform credibility assessment on them, and finally construct an enhanced semantic graph with a hierarchical structure.

[0093] First, the semantic association strength between nodes in the knowledge graph is quantified to construct a node affinity matrix. For example, the initial association strength value between nodes can be calculated based on indicators such as the number of common neighbors, path length, and semantic similarity between nodes, and stored in the node affinity matrix. Assuming that there are three nodes A, B, and C in the knowledge graph, there is a direct edge between A and B, and A and C are indirectly connected through B, then the association strength value between A and B will be higher than the association strength value between A and C.

[0094] Then, a multi-dimensional feature evaluation index system is established to measure the similarity between nodes. For example, structural similarity can consider indicators such as node degree and centrality; content similarity can consider information such as node text description and attributes; time domain similarity can consider factors such as the time when the node appears and the trend of change. Assuming that nodes A and B are both connected to nodes C and D, the structural similarity between A and B is high; if the text descriptions of A and B both contain the keyword "technology", the content similarity between A and B is high; if A and B both appear frequently in 2023, the time domain similarity between A and B is high. Extract the structural similarity, content similarity, and time domain similarity between nodes.

[0095] Next, the extracted structural similarity, content similarity, and temporal similarity are input into the adaptive weight fusion module. This module dynamically adjusts the weights according to the importance of different features and calculates the comprehensive affinity coefficient between nodes. For example, if the content of the knowledge graph changes rapidly, the weight of temporal similarity will be higher. Assuming that the weights of structural similarity, content similarity, and temporal similarity are 0.3, 0.5, and 0.2, respectively, the structural similarity of nodes A and B is 0.8, the content similarity is 0.9, and the temporal similarity is 0.7, then the comprehensive affinity coefficient of A and B is 0.3*0.8+0.5*0.9+0.2*0.7=0.85. The node density distribution field is constructed based on the comprehensive affinity coefficient, and the local connection relationship of the nodes is modeled by the density decay function.

[0096] Subsequently, the node density distribution field is input into the density-aware community discovery module. This module uses an improved modularity calculation method to iteratively optimize the community structure and obtain the initial community division. For example, nodes can be divided into different communities based on the density and connection density of the nodes. The node groups whose association strength exceeds the preset association threshold in the initial community division are marked as candidate knowledge clusters. The candidate knowledge clusters are filtered at multiple levels, such as removing clusters that are too small or too sparsely connected, to obtain stable knowledge clusters.

[0097] Next, a hybrid reasoning engine is built based on stable knowledge clusters. The engine integrates rule reasoning units, statistical reasoning units, and deep reasoning units. The rule reasoning unit performs symbolic reasoning based on the ontology rule base, such as reasoning using the "is-a" relationship. The statistical reasoning unit calculates conditional probability distributions based on probabilistic graph models, such as calculating association probabilities based on co-occurrence frequencies between nodes. The deep reasoning unit uses graph neural networks to extract implicit features, such as learning vector representations of nodes and predicting relationships. The multi-source reasoning results output by the hybrid reasoning engine are input into the adaptive fusion network, and the fusion weights are dynamically allocated according to the prediction accuracy of different reasoning units. The multi-source reasoning results are weighted and combined to obtain the completed latent semantic relationships.

[0098] Then, a multi-agent verification framework is constructed to evaluate the credibility of potential semantic relations. The framework includes evaluation agent, optimization agent and coordination agent. The evaluation agent generates multi-dimensional scores based on factual consistency, logical coherence and temporal rationality. The optimization agent adjusts the verification strategy according to the multi-dimensional scores. The coordination agent integrates the decision results of multiple agents.

[0099] Finally, the output results of the multi-agent verification framework are input into the hierarchical storage module, and stored in the core knowledge layer, extended knowledge layer or associated knowledge layer according to the credibility of the potential semantic relationship. At the same time, a credibility quantification table is generated to record the score and uncertainty of each semantic relationship.

[0100] The solution of this application can:

[0101] Improved accuracy: By combining multi-dimensional feature evaluation and hybrid reasoning engines, it is possible to more accurately predict potential semantic relationships and improve the integrity and accuracy of the knowledge graph. Enhanced credibility: The multi-agent verification framework can conduct a comprehensive credibility assessment of the predicted semantic relationships and generate a quantitative credibility score to enhance the credibility of the knowledge graph. Structural optimization: The hierarchical storage module can perform hierarchical storage according to the credibility of the semantic relationships, optimize the structure of the knowledge graph, and make it more hierarchical and interpretable.

[0102] In an optional implementation, the node density distribution field is input into a density-aware community discovery module, and the density-aware community discovery module uses an improved modularity calculation method to iteratively optimize the community structure; an initial community division is obtained based on the optimization result of the improved modularity calculation method, and a node group whose association strength exceeds a preset association threshold in the initial community division is marked as a candidate knowledge cluster group, including:

[0103] In the node density distribution field, the topological features and semantic features of the nodes are integrated; a dual density feature is calculated for each node, wherein the dual density feature includes: a local structure density calculated based on a nonlinear density decay function, and a semantic association density calculated based on a semantic similarity matrix; and the dual density features are combined to form a density feature vector of the node;

[0104] The density feature vector is input into a density-aware community discovery module, the density-aware community discovery module adopts an improved hierarchical modularity calculation method; the improved hierarchical modularity calculation method introduces an adaptive density adjustment factor, the adaptive density adjustment factor calculates a density difference matrix based on the density feature vector of the node pair; the modularity gain between communities is dynamically adjusted using the density difference matrix;

[0105] Based on the dynamically adjusted modularity gain, a hierarchical community optimization framework is constructed; in the hierarchical community optimization framework, density peak clustering is performed in a local neighborhood to obtain micro communities, and the micro communities are adaptively merged based on the dynamically adjusted modularity gain; when the modularity gain in the merging process is less than a dynamic threshold, an initial community division result is output;

[0106] A multi-dimensional correlation analysis is performed on the initial community division results to construct a community correlation tensor; each dimension of the community correlation tensor respectively characterizes the structural correlation strength, semantic similarity and evolutionary correlation between communities; a comprehensive correlation score is calculated based on the community correlation tensor, and community combinations that are higher than a preset correlation threshold are marked as candidate knowledge clusters.

[0107] A density-aware knowledge cluster discovery method is used to extract high-quality knowledge clusters from complex networks. This method integrates the topological and semantic features of nodes, uses an improved modularity optimization algorithm for community discovery, and finally identifies knowledge clusters through multi-dimensional correlation analysis.

[0108] First, construct the node density distribution field. This step integrates the topological features and semantic features of the node, providing a basis for subsequent community discovery. Specifically, first calculate the local structure density of each node. For example, the number of neighbor nodes of each node within a certain hop count range can be counted. The more neighbor nodes there are, the higher the local structure density of the node. The decay function can use nonlinear functions such as Gaussian kernel function. The farther the distance, the lower the weight. Then, calculate the semantic association density of each node. Assuming that the node has text description information, the word vector model can be used to calculate the semantic similarity between nodes, and the semantic association density of each node can be calculated based on the semantic similarity matrix. For example, the semantic similarity of each node with its neighbor nodes can be weighted averaged to obtain the semantic association density of the node. Finally, the local structure density and semantic association density are combined into a two-dimensional vector as the density feature vector of the node. For example, two density values ​​can be directly spliced ​​into a two-dimensional vector.

[0109] Next, the node density distribution field is input into the density-aware community discovery module. This module uses an improved hierarchical modularity calculation method to iteratively optimize the community structure. First, the density difference matrix of the node pairs is calculated. For example, the Euclidean distance between the density feature vectors of two nodes can be calculated. The larger the distance, the greater the density difference. Then, the modularity gain between communities is dynamically adjusted based on the density difference matrix. For example, the modularity gain of the two communities after merging can be adjusted according to the average density difference of the two communities. The larger the density difference, the greater the adjustment. Next, a hierarchical community optimization framework is constructed. Density peak clustering is performed in the local neighborhood to obtain micro-communities. For example, nodes can be divided into several micro-communities according to the local density of the nodes and the distance to the nodes with higher density. Then, the micro-communities are adaptively merged based on the dynamically adjusted modularity gain. For example, the two communities with the largest modularity gain are selected each time for merging until the modularity gain during the merging process is less than the dynamic threshold. Finally, the initial community division result is output.

[0110] Finally, a multi-dimensional correlation analysis is performed on the initial community division results. First, a community correlation tensor is constructed. Each dimension of the tensor represents the structural correlation strength, semantic similarity and evolutionary correlation between communities. For example, the structural correlation strength can be calculated based on the number or weight of the edges connecting the communities; the semantic similarity can be calculated based on the text description information of the nodes in the community; and the evolutionary correlation can be calculated based on the changes in the community over time. Assuming there are three communities, a 3x3x3 tensor can be constructed. Then, a comprehensive correlation score is calculated based on the community correlation tensor. For example, a weighted average can be performed on each element in the tensor to obtain a comprehensive correlation score between communities. Finally, community combinations that are higher than the preset correlation threshold are marked as candidate knowledge clusters. For example, the threshold is set to 0.8, and community combinations with a comprehensive correlation score higher than 0.8 are marked as candidate knowledge clusters.

[0111] Suppose there is a network with 10 nodes, each with text description information. By calculating the local structure density and semantic association density of the node, the density feature vector of each node is obtained. Then, these vectors are input into the density-aware community discovery module, and after iterative optimization, the initial community division results are obtained, for example, 10 nodes are divided into 3 communities. Finally, the community association tensor is constructed, and the comprehensive association score is calculated. For example, the comprehensive association score of community 1 and community 2 is 0.9, which is higher than the preset threshold of 0.8, then the combination of these two communities is marked as a candidate knowledge cluster.

[0112] The solution of this application can:

[0113] Improve the quality of knowledge clusters: This method integrates the topological features and semantic features of nodes, and can more accurately identify nodes with close connections, thereby improving the quality of knowledge clusters. Enhance the robustness of community discovery: This method uses an improved modularity optimization algorithm, which can effectively avoid the resolution limitations of traditional algorithms and improve the robustness of community discovery. Support multi-dimensional correlation analysis: This method constructs a community correlation tensor, which can analyze the correlation between communities from multiple dimensions such as structure, semantics, and evolution, thereby more comprehensively characterizing the characteristics of knowledge clusters.

[0114] In an optional implementation, the enhanced semantic graph and the credibility score table are deployed to a distributed edge computing network, and parallel semantic understanding is performed based on the enhanced semantic graph; query optimization suggestions are generated based on the deployed knowledge content, and suggestions are screened by credibility score; optimization suggestions with credibility higher than a preset optimization threshold are integrated by using federated learning, and the central cognitive model is updated, including:

[0115] Divide the enhanced semantic graph into multiple sub-graphs, and divide the enhanced semantic graph based on edge weight factors; the edge weight factors are calculated by the original weight of the edge, the semantic similarity between nodes, and the intersection and union ratio of the node neighborhood set; deploy the sub-graphs and the credibility score table to the edge computing nodes in the distributed edge computing network;

[0116] A graph attention network is deployed on the edge computing node for parallel semantic understanding, and the graph attention network extracts features of different types of semantic relationships through a multi-head attention mechanism; the graph attention network includes a relational attention layer, and the relational attention layer dynamically adjusts the attention weight based on the relationship type and extracts semantic features based on the sub-graph;

[0117] A knowledge completion module and a relational reasoning module are constructed based on the semantic features; the knowledge completion module calculates the knowledge path score using a path reliability evaluation method; the relational reasoning module performs pattern matching in combination with a rule template; query optimization suggestions are generated based on the knowledge path score and the pattern matching result; the query optimization suggestions are screened based on the credibility score table, and query optimization suggestions that are higher than a preset optimization threshold are retained;

[0118] A federated learning method is used to integrate the query optimization suggestions after screening; a differential privacy mechanism is introduced in the parameter aggregation process, and Gaussian noise is used to protect the model parameters from disturbances; the noise scale and sensitivity parameters are dynamically adjusted based on the validation set performance; and the integrated parameters are used to update the central cognitive model through a soft update mechanism.

[0119] First, the enhanced semantic graph is divided. The edges of the enhanced semantic graph are weighted, there is semantic similarity between nodes, and nodes have their own neighborhood sets. The edge weight factor of each edge is calculated by comprehensively considering the original weight of the edge, the semantic similarity between nodes, and the intersection-union ratio of the node neighborhood set. For example, if the original weight of the edge is 0.8, the semantic similarity between two nodes is 0.9, and the intersection-union ratio of the neighborhood set is 0.7, then these three values ​​can be weighted averaged to obtain the edge weight factor of the edge. According to the calculated edge weight factors, a graph segmentation algorithm, such as the METIS algorithm, is used to divide the enhanced semantic graph into multiple sub-graphs. Assuming that the enhanced semantic graph contains 1000 nodes and 2000 edges, it is divided into 10 sub-graphs by the METIS algorithm and according to the calculated edge weight factors. Each sub-graph contains an average of 100 nodes and 200 edges.

[0120] Then, the divided sub-graphs and credibility score tables are deployed to each edge computing node in the distributed edge computing network. Assuming that the distributed edge computing network contains 10 edge computing nodes, the 10 sub-graphs are deployed to these 10 edge computing nodes respectively, and the credibility score table is also copied to each edge computing node.

[0121] Next, parallel semantic understanding is performed on the edge computing nodes. Each edge computing node deploys a graph attention network, which uses a multi-head attention mechanism to extract features for different types of semantic relationships. The graph attention network contains a relational attention layer, which dynamically adjusts the attention weights according to different relationship types and extracts semantic features based on the sub-graph deployed on this node. For example, the relational attention layer assigns different attention weights to the "father-son" relationship and the "friend" relationship. Assuming that a sub-graph contains the two relationships "A is the father of B" and "C is the friend of D", the relational attention layer assigns a weight of 0.8 to the "father-son" relationship and a weight of 0.5 to the "friend" relationship.

[0122] Based on the extracted semantic features, a knowledge completion module and a relational reasoning module are constructed. The knowledge completion module uses a path reliability evaluation method to calculate the knowledge path score. For example, for the knowledge path "ABC", if each edge on the path has a high credibility, the path has a high score. The relational reasoning module combines rule templates for pattern matching. For example, if there is a rule template "A is the father of B, B is the father of C, then A is the grandfather of C", and a matching pattern is found in the subgraph, the relationship "A is the grandfather of C" can be inferred. Based on the knowledge path score and the results of pattern matching, query optimization suggestions are generated. For example, if the knowledge completion module finds a reliable path to connect the two entities in the query, it can be recommended to add the relationship on this path as a query condition.

[0123] Then, the generated query optimization suggestions are screened based on the credibility score table, and suggestions with a higher than preset optimization threshold are retained. Assuming the preset optimization threshold is 0.7, only query optimization suggestions with a credibility score higher than 0.7 are retained.

[0124] Finally, the federated learning method is used to integrate the filtered query optimization suggestions. The differential privacy mechanism is introduced in the parameter aggregation process to perturb the model parameters by adding Gaussian noise to protect data privacy. The noise scale and sensitivity parameters are dynamically adjusted according to the performance of the validation set. For example, if the performance of the validation set decreases, the noise scale or sensitivity parameter is reduced. The integrated parameters are used to update the central cognitive model through a soft update mechanism. For example, the parameters of the central cognitive model are weighted averaged with the integrated parameters to obtain the updated parameters.

[0125] The solution of this application can:

[0126] Improve the efficiency of semantic understanding: By deploying the enhanced semantic graph to the distributed edge computing network and using the graph attention network for parallel semantic understanding, the efficiency of semantic understanding can be significantly improved. Enhance query optimization capabilities: Through the knowledge completion module and the relationship reasoning module, more effective query optimization suggestions can be generated to improve the accuracy and efficiency of queries. Protect data privacy: The combination of federated learning and differential privacy mechanisms can effectively protect user data privacy and prevent sensitive information leakage.

[0127] In an optional implementation, the method further includes:

[0128] Distribute the updated central cognitive model to the distributed edge computing network through knowledge distillation; build a blockchain-based verification system to verify the optimization plan through consensus; write the verified optimization plan, reasoning path and credibility score into the blockchain account book, and feed back the verification result to the feature extraction network for updating the feature importance ranking table to realize the dynamic evolution of knowledge;

[0129] Construct a teacher-student network architecture, where the teacher network is a central cognitive model and the student network is an edge node model; distribute the central cognitive model to the distributed edge computing network through knowledge distillation; the knowledge distillation method includes soft label migration, feature graph migration and relationship structure migration; the soft label migration calculates the output probability distribution difference between the teacher network and the student network based on the temperature parameter, the feature graph migration aligns the middle layer features of the two networks through the attention mapping function, and the relationship structure migration calculates the consistency loss of the relationship between instances based on the semantic relationship mapping function; update the parameters of the edge node model based on the weighted combination of the output probability distribution difference, the middle layer features and the consistency loss;

[0130] Performing consensus verification on the optimization scheme generated by the edge node model; encapsulating the optimization scheme, the corresponding reasoning path and the credibility score as a blockchain transaction; using an improved practical Byzantine fault tolerance algorithm for verification, and calculating a consensus judgment value based on the logic verification score of the reasoning path, the credibility score and historical verification performance; and determining a verification result according to the consensus judgment value;

[0131] Divide storage shards according to knowledge domains, and maintain independent Merkle trees for the storage shards; construct a global index table to record the knowledge association relationship between shards; write the verified optimization scheme, the reasoning path, and the credibility score into the blockchain account book of the corresponding knowledge domain; establish association records of cross-domain knowledge based on the global index table; and update the blockchain account book using an incremental storage strategy;

[0132] Feeding the verification result back to the feature extraction network; calculating the feedback score of each feature based on the verification result; updating the feature importance by combining the basic importance of the feature and the feedback score; fusing the updated feature importance with the calculation result of the time decay function to generate a feature importance ranking table;

[0133] Dynamically adjust feature weights according to changes in the feature importance ranking table; adaptively optimize the network structure of the central cognitive model based on the adjusted feature weights, including expanding the representation dimension of importance features and compressing the network layer of importance features; use the optimized network structure to update the central cognitive model; and redistribute the updated central cognitive model to the distributed edge computing network through the knowledge distillation method to form a closed loop of dynamic knowledge evolution.

[0134] First, the system architecture is constructed. The architecture consists of four main parts: the central cognitive model, the distributed edge computing network, the blockchain verification system, and the feature extraction network. The central cognitive model, as the core of the knowledge base, is responsible for storing and processing global knowledge. The distributed edge computing network consists of multiple edge nodes, each of which has a lightweight model for performing local reasoning and generating optimization solutions. The blockchain verification system is responsible for consensus verification of the optimization solutions generated by the edge nodes and recording the verification results on the blockchain ledger. The feature extraction network is responsible for analyzing the verification results and dynamically adjusting the feature importance to guide the optimization of the central cognitive model.

[0135] Next, feature extraction and importance ranking are performed. The feature extraction network extracts key features from the input data and assigns basic importance to each feature according to predefined rules or algorithms. For example, the basic importance of a feature can be determined based on its frequency of occurrence in historical data or its impact on the prediction results. In the initial stage, it can be assumed that all features have the same importance and are assigned the same initial value, such as 1. Then, these features are sorted by importance to generate a feature importance ranking table.

[0136] Then, knowledge distillation and model distribution are performed. The central cognitive model transfers knowledge to the edge node model through knowledge distillation. The knowledge distillation process includes soft label migration, feature graph migration, and relational structure migration. Soft label migration refers to using the output probability distribution of the central model as a soft label to guide the learning of the edge model. Feature graph migration refers to transferring the intermediate layer features of the central model to the edge model to help the edge model learn richer feature representations. Relational structure migration refers to transferring the relationship between instances learned by the central model to the edge model to help the edge model learn more accurate relational reasoning capabilities. For example, if the central model determines that there is a "composition" relationship between "car" and "tire", this relationship is transferred to the edge node model. Through the combination of these three methods, the edge node model can effectively learn the knowledge of the central model. Assuming that the central model determines that the credibility of a certain optimization scheme is 0.9, this probability value is transferred as a soft label to the edge model to guide the learning of the edge model.

[0137] After that, optimization scheme generation and consensus verification are performed. The edge node model generates optimization schemes and calculates their credibility scores based on local data and received knowledge. For example, the edge node can generate a traffic light timing optimization scheme based on traffic flow data and traffic rules knowledge provided by the central model, and calculate the credibility of the scheme. Assume that the generated scheme is "extending the east-west green light time by 10 seconds" with a credibility score of 0.8. Then, the optimization scheme, the corresponding reasoning path, and the credibility score are encapsulated as a blockchain transaction and submitted to the blockchain verification system. The verification system uses an improved practical Byzantine fault tolerance algorithm to perform consensus verification on the transaction. The verification process considers the logic verification score of the reasoning path, the credibility score, and the historical verification performance of the node. For example, if multiple nodes have generated similar optimization schemes, and the reasoning path logic is clear and the credibility score is high, the scheme is more likely to pass verification. Assume that after verification, the consensus judgment value of the scheme is 0.9, then the scheme is considered valid.

[0138] Subsequently, the ledger is recorded and the knowledge is updated. The verified optimization scheme, reasoning path and credibility score are written into the blockchain ledger. The ledger is divided into storage shards according to the knowledge domain. Each shard maintains an independent Merkle tree, and the knowledge association between shards is recorded through a global index table. For example, the traffic light timing scheme can be stored in the "traffic management" shard, while the related road congestion information can be stored in the "urban planning" shard. The global index table records the association between the two shards. The blockchain ledger is updated using an incremental storage strategy, which only records new or modified information to improve efficiency.

[0139] Finally, verification result feedback and model optimization are performed. The verification results are fed back to the feature extraction network to update the feature importance ranking table. The feedback score of each feature is calculated based on the verification results. For example, if a feature plays an important role in multiple verified optimization schemes, its feedback score will be higher. The feature importance is updated by combining the basic importance and feedback score of the feature, and the updated feature importance is merged with the calculation result of the time decay function to generate a new feature importance ranking table. For example, if the initial importance of a feature is 1, the feedback score is 0.2, and the time decay coefficient is 0.9, then its new importance is 1 + 0.2 * 0.9 = 1.18. The feature weight is dynamically adjusted according to the change in the feature importance ranking table, and the network structure of the central cognitive model is adaptively optimized based on the adjusted feature weight, including expanding the representation dimension of important features and compressing the network layer of unimportant features. Finally, the optimized network structure is used to update the central cognitive model, and the updated central cognitive model is re-distributed to the distributed edge computing network through knowledge distillation to form a closed loop of dynamic knowledge evolution.

[0140] The solution of this application can:

[0141] Improve knowledge learning efficiency: Knowledge distillation technology can effectively transfer the knowledge of the central model to the edge model, avoiding the edge model from learning from scratch, thereby improving knowledge learning efficiency. Enhance knowledge credibility: The blockchain consensus verification mechanism can ensure that only verified optimization solutions can be recorded in the ledger, thereby enhancing the credibility of knowledge. Realize dynamic evolution of knowledge: The feature extraction network and model optimization mechanism can dynamically adjust the feature importance and model structure according to the verification results, so that the knowledge base can continuously learn and evolve to adapt to new environments and needs.

[0142] In an optional implementation, an improved practical Byzantine fault tolerance algorithm is used for verification, and a consensus determination value is calculated based on the logic verification score of the reasoning path, the credibility score, and the historical verification performance; and determining the verification result according to the consensus determination value includes:

[0143] Construct multi-dimensional evaluation indicators, calculate the logic verification score of the reasoning path based on the integrity, rule compliance and semantic coherence of the reasoning path; calculate the credibility score based on the entity relationship credibility, attribute value credibility and timeliness score; calculate the historical verification performance based on the verification accuracy, judgment consistency level and response timeliness;

[0144] An improved practical Byzantine fault-tolerant algorithm is used for verification, and a dynamic weight adjustment mechanism is constructed based on the multi-dimensional evaluation indicators; the initial weight coefficients of the logic verification score, the credibility score and the historical verification performance are determined according to the type characteristics of the knowledge to be verified and the professional field characteristics of the verification node; the initial weight coefficients are dynamically adjusted according to the historical verification effect using an adaptive learning rate; the logic verification score, the credibility score and the historical verification performance are weighted with the corresponding dynamically adjusted weight coefficients to obtain a consensus judgment value;

[0145] Based on the consensus judgment value, three-level verification thresholds are set, including a fast pass threshold, a regular verification threshold and a strict review threshold; a verification node reputation scoring model is constructed, and the verification node reputation scoring model calculates the reputation score based on the node's historical verification performance; verification nodes are selected according to the reputation score; the diversity of the verification group is ensured based on the professional field distribution of the verification nodes; the verification task is divided into multiple independent subtasks according to the knowledge field; a parallel verification mechanism is used to process the independent subtasks simultaneously; a result merging strategy is designed based on the verification results of each subtask to generate a final verification result.

[0146] This method aims to provide a reliable knowledge verification mechanism to ensure the accuracy and credibility of knowledge through multi-dimensional evaluation and improved practical Byzantine fault-tolerant algorithm.

[0147] First, construct multi-dimensional evaluation indicators. Evaluate the completeness of the reasoning path to check whether the reasoning steps are complete and whether there are logical gaps or omissions. For example, suppose the reasoning path is "all mammals are warm-blooded animals, cats are mammals, so cats are warm-blooded animals." If the premise "cats are mammals" is missing, the completeness evaluation will mark it as incomplete. Evaluate the rule compliance of the reasoning path to check whether the reasoning process follows logical rules, for example, check whether the reasoning conforms to rules such as syllogism and inductive reasoning. For example, if the reasoning path is "all birds can fly, penguins are birds, so penguins can fly", the rule compliance evaluation will mark it as non-compliant with the rules because the reasoning ignores special cases. Evaluate the semantic coherence of the reasoning path to check whether there are semantic contradictions or ambiguities in the reasoning process. For example, if the reasoning path is "apples are red, the sun is red, so apples are the sun", the semantic coherence evaluation will mark it as semantically incoherent. Through the above three dimensions, calculate the logical verification score of the reasoning path.

[0148] At the same time, the credibility score is calculated based on the entity relationship credibility, attribute value credibility and timeliness score. For example, for the knowledge "Beijing is the capital of China", check whether the "capital" relationship between "Beijing" and "China" is credible, check whether the attribute value of "Beijing" as the capital is credible, and check the timeliness of the knowledge.

[0149] In addition, historical verification performance is calculated based on verification accuracy, judgment consistency, and response timeliness. For example, the accuracy of a verification node's past verification tasks is counted, the consistency of its judgment with other nodes is counted, and the average time it takes to complete a verification task is recorded.

[0150] Next, the improved practical Byzantine fault tolerance algorithm is used for verification. The initial weight coefficients of the logic verification score, credibility score and historical verification performance are determined according to the type characteristics of the knowledge to be verified and the professional field characteristics of the verification node. For example, for knowledge in the medical field, the initial weight coefficient of the credibility score may be higher. The adaptive learning rate is used to dynamically adjust the initial weight coefficient according to the historical verification effect. For example, if the historical verification accuracy of a verification node continues to decline, its weight coefficient is reduced. The logic verification score, credibility score and historical verification performance are weighted with the corresponding dynamically adjusted weight coefficients to obtain the consensus judgment value. For example, assuming that the logic verification score is 80, the credibility score is 90, and the historical verification performance is 70, the corresponding weight coefficients are 0.4, 0.5, and 0.1 respectively, then the consensus judgment value is 80 * 0.4 + 90 * 0.5 + 70 * 0.1 = 83.

[0151] Three levels of verification thresholds are set based on the consensus judgment value, including the fast pass threshold, the regular verification threshold, and the strict review threshold. For example, the fast pass threshold is set to 95, the regular verification threshold is set to 80, and the strict review threshold is set to 60. Construct a verification node reputation scoring model and calculate the reputation score based on the node's historical verification performance. Select verification nodes based on the reputation score. Ensure the diversity of the verification group based on the professional field distribution of the verification nodes. For example, for knowledge involving interdisciplinary subjects, experts from different fields are selected to form a verification group. Divide the verification task into multiple independent subtasks according to the knowledge field. Use a parallel verification mechanism to process independent subtasks simultaneously. For example, divide a verification task involving medical and computer science knowledge into two subtasks and verify them simultaneously. Design a result merging strategy based on the verification results of each subtask to generate the final verification result. For example, use a majority voting mechanism to determine the final verification result based on the verification results of each subtask.

[0152] The solution of this application can:

[0153] Improve the accuracy and efficiency of knowledge verification: Through multi-dimensional evaluation and dynamic weight adjustment mechanism, the reliability of knowledge can be more comprehensively evaluated, and the influence of verification nodes can be dynamically adjusted according to their performance, thereby improving the accuracy of verification results. The parallel verification mechanism can significantly improve verification efficiency. Enhance the robustness and anti-interference of knowledge verification: The improved practical Byzantine fault-tolerant algorithm can effectively resist the interference of malicious nodes and ensure the reliability of verification results. Even if some verification nodes fail or provide erroneous information, the system can still operate normally and output reliable verification results. Achieve scalability and flexibility of knowledge verification: This method supports setting different verification parameters according to different knowledge types and domain characteristics, and supports parallel processing of multiple verification tasks, which can adapt to knowledge verification needs in different scenarios.

[0154] Figure 2 FIG. 1 is a schematic diagram of the structure of a streaming query semantic graph adaptive enhancement system based on cognitive computing according to an embodiment of the present invention. Figure 2 As shown, the system comprises:

[0155] The first unit is used to extract grammatical features, semantic features, and execution features from a streaming query language code repository, performance logs, and an expert knowledge base to form an original feature set; map the original feature set to a quantum state feature representation based on a quantum encoder; enhance the quantum state feature representation using a dual-path cognitive processing system, wherein a fast path captures explicit associations between features through an attention network, and a deep path mines implicit patterns between features through a memory neural network; adaptively fuse the explicit associations output by the fast path with the implicit patterns output by the deep path to generate a cognitive feature tensor containing feature importance, association strength, and timing constraints, and establish a feature importance ranking table;

[0156] The second unit is used to construct an initial semantic knowledge graph based on the cognitive feature tensor and the feature importance ranking table, set nodes with feature importance higher than a preset feature threshold as core knowledge nodes; calculate the degree of association between the core knowledge nodes and other nodes based on the graph attention mechanism, and generate a node affinity matrix; use a community discovery algorithm to analyze the node affinity matrix to identify knowledge clusters with a correlation greater than a preset correlation threshold; build a hybrid reasoning engine, use the knowledge clusters as basic units to perform knowledge deduction, and predict potential semantic relationships in the completion graph; optimize and verify the predicted semantic relationships based on multi-agent reinforcement learning, and output an enhanced semantic graph with a hierarchical structure and a credibility score table;

[0157] The third unit is used to deploy the enhanced semantic graph and the credibility rating table to a distributed edge computing network, perform parallel semantic understanding based on the enhanced semantic graph; generate query optimization suggestions based on the deployed knowledge content, and screen the suggestions through credibility ratings; use federated learning to integrate optimization suggestions whose credibility is higher than a preset optimization threshold, and update the central cognitive model; and distribute the updated central cognitive model to the distributed edge computing network through knowledge distillation.

[0158] According to a third aspect of the embodiments of the present invention,

[0159] An electronic device is provided, comprising:

[0160] processor;

[0161] a memory for storing processor-executable instructions;

[0162] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0163] According to a fourth aspect of the embodiments of the present invention,

[0164] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0165] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adaptively enhancing the semantic graph of streaming queries based on cognitive computing, characterized in that: include: Extract grammatical features, semantic features, and execution features from the streaming query language code repository, performance logs, and expert knowledge base to form an original feature set; Based on a quantum encoder, the original feature set is mapped into a quantum state feature representation; a dual-path cognitive processing system is used to enhance the quantum state feature representation, wherein a fast path captures explicit associations between features through an attention network, and a deep path mines implicit patterns between features through a memory neural network; the explicit associations output by the fast path and the implicit patterns output by the deep path are adaptively fused to generate a cognitive feature tensor including feature importance, association strength, and timing constraints, and a feature importance ranking table is established; Constructing an initial semantic knowledge graph according to the cognitive feature tensor and the feature importance ranking table, and setting nodes whose feature importance is higher than a preset feature threshold as core knowledge nodes; Calculate the degree of association between the core knowledge node and other nodes based on the graph attention mechanism to generate a node affinity matrix; Using a community discovery algorithm to analyze the node affinity matrix to identify knowledge clusters whose correlation is greater than a preset correlation threshold; Construct a hybrid reasoning engine to perform knowledge deduction based on the knowledge clusters as basic units and predict the potential semantic relationships in the completion graph; Based on multi-agent reinforcement learning, the predicted semantic relationship is optimized and verified, and an enhanced semantic graph with a hierarchical structure and a credibility score table are output; Deploy the enhanced semantic graph and the credibility score table to a distributed edge computing network, and perform parallel semantic understanding based on the enhanced semantic graph; generate query optimization suggestions based on the deployed knowledge content, and screen the suggestions through credibility scores; Federated learning is used to integrate optimization suggestions whose credibility is higher than a preset optimization threshold to update the central cognitive model; the updated central cognitive model is distributed to the distributed edge computing network through knowledge distillation.

2. The method according to claim 1, characterized in that Constructing an initial semantic knowledge graph according to the cognitive feature tensor and the feature importance ranking table, and setting nodes whose feature importance is higher than a preset feature threshold as core knowledge nodes; The degree of association between the core knowledge node and other nodes is calculated based on the graph attention mechanism, and the node affinity matrix is ​​generated, including: The cognitive feature tensor represents the multi-dimensional correlation strength between feature nodes, and the feature importance ranking table records the importance scores of nodes; constructs an associated feature evaluation index system and calculates a preset feature threshold; selects core knowledge nodes from the feature importance ranking table according to the preset feature threshold; and constructs an initial semantic knowledge graph centered on the core knowledge node using the correlation strength information in the cognitive feature tensor; Based on the initial semantic knowledge graph, a structural feature extractor is used to analyze the topological structure of the graph to obtain local features of nodes, and a semantic feature extractor is used to analyze node attribute information to obtain semantic features; the local features are adaptively fused with the semantic features through a feature fusion module to form an enhanced feature representation of the node; For the enhanced feature representation, the node feature weights are calculated in turn through the self-attention layer, the interactive attention layer analyzes the influence relationship between nodes, and the global attention layer obtains the overall importance of the nodes; the outputs of the three-layer attention mechanism are feature aggregated to obtain the preliminary correlation strength between nodes; A multi-dimensional analysis is performed on the preliminary association strength, and multi-dimensional similarity calculation, path complexity analysis and time-series dependency modeling are performed in sequence to obtain the similarity degree, direct and indirect connection relationship and dynamic evolution characteristics of the nodes in the feature space respectively; the analysis results of the similarity degree, the direct and indirect connection relationship and the dynamic evolution characteristics are integrated to generate a node affinity matrix.

3. The method according to claim 1, characterized in that A community discovery algorithm is used to analyze the node affinity matrix to identify knowledge clusters whose correlation is greater than a preset correlation threshold; a hybrid reasoning engine is constructed to perform knowledge deduction based on the knowledge clusters as basic units to predict potential semantic relationships in the completion graph; Based on multi-agent reinforcement learning, the predicted semantic relationship is optimized and verified, and the output of the enhanced semantic graph with a hierarchical structure and the credibility score table include: The node affinity matrix records the semantic association strength between nodes in the knowledge graph; a multidimensional feature evaluation index system is established, and the structural similarity, content similarity and time domain similarity between nodes are extracted from the node affinity matrix based on the multidimensional feature evaluation index system; The structural similarity, the content similarity and the time domain similarity are input into an adaptive weight fusion module, and the adaptive weight fusion module calculates the comprehensive affinity coefficient between nodes; a node density distribution field is constructed based on the comprehensive affinity coefficient, and the node density distribution field models the local connection relationship of nodes through a density attenuation function; The node density distribution field is input into a density-aware community discovery module, and the density-aware community discovery module uses an improved modularity calculation method to iteratively optimize the community structure; an initial community division is obtained based on the optimization result of the improved modularity calculation method, and a node group whose association strength exceeds a preset association threshold in the initial community division is marked as a candidate knowledge cluster group; Perform multi-level filtering on the candidate knowledge clusters to obtain stable knowledge clusters; construct a hybrid reasoning engine based on the stable knowledge clusters, wherein the hybrid reasoning engine integrates a rule reasoning unit, a statistical reasoning unit, and a deep reasoning unit, wherein the rule reasoning unit performs symbolic reasoning based on an ontology rule base, the statistical reasoning unit calculates conditional probability distribution based on a probabilistic graph model, and the deep reasoning unit extracts implicit features using a graph neural network; Inputting the multi-source reasoning results output by the hybrid reasoning engine into an adaptive fusion network, the adaptive fusion network dynamically assigns fusion weights according to the prediction accuracy of different reasoning units; performing weighted combination on the multi-source reasoning results based on the fusion weights to obtain a completed latent semantic relationship; Constructing a multi-agent verification framework to evaluate the credibility of the potential semantic relationship, the multi-agent verification framework includes an evaluation agent, an optimization agent and a coordination agent, the evaluation agent generates a multi-dimensional score based on factual consistency, logical coherence and temporal rationality, the optimization agent adjusts the verification strategy according to the multi-dimensional score, and the coordination agent integrates the decision results of multiple agents; The output results of the multi-agent verification framework are input into a hierarchical storage module, and the hierarchical storage module stores them hierarchically in the core knowledge layer, the extended knowledge layer or the associated knowledge layer according to the credibility of the potential semantic relationship; at the same time, a credibility quantification table is generated, and the credibility quantification table records the score and uncertainty of each semantic relationship.

4. The method according to claim 3, characterized in that Inputting the node density distribution field into a density-aware community discovery module, wherein the density-aware community discovery module uses an improved modularity calculation method to iteratively optimize the community structure; Obtaining an initial community division based on the optimization result of the improved modularity calculation method, and marking a node group whose association strength exceeds a preset association threshold in the initial community division as a candidate knowledge cluster group includes: In the node density distribution field, the topological features and semantic features of the nodes are integrated; a dual density feature is calculated for each node, wherein the dual density feature includes: a local structure density calculated based on a nonlinear density decay function, and a semantic association density calculated based on a semantic similarity matrix; and the dual density features are combined to form a density feature vector of the node; The density feature vector is input into a density-aware community discovery module, the density-aware community discovery module adopts an improved hierarchical modularity calculation method; the improved hierarchical modularity calculation method introduces an adaptive density adjustment factor, the adaptive density adjustment factor calculates a density difference matrix based on the density feature vector of the node pair; the modularity gain between communities is dynamically adjusted using the density difference matrix; Based on the dynamically adjusted modularity gain, a hierarchical community optimization framework is constructed; in the hierarchical community optimization framework, density peak clustering is performed in a local neighborhood to obtain micro communities, and the micro communities are adaptively merged based on the dynamically adjusted modularity gain; when the modularity gain in the merging process is less than a dynamic threshold, an initial community division result is output; A multi-dimensional correlation analysis is performed on the initial community division results to construct a community correlation tensor; each dimension of the community correlation tensor respectively characterizes the structural correlation strength, semantic similarity and evolutionary correlation between communities; a comprehensive correlation score is calculated based on the community correlation tensor, and community combinations that are higher than a preset correlation threshold are marked as candidate knowledge clusters.

5. The method according to claim 1, characterized in that: Deploy the enhanced semantic graph and the credibility score table to a distributed edge computing network, and perform parallel semantic understanding based on the enhanced semantic graph; generate query optimization suggestions based on the deployed knowledge content, and screen the suggestions through credibility scores; Federated learning is used to integrate optimization suggestions with credibility higher than the preset optimization threshold, and the central cognitive model is updated to include: Divide the enhanced semantic graph into multiple sub-graphs, and divide the enhanced semantic graph based on edge weight factors; the edge weight factors are calculated by the original weight of the edge, the semantic similarity between nodes, and the intersection and union ratio of the node neighborhood set; deploy the sub-graphs and the credibility score table to the edge computing nodes in the distributed edge computing network; A graph attention network is deployed on the edge computing node for parallel semantic understanding, and the graph attention network extracts features of different types of semantic relationships through a multi-head attention mechanism; the graph attention network includes a relational attention layer, and the relational attention layer dynamically adjusts the attention weight based on the relationship type and extracts semantic features based on the sub-graph; A knowledge completion module and a relational reasoning module are constructed based on the semantic features; the knowledge completion module calculates the knowledge path score using a path reliability evaluation method; the relational reasoning module performs pattern matching in combination with a rule template; query optimization suggestions are generated based on the knowledge path score and the pattern matching result; the query optimization suggestions are screened based on the credibility score table, and query optimization suggestions that are higher than a preset optimization threshold are retained; A federated learning method is used to integrate the query optimization suggestions after screening; a differential privacy mechanism is introduced in the parameter aggregation process, and Gaussian noise is used to protect the model parameters from disturbances; the noise scale and sensitivity parameters are dynamically adjusted based on the validation set performance; and the integrated parameters are used to update the central cognitive model through a soft update mechanism.

6. The method according to claim 1, characterized in that The method further comprises: Distribute the updated central cognitive model to the distributed edge computing network through knowledge distillation; build a blockchain-based verification system to verify the optimization plan through consensus; write the verified optimization plan, reasoning path and credibility score into the blockchain account book, and feed back the verification result to the feature extraction network for updating the feature importance ranking table to realize the dynamic evolution of knowledge; Construct a teacher-student network architecture, where the teacher network is a central cognitive model and the student network is an edge node model; distribute the central cognitive model to the distributed edge computing network through knowledge distillation; the knowledge distillation method includes soft label migration, feature graph migration and relationship structure migration; the soft label migration calculates the output probability distribution difference between the teacher network and the student network based on the temperature parameter, the feature graph migration aligns the middle layer features of the two networks through the attention mapping function, and the relationship structure migration calculates the consistency loss of the relationship between instances based on the semantic relationship mapping function; update the parameters of the edge node model based on the weighted combination of the output probability distribution difference, the middle layer features and the consistency loss; Performing consensus verification on the optimization scheme generated by the edge node model; encapsulating the optimization scheme, the corresponding reasoning path and the credibility score as a blockchain transaction; using an improved practical Byzantine fault tolerance algorithm for verification, and calculating a consensus judgment value based on the logic verification score of the reasoning path, the credibility score and historical verification performance; and determining a verification result according to the consensus judgment value; Divide storage shards according to knowledge domains, and maintain independent Merkle trees for the storage shards; construct a global index table to record the knowledge association relationship between shards; write the verified optimization scheme, the reasoning path, and the credibility score into the blockchain account book of the corresponding knowledge domain; establish association records of cross-domain knowledge based on the global index table; and update the blockchain account book using an incremental storage strategy; Feeding the verification result back to the feature extraction network; calculating the feedback score of each feature based on the verification result; updating the feature importance by combining the basic importance of the feature and the feedback score; fusing the updated feature importance with the calculation result of the time decay function to generate a feature importance ranking table; Dynamically adjust feature weights according to changes in the feature importance ranking table; adaptively optimize the network structure of the central cognitive model based on the adjusted feature weights, including expanding the representation dimension of importance features and compressing the network layer of importance features; use the optimized network structure to update the central cognitive model; and redistribute the updated central cognitive model to the distributed edge computing network through the knowledge distillation method to form a closed loop of dynamic knowledge evolution.

7. The method according to claim 6, characterized in that An improved practical Byzantine fault-tolerant algorithm is used for verification, and a consensus determination value is calculated based on the logic verification score of the reasoning path, the credibility score, and the historical verification performance; Determining the verification result according to the consensus determination value includes: Construct multi-dimensional evaluation indicators, calculate the logic verification score of the reasoning path based on the integrity, rule compliance and semantic coherence of the reasoning path; calculate the credibility score based on the entity relationship credibility, attribute value credibility and timeliness score; calculate the historical verification performance based on the verification accuracy, judgment consistency level and response timeliness; An improved practical Byzantine fault-tolerant algorithm is used for verification, and a dynamic weight adjustment mechanism is constructed based on the multi-dimensional evaluation indicators; the initial weight coefficients of the logic verification score, the credibility score and the historical verification performance are determined according to the type characteristics of the knowledge to be verified and the professional field characteristics of the verification node; the initial weight coefficients are dynamically adjusted according to the historical verification effect using an adaptive learning rate; the logic verification score, the credibility score and the historical verification performance are weighted with the corresponding dynamically adjusted weight coefficients to obtain a consensus judgment value; Based on the consensus judgment value, three-level verification thresholds are set, including a fast pass threshold, a regular verification threshold and a strict review threshold; a verification node reputation scoring model is constructed, and the verification node reputation scoring model calculates the reputation score based on the node's historical verification performance; verification nodes are selected according to the reputation score; the diversity of the verification group is ensured based on the professional field distribution of the verification nodes; the verification task is divided into multiple independent subtasks according to the knowledge field; a parallel verification mechanism is used to process the independent subtasks simultaneously; a result merging strategy is designed based on the verification results of each subtask to generate a final verification result.

8. A stream query semantic graph adaptive enhancement system based on cognitive computing, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to extract grammatical features, semantic features, and execution features from the streaming query language code repository, performance logs, and expert knowledge base to form an original feature set; Based on a quantum encoder, the original feature set is mapped into a quantum state feature representation; a dual-path cognitive processing system is used to enhance the quantum state feature representation, wherein a fast path captures explicit associations between features through an attention network, and a deep path mines implicit patterns between features through a memory neural network; the explicit associations output by the fast path and the implicit patterns output by the deep path are adaptively fused to generate a cognitive feature tensor including feature importance, association strength, and timing constraints, and a feature importance ranking table is established; The second unit is used to construct an initial semantic knowledge graph according to the cognitive feature tensor and the feature importance ranking table, set nodes with feature importance higher than a preset feature threshold as core knowledge nodes; calculate the degree of association between the core knowledge nodes and other nodes based on the graph attention mechanism, and generate a node affinity matrix; Using a community discovery algorithm to analyze the node affinity matrix to identify knowledge clusters whose correlation is greater than a preset correlation threshold; Construct a hybrid reasoning engine to perform knowledge deduction based on the knowledge clusters as basic units and predict the potential semantic relationships in the completion graph; Based on multi-agent reinforcement learning, the predicted semantic relationship is optimized and verified, and an enhanced semantic graph with a hierarchical structure and a credibility score table are output; The third unit is used to deploy the enhanced semantic graph and the credibility score table to a distributed edge computing network, perform parallel semantic understanding based on the enhanced semantic graph; generate query optimization suggestions based on the deployed knowledge content, and screen the suggestions by credibility score; Federated learning is used to integrate optimization suggestions whose credibility is higher than a preset optimization threshold to update the central cognitive model; the updated central cognitive model is distributed to the distributed edge computing network through knowledge distillation.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Knowledge graph multi-hop question and answer method based on reinforcement learning path reasoning

    CN115640410A

  • Auxiliary quality inspection auditing method, device and system based on claim settlement knowledge

    CN117763455A