Construction of large model expert database based on knowledge graph
By constructing a large model expert database based on knowledge graphs, the problems of difficulty in multi-source data fusion, insufficient cross-modal knowledge association, and lagging knowledge updates in traditional databases are solved. This enables real-time monitoring and updating of multi-source data, efficient association and retrieval of cross-modal data, and supports intelligent decision-making and secure and reliable computing for complex problems.
Patent Information
- Application Number
- CN202511442198.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Traditional databases face challenges such as difficulty in integrating multi-source data, insufficient cross-modal knowledge association, lagging knowledge updates, and difficulty in handling complex logical reasoning.
Based on the construction of a large model expert database based on knowledge graphs, the hash values of data blocks are compared using a hash fingerprint algorithm to mark potential update points. Data updates are comprehensively determined by combining metadata information, a fusion network is constructed and compressed into semantic vectors, a multi-layer knowledge network is established, cloud models are used to handle fuzzy relationships, and Monte Carlo tree search algorithm and counterfactual reasoning are combined to generate hypothetical scenarios, thereby achieving real-time knowledge updates and efficient retrieval.
It enables real-time monitoring and updating of multi-source data, efficient association and retrieval of cross-modal data, generates reliable inference results according to user needs, supports intelligent decision-making for complex problems, and performs efficient calculations while ensuring data privacy and security.
Smart Images

