Data asset semantic enhancement method and system based on knowledge graph and large model
By semantically decomposing and vectorizing natural language queries, and combining this with the generation of structural paths from knowledge graphs, the problem of mapping data asset knowledge graphs in natural language access is solved, improving the accuracy and interpretability of queries and achieving semantic enhancement of data assets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA COMMUNICATIONS SERVICES CORPORATION
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-09
AI Technical Summary
Existing data asset knowledge graphs struggle to accurately map user query intent in natural language access scenarios, and suffer from missing relationships or lagging modeling, resulting in query results lacking interpretability and usability.
By using a knowledge graph and large model-based approach, the natural language query input by the user is decomposed and semantically represented at the word level, generating a structured semantic vector, constructing a semantically constrained structured path request, and performing path search in the graph to generate the final response result or completion suggestion, thereby improving the semantic consistency and structural integrity of the graph.
It achieves accurate mapping and improved interpretability of data asset knowledge graphs in natural language access scenarios, enhances the usability and scalability of the graphs, and can generate query results and structural completion suggestions that conform to business semantics based on the existing structure.
Smart Images

Figure CN122174837A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing, and in particular relates to a method and system for semantic enhancement of data assets based on knowledge graphs and large models. Background Technology
[0002] As enterprises deepen their digital transformation, data assets have become a core foundation supporting business analysis, decision-making, and governance. Data assets typically exist in the form of fields, tables, metrics, data sources, business themes, and their lineages, and their scale and complexity continue to grow with the evolution of business systems. To systematically describe these assets and their relationships, knowledge graphs are widely used to construct structured associations between data assets, characterizing data sources, computational logic, and dependency paths through nodes and relationships. However, existing data asset knowledge graphs mainly rely on manual modeling or rule-driven methods for construction. While their structural expressions are clear, their adaptability to natural language semantics is weak, heavily reliant on unified naming conventions and complete metadata definitions. In practice, users prefer to access data assets through natural language, such as inquiring about the computational source of metrics, business relationships between fields, or cross-theme data association logic. However, there are significant differences between these unstructured expressions and the highly engineered relational models in the graph, making it difficult to accurately map query intent to the graph structure. Traditional keyword matching or template-based question answering methods struggle to cover complex business semantic scenarios. In cases involving multi-hop relationships, implicit computational logic, or incomplete knowledge graph structures, they often fail to find the correct path or return results lacking interpretability. Furthermore, the actual construction of data asset knowledge graphs inevitably suffers from missing relationships or lagging modeling, making it difficult to find corresponding relationship patterns within the existing structure even when user semantics are understood. Summary of the Invention
[0003] The purpose of this invention is to design a method and system for semantic enhancement of data assets based on knowledge graphs and large models, which can improve the availability, interpretability and scalability of data assets in natural language access scenarios.
[0004] To achieve the above objectives, in a first aspect of the present invention, a method for semantic enhancement of data assets based on knowledge graphs and large models is provided. The knowledge graph is constructed based on the metadata of the data assets, and the metadata includes field descriptions, indicator definitions, and lineage relationships. The method includes the following steps: The system performs word-level decomposition on the natural language query input by the user and maintains the integrity of compound words by customizing a vocabulary based on the data asset domain; the decomposed word elements are converted into vector representations and input into a context-aware semantic encoder to generate context-related word-level semantic representations; Based on the word-level semantic representation, each word is functionally classified, including query target, action indication or limiting condition, and semantic vectors representing query target, action indication and overall query intent are generated according to the classification results. Based on the semantic vector, a structural path generation request containing candidate relation types, starting entity type constraints, and ending entity type constraints is constructed in the knowledge graph; Path search is performed in the knowledge graph to obtain a set of candidate paths. A path-level semantic representation is generated for each candidate path. Based on the semantic consistency score between the path-level semantic representation and the semantic vector representing the overall query intent, a set of target path results is obtained. If the target path result set is empty, then generate a set of structural completion suggestions; The final response result is generated based on the target path result set or the structure completion suggestion set, and the suggestions in the structure completion suggestion set are written into the knowledge graph when the writing conditions are met.
[0005] Furthermore, the vector representation is generated through an embedding mapping table, which is trained based on field descriptions, indicator definition text, and lineage descriptions, and resides in the same vector space as the structural description vectors of nodes and relationships in the knowledge graph.
[0006] Furthermore, the limiting conditions are used to identify entities mentioned in the natural language query and match the entity types in the knowledge graph to determine the starting entity type constraint or the ending entity type constraint.
[0007] Furthermore, the screening of candidate relation types includes: calculating the weighted matching score of the structural description vector of each relation type with the semantic vector representing the query target, the semantic vector representing the action indication, and the semantic vector representing the overall query intent, and selecting relation types with scores higher than the relation screening threshold to form a candidate relation type set.
[0008] Furthermore, during the path search process, only the relation types in the candidate relation type set are used for graph traversal, and the range of the starting node and the ending node is limited according to the starting entity type constraint and the ending entity type constraint.
[0009] Furthermore, the path-level semantic representation is generated by aggregating the textual descriptions of each node and relationship in the candidate path into a pre-trained language model and encoding them according to the path order.
[0010] Furthermore, the generation of the structural completion suggestion set includes: locating semantically weak relation positions in candidate paths as structural gaps, generating candidate completion relations based on the overall query intent semantic vector, the starting entity type description at the gap, and the local graph context, and evaluating their semantic fit and structural offset to determine the final completion suggestions.
[0011] Furthermore, the priority of the structural completion suggestions is determined by their comprehensive score, which is calculated by weighting semantic fit, structural offset, and the frequency of occurrence of the entities or relationships involved in the knowledge graph.
[0012] Furthermore, the writing conditions include: the comprehensive score of the structural completion suggestion is not lower than the writing threshold set by the system, and the writing operation does not trigger the update of the knowledge graph main graph.
[0013] In a second aspect of the invention, a data asset semantic enhancement system based on knowledge graphs and large models is provided, the system comprising: The Natural Language Semantic Understanding module is used to perform word-level decomposition on user-input natural language queries and maintain the integrity of compound words based on a customized vocabulary in the data asset domain; the decomposed word units are converted into vector representations and input into a context-aware semantic encoder to generate context-related word-level semantic representations; based on the word-level semantic representations, each word unit is functionally classified, including query target, action indication or limiting conditions, and semantic vectors representing query target, action indication and overall query intent are generated according to the classification results; The structure path generation module is used to construct a structure path generation request in the knowledge graph based on the semantic vector, which includes candidate relation types, starting entity type constraints, and ending entity type constraints. The knowledge graph path search and scoring module is used to perform path search in the knowledge graph, obtain a set of candidate paths, generate a path-level semantic representation for each candidate path, and filter the target path result set based on the semantic consistency score between the path-level semantic representation and the semantic vector representing the overall query intent. The structure completion suggestion generation module is used to generate a structure completion suggestion set if the target path result set is empty; The response generation and writing control module is used to generate the final response result based on the target path result set or the structure completion suggestion set, and write the suggestions in the structure completion suggestion set into the knowledge graph when the writing conditions are met.
[0014] The beneficial technical effects of the present invention are at least as follows: To address the aforementioned issues, this invention provides a method and system for semantic enhancement of data assets based on knowledge graphs and large-scale models. By introducing a stable intermediate representation mechanism between natural language semantics and graph structure, it achieves accurate mapping from natural language queries to graph structure operations. This invention performs structured semantic modeling on natural language queries, extracting semantic elements that reflect the query target and relational intent. Using this semantic representation, it constructs semantically constrained structural path generation requests in the relation type space of the knowledge graph, ensuring that the graph path search process is continuously guided by query semantics. Furthermore, this invention introduces a semantic consistency evaluation mechanism in the graph path search stage, semantically filtering structurally reachable paths to obtain path results that satisfy both structural constraints and business semantics. When the existing graph structure cannot fully support the query semantics, this invention combines query semantics with local graph structural information to generate structurally constrained relation completion suggestions, supporting query result generation and providing a basis for subsequent graph structure improvement. Through the above methods, this invention constructs a processing flow that closely coordinates natural language semantics and data asset knowledge graph structure without compromising the stability of existing graph structures, significantly improving the availability, interpretability, and scalability of data assets in natural language access scenarios. Attached Figure Description
[0015] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0016] Figure 1 This is a flowchart of a data asset semantic enhancement method based on knowledge graphs and large models according to the present invention.
[0017] Figure 2 This is a framework diagram of a data asset semantic enhancement system based on knowledge graphs and large models according to the present invention. Detailed Implementation
[0018] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0019] In one or more embodiments, such as Figure 1 As shown, a data asset semantic enhancement method based on knowledge graphs and large models is disclosed, the method comprising the following: S1: Perform word-level decomposition on the natural language query input by the user, and maintain the integrity of compound words based on a customized vocabulary in the data asset domain; convert the decomposed word elements into vector representations, and input them into a context-aware semantic encoder to generate context-related word-level semantic representations; based on the word-level semantic representations, classify each word element by function, including query target, action indication or limiting conditions, and generate semantic vectors representing query target, action indication and overall query intent respectively according to the classification results; Specifically, the goal of this step is to transform the user's natural language query into a semantic representation that can be directly used by all subsequent structured operations. In data asset management scenarios, user queries are often presented in a conversational style, mixing business concepts, abbreviated expressions, and non-standard terminology, such as "How is this profit margin calculated?", "Which field in the order table represents time?", and "What is the relationship between this metric and sales revenue?". These expressions cannot be directly mapped to structured query conditions; therefore, it is necessary to first perform complete semantic modeling of the natural language, transforming it from text form into an intermediate representation with clear semantic function divisions and an overall semantic focus.
[0020] The input received in this step is a natural language query. The input is collected by the system's query interface, and its sources may include the search input box of the data asset management platform, the natural language question entry point on the indicator viewing page, etc. Before entering the semantic processing flow, the input only undergoes the most basic character-level normalization processing, such as standardizing punctuation marks and removing redundant whitespace. No rewriting or rule-making of the sentence structure is performed to ensure that subsequent semantic modeling is based on the user's original expression.
[0021] In the semantic processing phase, the system first... Word-level segmentation is performed. The segmentation rules combine general word segmentation strategies with a customized lexicon from the data asset domain, ensuring that compound words with definite meanings within the asset system, such as "net profit margin," "order amount," and "creation time," retain their overall form. Each word is then mapped to a vector representation. The vector comes from an embedding mapping table maintained internally by the system. This mapping table is not built based on an open corpus, but is trained using text related to data assets such as field descriptions, indicator definition texts, and lineage descriptions, so that the vector space can reflect the relative relationships between asset semantics.
[0022] After obtaining the word vector sequence, the system inputs it into a multi-layer context-encoding structure. This structure consists of several layers of sequentially stacked encoding units, each layer containing self-attention computation and non-linear transformation to capture the dependencies between words. Through this process, the system can identify the semantic relationships between different components in a sentence. For example, in the query "What fields are used to calculate profit margin?", the relationship between "calculate" and "fields," and the semantic status of "profit margin" as the queried object. After multi-layer encoding, the system obtains a set of context-related word-level representations. Each of them They have already incorporated the contextual semantic information of the entire sentence.
[0023] Based on this, the system performs semantic role determination for each word-level representation. Semantic roles characterize the functional position of a word in the current query, such as representing the meaning of an action, the query target, or limiting conditions. Role determination is completed through a position-by-position discriminant calculation, in the following form: ; in, Indicates the first The contextual semantic representation of each word element and These are parameters for the semantic role discrimination layer, used to map the context representation to a predefined role category space. This identifies the semantic role type corresponding to the lexical element. Through this process, the system can clearly distinguish between action-oriented, target-oriented, and modifier-oriented components in the query, thus providing a clear semantic function division for subsequent structured processing.
[0024] At the same time, the system also needs to construct a unified representation that can represent the semantic direction of the entire query, for subsequent overall semantic alignment of different structural paths. To this end, the system performs a weighted aggregation of all word-level representations to form a query-level semantic representation. : ; in, Indicates the first The semantic importance weight of each term in the current query is calculated through an internal scoring process. This weight is used to reduce the interference of function words or modifiers on the overall semantics and highlight the semantic contribution of the query target and core actions. Through this weighted aggregation method, This allows for a centralized reflection of the semantic core of the query, enabling subsequent structural matching to be based on a unified semantic benchmark. To avoid discrepancies in representation scales across different queries, the aggregation result is mapped to a uniform numerical range before output, ensuring the stability of subsequent semantic similarity calculations. Through the above processing, this step ultimately outputs two results: one is a set of semantic roles. The first set records each keyword element in the query and its corresponding semantic function type, used for subsequent inference and constraint of graph structure relationships; the second is the query-level semantic representation. This representation serves as a semantic summary of the entire query and is used for subsequent structural path matching and semantic consistency judgment.
[0025] S2: Based on the semantic vector, construct a structural path generation request in the knowledge graph that includes candidate relation types, starting entity type constraints, and ending entity type constraints; Specifically, this step will use the semantic role set obtained in the previous step. With query semantic representation Transform into a structure path generation request that can be directly executed in the knowledge graph. In data asset scenarios, users often use colloquial verbs or phrases such as "calculate," "correspond," "from," "caliber," "relationship," and "dependency" to express relational intent. However, relation types in knowledge graphs are often defined using engineered methods (e.g., "derived from," "referenced," "caliber consistent," "upstream lineage," "aggregate source," etc.). Therefore, this step focuses on... The provided "semantic function location" (target, action, condition) serves as the framework, with The provided "sentence semantic focus" serves as a constraint, forming a set of structured candidates on the graph relation type set and organizing them into executable path requests, rather than directly outputting answers or paths.
[0026] The system first reads the set of currently available relation types from the knowledge graph and constructs a "structural description vector" for each relation type. This vector originates from the relation metadata maintained during the graph construction phase: relation name, relation definition, set of allowed starting entity types, and set of allowed ending entity types. This textual metadata is solidified into vector indexes during deployment. Vector generation uses the same embedding mapping table and dimensional space as the previous step, thus ensuring consistency with... They can be directly compared; differences in numerical ranges are handled through mapping to maintain a consistent scale. Let the first... The structural description vector of each relation type is At the same time, the system from Two types of semantic anchors are extracted and phrase-level vectors are formed: one is the "target anchor," which is... The target vector is obtained by concatenating the sets of terms corresponding to the character type in the query target and averaging the vectors. Secondly, there is the "action anchor point," which is... The action vector is obtained by concatenating the sets of lexical indicators corresponding to the character type and their corresponding actions / relationships, and then averaging the vectors. When a certain type of anchor point is composed of multiple lexical units in a sentence, the system identifies the units according to their positions within the sentence. The words are concatenated in sequence to form phrases, and then the average of the word vectors within the phrases is taken to ensure that compound words (such as "net profit margin" and "order amount") are included in the calculation as a whole.
[0027] In obtaining , , With relation vector Then, the system calculates a matching score for each relation type. This score consists of three parts: the fit between the action anchor and the relation, the fit between the target anchor and the relation, and the global constraint of the entire sentence's semantics on the relation; simultaneously, a "structural consistency penalty term" is introduced to characterize whether the entity type constraints of the start and end points of the relation type are consistent with the entity type implied by the current query's semantic anchor. The source of the entity type implication is... The target anchor terms in the data asset thesaurus are categorized by type (e.g., "field, column, attribute" points to the field class; "indicator, caliber, measure" points to the indicator class; "table, data source, theme" points to the table / data source class). This thesaurus is statically maintained in the system configuration. For the first... For each relation type, structural consistency penalty is applied using a non-negative scalar. This indicates that the allowed start and end point types of the relationship are consistent with the anchor point implication. Take the smaller value, otherwise take the larger value; to avoid inconsistencies in the magnitudes of different terms. Normalization is performed before entering the formula. The final score is calculated as follows: ; in, Representing relation type The matching score for the current query; For the reason Action anchor vectors composed of action / relation indicator lexics; For the reason The target anchor vector composed of the target words in the query; For query-level semantic representation; For relation type The structural description vector; Calculate the cosine similarity; The penalty weight is used to balance semantic matching and structural consistency constraints; The structural consistency penalty scalar originates from relation types. Origin and end point type constraints and The induced type hints are consistent with the mapping results and are normalized.
[0028] Scores for all relation types Then, the system selects the set of relation types with the highest scores as the candidate relation set and organizes them into a structure path generation request. . It contains three types of information: a set of candidate relation types, starting entity type constraints, and ending entity type constraints. The starting and ending type constraints are determined by... The target anchor and constraint anchor jointly determine the outcome: for example, "Which fields are used to calculate the profit margin?" pushes the endpoint constraint to the field class entity; "What is the relationship between this indicator and sales revenue?" places the target constraint on the association between the indicator class and the indicator / field class; "Which field in the order table represents time?" pushes the starting constraint to the table class entity and the endpoint constraint to the field class entity. The selection of the candidate set and the request assembly are represented as follows: ; in, Requests to generate paths for the graph structure; Indicates by Select from high to low A set of candidate relations is formed by combining a vector of relation types and their scores. Indicates by The induced constraints on the starting and ending entity types (obtained through data asset thesaurus mapping); Indicates by The additional constraint information extracted from the defined roles (such as time range, business domain keywords, and topic domain terms) is used for filtering in the subsequent path retrieval stage. The above three components together constitute an executable structured request, enabling subsequent steps to have clear relational candidates and type boundaries when retrieving paths in the graph.
[0029] S3: Perform path search in the knowledge graph to obtain a set of candidate paths, generate a path-level semantic representation for each candidate path, and filter the target path result set based on the semantic consistency score between the path-level semantic representation and the semantic vector representing the overall query intent. Specifically, the goal of this step is to generate a structured graph path once a structured graph request has been obtained. Under this premise, actual path search is performed in the knowledge graph, and the path result that best matches the current query intent is selected by integrating and evaluating the consistency between structural reachability and query semantics. In the data asset knowledge graph, there are often multiple structurally legitimate but business-meaningful paths between entities of the same type. For example, indicators may be connected by "computational relationships," "references," or "lineage." If paths are returned solely based on structural connectivity, it is easy to produce results that have no practical explanatory value for users.
[0030] The input for this step is the graph structure path generation request output from the previous step. . The data contains at least three types of information: first, a set of candidate relation types, used to limit the relation edges that can be used during graph traversal; second, start and end entity type constraints, used to limit the set of starting nodes and the set of acceptable ending nodes for traversal; and third, additional constraints derived from semantic roles, used to filter nodes or relations that do not meet the business context. All of the above information is used in its entirety in this step without being trimmed or rewritten.
[0031] During the path search phase, the system first... This is converted into an executable traversal configuration for a graph database. Specifically, the system uses a knowledge graph. The system identifies all nodes that satisfy the starting entity type constraint as the initial node set, and performs a multi-hop traversal starting from these nodes. During the traversal, only nodes that satisfy the starting entity type constraint are allowed. The set of candidate relation types specified in the query is expanded to avoid introducing structural edges unrelated to the current query; simultaneously, during each hop expansion, the nodes and relations to be added to the path are applied... Additional constraints are imposed, such as limiting the subject domain of a field, the business scope of an indicator, or the data source type. The traversal terminates when the endpoint entity type constraint is met or the preset maximum number of hops is reached. Through the above process, the system obtains a set of structurally satisfied... Constrained candidate path set Each of the paths It is represented as a sequence of nodes and relationships arranged in order.
[0032] because While all paths in the system are structurally valid, they may differ significantly in semantic fit. Therefore, the system further evaluates the semantic consistency of each path. To this end, the system first constructs a path-level semantic representation for each path. Specifically, it performs a semantic consistency assessment on each path. For each relation and node in the graph, we read its structural description vector, which was already fixed during the graph construction phase. These vectors originate from textual meta-information such as the name and definition of the relation or node, and are then compared with the query semantic representation. They reside in the same vector space. Subsequently, the system aggregates these vectors in path order to obtain a path semantic representation. This representation is used to characterize the comprehensive semantic features of the entire path, rather than just reflecting a local node or relationship.
[0033] After obtaining the path semantic representation, the system compares it with the query semantic representation. Consistency scoring is performed, while also considering the impact of path structure complexity on interpretability. Path The overall score is calculated as follows: ; in, For path The final score result; For path The semantic representation vector is obtained by sequentially aggregating the structural description vectors of nodes and relationships in the path; The semantic representation of the query comes from step one; This indicates semantic similarity calculation, used to measure the degree of fit between the overall semantics of the path and the query intent; Representing a path The structural length is used to reflect the complexity of the path; This is a complexity penalty weight used to reduce the priority of excessively long paths when semantic fit is similar. This scoring method makes the system more inclined to select paths with simple structures and clear business meanings while ensuring semantic consistency. This is especially important in scenarios such as indicator lineage analysis and field source tracing. After scoring all candidate paths, the system... The paths are sorted from highest to lowest score, and the one or more paths with the highest scores are selected as the candidate result set for the current query. During the selection process, the system also performs deduplication on the path results to avoid outputting multiple paths that are highly overlapping in node sequences but semantically equivalent. The final set of path results is denoted as […]. .
[0034] S4: If the target path result set is empty, generate a set of structural completion suggestions; Specifically, this step generates structural completion suggestions for cases where no path results satisfying the query's semantic requirements have been obtained after the graph path search and semantic consistency scoring have been completed. "Structural deficiencies" here do not mean the graph is entirely incorrect, but rather that, under the current query semantic constraints, the graph does not yet explicitly contain a relational pattern capable of carrying that semantic meaning. This is common in data asset scenarios; for example, a certain metric is typically calculated using a set of fields in business operations, but the corresponding calculation relationship has not yet been added to the graph; or cross-topic domain data tables are frequently used together in actual analysis, but clear association edges have not yet been established in the graph. The purpose of this step is to provide interpretable and implementable structural completion candidates for these situations. The input to this step includes the path result set. and query semantic representation for path semantic evaluation. .when When a path is not empty but its overall semantic consistency score is low, The path in the code will be used as the analysis object; when If the set is empty, the candidate paths generated and sorted in the previous step are used as the reference set. In either case, this step is based on the question of "why existing paths cannot fully express the query semantics", rather than returning to the natural language level for processing.
[0035] In the structural missing location phase, the system first... The system analyzes each path segment by segment. Each path consists of a sequence of nodes and a sequence of relations. The system sequentially examines each relation in the path, combining the relation's structural description vector with the query semantic representation. The similarity is used to determine whether the relationship effectively carries the semantic function of the current query. When there are multiple consecutive relationship pairs in the path... When the similarity contribution is low, or the path has significantly deviated from the query semantics before reaching the endpoint entity type, the system marks the location as a "structural gap location". If the result is empty, the same analysis process is performed directly on the candidate paths with the highest scores. Through this process, the system can determine the approximate connection location where the relationship needs to be completed, as well as the corresponding range of starting and ending entity types.
[0036] After determining the location of the structural gap, the system enters the completion relation generation stage. The system constructs an input context for completion reasoning, which consists of three parts: query semantic representation. The graph contains descriptions of the starting entity type at the gap location and the local structure of the path segment preceding the gap. Both the starting entity type description and the local structure description are derived from existing metadata in the graph, such as entity type names, type description text, and definitions of existing relationships. These texts have been mapped to vector representations during the graph construction phase and can be directly used for subsequent calculations.
[0037] The relation completion generation module employs a fixed encoder-decoder structure. The encoder fuses the aforementioned context, while the decoder generates candidate relation types and their connection directions one by one, using relation type as the unit of generation. During the generation process, each candidate relation is mapped to its corresponding structural description vector. The candidate relation is then jointly evaluated with the query semantics and the current graph structure pattern. The comprehensive score is calculated as follows: ; in, Indicates the first A comprehensive score for each candidate complement relationship; For query semantic representation; A structural description vector for candidate relation types; Used to measure how well candidate relations fit the query intent at the semantic level; This indicates the degree of deviation of the candidate relation relative to the current graph structure pattern. This degree of deviation is obtained by comparing the combination of the start and end point types of the candidate relation with the distribution of existing relation types in the graph, and is normalized before entering the calculation. The offset penalty weight is used to suppress completion suggestions that have an excessive impact on the stability of the graph structure. Through this scoring method, the system can strike a balance between "semantic reasonableness" and "structural acceptability." After scoring, the system... The candidate relationships are sorted from highest to lowest, and the top-ranked items are selected. Combined with the previously determined range of starting and ending entity types, a set of structural completion suggestions is formed. . Each item exists as a combination of relation type and entity type constraints, rather than being directly bound to a specific entity instance. This ensures that the completion suggestions are both generalizable and easy to apply or review in the future.
[0038] S5: Generate the final response result based on the target path result set or the structure completion suggestion set, and write the suggestions in the structure completion suggestion set into the knowledge graph when the writing conditions are met.
[0039] Specifically, this step, assuming a set of structural completion suggestions has already been obtained, generates a final deliverable query response. When preset conditions are met, the structural completion suggestions are optionally written into the candidate enhancement area of the knowledge graph, thus completing a full closed-loop operation of "semantic understanding—structural reasoning—result implementation." The input to this step includes a set of path results. and a set of structural completion suggestions . Each item in the table includes the candidate relation type, the corresponding range of starting entity types, and the range of ending entity types, along with a comprehensive score calculated in step four, reflecting the reasonableness of the completion suggestion under the constraints of the current query semantics and the existing graph structure. This step does not revisit the original natural language query or re-execute the path search; instead, it is entirely based on... The already generated structural information will be processed subsequently.
[0040] During the response generation phase, the system first determines whether a set of available path results exists. ;when When not empty, based on Directly generate response results, when If it is empty, then... The system organizes the completion suggestions and generates a response. Specifically, based on the relationship type and entity type constraints described in each completion suggestion, the system generates a corresponding "structural interpretation unit." This unit explicitly indicates which types of data assets have the suggested association relationship under the current query semantics. For example, when... When a completion suggestion contains "Indicator - Calculation Relationship - Fields", the system will organize it into a structured description stating "This indicator may be calculated using the following fields". To sort and filter multiple completion suggestions, the system calculates a response priority score for each suggestion: ; in, Indicates the first The priority score of each completion suggestion during the response generation phase; The comprehensive score obtained in step four is used to reflect the semantic and structural rationality of the proposed completion. This indicates the degree of uncertainty after the completion suggestion is introduced into the current graph, and is used to characterize whether the suggestion involves a broad range of entity types or less common relationship patterns; The weight parameter is used to balance the rationality of the suggestions with the stability of the output. Through this calculation, the system can prioritize structural suggestions that both conform to the semantics of the current query and have a high degree of interpretability for generating the response.
[0041] After sorting, the system selects one or more of the highest priority completion suggestions to generate the final response result. . The output is in a structured format and may include relationship descriptions, entity types involved, and structural hints for further querying by downstream modules. This output format is suitable for direct display in the data asset management interface and can also be used as input for subsequent automated processes, such as for generating recommended query paths or indicator description text.
[0042] During the optional write phase of the structure suggestion, the system... The completion suggestions are evaluated independently to determine whether to include them in the candidate enhancement regions of the atlas. The evaluation criteria are also based on the comprehensive score obtained in step four. This is controlled in conjunction with the current system's configured write policy. The write decision can be expressed as: ; in, Indicates the first Write the completion suggestion marker; The overall score for this recommendation; The write threshold is set for the system. Suggestions marked as writable will be recorded as candidate structural enhancements, stored separately from the existing graph structure, and used for subsequent manual review or rule processing, without directly affecting the stable operation of the existing graph. The output of this step includes two results: the final response result. The first is used to provide a clear and executable system response to the current query; the second is the candidate set for structural enhancement, which comes from... The system retrieves completion suggestions that meet the writing conditions and incorporates them into the graph enhancement process in a controlled manner. Through this step, the system truly transforms the preceding semantic and structural reasoning results into executable results, completing a full data asset semantic enhancement process.
[0043] In one or more embodiments, such as Figure 2 As shown, a data asset semantic enhancement system based on knowledge graphs and large models is disclosed, the system comprising: The Natural Language Semantic Understanding module is used to perform word-level decomposition on user-input natural language queries and maintain the integrity of compound words based on a customized vocabulary in the data asset domain; the decomposed word units are converted into vector representations and input into a context-aware semantic encoder to generate context-related word-level semantic representations; based on the word-level semantic representations, each word unit is functionally classified, including query target, action indication or limiting conditions, and semantic vectors representing query target, action indication and overall query intent are generated according to the classification results; The structure path generation module is used to construct a structure path generation request in the knowledge graph based on the semantic vector, which includes candidate relation types, starting entity type constraints, and ending entity type constraints. The knowledge graph path search and scoring module is used to perform path search in the knowledge graph, obtain a set of candidate paths, generate a path-level semantic representation for each candidate path, and filter the target path result set based on the semantic consistency score between the path-level semantic representation and the semantic vector representing the overall query intent. The structure completion suggestion generation module is used to generate a structure completion suggestion set if the target path result set is empty; The response generation and writing control module is used to generate the final response result based on the target path result set or the structure completion suggestion set, and write the suggestions in the structure completion suggestion set into the knowledge graph when the writing conditions are met.
[0044] It is worth noting that the specific workflow of the data asset semantic enhancement system based on knowledge graphs and large models provided in this embodiment of the invention is the same as that of the data asset semantic enhancement method based on knowledge graphs and large models described in the above embodiment, and will not be repeated here.
[0045] This invention also provides a data asset semantic enhancement device based on knowledge graphs and large models, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps described in the above embodiment of a data asset semantic enhancement method based on knowledge graphs and large models, for example... Figure 1 The steps S1 to S5 described above; or, when the processor executes the computer program, it implements the functions of each module in the above system embodiments.
[0046] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the knowledge graph and large model-based data asset semantic enhancement device.
[0047] The data asset semantic enhancement device based on knowledge graphs and large models can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. This device may include, but is not limited to, processors and memory. Those skilled in the art will understand that the device may also include input / output devices, network access devices, buses, etc.
[0048] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the knowledge graph and large model-based data asset semantic enhancement device, connecting all parts of the device via various interfaces and lines.
[0049] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the data asset semantic enhancement device based on knowledge graphs and large models by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the operation of the air conditioner controller, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0050] The module integrating the data asset semantic enhancement device based on knowledge graphs and large models, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0051] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0052] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for semantic enhancement of data assets based on knowledge graphs and large models, characterized in that, The knowledge graph is constructed based on the metadata of the data assets, which includes field descriptions, indicator definitions, and lineage relationships; the method includes the following steps: The system performs word-level decomposition on the natural language query input by the user and maintains the integrity of compound words by customizing a vocabulary based on the data asset domain; the decomposed word elements are converted into vector representations and input into a context-aware semantic encoder to generate context-related word-level semantic representations; Based on the word-level semantic representation, each word is functionally classified, including query target, action indication or limiting condition, and semantic vectors representing query target, action indication and overall query intent are generated according to the classification results. Based on the semantic vector, a structural path generation request containing candidate relation types, starting entity type constraints, and ending entity type constraints is constructed in the knowledge graph; Path search is performed in the knowledge graph to obtain a set of candidate paths. A path-level semantic representation is generated for each candidate path. Based on the semantic consistency score between the path-level semantic representation and the semantic vector representing the overall query intent, a set of target path results is obtained. If the target path result set is empty, then generate a set of structural completion suggestions; The final response result is generated based on the target path result set or the structure completion suggestion set, and the suggestions in the structure completion suggestion set are written into the knowledge graph when the writing conditions are met.
2. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The vector representation is generated through an embedding mapping table, which is trained based on field descriptions, indicator definition text, and lineage descriptions, and is in the same vector space as the structural description vectors of nodes and relationships in the knowledge graph.
3. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The limiting conditions are used to identify entities mentioned in natural language queries and match entity types in the knowledge graph to determine the starting entity type constraint or the ending entity type constraint.
4. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The screening of candidate relation types includes: calculating the weighted matching score of the structural description vector of each relation type with the semantic vector representing the query target, the semantic vector representing the action indication, and the semantic vector representing the overall query intent, and selecting relation types with scores higher than the relation screening threshold to form a candidate relation type set.
5. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The path search process uses only the relation types in the candidate relation type set for graph traversal, and limits the range of the starting node and the ending node according to the starting entity type constraint and the ending entity type constraint.
6. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The path-level semantic representation is generated by aggregating the textual descriptions of each node and relationship in the candidate path into a pre-trained language model and encoding them according to the path order.
7. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The generation of the structural completion suggestion set includes: locating semantically weak relation positions in candidate paths as structural gaps, generating candidate completion relations based on the overall query intent semantic vector, the starting entity type description at the gap, and the local graph context, and evaluating their semantic fit and structural offset to determine the final completion suggestion.
8. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The priority of the structural completion suggestions is determined by their comprehensive score, which is calculated by weighting semantic fit, structural offset, and the frequency of occurrence of the entities or relationships involved in the knowledge graph.
9. The data asset semantic enhancement method based on knowledge graphs and large models according to claim 1, characterized in that, The writing conditions include: the overall score of the structural completion suggestion is not lower than the writing threshold set by the system, and the writing operation does not trigger the update of the knowledge graph main graph.
10. A data asset semantic enhancement system based on knowledge graphs and large models, characterized in that, The system includes: The Natural Language Semantic Understanding module is used to perform word-level decomposition on user-input natural language queries and maintain the integrity of compound words based on a customized vocabulary in the data asset domain; the decomposed word units are converted into vector representations and input into a context-aware semantic encoder to generate context-related word-level semantic representations; based on the word-level semantic representations, each word unit is functionally classified, including query target, action indication or limiting conditions, and semantic vectors representing query target, action indication and overall query intent are generated according to the classification results; The structure path generation module is used to construct a structure path generation request in the knowledge graph based on the semantic vector, which includes candidate relation types, starting entity type constraints, and ending entity type constraints. The knowledge graph path search and scoring module is used to perform path search in the knowledge graph, obtain a set of candidate paths, generate a path-level semantic representation for each candidate path, and filter the target path result set based on the semantic consistency score between the path-level semantic representation and the semantic vector representing the overall query intent. The structure completion suggestion generation module is used to generate a structure completion suggestion set if the target path result set is empty; The response generation and writing control module is used to generate the final response result based on the target path result set or the structure completion suggestion set, and write the suggestions in the structure completion suggestion set into the knowledge graph when the writing conditions are met.