Figure CN121212291A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to the construction of a large model expert database based on knowledge graphs. Background Technology
[0002] In an era of profound digital and intelligent development, the scale of data generated across various industries has expanded dramatically, encompassing multimodal information such as text, images, and audio. This heterogeneous data, like scattered pearls, contains immense knowledge value. However, traditional data storage and processing methods, such as relational databases, struggle to effectively handle complex semantic relationships and unstructured data, resulting in low efficiency in knowledge mining and severe information silos. Knowledge graphs, as a type of semantic network, can describe entities and their relationships in a structured way, transforming discrete data into a computable and reasonable knowledge network, exhibiting unique advantages in knowledge representation and reasoning. Large models, especially large-scale pre-trained language models, excel in tasks such as text generation and question answering due to their powerful natural language processing capabilities. Combining knowledge graphs with large models to build expert databases has become a key path to achieving efficient knowledge utilization and assisting intelligent decision-making. However, in practical applications, knowledge graphs face challenges such as difficulty in integrating multi-source data, insufficient cross-modal knowledge associations, and lagging knowledge updates; large models, on the other hand, suffer from problems such as poor accuracy of professional domain knowledge, lack of interpretability, and difficulty in handling complex logical reasoning.
[0003] Therefore, it is necessary to design a large-scale model expert database based on knowledge graphs to solve the problems of difficulty in multi-source data fusion, insufficient cross-modal knowledge association, lagging knowledge updates, and difficulty in handling complex logical reasoning in traditional databases. Summary of the Invention
[0004] In view of this, the present invention proposes a method for constructing a large model expert database based on knowledge graphs, which aims to solve the problems of difficulty in multi-source data fusion, insufficient cross-modal knowledge association, lagging knowledge updates, and difficulty in handling complex logical reasoning in traditional databases.
[0005] This invention proposes a method for constructing a large-scale expert database based on knowledge graphs, including: Real-time data from a multi-source data platform is acquired. The multi-source data includes images, videos, text, pictures, and audio. The multi-source data platform is connected to a literature database and an unstructured data platform. The hash values of data blocks are compared using a hash fingerprint algorithm, and potential update points are marked. The semantic similarity of subsequences of unstructured text is calculated, update regions are marked, and data updates are determined by combining metadata information and stored in a message queue. Feature extraction is performed on multi-source data to construct a fusion network fusion modal feature, and the fusion network fusion modal feature is compressed into a semantic vector; The expert database comprises a basic fact layer and a reasoning rule layer. The basic fact layer uses semantic vectors as nodes in the knowledge graph to calculate the cosine similarity between nodes. When the similarity exceeds a pre-set threshold, an undirected edge is established between the corresponding nodes. The reasoning rule layer uses a cloud model to define fuzzy relation nodes and establishes directed fuzzy relation edges between fuzzy relation nodes and basic fact nodes. The edge label indicates the type of fuzzy relation. Timestamp information is embedded in the attributes of nodes and edges. Directed temporal edges are established between nodes with causal or evolutionary relationships according to chronological order. An attribute graph database is used to store and construct the knowledge graph, and each node and edge is assigned corresponding attributes. The system receives user requests, transforms them into graph traversal task statements that the graph database can understand, determines the types of nodes to be queried, edge relationships, and the inference target, extracts rules relevant to the current task as constraints for graph traversal, generates candidate paths using algorithms, generates hypothetical scenarios through counterfactual reasoning, verifies the inference, and returns the results. The target domain knowledge graph is preprocessed to extract structural feature vectors, which are then aligned with the initial target domain graph. The structural features of the source domain are transferred to the target domain, and the transferred features are applied to the target domain knowledge graph. Based on the relationships between features, new nodes and edges are added to the target domain knowledge graph to expand its scale and scope. Combined with new target domain data obtained from multi-source data platforms, the target domain knowledge graph is updated in real time to complete the construction of the expert database.
[0006] Furthermore, after applying the transferred features to the target domain knowledge graph, the following steps are taken: based on new target domain data obtained from a multi-source data platform, the cosine similarity between nodes in the target domain knowledge graph is recalculated. A first similarity change threshold S1 and a second similarity change threshold S2 are preset, and S1 < S2; Calculate the change in cosine similarity between nodes, ΔS, after the introduction of new data; When △S≥S2, it is determined that the relationship between nodes has changed significantly, triggering a comprehensive update process of the knowledge graph, reconstructing the associated edges and updating the edge weights; When S1≤△S<S2, it is determined that there is a slight change in the relationship between nodes, and only the associated edges of the relevant nodes are locally adjusted. When △S<S1, the relationship between nodes is basically stable, and the existing knowledge graph structure is maintained. After the knowledge graph of the target domain is updated in real time, a knowledge retrieval index is built based on the updated knowledge graph; Pre-set the index update frequency threshold F0, and count the number of updates N of nodes and edges in the knowledge graph; When N≥F0, the knowledge retrieval index is immediately regenerated; When N < F0, the index is updated according to the preset periodic time interval T1.
[0007] Furthermore, the process of triggering a comprehensive update of the knowledge graph includes: pre-setting a node connectivity threshold D1 and an information entropy threshold E1, and calculating the connectivity ΔD and information entropy ΔE of each node in the knowledge graph; When a node's ΔD < D1 and ΔE < E1, the node is determined to be a redundant node, and the node and its associated edges are deleted from the knowledge graph. Recalculate the cosine similarity between the remaining nodes and pre-set a new edge establishment threshold S3; if the similarity between nodes is ≥ S3, then establish undirected associated edges and assign edge weights according to the similarity magnitude. For the inference rule layer, the confidence level of fuzzy relation nodes is re-evaluated, and a confidence threshold C1 is pre-set; When the confidence of a fuzzy relation node is less than C1, the node is redefined using the cloud model, and the directed fuzzy association edge with the basic fact node is updated. When the confidence level of a fuzzy relation node is greater than or equal to C1, it means that the fuzzy relation represented by the fuzzy relation node meets the credibility requirements of knowledge graph reasoning and application under the current evaluation system.
[0008] Furthermore, the local adjustment of the associated edges of the relevant nodes includes: pre-setting an edge weight fluctuation threshold W1; and calculating the change in associated edge weight ΔW. When △W≥W1, the weight adjustment formula is preset: new weight = original weight × (1+k×△W), where k is the weight adjustment coefficient; If the adjusted edge weight is less than the preset minimum weight Wmin, then delete the associated edges of the relevant nodes; If the newly emerging similarity between nodes is greater than or equal to the pre-set temporary threshold S4, then a temporary associated edge is established and marked, and will be re-evaluated in the next round of updates.
[0009] Furthermore, the establishment of the knowledge retrieval index includes: pre-setting text index type T1, image index type T2, and audio index type T3; Based on the node data type, if it is text data, a T1 type index is used to extract keywords and establish a keyword-node ID mapping table; If the data is image data, a T2 type index is used, and the image feature vector is hashed to establish a hash value-node ID mapping. If the data is audio, a T3 type index is used, which is based on Mel spectrum characteristics. Preset an index capacity threshold C1. When the space occupied by the index ≥ 80% of C1, perform index compression and merge duplicate index entries.
[0010] Further, the method of comparing the hash values of data blocks using the hash fingerprint algorithm and marking potential update points includes: Preset a first hash difference threshold H1 and a second hash difference threshold H2, and H1 < H2; calculate the hash value difference degree ΔH of the data block; When ΔH ≥ H2, mark the corresponding data block as a high-priority potential update point; When H1 ≤ ΔH < H2, mark the corresponding data block as a low-priority potential update point; Further, the method of calculating the subsequence semantic similarity of unstructured text and marking the update area includes: Preset a semantic similarity threshold B0; divide the unstructured text into subsequences of a fixed length, and calculate the semantic similarity ΔB of adjacent subsequences; When ΔB < B0, mark the corresponding subsequence area as the update area; When ΔB ≥ B0, determine that there is no update in the corresponding subsequence area and do not perform marking.
[0011] Further, the comprehensive determination of data update by combining metadata information includes: obtaining metadata, where the metadata includes the update timestamp and file size change of the data; presetting a timestamp difference threshold T0 and a file size change threshold F0; Calculate the timestamp difference ΔT and file size difference ΔF between the current metadata and the historical metadata; When ΔT ≥ T0 and ΔF ≥ F0, combine the potential update point and update area markings to determine that the data has been updated; When ΔT < T0 and ΔF < F0, determine that the data has not been updated.
[0012] Further, when generating a hypothetical scenario through counterfactual reasoning, verifying the deduction, and then returning the result, it includes: Select key nodes or edges from the candidate paths, modify their attributes to generate a hypothetical scenario; Use the relationships of other nodes and edges in the knowledge graph to verify the consistency of the hypothetical scenario and check whether the hypothetical scenario conflicts with the existing knowledge; Deduce the consequences of the hypothetical scenario to obtain the result of counterfactual reasoning, and organize and format the reasoning paths and counterfactual reasoning results that meet the rule constraints and have been verified and return them to the user.
[0013] Furthermore, when inferring the consequences of the hypothetical scenario, the process includes: inputting the hypothetical scenario into a preset inference model through a rule engine in a knowledge graph, and performing multi-hop inference along the candidate path; Based on the attributes of nodes and the weights of edges in the knowledge graph, the degree of influence of the hypothetical scenario on each associated node is calculated, and the influence propagation path is generated. If fuzzy relation nodes are involved in the deduction process, the uncertainty of the deduction results can be quantified using the digital features of the cloud model to obtain counterfactual reasoning results containing probability distributions.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Employing a hash fingerprint algorithm, semantic similarity calculation, and metadata verification, this system monitors and updates multi-source data (text, images, audio, etc.) in real time, accurately identifying potential knowledge update points and regions. This avoids the resource waste of full-scale comparisons and ensures that the expert database always reflects the latest information. Simultaneously, the model extracts and fuses features from multimodal data, compressing them into a unified semantic vector. This breaks down modal differences and enables efficient cross-modal data association and retrieval.
[0015] 2. A multi-layered knowledge network is constructed. The basic fact layer establishes connections between nodes based on cosine similarity, the reasoning rule layer uses a cloud model to handle fuzzy relationships, and time-series edges embed timestamps to record the knowledge evolution process, thus completely and accurately expressing various knowledge relationships. Based on this, combined with the Monte Carlo tree search algorithm and counterfactual reasoning, it can efficiently generate reasoning paths and simulate hypothetical scenarios within the knowledge network according to user needs, providing reliable reasoning results for complex problems.
[0016] 3. By extracting structural features from the source domain knowledge graph and transferring them to the target domain, adversarial training enables rapid adaptation, allowing the construction of the target domain expert database without requiring a large amount of labeled data. Simultaneously, fully homomorphic encryption and Bloom filters are used to encrypt the index for sensitive data, achieving efficient retrieval and computation in encrypted form while ensuring data privacy and security, thus ensuring the expert database operates in a secure and reliable environment. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 The first flowchart for constructing a large model expert database based on knowledge graphs is provided in the embodiments of the present invention.
[0018] Figure 2The second flowchart for constructing a large model expert database based on knowledge graphs is provided in the embodiments of the present invention. Detailed Implementation
[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] See Figure 1 and Figure 2 As shown, this embodiment of the invention proposes a method for constructing a large-scale expert database based on knowledge graphs, including the following steps: Step S100: Obtain real-time data from a multi-source data platform. The multi-source data includes images, videos, text, pictures, and audio. The multi-source data platform is connected to a literature database and an unstructured data platform. The hash values of data blocks are compared using a hash fingerprint algorithm, and potential update points are marked. The semantic similarity of subsequences is calculated for unstructured text, update regions are marked, and data updates are determined by combining metadata information and stored in a message queue. Step S200: Extract features from multi-source data, construct fusion modal features of the fusion network, and compress the fusion modal features of the fusion network into semantic vectors; Step S300: The expert database includes a basic fact layer and a reasoning rule layer. The basic fact layer uses semantic vectors as nodes of the knowledge graph to calculate the cosine similarity between nodes. When the similarity exceeds a pre-set threshold, an undirected association edge is established between the corresponding nodes. The reasoning rule layer uses a cloud model to define fuzzy relation nodes and establishes directed fuzzy association edges between fuzzy relation nodes and basic fact nodes. The edge label indicates the type of fuzzy relation. Timestamp information is embedded in the attributes of nodes and edges. Directed temporal edges are established between nodes with causal or evolutionary relationships according to the chronological order. The knowledge graph is stored and constructed using an attribute graph database, and each node and edge is assigned corresponding attributes. Step S400: Receive user requirements, transform the requirements into graph traversal task statements that the graph database can understand, determine the types of nodes to be queried, edge relationships, and the inference target, extract the rules related to the current task as constraints for graph traversal, generate candidate paths using algorithms, generate hypothetical scenarios through counterfactual reasoning, verify the inference, and return the results. Step S500: Preprocess the target domain knowledge graph, extract structural feature vectors, align with the initial target domain graph, transfer source domain structural features to the target domain, apply the transferred features to the target domain knowledge graph, add new nodes and edges to the target domain knowledge graph based on the relationships between features, expand the scale and scope of the knowledge graph, and update the target domain knowledge graph in real time by combining new target domain data obtained from multi-source data platforms, thus completing the construction of the expert database.
[0021] This embodiment employs a hash fingerprint algorithm, semantic similarity calculation, and metadata verification to monitor and update multi-source data such as text, images, and audio in real time. This accurately identifies potential knowledge update points and regions, avoiding the resource waste of full-scale comparisons and ensuring the expert database always reflects the latest information. Simultaneously, a model extracts and fuses features from multimodal data, compressing it into a unified semantic vector to overcome modal differences and achieve efficient cross-modal data association and retrieval. A multi-layered knowledge network is constructed: the basic fact layer establishes connections between nodes based on cosine similarity; the reasoning rule layer uses a cloud model to handle fuzzy relationships; and time-series edges embed timestamps to record the knowledge evolution process, comprehensively and accurately expressing various knowledge relationships. Building upon this, the Monte Carlo tree search algorithm and counterfactual reasoning are combined to efficiently generate reasoning paths and simulate hypothetical scenarios within the knowledge network according to user needs, providing reliable reasoning results for complex problems. By extracting structural features from the source domain knowledge graph and transferring them to the target domain, combined with adversarial training, rapid adaptation is achieved, enabling the construction of the target domain expert database without requiring a large amount of labeled data. Meanwhile, for sensitive data, fully homomorphic encryption technology and Bloom filter encryption index are used to achieve efficient retrieval and calculation in encrypted state while ensuring data privacy and security, and to ensure that the expert database operates in a safe and reliable environment.
[0022] Specifically, after applying the transferred features to the target domain knowledge graph, the following steps are taken: based on new target domain data obtained from a multi-source data platform, the cosine similarity between nodes in the target domain knowledge graph is recalculated. A first similarity change threshold S1 and a second similarity change threshold S2 are preset, and S1 < S2; Calculate the change in cosine similarity between nodes, ΔS, after the introduction of new data; When △S≥S2, it is determined that the relationship between nodes has changed significantly, triggering a comprehensive update process of the knowledge graph, reconstructing the associated edges and updating the edge weights; When S1≤△S<S2, it is determined that there is a slight change in the relationship between nodes, and only the associated edges of the relevant nodes are locally adjusted. When △S<S1, the relationship between nodes is basically stable, and the existing knowledge graph structure is maintained. After the knowledge graph of the target domain is updated in real time, a knowledge retrieval index is built based on the updated knowledge graph; Pre-set the index update frequency threshold F0, and count the number of updates N of nodes and edges in the knowledge graph; When N≥F0, the knowledge retrieval index is immediately regenerated; When N < F0, the index is updated according to the preset periodic time interval T1.
[0023] Specifically, the process of triggering a comprehensive update of the knowledge graph includes: pre-setting the node connectivity threshold D1 and the information entropy threshold E1, and calculating the connectivity ΔD and information entropy ΔE of each node in the knowledge graph. When a node's ΔD < D1 and ΔE < E1, the node is determined to be a redundant node, and the node and its associated edges are deleted from the knowledge graph. Recalculate the cosine similarity between the remaining nodes and pre-set a new edge establishment threshold S3; if the similarity between nodes is ≥ S3, then establish undirected associated edges and assign edge weights according to the similarity magnitude. For the inference rule layer, the confidence level of fuzzy relation nodes is re-evaluated, and a confidence threshold C1 is pre-set; When the confidence of a fuzzy relation node is less than C1, the node is redefined using the cloud model, and the directed fuzzy association edge with the basic fact node is updated. When the confidence level of a fuzzy relation node is greater than or equal to C1, it means that the fuzzy relation represented by the fuzzy relation node meets the credibility requirements of knowledge graph reasoning and application under the current evaluation system.
[0024] Specifically, local adjustments are made to the associated edges of relevant nodes, including: pre-setting an edge weight fluctuation threshold W1; and calculating the change in associated edge weight ΔW. When △W≥W1, the weight adjustment formula is preset: new weight = original weight × (1+k×△W), where k is the weight adjustment coefficient; If the adjusted edge weight is less than the preset minimum weight Wmin, then delete the associated edges of the relevant nodes; If the newly emerging similarity between nodes is greater than or equal to the pre-set temporary threshold S4, then a temporary associated edge is established and marked, and will be re-evaluated in the next round of updates.
[0025] Specifically, the knowledge retrieval index is established, including: pre-setting text index type T1, image index type T2, and audio index type T3; Based on the node data type, if it is text data, a T1 type index is used to extract keywords and establish a keyword-node ID mapping table; If the data is image data, a T2 type index is used, and the image feature vector is hashed to establish a hash value-node ID mapping. If the data is audio, a T3 type index is used, which is based on Mel spectrum characteristics. A pre-set index capacity threshold C1 is used. When the index occupies ≥ C1 × 80% of the space, index compression is performed and duplicate index entries are merged.
[0026] Specifically, a pre-defined task parsing rule base is used to parse keywords and semantic logic in user requests. For query-type requests, node types and attribute constraints are extracted from the rule base, and the corresponding nodes are located in the knowledge graph. For reasoning-type requests, the request is transformed into a graph traversal statement containing node types, edge relationship types, and reasoning objectives, based on the reasoning rules in the rule base. For counterfactual reasoning requests, rules are generated based on hypothetical scenarios in the rule base to determine the key nodes or edges that need to be modified, and these are transformed into modification and deduction instructions executable by the graph database. Simultaneously, a semantic matching threshold is pre-defined; when the semantic matching degree between the user request and the rule base is lower than this threshold, a manual-assisted parsing process is triggered.
[0027] Specifically, the Monte Carlo tree search algorithm is used to traverse the knowledge graph, with the current node as the root node, and the search tree is expanded according to the constraints in the graph traversal task statement. The maximum depth and maximum number of expanded nodes of the search tree are preset, and expansion stops when the depth limit or the number of nodes limit is reached. The expanded nodes are scored by an evaluation function that comprehensively considers factors such as the weight of the associated edges of the node, the importance of the node, and the path length. Multiple candidate paths are selected according to the scores. If the number of candidate paths is less than the preset minimum value, the parameters of the evaluation function are adjusted and the search is restarted.
[0028] Specifically, a new data monitoring queue is established to receive new data from the target domain in real time from multi-source data platforms; after converting the new data into semantic vectors, the semantic distance between the new data and existing nodes in the knowledge graph is calculated; when the semantic distance is lower than a pre-set threshold for adding new nodes, a new node is created and edges are established with existing nodes based on semantic associations; when the semantic distance is higher than the threshold but there are partial semantic associations, the attributes of the relevant nodes and the weights of the associated edges are updated; after the update is completed, a consistency check is performed on the knowledge graph, and if logical conflicts or data contradictions are found, the conflict resolution process is automatically triggered for correction.
[0029] The above embodiments can accurately identify changes in the relationships of nodes in the knowledge graph through a multi-threshold dynamic update mechanism. When the similarity change amount ΔS ≥ S2, a full update is triggered, redundant nodes are deleted, associated edges are rebuilt, and fuzzy relationships are optimized to ensure the accuracy of the knowledge network structure; when ΔS < S1, stability is maintained to balance the update cost and efficiency; at the same time, the index update strategy is dynamically adjusted according to the number of updated nodes and edges N and the threshold F0 to avoid resource waste. An adaptive index scheme is adopted for different types of data, combined with an index compression mechanism, to achieve efficient storage and fast retrieval. The intelligent update and index optimization system thus formed not only ensures the timeliness and structural rationality of the knowledge graph, but also improves the data retrieval efficiency, provides reliable support for the knowledge management and application of the expert database, and effectively solves problems such as the lag in updating and low efficiency in retrieval of traditional knowledge graphs.
[0030] Specifically, the hash values of data blocks are compared using the hash fingerprint algorithm, and potential update points are marked, including: A first hash difference threshold H1 and a second hash difference threshold H2 are preset in advance, and H1 < H2; the hash value difference degree ΔH of the data block is calculated; When ΔH ≥ H2, the corresponding data block is marked as a high-priority potential update point; When H1 ≤ ΔH < H2, the corresponding data block is marked as a low-priority potential update point; Specifically, the subsequence semantic similarity of unstructured text is calculated, and the update area is marked, including: A semantic similarity threshold B0 is preset in advance; the unstructured text is divided into subsequences of a fixed length, and the semantic similarity ΔB of adjacent subsequences is calculated; When ΔB < B0, the corresponding subsequence area is marked as the update area; When ΔB ≥ B0, it is determined that there is no update in the corresponding subsequence area, and no marking is performed.
[0031] Specifically, the data update is comprehensively determined in combination with metadata information, including: obtaining metadata, where the metadata includes the update timestamp and file size change of the data; a timestamp difference threshold T0 and a file size change threshold F0 are preset in advance; The timestamp difference ΔT and file size difference ΔF between the current metadata and the historical metadata are calculated; When ΔT ≥ T0 and ΔF ≥ F0, in combination with the marking of potential update points and update areas, it is determined that the data has been updated; When ΔT < T0 and ΔF < F0, it is determined that the data has not been updated.
[0032] Specifically, message queue priority rules are pre-defined. If a data block is marked as a high-priority potential update point, it is inserted at the head of the message queue to ensure priority processing; if it is a low-priority potential update point, it is inserted at the tail of the queue. Simultaneously, a timestamp is added to each piece of data stored in the queue. When the queue length exceeds a preset capacity threshold Q0, the earliest-enqueued data with the lowest priority is automatically deleted to ensure efficient message queue operation. Furthermore, integrity checks are performed on the data stored in the queue. If the check fails, the corresponding data is retrieved again and marked as abnormal, triggering a manual review process.
[0033] Specifically, for text data, after extracting Transformer-encoded word vectors, a word vector redundancy threshold D0 is pre-set. If the proportion of repeated features in the word vectors exceeds D0, Principal Component Analysis (PCA) is used for dimensionality reduction. For image data, after extracting features through a convolutional neural network, a non-maximum suppression algorithm is used to filter redundant feature boxes, retaining features with confidence levels higher than the threshold C0. For audio data, after Mel-spectrum transformation, if the feature sequence length exceeds a preset duration threshold L0, a sliding window is used for truncation or zero-padding to ensure uniform feature dimensions and provide standardized input for subsequent modality fusion.
[0034] Specifically, a dynamic weight allocation strategy is adopted, with a pre-set attention weight fluctuation threshold W0, and the attention weights of each modality feature are monitored in real time. When the weight fluctuation of a certain modality exceeds W0, the weight allocation parameters in the multi-head attention mechanism are automatically adjusted to enhance the fusion ratio of key modalities. Simultaneously, a residual connection structure is introduced to avoid the gradient vanishing problem. If the Euclidean distance between the fused feature vector and the original input feature exceeds the threshold E0, residual path correction is triggered to ensure effective transmission of feature information. Furthermore, before compression into semantic vectors, the authenticity of the fused features is judged by an adversarial training discriminator. If the discriminant accuracy is lower than the threshold A0, the parameters of the fusion network are readjusted.
[0035] Specifically, after calculating the cosine similarity between nodes, a pre-set edge weight decay coefficient α is used to assign initial weights to newly established undirected related edges. Simultaneously, the weights of all edges are periodically scanned. If an edge is not visited within a preset time period T, its weight is decayed according to the formula "current weight = current weight × (1-α)". When the edge weight falls below the threshold Wmin, the edge is automatically deleted. Furthermore, a Locality Sensitive Hash (LSH) algorithm is introduced to cluster high-dimensional semantic vectors, calculating only the similarity between neighboring nodes after clustering, significantly reducing computational load. If the clustering error exceeds the threshold ε, the hash function parameters are readjusted.
[0036] Specifically, after reassessing the confidence of fuzzy relation nodes, if the node confidence is lower than the threshold C1, it needs to be redefined, and the cloud model parameters (expectation, entropy, hyperentropy) are optimized using a genetic algorithm. An upper limit of the number of iterations N0 and a fitness threshold F1 are set. If F1 is not reached within N0 iterations, the parameters are fine-tuned using human expert knowledge. When updating directed fuzzy relation edges, the logical consistency between the edge labels and the basic fact nodes is checked. If contradictions exist (such as a conflict between "may belong to" relations and "does not belong to" facts), a conflict resolution process is automatically triggered, correcting the edge labels or node attributes according to preset rules (such as prioritizing high-confidence relations).
[0037] The above embodiments achieve accurate identification and efficient processing of data updates through multi-dimensional threshold settings and collaborative decision-making. Potential update points are hierarchically marked using dual-hash difference thresholds (H1, H2), and unstructured text update regions are accurately located using a semantic similarity threshold (B0). Simultaneously, metadata information such as timestamp differences (ΔT) and file size differences (ΔF) is integrated for comprehensive judgment, avoiding misjudgment based on a single indicator and significantly improving the accuracy and reliability of data update detection. In the data processing stage, strategies such as message queue priority management, multimodal feature standardization extraction, dynamic weight fusion, and intelligent edge relationship maintenance ensure rapid response and orderly processing of updated data. This reduces resource consumption caused by invalid data processing and promptly captures key data changes, providing a solid data foundation for the dynamic updating of the knowledge graph and the continuous optimization of the expert database.
[0038] Specifically, when generating hypothetical scenarios through counterfactual reasoning and verifying the deductions before returning the results, this includes: Select key nodes or edges from candidate paths, modify their attributes, and generate hypothetical scenarios; By utilizing other nodes and edge relationships in the knowledge graph, consistency verification of the hypothetical scenario is performed to check whether the hypothetical scenario conflicts with existing knowledge. The consequences of hypothetical scenarios are extrapolated to obtain counterfactual reasoning results. The reasoning paths and counterfactual reasoning results that conform to the rules and have been verified are organized, formatted, and returned to the user.
[0039] Specifically, when extrapolating the consequences of hypothetical scenarios, the process includes: inputting the hypothetical scenario into a preset extrapolation model through a rule engine in a knowledge graph, and performing multi-hop reasoning along candidate paths; Based on the attributes of nodes and the weights of edges in the knowledge graph, calculate the degree of influence of the hypothetical scenario on each associated node, and generate the influence propagation path; If fuzzy relation nodes are involved in the deduction process, the uncertainty of the deduction results can be quantified using the digital features of the cloud model to obtain counterfactual reasoning results containing probability distributions.
[0040] Specifically, a node importance assessment model is pre-defined, calculating node weights by combining parameters such as node connectivity, query frequency, and information entropy, and selecting the top N nodes by weight as key nodes. For edges, key edges whose influence on the reasoning result exceeds a threshold are selected based on the edge's weight, the importance of associated nodes, and its frequency of occurrence in the reasoning path. Simultaneously, a gradient boosting decision tree (GBDT) model is introduced, training a key node / edge recognizer based on labeled historical counterfactual reasoning scenario data. When the recognition accuracy falls below a preset value, the model is automatically triggered for iterative optimization.
[0041] Specifically, a contradiction detection rule base is constructed, covering logical contradiction types such as attribute conflicts (e.g., "temperature > 100℃" and "matter is solid") and relational conflicts (e.g., "A is a subset of B" and "A and B have no intersection"). Hypothetical scenarios are input into the rule base, and the relevant nodes and edges are traversed using the Cypher query language of the graph database to check for rule violations. If a contradiction is found, a conflict report is generated and the conflict location is marked. Based on the severity of the conflict (fatal / non-fatal), a decision is made whether to terminate the deduction or resolve the contradiction (e.g., modifying assumptions or adjusting node attributes).
[0042] The above embodiments achieve efficient deduction and reliable verification of hypothetical scenarios through precise key node selection, multi-dimensional consistency verification, intelligent multi-hop reasoning, and uncertainty quantification. Key nodes / edges are identified based on node importance assessment and historical scenario training, ensuring the targeted nature of hypothetical scenario construction. The combination of a contradiction detection rule base and graph database traversal effectively avoids logical conflicts and ensures the reliability of reasoning premises. Forward and reverse chain reasoning and attention mechanisms improve multi-hop reasoning efficiency and influence propagation models quantify the transmission effect of hypothetical scenarios on the knowledge network. Cloud model digital features quantify the uncertainty of fuzzy relationships, transforming abstract fuzzy conclusions into concrete numerical representations containing probability distributions. This ensures that counterfactual reasoning results not only conform to the logical constraints of the knowledge graph but also accurately reflect the uncertainty of real-world scenarios, providing logically sound and practical deep reasoning support for scientific research prediction, business decision-making, and other scenarios, significantly enhancing the application value of expert databases in solving complex problems.
[0043] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0044] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0045] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0046] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0047] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for constructing a large-scale expert database based on knowledge graphs, characterized in that, include: Real-time data from a multi-source data platform is acquired. The multi-source data includes images, videos, text, pictures, and audio. The multi-source data platform is connected to a literature database and an unstructured data platform. The hash values of data blocks are compared using a hash fingerprint algorithm, and potential update points are marked. The semantic similarity of subsequences of unstructured text is calculated, update regions are marked, and data updates are determined by combining metadata information and stored in a message queue. Feature extraction is performed on multi-source data to construct a fusion network fusion modal feature, and the fusion network fusion modal feature is compressed into a semantic vector; The expert database comprises a basic fact layer and a reasoning rule layer. The basic fact layer uses semantic vectors as nodes in the knowledge graph to calculate the cosine similarity between nodes. When the similarity exceeds a pre-set threshold, an undirected edge is established between the corresponding nodes. The reasoning rule layer uses a cloud model to define fuzzy relation nodes and establishes directed fuzzy relation edges between fuzzy relation nodes and basic fact nodes. Timestamp information is embedded in the attributes of nodes and edges. Directed temporal edges are established between nodes with causal or evolutionary relationships according to chronological order. The knowledge graph is constructed using an attribute graph database, and each node and edge is assigned corresponding attributes. Receive user requests, transform them into graph traversal task statements that the graph database can understand, determine the types of nodes to be queried, edge relationships, and inference targets, and extract the rules related to the current task as constraints for graph traversal. The algorithm generates candidate paths, generates hypothetical scenarios through counterfactual reasoning, verifies the deductions, and then returns the results. Preprocess the target domain knowledge graph, extract structural feature vectors, and align them. The initial target domain knowledge graph is generated by transferring structural features from the source domain to the target domain. The transferred features are then applied to the target domain knowledge graph. Based on the relationships between features, new nodes and edges are added to the target domain knowledge graph to expand its scale and scope. Combined with new target domain data obtained from multi-source data platforms, the target domain knowledge graph is updated in real time to complete the construction of the expert database.
2. The construction of a large-scale expert database based on knowledge graphs according to claim 1, characterized in that, After applying the transferred features to the target domain knowledge graph, the following is included: Based on new data in the target domain obtained from multi-source data platforms, the cosine similarity between nodes in the target domain knowledge graph is recalculated. A first similarity change threshold S1 and a second similarity change threshold S2 are preset, and S1 < S2; Calculate the change in cosine similarity between nodes, ΔS, after the introduction of new data; When △S≥S2, it is determined that the relationship between nodes has changed significantly, triggering a comprehensive update process of the knowledge graph, reconstructing the associated edges and updating the edge weights; When S1≤△S<S2, it is determined that there is a slight change in the relationship between nodes, and only the associated edges of the relevant nodes are locally adjusted. When △S<S1, the relationship between nodes is basically stable, and the existing knowledge graph structure is maintained. After the knowledge graph of the target domain is updated in real time, a knowledge retrieval index is built based on the updated knowledge graph; Pre-set the index update frequency threshold F0, and count the number of updates N of nodes and edges in the knowledge graph; When N≥F0, the knowledge retrieval index is immediately regenerated; When N < F0, the index is updated according to the preset periodic time interval T1.
3. The construction of a large-scale expert database based on knowledge graphs according to claim 2, characterized in that, The process for triggering a comprehensive update of the knowledge graph includes: Pre-set the node connectivity threshold D1 and the information entropy threshold E1, and calculate the connectivity ΔD and information entropy ΔE of each node in the knowledge graph. When a node's ΔD < D1 and ΔE < E1, the node is determined to be a redundant node, and the node and its associated edges are deleted from the knowledge graph. Recalculate the cosine similarity between the remaining nodes and pre-set a new edge establishment threshold S3; if the similarity between nodes is ≥ S3, then establish undirected associated edges and assign edge weights according to the similarity magnitude. For the inference rule layer, the confidence level of fuzzy relation nodes is re-evaluated, and a confidence threshold C1 is pre-set; When the confidence of a fuzzy relation node is less than C1, the node is redefined using the cloud model, and the directed fuzzy association edge with the basic fact node is updated. When the confidence level of a fuzzy relation node is greater than or equal to C1, it means that the fuzzy relation represented by the fuzzy relation node meets the credibility requirements of knowledge graph reasoning and application under the current evaluation system.
4. The construction of a large-scale expert database based on knowledge graphs according to claim 3, characterized in that, The local adjustment of the associated edges of the relevant nodes includes: Pre-set the edge weight fluctuation threshold W1; calculate the change in the weight of the associated edge ΔW; When △W≥W1, the weight adjustment formula is preset: new weight = original weight × (1+k×△W), where k is the weight adjustment coefficient; If the adjusted edge weight is less than the preset minimum weight Wmin, then delete the associated edges of the relevant nodes; If the newly emerging similarity between nodes is greater than or equal to the pre-set temporary threshold S4, then a temporary associated edge is established and marked, and will be re-evaluated in the next round of updates.
5. The construction of a large-scale expert database based on knowledge graphs according to claim 4, characterized in that, The establishment of the knowledge retrieval index includes: Pre-define text index type T1, image index type T2, and audio index type T3; Based on the node data type, if it is text data, a T1 type index is used to extract keywords and establish a keyword-node ID mapping table; If the data is image data, a T2 type index is used, and the image feature vector is hashed to establish a hash value-node ID mapping. If the data is audio, a T3 type index is used, which is based on Mel spectrum characteristics. A pre-set index capacity threshold C1 is used. When the index occupies ≥ C1 × 80% of the space, index compression is performed and duplicate index entries are merged.
6. The construction of a large-scale expert database based on knowledge graphs according to claim 1, characterized in that, The step of comparing the hash values of data blocks using a hash fingerprint algorithm and marking potential update points includes: A first hash difference threshold H1 and a second hash difference threshold H2 are preset, with H1 < H2; the hash value difference ΔH of the data block is calculated; When ΔH≥H2, the corresponding data block is marked as a high-priority potential update point; When H1≤ΔH<H2, the corresponding data block is marked as a low-priority potential update point; When ΔH < H1, it is determined that the data block has not been updated, and the original state is maintained.
7. The construction of a large-scale expert database based on knowledge graphs according to claim 1, characterized in that, The calculation of semantic similarity of subsequences in unstructured text and the marking of updated regions include: A semantic similarity threshold B0 is pre-set; unstructured text is divided into fixed-length subsequences, and the semantic similarity ΔB between adjacent subsequences is calculated; When ΔB < B0, the corresponding subsequence region is marked as the update region; When ΔB≥B0, the corresponding subsequence region is determined to have no update and no marking is performed.
8. The construction of a large-scale expert database based on knowledge graphs according to claim 1, characterized in that, The method of comprehensively determining data updates by combining metadata information includes: Obtain metadata, which includes data update timestamps and file size changes; pre-set timestamp difference threshold T0 and file size change threshold F0. Calculate the timestamp difference ΔT between the current metadata and the historical metadata, and the file size difference ΔF; When ΔT≥T0 and ΔF≥F0, the data is determined to have been updated by combining the potential update point and the update region marker; When ΔT < T0 and ΔF < F0, it is determined that the data has not been updated.
9. The construction of a large-scale expert database based on knowledge graphs according to claim 1, characterized in that, The process of generating hypothetical scenarios through counterfactual reasoning and returning results after verifying the deduction includes: Select key nodes or edges from the candidate paths, modify their attributes, and generate hypothetical scenarios; By utilizing other nodes and edge relationships in the knowledge graph, consistency verification of the hypothetical scenario is performed to check whether the hypothetical scenario conflicts with existing knowledge. The consequences of hypothetical scenarios are extrapolated to obtain counterfactual reasoning results. The reasoning paths and counterfactual reasoning results that conform to the rules and have been verified are organized, formatted, and returned to the user.
10. The construction of a large-scale model expert database based on knowledge graphs according to claim 9, characterized in that, The process of extrapolating the consequences of hypothetical scenarios includes: By using the rule engine in the knowledge graph, the hypothetical scenario is input into the preset inference model, and multi-hop reasoning is performed along the candidate path; Based on the attributes of nodes and the weights of edges in the knowledge graph, the degree of influence of the hypothetical scenario on each associated node is calculated, and the influence propagation path is generated. If fuzzy relation nodes are involved in the deduction process, the uncertainty of the deduction results can be quantified using the digital features of the cloud model to obtain counterfactual reasoning results containing probability distributions.
Citation Information
Patent Citations
Collaborative ortho-rectification method for panchromatic multispectral image
CN118297792A
Lightweight attention cloud detection method based on deep learning
CN119888471A
Multi-modal knowledge graph rule reasoning method and device based on large model
CN120409666A
Supply chain sales anomaly detection and root cause analysis system and method fused with knowledge graph
CN120631970A
Knowledge graph construction method and system based on large language model
CN120633803A