Carbon quantum dots enhance micro-acidic hypochlorous acid synergistic disinfection knowledge graph construction method
By constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid, the problem of inconsistency between professional terminology and colloquial expression was solved. This enabled accurate extraction of entity relationships and organization of complex paths, improving the completeness and usability of the knowledge graph, supporting intelligent retrieval and question-and-answer applications, and promoting the popularization of new disinfection technologies.
Patent Information
- Application Number
- CN202611533932.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies struggle to systematically organize knowledge in the field of carbon quantum dot-enhanced synergistic disinfection with slightly acidic hypochlorous acid. Issues include inconsistencies between technical terminology and colloquial expressions, inaccurate entity relationship extraction, and difficulty in organizing complex association paths, all of which affect the integrity and usability of the knowledge graph.
By acquiring texts related to the synergistic disinfection of slightly acidic hypochlorous acid enhanced by carbon quantum dots and spoken questions from non-professional users, and using a pre-trained language model for lexical analysis and contextual semantic understanding, combined with graph neural networks and multi-hop relational reasoning, a knowledge graph for the synergistic disinfection of slightly acidic hypochlorous acid enhanced by carbon quantum dots is constructed. This enables unified semantic representation of professional terminology and spoken expressions, as well as accurate extraction of entity relationships.
It improves the efficiency of domain knowledge organization and retrieval accuracy, covers both professional and colloquial expressions, supports intelligent retrieval and question-and-answer interaction, and provides a reliable data foundation for the standardized promotion of new disinfection technologies in public health and environmental disinfection scenarios.
Smart Images

Figure CN123031844A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph construction and intelligent semantic processing technology, specifically to a method for constructing a knowledge graph for synergistic disinfection with slightly acidic hypochlorous acid enhanced by carbon quantum dots. Background Technology
[0002] In modern public health control, medical and health care, food processing, and environmental disinfection, slightly acidic hypochlorous acid is widely used for disinfection of environmental surfaces, air, utensils, and human contact surfaces due to its strong oxidizing and bactericidal capabilities and good safety profile. With the development of nanomaterials technology, carbon quantum dots, due to their small particle size, abundant surface functional groups, good optical properties, and ability to participate in the generation of active species, are gradually being introduced into the field of disinfection enhancement. The combination of carbon quantum dots and slightly acidic hypochlorous acid may create synergistic effects in areas such as reactive oxygen species generation, available chlorine utilization, microbial film disruption, improved disinfection efficiency, and regulation of biosafety. Therefore, carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection technology has become an important direction in the research and application of novel disinfection technologies.
[0003] However, the synergistic disinfection of slightly acidic hypochlorous acid enhanced by carbon quantum dots involves multiple disciplines, including nanomaterials, disinfection chemistry, microbial inactivation, biotoxicity evaluation, environmental safety assessment, and public health applications. The related knowledge exhibits significant overlap and complexity. For example, the particle size, surface functional groups, luminescence properties, and catalytic activity of carbon quantum dots are intricately correlated with the effective chlorine concentration, pH range, redox properties, stability, and type of target organisms in slightly acidic hypochlorous acid. Furthermore, the synergistic disinfection effect is influenced by various factors such as contact time, environmental conditions, microbial species, application scenarios, and safety evaluation indicators. Because this knowledge is scattered across papers, experimental records, standards, application instructions, and technical documents, existing technologies struggle to systematically organize the relevant entities, relationships, and application conditions. Current knowledge management methods typically rely on manual organization, keyword retrieval, or general knowledge graph construction. Manual organization is labor-intensive and inefficient, making it difficult to adapt to the rapid growth and heterogeneous nature of knowledge in the field of synergistic disinfection of slightly acidic hypochlorous acid enhanced by carbon quantum dots. Keyword retrieval methods primarily rely on literal matching to return relevant text, failing to accurately reveal the deep relationships between carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, reaction mechanisms, safety evaluation indicators, and application scenarios. While general knowledge graph construction methods can extract some entities and relationships, they typically lack the ability to standardize terminology, semantic mapping, and relational constraints specific to this particular disinfection field. This can easily lead to problems such as inaccurate entity identification, confused relation types, redundant knowledge nodes, and unclear graph association paths. Furthermore, in actual promotion and application, non-professional users often use colloquial, experiential, or scenario-based expressions to describe issues related to the synergistic disinfection of slightly acidic hypochlorous acid enhanced by carbon quantum dots. For example, users might describe "carbon quantum dots" as "luminescent carbon particles," "slightly acidic hypochlorous acid" as "weakly acidic water," and summarize "biotoxicity evaluation" or "skin irritation evaluation" as "whether it is safe." These colloquial expressions have significant semantic differences from the standardized terminology in professional literature, standard documents, and experimental data. Existing knowledge graph construction methods, if based solely on professional domain text for entity extraction and relation construction, easily overlook the numerous non-standard expressions present in real-world applications. This results in knowledge graphs that fail to cover users' actual questioning habits and struggle to support subsequent intelligent retrieval, question-and-answer interaction, and standardized application guidance.
[0004] Therefore, existing technologies for knowledge organization in the synergistic disinfection of slightly acidic hypochlorous acid enhanced by carbon quantum dots still suffer from several problems, including fragmented domain knowledge, difficulty in unifying professional terminology and colloquial expression, insufficient accuracy in entity relation extraction, difficulty in completing semantically biased nodes, difficulty in effectively organizing complex association paths, and unstable quality of knowledge triples. These problems affect the completeness, accuracy, and usability of the knowledge graph in the synergistic disinfection domain, hindering the standardized promotion of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection technology in public health, environmental disinfection, and grassroots epidemic prevention scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide a method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid, thereby solving the problems existing in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for constructing a knowledge graph of synergistic disinfection using carbon quantum dots enhanced by slightly acidic hypochlorous acid, comprising: S1. Obtain text related to the synergistic disinfection of carbon quantum dots with slightly acidic hypochlorous acid and the spoken question texts of non-professional users, and obtain the question intent feature vector and the domain terminology feature vector containing domain semantic information; S2. Based on the feature vector of the question intent, perform similarity calculation with the feature vector of the standard term nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection to obtain the initial node mapping set; S3. For the initial node mapping set, if the maximum node similarity in the initial node mapping set is lower than a preset threshold, feature aggregation is performed on the associated nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection to obtain an extended node mapping set. S4. Filter nodes that are irrelevant to the candidate nodes by term category from the extended node mapping set. If the normalized score of the candidate node is greater than the node confidence threshold, then determine the target specification term node. S5. Based on the target specification term nodes, perform multi-hop relation reasoning in the field of carbon quantum dot enhanced slightly acidic hypochlorous acid synergistic disinfection, and use relation hop count limit and relation type filter to constrain the reasoning boundary to obtain the initial extended path set; S6. For the initial extended path set, the path weight is accumulated and the node access mark is set to prevent loop duplication. The convergence search range is set according to the path pruning rules and termination conditions. After evaluating the path length of each path, the candidate relationship path set is obtained. S7. For the candidate relation path set, if the path confidence score in the candidate relation path set is greater than the preset threshold, then extract the corresponding path entity sequence and entity relation sequence to obtain the target knowledge triple set.
[0007] Preferably, S1 includes: Lexical analysis was performed on texts and spoken question texts in the field of carbon quantum dot-enhanced synergistic disinfection with slightly acidic hypochlorous acid to obtain word segmentation sequences; Based on the word segmentation sequence, perform contextual semantic understanding to obtain the initial semantic feature matrix; Feature extraction is performed on the initial semantic feature matrix to determine the question intent feature vector, and entity word vectors are extracted from the initial semantic feature matrix to obtain the domain terminology feature vector; The question intent feature vector and the domain terminology feature vector are fused to obtain question intent feature vector and domain terminology feature vector containing domain semantic information.
[0008] Preferably, S2 includes: Obtain the feature vector of the question's intent and the node feature vector of standardized terminology in the field of carbon quantum dot-enhanced synergistic disinfection with slightly acidic hypochlorous acid; The node similarity value is calculated by comparing the feature vector of the question intent with the feature vector of the standard term node. If the node similarity value is greater than the matching threshold, the corresponding node is extracted as a candidate mapping node. Sort the candidate mapping nodes according to their node similarity values, and extract the initial node mapping set based on the sorting results.
[0009] Preferably, S3 includes: Determine the maximum node similarity of the initial node mapping set; If the maximum node similarity is lower than a preset threshold, then the associated nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection are aggregated using a graph neural network to generate aggregated feature representations of the associated nodes. Determine semantically biased nodes among associated nodes based on aggregated feature representation; By completing semantically biased nodes based on the synonym mapping table, an extended node mapping set is obtained.
[0010] Preferably, S4 includes: Extract term category features from the extended node mapping set, and perform candidate node pruning based on the term category features to obtain the remaining node set; Semantic relevance is extracted from the remaining node set, and a weighted node set is obtained by calculating the semantic relevance using node weights. Terminology standardization is performed using a weighted set of nodes to obtain standardized candidates. Calculate the normalized score of the standardized candidate. If the normalized score is greater than the node confidence threshold, then determine the target specification term node.
[0011] Preferably, S5 includes: Obtain a multi-hop inference candidate entity set, which is generated by extracting adjacent entities from the target canonical term node; Determine whether the candidate entity set for multi-hop reasoning meets the reasoning boundary constraints, including removing the corresponding entity to obtain the filtered entity set if the number of relation hops in the candidate entity set for multi-hop reasoning is greater than the hop count limit threshold. Iterate through the filtered entity set to obtain the candidate path branch set; Based on the node access frequency of the candidate path branch set, perform branch priority sorting to obtain the initial expanded path set.
[0012] Preferably, S6 includes: Extract the node entities and relationship types of the initial path to obtain the accumulated weight; Access tags are assigned based on the accumulated weight and the node entity; Determine if the access flag indicates an accessed state; If the access is marked as accessed, a loop detection result is generated; The truncated path is obtained based on the loop detection results, and the convergence search range is determined by constraining the truncated path; The evaluation length value is obtained based on the convergence search range, and the candidate relation path set is obtained through the evaluation length value.
[0013] Preferably, S7 includes: Extract the node feature vectors and topological features of candidate relationship paths to obtain connectivity scores; Semantic similarity is calculated based on connectivity scores and node feature vectors to obtain relation weight distribution; The path confidence score of candidate relationship paths is determined by relation weight distribution and semantic similarity. If the path confidence score is greater than a preset threshold, the path entity sequence and entity relationship sequence of the candidate relationship path are extracted to obtain the target knowledge triple set.
[0014] Preferably, it also includes S8, which involves organizing the entity relationships between carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios into a graph based on the target knowledge triple set, to obtain a knowledge graph of carbon quantum dots enhancing slightly acidic hypochlorous acid synergistic disinfection, specifically including: Obtain the set of target knowledge triples, and extract the target entity from the set; Obtain the entity relationship set by performing relationship mapping based on the target entity.
[0015] Preferably, S8 further includes: Organize the entity relationship set into a graph to determine the initial knowledge graph; Determine whether the number of isolated nodes in the graph exceeds a preset threshold; If the number exceeds a preset threshold, the edge relationships of the graph are completed to obtain a knowledge graph of carbon quantum dots-enhanced slightly acidic hypochlorous acid synergistic disinfection.
[0016] As can be seen from the above technical solution, the present invention has the following beneficial effects: This method for constructing a knowledge graph for carbon quantum dot-enhanced synergistic disinfection of slightly acidic hypochlorous acid simultaneously acquires text related to the field and spoken questions from non-professional users. Utilizing a pre-trained language model for lexical analysis and contextual semantic understanding, it achieves a unified semantic representation of professional domain knowledge and everyday user expressions. Through similarity calculation between question intent feature vectors and standardized terminology node feature vectors, node ranking, semantic deviation node completion, and terminology standardization, it effectively alleviates the semantic gap between non-standard expressions and professional terms such as "luminescent carbon particles" and "carbon quantum dots," and "weakly acidic water" and "slightly acidic hypochlorous acid," improving the accuracy of domain entity recognition and terminology mapping. Furthermore, through multi-hop relation reasoning, path pruning, path weight accumulation, and path confidence filtering, it can... By extracting more reliable entity sequences and entity relationship sequences from complex collaborative disinfection knowledge relationships, the interference of irrelevant nodes, redundant paths, and low-quality relationships on the graph construction results is reduced. Finally, based on the target knowledge triple set, the entity relationships between carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection objects, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios are graph-organized. This facilitates the formation of a collaborative disinfection knowledge graph with a clear structure, accurate semantic associations, and coverage of both professional and colloquial expressions. This improves the organizational efficiency, retrieval accuracy, and subsequent question-and-answer application adaptability of knowledge in the field of carbon quantum dots-enhanced slightly acidic hypochlorous acid synergistic disinfection, providing a reliable data foundation and knowledge support for the standardized promotion of this type of novel collaborative disinfection technology in scenarios such as public health prevention and control, environmental disinfection, and grassroots epidemic prevention. Attached Figure Description
[0017] Figure 1 This is a signal transmission diagram of the present invention; Figure 2 This is a structural block diagram of the network terminal of an exemplary electronic device of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example 1:
[0020] like Figure 1 As shown, this invention provides a technical solution: a method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid, comprising: S1. Obtain the domain text and non-professional user's oral question text of carbon quantum dot enhanced slightly acidic hypochlorous acid synergistic disinfection. Perform lexical analysis and contextual semantic understanding on the domain text and oral question text through a pre-trained language model to obtain the question intention feature vector and domain terminology feature vector containing domain semantic information. S2. Based on the feature vector of the question intent, the similarity calculation method is used to calculate the similarity between the feature vector of the standard term node in the field of carbon quantum dot enhanced slightly acidic hypochlorous acid synergistic disinfection, and the node similarity ranking is performed on the calculation results to obtain the initial node mapping set. S3. For the initial node mapping set, if the maximum node similarity in the initial node mapping set is lower than the preset threshold, the graph neural network is used to aggregate the features of the associated nodes in the field of carbon quantum dot enhanced micro-acid hypochlorous acid synergistic disinfection, and the semantic deviation nodes are determined based on the synonym mapping table and the hierarchical relationship to obtain the extended node mapping set. S4. Filter out irrelevant nodes from the extended node mapping set by term category and prune candidate nodes. Perform term standardization on the remaining nodes by calculating node weights. If the normalized score of the candidate is greater than the node confidence threshold, then determine the target standardized term node. S5. Based on the target specification terminology nodes, perform multi-hop relation reasoning in the field of carbon quantum dot enhanced slightly acidic hypochlorous acid synergistic disinfection. Use relation hop count limit and relation type filter to constrain the reasoning boundary. Perform path branch priority sorting for each extended branch to obtain the initial extended path set. S6. For the initial extended path set, the path weight is accumulated and the node access mark is set to prevent loop duplication. The convergence search range is set according to the path pruning rules and termination conditions. After evaluating the path length of each path, the candidate relationship path set is obtained. S7. For the candidate relation path set, if the path confidence score in the candidate relation path set is greater than the preset threshold, then extract the corresponding path entity sequence and entity relation sequence to obtain the target knowledge triple set. S8. Based on the target knowledge triplet set, the entity relationships between carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effect, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators and application scenarios are organized into a graph to obtain a knowledge graph of carbon quantum dots enhancing slightly acidic hypochlorous acid synergistic disinfection.
[0021] In the above scheme, the system first establishes a text processing foundation for the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection, using professional field texts and spoken question texts from non-professional users as input data.
[0022] Specifically, the professional-domain texts include content related to carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios. The non-professional user-generated texts include questions asked in natural language regarding disinfection effectiveness, applicable targets, mechanisms of action, and safety. The system uses a pre-trained language model to perform lexical analysis and contextual semantic understanding on these texts, identifying keywords, entities, modification relationships, and semantic connections, and converting the unstructured text into computable feature vectors.
[0023] Among them, the question intent feature vector is used to represent the semantic needs pointed to by the user's question, and the domain terminology feature vector is used to represent the semantic meaning of professional terms in the field of carbon quantum dot enhanced slightly acidic hypochlorous acid synergistic disinfection.
[0024] Furthermore, after obtaining the question intent feature vector, the system performs a vector inner product calculation between the question intent feature vector and the pre-constructed standard term node feature vector.
[0025] Specifically, the standardized terminology nodes include nodes for carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios. Each standardized terminology node is configured with a corresponding node feature vector. Through vector inner product calculation, the system obtains the semantic similarity between the user's query intent and each standardized terminology node, and sorts them according to the similarity value from largest to smallest, forming an initial node mapping set. This process maps users' colloquial expressions to a professional terminology system, providing a standardized node foundation for subsequent knowledge graph construction.
[0026] Furthermore, when the maximum node similarity in the initial node mapping set does not reach the preset threshold, it indicates that there is an expression difference or semantic deviation between the user's question text and the existing standardized terms.
[0027] At this point, the system uses a graph neural network to aggregate features of related nodes in the field of carbon quantum dots enhancing synergistic disinfection with slightly acidic hypochlorous acid. The graph neural network utilizes the connections between nodes to integrate information about related nodes surrounding the target candidate node into the node representation, ensuring that node features simultaneously encompass both their own textual semantics and the contextual relationships within the knowledge structure. When user queries contain non-standard expressions such as "weakly acidic disinfectant," "carbon dot-assisted sterilization," or "sterilization enhancement," the system uses related node aggregation, a synonym mapping table, and hierarchical relationship determination to complete these expressions to the standard nodes of "slightly acidic hypochlorous acid," "carbon quantum dots," and "synergistic disinfection effect," resulting in an expanded node mapping set.
[0028] Furthermore, after obtaining the extended node mapping set, the system filters irrelevant nodes by term category filtering and candidate node pruning.
[0029] Specifically, terminology category selection is conducted according to materials, disinfectants, target organisms, reaction mechanisms, conditions of action, safety evaluation, and application scenarios. When user questions concern disinfection effectiveness, the system retains nodes related to synergistic disinfection effects, disinfection targets, and conditions of action; when user questions concern safety, the system retains nodes related to safety evaluation indicators and application scenarios. Candidate nodes that do not match the category, do not meet the set requirements for semantic relevance, or do not meet the set requirements for path relevance are deleted by the system through candidate node pruning.
[0030] Subsequently, the system calculates node weights for the retained nodes. Node weights are determined by semantic similarity, term category matching degree, graph structure association strength, and synonym matching strength, and the calculation results are normalized. When the normalized score of a candidate node is greater than the node confidence threshold, the system identifies that candidate node as the target specification term node.
[0031] As a preferred embodiment, after identifying the target specification terminology node, the system uses the target specification terminology node as a starting point to perform cross-node relationship reasoning within the knowledge structure of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection. Cross-node relationship reasoning is used to discover the direct and indirect associations between the target specification terminology node and other entity nodes.
[0032] The system starts from a carbon quantum dot node, connects to a slightly acidic hypochlorous acid node via an enhancement relationship, and then connects to a disinfection object node via an action relationship, or connects to an action condition node and a reaction mechanism node via an influence relationship. To prevent the reasoning scope from exceeding the set boundaries, the system uses relationship hop count limits and relationship type filtering to constrain the reasoning boundaries. The relationship hop count limit is used to limit the maximum number of hops that can be expanded outward from the starting node, and the relationship type filtering is used to retain relationship types related to the construction of the collaborative disinfection knowledge graph, including enhancement, action, influence, association, evaluation, and application relationships, and to filter relationship edges that are irrelevant to the current construction goal.
[0033] Specifically, during cross-node relationship reasoning, the system performs path branch priority ranking for each extension branch. The ranking criteria include node weight, edge weight, relationship type priority, path completeness, and domain rule matching degree.
[0034] Specifically, by prioritizing path branches, the system expands paths sequentially according to the sorting results, ensuring that the semantic association with the target specification term nodes meets the requirements and the relationship type conforms to the graph construction goal, thus obtaining an initial set of expanded paths. For the initial set of expanded paths, the system further evaluates the overall reliability of the paths using a path weight accumulation method and sets node access markers for visited nodes to prevent loops from forming in the graph structure due to bidirectional relationships, circular relationships, or synonymous node backreferences.
[0035] Furthermore, during the path search process, the system follows path pruning rules and termination conditions to set the convergence search range.
[0036] Specifically, path pruning rules include deleting paths whose cumulative weight has not reached a threshold, deleting paths containing duplicate nodes, deleting paths whose relationship type does not meet preset requirements, and deleting paths whose length exceeds the limit. Termination conditions include reaching the maximum relationship hop count, the path confidence not meeting the set requirements, obtaining a sufficient number of candidate paths, or the current path being unable to continue connecting valid nodes. By evaluating the path length of each path, the system excludes paths that cannot express complete knowledge relationships, as well as paths that exceed the set length and introduce noisy relationships, ultimately obtaining a set of candidate relationship paths.
[0037] Furthermore, for the set of candidate relation paths, the system continues to calculate the path confidence score for each candidate relation path. The path confidence score is jointly determined by the node weights of each node in the path, the edge weights of each relation edge, the path length penalty factor, and the relation type matching degree.
[0038] Specifically, when the path confidence score in a candidate relation path exceeds a preset threshold, the system extracts the path entity sequence and entity relation sequence corresponding to that path, forming a target knowledge triple set. The target knowledge triple is represented as an entity, relation, and entity structure, including carbon quantum dots, enhancement, synergistic disinfection effect of slightly acidic hypochlorous acid, slightly acidic hypochlorous acid, acting on, disinfection target, acting conditions, effects, synergistic disinfection effect, reaction mechanism, association, safety evaluation indicators, synergistic disinfection effect, applied to, and application scenario.
[0039] Finally, based on the target knowledge triplet set, the system organizes the entity relationships between carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effect, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios into a graph-like structure.
[0040] In the graph-based organization, the system treats the aforementioned entities as nodes in the knowledge graph, the semantic relationships between entities as relation edges, and configures the nodes and relation edges with attributes such as category, weight, confidence, source text, and update time. The resulting carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection knowledge graph can support structured storage of domain knowledge, semantic retrieval, path reasoning, question answering, and knowledge updating.
[0041] In the above scheme, carbon quantum dots are incorporated into the knowledge graph construction process as a functional entity that enhances the disinfection effect of slightly acidic hypochlorous acid. During entity relation extraction and multi-hop relation reasoning, the construction device identifies the relationship between carbon quantum dots and slightly acidic hypochlorous acid as an enhancing relationship and further associates this enhancing relationship with synergistic disinfection nodes. This synergistic disinfection effect includes enhanced disinfection intensity, shortened disinfection time, and extended disinfection effect duration. Specifically, enhanced disinfection intensity indicates that, under the same disinfection target and conditions, the inactivation ability of slightly acidic hypochlorous acid against target microorganisms is improved after the participation of carbon quantum dots; shortened disinfection time indicates a reduction in the contact time required to achieve the set disinfection result; and extended disinfection effect duration indicates an increase in the effective inhibition time of microbial regrowth after disinfection treatment. The construction device uses the aforementioned enhanced disinfection intensity, shortened disinfection time, and extended disinfection effect duration as effect attributes of the synergistic disinfection node, and through entity relations such as carbon quantum dots, enhancement, slightly acidic hypochlorous acid synergistic disinfection effect, and synergistic disinfection effect, manifested as, and enhanced disinfection intensity, forms a knowledge structure that characterizes the enhanced disinfection effect of slightly acidic hypochlorous acid by carbon quantum dots.
[0042] Example 2:
[0043] S1 includes obtaining domain text and spoken question text for carbon quantum dot-enhanced synergistic disinfection with slightly acidic hypochlorous acid, performing lexical analysis to obtain a word segmentation sequence; performing contextual semantic understanding based on the word segmentation sequence to obtain an initial semantic feature matrix; extracting features from the initial semantic feature matrix to determine the question intent feature vector, and extracting entity word vectors from the initial semantic feature matrix to obtain a domain terminology feature vector; fusing the question intent feature vector and the domain terminology feature vector to obtain a question intent feature vector and a domain terminology feature vector containing domain semantic information.
[0044] In this embodiment, after receiving text and spoken question text related to carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection, the construction device first performs input normalization processing on the two types of text.
[0045] Specifically, the input standardization process includes character encoding standardization, full-width character conversion, deletion of consecutive spaces, preservation of punctuation boundaries, standardization of chemical names, and splitting of numerical units. After this process, slightly acidic hypochlorous acid, carbon quantum dots, available chlorine, contact time, disinfection targets, reaction mechanisms, and safety evaluation indicators are represented in a unified character format in the text, preventing the same term from being identified as different terms due to different spellings.
[0046] Furthermore, after completing the input normalization process, the construction device calls the domain terminology lexical list and sequence labeling model to perform lexical analysis on the text. The domain terminology lexical list pre-stores the standardized names, synonyms, and abbreviations of carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios. The sequence labeling model determines the position of each character in a term and outputs the term boundaries. The construction device combines consecutive characters into terms according to the term boundaries, while retaining the start position, end position, part-of-speech category, and entity category of each term in the original text.
[0047] In cases where the domain terminology vocabulary recognition results differ from those of the sequence labeling model, the construction device calculates boundary selection scores based on the number of characters covered by the terminology, the priority of the terminology category, and the context matching results. The number of characters covered corresponds to the number of characters completely covered; the priority of the terminology category is determined according to a preset order: material entity, disinfectant entity, action entity, object entity, condition entity, mechanism entity, safety evaluation entity, and application scenario entity; and the context matching results are determined by whether adjacent terms satisfy the domain semantic collocation. The construction device adds these three scores together and selects the boundary with the highest score as the final term boundary, thus obtaining the word segmentation sequence.
[0048] Furthermore, after obtaining the word segmentation sequence, the construction device converts each word term into a word vector. The word vector is formed by adding three parts: the first part is the semantic vector of the word itself, used to represent the literal meaning of the word; the second part is the position vector, used to represent the word term's position in the word segmentation sequence; and the third part is the text type vector, used to distinguish whether the word term originates from domain text or spoken question text. The construction device arranges all word vectors according to the order of the words in the word segmentation sequence, forming an input vector matrix.
[0049] Subsequently, the construction device feeds the input vector matrix into a pre-trained language model for contextual semantic understanding.
[0050] Furthermore, when the pre-trained language model performs contextual semantic understanding on the input vector matrix, it first generates a query representation, a key representation, and a value representation for each term. The construction device matches and calculates the query representation of the current term with the key representations of other terms in the word segmentation sequence to obtain the attention score of the current term to other terms.
[0051] The attention scores, after normalization, form the attention weights for each word in the current word segment. The construction device then performs a weighted sum of the values of each word segment according to the attention weights to obtain the semantic representation of the current word segment after incorporating the context. This process is performed on each word segment in the word segmentation sequence, and after nonlinear transformations, residual connections, and normalization within the pre-trained language model, an initial semantic feature matrix is formed. Each row of this initial semantic feature matrix corresponds to a word segment in the word segmentation sequence, each column corresponds to a semantic feature dimension, and the matrix value represents the semantic state of that word segment in the current context.
[0052] As a preferred embodiment, after obtaining the initial semantic feature matrix, the construction device extracts the question intent features from the matrix rows corresponding to the spoken question text.
[0053] Specifically, the construction device first reads the semantic representation of each term in the spoken question text and calculates the intent contribution value according to the term category. The intent contribution value is obtained by adding the contribution values of action words, object words, condition words, and evaluation words. The action word contribution value is determined by terms related to enhancement, disinfection, killing, evaluation, and application; the object word contribution value is determined by terms related to carbon quantum dots, slightly acidic hypochlorous acid, bacteria, viruses, and biofilms; the condition word contribution value is determined by terms related to concentration, pH, contact time, and temperature; and the evaluation word contribution value is determined by terms related to safety, inactivation effect, and residue indicators. The construction device normalizes the intent contribution values of each term so that the sum of the weights of all terms is 1. Subsequently, the construction device performs a weighted summation of the semantic representations of each term in the spoken question text according to the normalized weights to obtain the question intent feature vector.
[0054] Thus, the questioning object, questioning action, questioning conditions, and questioning evaluation, which are scattered throughout the spoken question text, are centralized into a single vector representation.
[0055] Furthermore, the construction device extracts entity word vectors from the initial semantic feature matrix to obtain domain terminology feature vectors. The construction device reads the entity category tags formed during the lexical analysis stage to determine the positions of terms belonging to material entities, disinfectant entities, action entities, object entities, condition entities, mechanism entities, safety evaluation entities, and application scenario entities.
[0056] For an entity consisting of a single term, the construction device directly takes the semantic representation of that term in the initial semantic feature matrix as the entity word vector. For an entity consisting of two or more consecutive terms, the construction device adds up the semantic representations of all terms within the scope of the entity, and then divides by the number of terms to obtain the entity word vector. For cases where the same normative term appears more than twice in the text, the construction device first obtains the entity word vector corresponding to each occurrence position, then adds up all entity word vectors and divides by the number of occurrences to obtain the domain term feature vector corresponding to the normative term.
[0057] As a result, carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios all form corresponding domain terminology feature vectors.
[0058] In this embodiment, after obtaining the question intent feature vector and the domain terminology feature vector, the construction device performs a fusion process on the two. During the fusion process, the construction device first calculates the correlation score between the question intent feature vector and each domain terminology feature vector.
[0059] Specifically, the correlation score is calculated as follows: Each dimension of the question intent feature vector is multiplied item by item by the corresponding dimension of the domain term feature vector, and then all products are summed to obtain the correlation score of the domain term relative to the current question intent. The construction device normalizes all correlation scores so that the sum of the correlation weights of all domain terms is 1. Subsequently, the construction device performs a weighted summation of the feature vectors of each domain term according to the correlation weights to obtain the domain constraint vector. This domain constraint vector is used to represent the combination of domain terms involved in the current question.
[0060] Furthermore, the construction device concatenates the question intent feature vector with the domain constraint vector and obtains the fused question intent feature vector through a linear transformation. The linear transformation process is as follows: the values of each dimension in the concatenated vector are multiplied by the corresponding weights obtained through pre-training, and then each product is added to the bias value to obtain a new vector value; subsequently, the new vector value is normalized so that the values of different dimensions are within the same scale range.
[0061] Through this processing, the fused question intent feature vector simultaneously includes the questioning purpose expressed in the spoken question text, as well as the limiting relationship of the terminology in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection to that questioning purpose.
[0062] Furthermore, for the domain terminology feature vector, the construction device uses the question intent feature vector to semantically supplement it.
[0063] Specifically, the construction device multiplies each domain terminology feature vector by the corresponding dimension of the question intent feature vector, and calculates a gating value based on the concatenation result. The gating value ranges from 0 to 1 and is used to determine the proportion of question intent features entering the domain terminology features. After multiplying the question intent feature vector by the gating value, the construction device concatenates it with the original domain terminology feature vector, and then performs linear transformation and normalization to obtain the fused domain terminology feature vector. This fused domain terminology feature vector retains the semantics of the term itself in the domain text and also carries the semantic reference of the spoken question text to that term.
[0064] After the above processing, the construction device obtains a query intent feature vector containing domain semantic information and a domain terminology feature vector containing domain semantic information. The former is used to characterize the retrieval intent corresponding to the user's query, and the latter is used to characterize the meaning of standard terms in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection.
[0065] Example 3:
[0066] S2 includes obtaining the feature vector of the question intent and the feature vector of the standard term nodes in the field of carbon quantum dot-enhanced synergistic disinfection of slightly acidic hypochlorous acid; calculating the node similarity value based on the feature vector of the question intent and the feature vector of the standard term nodes; if the node similarity value is greater than the matching threshold, the corresponding node is extracted as a candidate mapping node; the candidate mapping nodes are sorted according to the node similarity value, and the initial node mapping set is obtained based on the sorting result.
[0067] In this embodiment, after completing the semantic encoding of the spoken question text, the construction device reads the question intent feature vector from the vector cache unit.
[0068] The question intent feature vector is formed by semantically extracting the questioning action, question object, limiting conditions, and evaluation direction from the spoken question text, and is used to represent the retrieval target corresponding to the current user's question. The device simultaneously reads the feature vectors of standardized terminology nodes from a standardized terminology node library in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection. Each node in the standardized terminology node library is pre-configured with a node identifier, node name, node category, synonym expression, parent node, subordinate node, related nodes, node activation status, and node feature vector. Standardized terminology nodes with an "activated" status are included in this similarity calculation, while those with an "deactivated" status are not included.
[0069] Furthermore, when reading the feature vector of the standard terminology node, the construction device first performs a data integrity check. The check includes whether the node identifier is empty, whether the node category belongs to a preset category, whether the node feature vector exists, and whether the number of dimensions of the node feature vector is consistent with the feature vector of the query intent.
[0070] Specifically, the preset categories include material entities, disinfectant entities, action entities, object entities, condition entities, mechanism entities, safety evaluation entities, and application scenario entities. For feature vectors of standardized terminology nodes with the same number of dimensions, the construction device directly retains the original vectors; for feature vectors of standardized terminology nodes with inconsistent numbers of dimensions, the construction device calls a pre-trained dimension mapping layer for transformation.
[0071] The processing of the dimension mapping layer is as follows: multiply the values of each dimension in the node feature vector by the corresponding mapping weight, accumulate the resulting products according to the output dimension, and add the corresponding bias value to the accumulation result to obtain the node feature vector with the same number of dimensions as the question intent feature vector.
[0072] Furthermore, after completing the dimensional consistency processing, the construction device performs normalization processing on the question intent feature vector and the normative term node feature vector, respectively.
[0073] Specifically, the normalization process is as follows: First, square the values of each dimension in the vector, then sum all the squared values to obtain the sum of squares; then take the square root of the sum of squares to obtain the vector length; finally, divide the value of each dimension in the vector by the vector length to obtain the normalized vector. After normalization, the numerical scale of vectors from different sources is unified, and the node similarity calculation result is determined by the semantic direction.
[0074] Furthermore, the constructing device then calculates node similarity based on the query intent feature vector and the feature vector of each canonical term node.
[0075] In the specific calculation, the construction device multiplies the first dimension of the question intent feature vector with the first dimension of the standard term node feature vector to obtain the first product; it then multiplies the second dimension to obtain the second product; and so on, until the last dimension, resulting in a set of products with the same number of vector dimensions. The construction device then sums all the products in the set, and the sum is used as the node similarity value between the standard term node and the current question intent. The construction device performs the above calculation on all enabled standard term nodes and writes the calculation results into a similarity result table.
[0076] Each record in the similarity results table includes node identifier, node name, node category, node similarity value, vector version number, and calculation time.
[0077] Furthermore, the matching threshold is determined by labeling a sample set before the device is deployed.
[0078] In one specific embodiment, the labeled sample set contains 3000 spoken question texts. Each spoken question text is labeled with its corresponding standardized terminology nodes by two domain experts. When the labeling results of the two domain experts are consistent, the labeling result enters the threshold determination process; when the labeling results of the two domain experts are inconsistent, a third domain expert reviews and determines the final labeling result. The construction device sets the candidate matching threshold to a value between 0.50 and 0.95, with a value interval of 0.01, and sequentially uses each candidate matching threshold to filter nodes in the labeled sample set. For each candidate matching threshold, the construction device counts the number of filtered nodes, the number of filtered nodes that belong to the final labeling result, and the number of nodes that were not filtered in the final labeling result. The accuracy is calculated by dividing the number of filtered nodes that belong to the final labeling result by the number of filtered nodes.
[0079] Specifically, the recall rate is calculated by dividing the number of nodes selected and belonging to the final labeled results by the number of nodes in the final labeled results. The comprehensive evaluation value is calculated by multiplying the precision and recall rates, multiplying the product by 2, and finally dividing by the sum of the precision and recall rates. The construction device determines the candidate matching threshold with the highest comprehensive evaluation value as the matching threshold. If there are two or more candidate matching thresholds with the same comprehensive evaluation value, the candidate matching threshold with the highest value is selected as the matching threshold to constrain the number of nodes entering the candidate mapping node list. In this specific embodiment, after calculation using the labeled sample set, the matching threshold is determined to be 0.72.
[0080] As a preferred embodiment, after obtaining the node similarity value and the matching threshold, the construction device reads the similarity result table one by one and compares the node similarity value of each standard term node with 0.72.
[0081] Specifically, when the node similarity value is greater than 0.72, the construction device extracts the standardized term node as a candidate mapping node and writes the node identifier, node name, node category, node similarity value, synonym expression hit flag, and node source into the candidate mapping node list. When the node similarity value is less than or equal to 0.72, the construction device does not write the standardized term node into the candidate mapping node list. Through this filtering process, only standardized term nodes that meet the matching threshold are retained, while standardized term nodes that do not meet the matching threshold are excluded from the initial mapping range.
[0082] Furthermore, after the candidate mapping nodes are formed, the construction device sorts them according to their node similarity values. During sorting, the construction device first compares the node similarity values, placing the candidate mapping node with the higher similarity value first. If two candidate mapping nodes have the same node similarity value, then the node category priority is compared.
[0083] The node category priority is pre-written in the parameter table, in the following order: disinfectant entity, material entity, action entity, object entity, condition entity, mechanism entity, safety evaluation entity, and application scenario entity. If both the node similarity value and node category priority are the same, then the synonym expression hit tags are compared; candidate mapping nodes with synonym expression hits are ranked first. If the above conditions are still the same, then the node update time is compared, and the candidate mapping node with the later update time is ranked first. This results in a candidate mapping node ranking result with a determined order.
[0084] Furthermore, the construction device extracts an initial node mapping set based on the sorting result of the candidate mapping nodes. In one specific embodiment, the number of nodes extracted from the initial node mapping set is set to 20. When the number of candidate mapping nodes is greater than 20, the construction device extracts nodes sequentially from the first candidate mapping node in the sorting result to the 20th candidate mapping node, and combines the extracted 20 candidate mapping nodes into the initial node mapping set. When the number of candidate mapping nodes is less than or equal to 20, the construction device combines all candidate mapping nodes in the candidate mapping node list into the initial node mapping set.
[0085] Example 4:
[0086] S3 includes determining the maximum node similarity of the initial node mapping set; if the maximum node similarity is lower than a preset threshold, then the associated nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection are aggregated using a graph neural network to generate aggregated feature representations of the associated nodes; semantically biased nodes in the associated nodes are determined based on the aggregated feature representations; semantically biased nodes are completed based on a synonym mapping table to obtain an extended node mapping set.
[0087] In this embodiment, after obtaining the initial node mapping set, the construction device reads each node record within the set. Each node record includes a node identifier, node name, node category, node similarity value, node source, and sorting number.
[0088] Specifically, the construction device reads nodes in the order of their sorting numbers. First, it reads the node similarity value of the first node record and records this value as the current maximum node similarity. Then, it reads the node similarity value of the second node record and compares it with the current maximum node similarity. If the node similarity value of the second node record is greater than the current maximum node similarity, the current maximum node similarity is replaced by the node similarity value of the second node record. If the node similarity value of the second node record is less than or equal to the current maximum node similarity, the current maximum node similarity remains unchanged. The construction device reads nodes sequentially until the last node record in the same manner. The value retained after traversal is the maximum node similarity of the initial node mapping set.
[0089] The preset threshold is used to determine whether the initial node mapping set meets the terminology mapping requirements. This preset threshold is determined by the labeled sample set before the device is deployed. The labeled sample set includes 3,000 spoken question texts in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection. Each spoken question text is labeled with the corresponding standardized terminology nodes by two domain personnel. Samples with consistent labeling by two domain personnel directly enter the threshold determination process, while samples with inconsistent labeling are reviewed by a third domain personnel to determine the final labeled nodes.
[0090] Furthermore, the construction device uses values between 0.50 and 0.95 as candidate thresholds, with intervals of 0.01, and sequentially uses each candidate threshold to verify the labeled sample set. During verification, the construction device counts four categories of samples: Category 1: the number of samples with maximum node similarity less than the candidate threshold and which, after subsequent expansion, yielded correct nodes; Category 2: the number of samples with maximum node similarity less than the candidate threshold but which, after subsequent expansion, did not yield correct nodes; Category 3: the number of samples with maximum node similarity greater than or equal to the candidate threshold and whose initial node mapping was correct; and Category 4: the number of samples with maximum node similarity greater than or equal to the candidate threshold but whose initial node mapping was incorrect.
[0091] Specifically, the construction device adds the quantity of the first category to the quantity of the third category to obtain the number of correct judgments corresponding to the candidate threshold, and then divides the number of correct judgments by 3000 to obtain the judgment accuracy corresponding to the candidate threshold. The construction device determines the candidate threshold with the highest judgment accuracy value as the preset threshold; when the judgment accuracy values of two candidate thresholds are the same, the candidate threshold with the higher value is selected. In this embodiment, the preset threshold is determined to be 0.72.
[0092] The construction device compares the maximum node similarity with 0.72. When the maximum node similarity is greater than or equal to 0.72, the initial node mapping set continues to the subsequent node selection process. When the maximum node similarity is less than 0.72, the construction device determines that there is an expression difference between the current spoken question text and the standardized terminology node, and initiates the associated node feature aggregation process. At this time, the construction device uses the node in the initial node mapping set as the starting node and reads the associated nodes connected to the starting node from the knowledge graph of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection domain.
[0093] Specifically, the readable relation edges include synonym relations, superior relations, subordinate relations, material enhancement relations, disinfection effect relations, object of action relations, conditional influence relations, reaction mechanism relations, safety evaluation relations, and application scenario relations. The construction device simultaneously reads the relation type, relation source, review status, and edge weight of each relation edge.
[0094] As a preferred embodiment, the edge weight of the relationship is determined according to the number of relationship sources, the level of the relationship sources, and the review status. The number of relationship sources is determined by the number of text entries supporting the relationship; the level of the relationship sources is pre-assigned according to the order of experimental data, standard documents, patent texts, paper texts, and user logs; and the review status is pre-assigned according to whether it has been reviewed or not. The construction device adds the values corresponding to the number of relationship sources, the level of the relationship sources, and the review status to obtain the edge weight of the relationship.
[0095] In cases where there are more than two relational edges between nodes in the same group, the construction device calculates the edge weight of each relational edge and retains the relational edge with the first-ranked edge weight for feature aggregation.
[0096] Furthermore, the construction device performs feature aggregation on associated nodes using a graph neural network. For any associated node, the construction device first reads the node's own node feature vector, and then multiplies each dimension of the node's own feature vector by its own node weight to obtain the weighted result of the own node. The weight of the own node is pre-written into a parameter table, and in this embodiment, it is set to 1.
[0097] Subsequently, the construction device reads the feature vectors of neighboring nodes connected to the associated node and weights the neighboring node feature vectors according to the relationship edge weights, relationship type weights, and node category weights between the neighboring nodes and the associated node. Specifically, each dimension of the neighboring node feature vector is multiplied by the corresponding relationship edge weight, then by the corresponding relationship type weight, and finally by the corresponding node category weight to obtain the weighted feature result of the neighboring node. The relationship type weights and node category weights are both validated using training samples and written into the parameter table, which the construction device directly calls during runtime.
[0098] Furthermore, the construction device adds the weighted result of the self-node to the weighted feature results of all adjacent nodes dimension by dimension to obtain the intermediate aggregation result.
[0099] Subsequently, the construction device calculates the total weight value participating in the aggregation. This total weight value is obtained by multiplying and summing the weights of the self-nodes, the weights of the relation edges corresponding to each adjacent node, the relation type weights, and the node category weights. The construction device divides each dimension value in the intermediate aggregation result by the total weight value participating in the aggregation to obtain the normalized aggregation result. The normalized aggregation result then enters the feature transformation layer of the graph neural network. The feature transformation layer multiplies each dimension value in the normalized aggregation result by the corresponding weights obtained during training, sums the multiplications, and adds a bias value to obtain the transformed feature value. The transformed feature value is then processed by an activation function to form the aggregated feature representation of the associated node.
[0100] Through this process, the aggregated feature representation of associated nodes simultaneously includes the semantics of the associated node itself, the semantics of adjacent nodes, and the semantics of relation edges.
[0101] Furthermore, after obtaining the aggregated feature representation, the construction device performs semantic deviation determination on the associated nodes. Semantic deviation nodes refer to nodes that do not meet the matching requirements in the initial node mapping set, but can establish a corresponding relationship with the current question intent after semantic aggregation of associated nodes.
[0102] The construction device first calculates the aggregated similarity between the aggregated feature representation of the associated node and the question intent feature vector. During calculation, the first dimension of the aggregated feature representation is multiplied by the first dimension of the question intent feature vector to obtain the first product; the second dimension is multiplied by the second dimension of the question intent feature vector to obtain the second product; this process is repeated until the last dimension, and then all products are summed to obtain the aggregated similarity value. The construction device then reads the direct similarity value of the associated node in the initial similarity calculation stage; if the associated node is not included in the initial similarity result table, its direct similarity value is recorded as 0.
[0103] In this embodiment, the semantic deviation judgment threshold is also determined through the labeled sample set. The construction device uses values between 0.50 and 0.90 as candidate judgment thresholds, with a value interval of 0.01, and verifies 3000 labeled samples using each candidate judgment threshold.
[0104] For each candidate judgment threshold, the construction device counts the number of nodes judged as semantically biased and belonging to the final labeled nodes, and the number of nodes judged as semantically biased but not belonging to the final labeled nodes. The construction device subtracts the latter number from the former to obtain the net judgment score of the candidate judgment threshold. The construction device determines the candidate judgment threshold with the highest net judgment score as the semantic bias judgment threshold; when the net judgment scores of two candidate judgment thresholds are the same, the candidate judgment threshold with the higher value is selected. In this embodiment, the semantic bias judgment threshold is determined to be 0.68.
[0105] Furthermore, the construction device combines the aggregated similarity value, the direct similarity value, the preset threshold of 0.72, and the semantic deviation judgment threshold of 0.68 for judgment.
[0106] Specifically, when the aggregated similarity value of an associated node is greater than or equal to 0.68, and the direct similarity value of the associated node is less than 0.72, the construction device classifies the associated node as a semantically biased node. When the aggregated similarity value is less than 0.68, or the direct similarity value is greater than or equal to 0.72, the construction device does not add the associated node to the semantically biased node list. Through this determination method, nodes that were not initially mapped due to colloquial expressions, abbreviations, synonyms, or hierarchical expressions can be identified after aggregating associated nodes.
[0107] As a preferred embodiment, after obtaining the list of semantic deviation nodes, the construction device calls a synonym mapping table for completion. The synonym mapping table stores standardized terms, synonyms, abbreviations, colloquial expressions, entity categories, standardized node identifiers, and review status. The construction device extracts the node name, alias, parent node name, child node name, and adjacent node name of each semantic deviation node, and matches them sequentially with the expressions in the synonym mapping table.
[0108] Specifically, the matching process includes three steps: Step 1 performs a complete match, meaning a match is determined when the content of the semantic deviation node is exactly the same as the expression in the mapping table; Step 2 performs a normalization match, meaning a comparison is made again after removing spaces, standardizing number formats, and standardizing chemical names; Step 3 performs a term order match, meaning that, assuming the entity categories are consistent, the order of terms in the semantic deviation node's content is compared to the order of terms in the mapping table. The construction device only uses the matching result for completion when the review status of the matching result is "reviewed".
[0109] Furthermore, during the completion process, the construction device writes the standardized node identifier, standardized node name, node category, aggregated similarity value, direct similarity value, synonym hit expression, completion method, and review status corresponding to the semantic deviation node into the extended node record.
[0110] If a semantic deviation node matches two or more expressions of the same standard node, the construction device retains the extended node record with the highest aggregate similarity value and writes the remaining matched expressions into the supplementary description field. If a semantic deviation node matches two or more standard nodes, the construction device sorts them sequentially according to entity category consistency, aggregate similarity value, relation edge weight, and review status, and selects the standard node with the highest ranking as the completion result. Entity category consistency is prioritized, aggregate similarity value is prioritized, relation edge weight is prioritized, and review status is prioritized.
[0111] Furthermore, the construction device merges the completed extended node records with the initial node mapping set to form an extended node mapping set.
[0112] During the merging process, the construction device uses the standardized node identifier as the basis for deduplication. If the standardized node identifier in an extended node record does not appear in the initial node mapping set, the extended node record is directly written into the extended node mapping set. If the standardized node identifier in an extended node record already exists in the initial node mapping set, the aggregated similarity value of the extended node record is compared with the node similarity value of the corresponding node in the initial node mapping set. The record with the higher similarity value is retained as the master record, and the source, hit expression, and calculated value of the other record are written into the completion description field of the master record. After merging, the construction device reorders the nodes in the set according to the top values of the node similarity value and the aggregated similarity value to obtain the extended node mapping set.
[0113] Example 5:
[0114] S4 includes extracting term category features from the extended node mapping set, performing candidate node pruning based on the term category features to obtain the remaining node set; extracting semantic relevance from the remaining node set, and using node weights to calculate and process the semantic relevance to obtain a weighted node set; performing term standardization processing on the weighted node set to obtain standardized candidates; calculating the normalized score of the standardized candidates, and if the normalized score is greater than the node confidence threshold, then the target standardized term node is determined.
[0115] In this embodiment, after obtaining the extended node mapping set, the construction device reads the node records in the set one by one. Each node record includes a canonical node identifier, node name, node category, node similarity value, aggregate similarity value, synonym hit expression, relation edge information, node source, review status, and node activation status. The construction device first reads the node category field and uses this field as a term category feature.
[0116] Specifically, terminology category features are stored according to material entities, disinfectant entities, action entities, object entities, condition entities, mechanism entities, safety evaluation entities, and application scenario entities. These categories are written into the domain terminology library when nodes are added to the library. During node addition, the terminology extraction model first provides the category results, which are then confirmed by reviewers and written into the node category field. This allows the category field to serve as a basis for judging candidate node pruning.
[0117] When constructing the device to perform candidate node pruning, it first reads the intent category of the current spoken question text.
[0118] Specifically, the intent category is determined by the intent recognition results of the preceding questions, including queries for disinfection effect, disinfection object, action conditions, reaction mechanism, safety evaluation, and application scenario. The device constructs a table that compares the intent category with the terminology category. Disinfection effect query corresponds to material entity, disinfectant entity, and action entity; disinfection object query corresponds to action entity and object entity; action condition query corresponds to disinfectant entity, condition entity, and action entity; reaction mechanism query corresponds to material entity, disinfectant entity, mechanism entity, and action entity; safety evaluation query corresponds to disinfectant entity, safety evaluation entity, and application scenario entity; and application scenario query corresponds to application scenario entity, object entity, and safety evaluation entity.
[0119] Furthermore, if the node category in the extended node mapping set falls within the range corresponding to the current intent category, the construction device retains the node; if the node category does not fall within the range corresponding to the current intent category, the construction device deletes the node.
[0120] After completing category pruning, the construction device continues to perform node status pruning. The construction device reads the review status and node activation status of each retained node. Nodes with a review status of "reviewed" and a node activation status of "activated" proceed to the relationship validity judgment; nodes with a review status of "unreviewed" or a node activation status of "deactivated" are deleted from the current candidate range.
[0121] In determining the validity of a relationship, the construction device reads the relationship edge between the node and the starting node corresponding to the current question intent.
[0122] Specifically, the types of relationships that can be retained include synonym relationships, superior relationships, subordinate relationships, material enhancement relationships, disinfection effect relationships, target relationship relationships, conditional influence relationships, reaction mechanism relationships, safety evaluation relationships, and application scenario relationships. When any of the above-mentioned relationship edges exist between a node and the starting node, the construction device adds that node to the remaining node set; when no such relationship edge exists between a node and the starting node, the construction device deletes that node. Through the above processing, nodes in the extended node mapping set that do not correspond to the category, are unavailable in the state, or have unreachable relationships will no longer be included in subsequent weighted calculations.
[0123] Furthermore, the construction device extracts semantic relevance for the remaining node set. When extracting semantic relevance, the construction device reads the current question intent feature vector and the node feature vectors corresponding to the remaining nodes, and performs length normalization on both.
[0124] Specifically, the length normalization process is as follows: First, multiply each dimension of the vector by itself to obtain the square value of each dimension; then, sum all the square values to obtain the sum of squares; then, take the square root of the sum of squares to obtain the vector length; finally, divide each dimension of the vector by the vector length to obtain the normalized vector. The construction device multiplies the normalized question intent feature vector with the normalized node feature vector along the corresponding dimensions, and adds the products of all dimensions. The resulting value is used as the semantic relevance between the node and the current question intent. The construction device performs this calculation for each node in the remaining node set and writes the node identifier, node name, node category, and semantic relevance value into the semantic relevance table.
[0125] As a preferred embodiment, the construction device calculates node weights based on a semantic association table.
[0126] Specifically, the node weight is determined by five parameters: semantic relevance, term category consistency, graph structure relationship strength, synonym hit result, and source credibility. The weights of these five parameters are determined through training with labeled samples before device deployment. In this embodiment, the weight for semantic relevance is 0.40, the weight for term category consistency is 0.20, the weight for graph structure relationship strength is 0.15, the weight for synonym hit result is 0.15, and the weight for source credibility is 0.10. The sum of these five weights is 1.
[0127] Furthermore, terminology category consistency is determined by whether the node category falls within the corresponding range of the current intent category. Since nodes that do not fall within the corresponding range have been deleted during the pruning phase, the terminology category consistency value of the remaining nodes is 1. The strength of graph structure relationships is determined by the relationship edges between a node and its starting node. The construction device reads the number of relationship sources, the relationship source level, and the review status, and converts them into relationship edge weights.
[0128] The relationship source quantity is determined by the number of text entries supporting the relationship; the relationship source level is configured with a fixed value in the order of experimental data, standard documents, patent texts, paper texts, and user logs; and the value is 1 when the review status is "reviewed". The construction device adds the values corresponding to the relationship source quantity, relationship source level, and review status to obtain the relationship edge weight, and uses this relationship edge weight as the graph structure relationship strength. If there are two or more relationship edges between the same node and the starting node, the construction device calculates the weight of each relationship edge separately, and takes the weight of the relationship edge with the first numerical value as the graph structure relationship strength of that node.
[0129] Furthermore, the synonym matching results are determined by the synonym mapping table. The construction device matches the node name, alias field, synonym matching expression, and spoken expression field with the synonym mapping table respectively.
[0130] Specifically, when a term is completely hit and the mapping table is in the "approved" state, the synonym hit result is 1; when no approved mapping item is hit, the synonym hit result is 0. Source credibility is determined by the node source. When the node source is a manually reviewed terminology database, the source credibility is 1; when the node source is an approved domain text extraction result, the source credibility is 0.85; when the node source is an approved user log summary result, the source credibility is 0.70.
[0131] In a preferred embodiment, when calculating node weights, the construction device multiplies the semantic relevance value by 0.40, the term category consistency value by 0.20, the graph structure relationship strength value by 0.15, the synonym hit result value by 0.15, and the source credibility value by 0.10. These five products are then summed to obtain the node weight value. The construction device writes the node weight value, along with the node identifier, node name, node category, semantic relevance value, synonym hit expression, graph structure relationship strength, and source credibility, into the weighted node set.
[0132] In this embodiment, the construction device performs terminology standardization processing through a weighted set of nodes.
[0133] Specifically, during processing, the construction device first performs character normalization on the node names in the weighted node set. Character normalization includes removing spaces, standardizing full-width and half-width characters, standardizing Arabic numeral formats, standardizing acidity / alkalinity expressions, standardizing available chlorine expressions, standardizing chemical name expressions, and standardizing Chinese synonym expressions. After character normalization is completed, the construction device performs a complete match between the normalized node names and the standardized terminology list. If a complete match is achieved, the construction device maps the node to the standardized node identifier in the standardized terminology list and records the source of standardization as a standardized terminology list match.
[0134] Furthermore, when a perfect match fails, the construction device invokes a synonym mapping table for standardized matching. The construction device compares the node name, synonym match expression, abbreviation expression, and colloquial expression with the expressions in the synonym mapping table, respectively.
[0135] When the comparison result matches and the expression's review status is "reviewed," the construction device maps the node to the corresponding standardized node identifier in the synonym mapping table and records the standardization source as a "synonym mapping table match." When the synonym mapping table does not match, the construction device reads the node's parent node, child node, and adjacent nodes, and determines the merging-available standardized nodes in the order of consistent entity category, valid relation edge type, and reviewed relation edge status being "reviewed." When merging is successful, the construction device maps the node to the corresponding standardized node identifier and records the standardization source as "graph relation merging."
[0136] Furthermore, during the terminology standardization process, when two or more weighted nodes are mapped to the same standardized node identifier, the construction device performs a merging process. During merging, the construction device compares the node weight values of each weighted node, selects the node with the highest node weight value as the primary candidate, and writes the node name, synonym hit expression, node source, and relation edge information of the remaining nodes into the alias field and source field of the primary candidate.
[0137] Specifically, when one weighted node can be mapped to two or more standardized node identifiers, the construction device sorts them sequentially according to entity category consistency, node weight value, semantic relevance value, source credibility, and review status. Standardized nodes with consistent entity categories are ranked first, followed by those with higher node weight values, those with higher semantic relevance values, those with higher source credibility values, and those with a "reviewed" status. The construction device selects the first-ranked standardized node identifier as the standardization result for that weighted node. After completing the above processing, the construction device generates standardization candidates, each of which includes a standardized node identifier, standardized node name, standardized terminology category, node weight value, semantic relevance value, standardization source, alias field, and review status.
[0138] Furthermore, the construction device then calculates the normalized scores of the standardized candidates. The construction device first reads the node weight values of all standardized candidates and determines the value that ranks first and the value that ranks last among the node weight values.
[0139] For any standardized candidate, the construction device first subtracts the last value of the node weight from the node weight of the candidate to obtain the weight difference; then subtracts the last value of the node weight from the first value to obtain the weight span; and finally divides the weight difference by the weight span to obtain the normalized score of the standardized candidate.
[0140] Specifically, when the value of the first-ranked node weight is equal to the value of the last-ranked node weight, the construction device records the normalization score of each standardization candidate as 1. The normalization score, along with the standard node identifier, standard node name, standard terminology category, node weight value, and standardization source, is written into the standardization candidate scoring table.
[0141] Furthermore, the node confidence threshold is determined by labeling a sample set before the device is deployed.
[0142] Specifically, the labeled sample set includes 3000 spoken question texts in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection. Each spoken question text is labeled with its corresponding standardized terminology node. The labeling process is completed by two domain experts respectively; samples with consistent labeling by the two experts enter the threshold determination process, while samples with inconsistent labeling are reviewed by a third domain expert to determine the final labeled node. The construction device uses values between 0.50 and 0.95 as the confidence threshold for candidate nodes, with a value interval of 0.01, and sequentially uses each candidate node confidence threshold to screen the standardized candidate scoring table.
[0143] For each candidate node confidence threshold, the construction device counts three types of quantities: the first type is the number of candidates whose normalized scores are greater than the candidate node confidence threshold and belong to the final labeled nodes; the second type is the number of candidates whose normalized scores are greater than the candidate node confidence threshold but do not belong to the final labeled nodes; and the third type is the number of candidates that belong to the final labeled nodes but whose normalized scores are less than or equal to the candidate node confidence threshold.
[0144] Furthermore, the construction device calculates the evaluation result of the confidence threshold of each candidate node based on the above three types of quantities.
[0145] Specifically, the precision is calculated as follows: divide the number of items in Class 1 by the sum of the number of items in Class 1 and Class 2. The recall is calculated as follows: divide the number of items in Class 1 by the sum of the number of items in Class 1 and Class 3. The overall evaluation value is calculated as follows: first multiply the precision and recall, then multiply the product by 2, and finally divide by the sum of the precision and recall. When the sum of precision and recall is 0, the overall evaluation value of the confidence threshold for that candidate node is recorded as 0.
[0146] The construction device determines the confidence threshold of the candidate node with the highest comprehensive evaluation value as the node confidence threshold; when the comprehensive evaluation values of two or more candidate node confidence thresholds are the same, the construction device selects the candidate node confidence threshold with the highest value.
[0147] In this embodiment, the node confidence threshold is set to 0.78.
[0148] As a preferred embodiment, the construction device compares the normalized score of each standardized candidate with a node confidence threshold of 0.78. When the normalized score is greater than 0.78, the construction device determines the standardized candidate as a target specification terminology node and writes it into the target specification terminology node table. When the normalized score is less than or equal to 0.78, the construction device does not write the standardized candidate into the target specification terminology node table.
[0149] The target specification terminology node table includes the specification node identifier, specification node name, specification terminology category, normalization score, node weight value, semantic relevance value, standardization source, and alias field.
[0150] After the above processing, the nodes in the extended node mapping set successively complete term category pruning, semantic relevance extraction, node weight calculation, term standardization, and confidence screening, forming target standardized term nodes that can be used for subsequent relational reasoning.
[0151] Example 6:
[0152] S5 includes obtaining a multi-hop inference candidate entity set, which is generated by extracting adjacent entities from the target specification term node; determining whether the multi-hop inference candidate entity set meets the inference boundary constraints, including removing the corresponding entity to obtain a filtered entity set if the number of relation hops in the multi-hop inference candidate entity set is greater than the hop count limit threshold; traversing the filtered entity set to obtain a candidate path branch set; and performing branch priority sorting according to the node access frequency of the candidate path branch set to obtain an initial extended path set.
[0153] In this embodiment, after obtaining the target standardized term node, the construction device reads the standardized node identifier, node name, node category, normalized score, and node weight value of the node, and uses the standardized node identifier as the starting entity identifier for relational reasoning. The construction device accesses the entity index table of the knowledge graph of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection domain, and retrieves entity records that are directly connected to the starting entity identifier by an edge.
[0154] Specifically, the entity record includes entities corresponding to carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios. The construction device simultaneously reads the relationship type, relationship direction, relationship edge weight, relationship source, review status, and relationship creation time between the starting entity and adjacent entities.
[0155] Furthermore, when extracting adjacent entities, the construction device reads the outgoing edge record and incoming edge record of the starting entity respectively. For outgoing edge records, the construction device takes the entity pointed to by the outgoing edge as an adjacent entity; for incoming edge records, the construction device takes the entity from which the incoming edge originates as an adjacent entity.
[0156] For each adjacent entity obtained, the construction device generates a candidate entity record and writes the entity identifier, entity name, entity category, relationship type, relationship direction, relationship edge weight, source entity identifier, and relationship hop count into the candidate entity record.
[0157] Specifically, the relationship hop count of adjacent entities directly connected to the target specification term node is recorded as 1. The construction device then uses the adjacent entity with a relationship hop count of 1 as the next-level extended entity, continues to read entities that are connected to the extended entity by a relationship edge, and records the relationship hop count of the newly acquired entity as the previous-level relationship hop count plus 1.
[0158] The aforementioned expansion process is executed in ascending order of relation hop count until the hop count limit is reached or no next-level entity that meets the relation type requirements is found. This results in a multi-hop inference candidate entity set generated by extracting adjacent entities from the target specification term nodes.
[0159] Specifically, in the process of forming a multi-hop reasoning candidate entity set, the construction device merges duplicate entities.
[0160] If the same entity is extracted through two paths, the construction device compares the hop counts of the two paths, retains the record with the higher hop count as the master record, and writes the source entity, relation type, and relation edge weight of the other path into the path source field of the master record. If the same entity is extracted through two paths with the same hop count, the construction device compares the cumulative relation edge weights of the two paths; the cumulative relation edge weights are obtained by adding the weights of each relation edge in the path. The record with the higher cumulative relation edge weight value is used as the master record.
[0161] If the number of hops and the cumulative weight of the edge are the same, the construction device determines the main relation type according to the preset order of strengthening relation, acting on relation, influencing relation, associating relation, evaluating relation, applying to relation, superior relation, subordinate relation, and synonym relation.
[0162] In this embodiment, the hop count limit threshold is determined through sample path verification before the construction device is deployed.
[0163] Specifically, the sample path validation data includes 3,000 spoken question texts in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection, as well as standard inference paths annotated by domain personnel. Each standard inference path includes a starting entity, traversed entities, relation type, and ending entity. The construction device uses integers between 1 and 5 as candidate hop count limit thresholds and sequentially uses each candidate hop count limit threshold to validate the 3,000 sample paths.
[0164] For each candidate hop count limit threshold, the construction device counts three types of quantities: the first type is the number of samples that can obtain a standard inference path within the hop count limit; the second type is the number of paths generated within the hop count limit but not belonging to the standard inference path; and the third type is the number of samples that obtain a standard inference path only after exceeding the hop count limit. The construction device divides the first type of quantity by 3000 to obtain the standard path coverage value; then divides the second type of quantity by the total number of paths generated under the candidate hop count limit threshold to obtain the irrelevant path generation value; finally, it subtracts the irrelevant path generation value from the standard path coverage value to obtain the boundary evaluation value of the candidate hop count limit threshold.
[0165] In this embodiment, the construction device selects the first integer value of the boundary evaluation value as the hop count limit threshold. If two integers have the same boundary evaluation value, the integer with the first value is selected as the hop count limit threshold. In this embodiment, the hop count limit threshold is set to 3.
[0166] In this embodiment, when the construction device determines whether the set of candidate entities for multi-hop inference meets the inference boundary constraints, it reads the candidate entity records one by one. The construction device first reads the relation hop number field in the candidate entity record and compares the relation hop number with the hop number limit threshold 3. When the relation hop number is greater than 3, the construction device deletes the candidate entity record; when the relation hop number is less than or equal to 3, the construction device retains the candidate entity record and continues to perform relation type determination.
[0167] In the relation type determination process, the construction device reads the relation type field from the candidate entity record. If the relation type belongs to one of the following categories: reinforcing relation, acting on relation, influencing relation, association relation, evaluation relation, applied to relation, superior relation, subordinate relation, or synonym relation, the candidate entity record is added to the filter entity set; if the relation type does not belong to any of these categories, the candidate entity record is deleted. The construction device also reads the relation review status. Candidate entity records with a review status of "reviewed" are added to the filter entity set, while candidate entity records with an "unreviewed" status are deleted. After the above determinations of relation hop count, relation type, and review status, the filter entity set is obtained.
[0168] In this embodiment, the construction device traverses the filtered entity set to obtain a candidate path branch set. At the start of the traversal, the construction device uses the target specification term node as the path starting point, reads the entity in the filtered entity set whose relationship hop count is 1 and which is directly connected to the path starting point, and combines the path starting point, relationship type, and the entity to form the first path segment.
[0169] Subsequently, the construction device uses the terminating entity of the first path segment as the current entity, reads entities connected to the current entity in the filtered entity set with a relationship hop count of 2, and extends the first path segment to form the second path segment. The construction device then uses the terminating entity of the second path segment as the current entity, reads entities connected to the current entity in the filtered entity set with a relationship hop count of 3, and extends the path to form the third path segment. After each extension, the construction device records the path number, starting entity, traversed entities, terminating entity, relationship type, relationship direction, relationship edge weight, relationship hop count, and path length.
[0170] Furthermore, during path traversal, the construction device incorporates entity duplication checks. The device establishes an entity access table for each path being generated, initially empty. Each time an entity is added to a path, the device checks if its entity identifier already exists in the entity access table; if not, it writes the entity identifier into the table and continues extending the path; if it already exists, it stops extending the path and adds the duplicate entity to the previously formed path content as a completed path record.
[0171] The construction device also performs relational adaptation judgment based on the intent category of the current spoken question text. When the current intent category is a disinfection object query, paths containing the action relationship and disinfection action relationship are retained; when the current intent category is an action condition query, paths containing the condition influence relationship and influence relationship are retained; when the current intent category is a reaction mechanism query, paths containing the reaction mechanism relationship, influence relationship, and association relationship are retained; when the current intent category is a safety evaluation query, paths containing the safety evaluation relationship, evaluation relationship, application relationship, and influence relationship are retained. Extension branches whose relationship type does not correspond to the current intent category are not written into the candidate path branch set.
[0172] After completing the traversal, the construction device obtains a set of candidate path branches. Each candidate path branch includes an entity sequence, a relationship sequence, a path length, a relationship hop count, a relationship edge weight sequence, and an entity category sequence.
[0173] Furthermore, the construction device calculates the node access frequency based on the candidate path branch set. The construction device first establishes a node access count table and initially records the access count of each entity as 0.
[0174] Subsequently, the construction device starts from the first path in the candidate path branch set and sequentially reads the entity identifiers in that path. Each time an entity identifier is read, the construction device increments the access count of that entity in the node access count table by 1. The construction device traverses all paths in the candidate path branch set in the same manner to obtain the access count of each entity in the candidate path branch set. For any candidate path branch, the construction device reads the access counts of all entities in that path, adds up the access counts of each entity to obtain the total path access count; then, it divides the total path access count by the number of entities contained in that path to obtain the node access frequency value of that candidate path branch.
[0175] Furthermore, the construction device performs branch priority sorting based on node access frequency. During sorting, the construction device uses the node access frequency value as the primary sorting criterion, placing the candidate path branch with the higher node access frequency value first. If two candidate path branches have the same node access frequency value, the construction device compares the cumulative weight value of the relation edges.
[0176] The cumulative weight of each relation edge in the path is obtained by adding the weights of each relation edge in the path, with the path having the highest cumulative weight ranked first. If both the node access frequency and the cumulative weight of the relation edges are the same, the construction device compares the path lengths, with the path having the highest length ranked first. If all the above sorting conditions are the same, the construction device sorts the paths according to their generation time, with the path generated earlier ranked first. After sorting, the construction device generates an initial set of extended paths according to the sorting sequence.
[0177] Each path in the initial extended path set retains its path number, sorting number, starting entity, passing entities, ending entity, relationship type, relationship hop count, node access frequency value, cumulative relationship edge weight value, and path length.
[0178] Example 7:
[0179] S6 includes extracting the node entities and relation types of the initial path to obtain the accumulated weight; assigning access markers based on the accumulated weights and node entities; determining whether the access markers are in an visited state; generating loop detection results if the access markers are in an visited state; obtaining truncated paths based on the loop detection results; constraining the truncated paths to determine the convergence search range; obtaining the evaluation length value based on the convergence search range; and obtaining a set of candidate relation paths through the evaluation length value.
[0180] In this embodiment, after obtaining the initial set of extended paths, the construction device reads the initial paths one by one according to the path sorting number.
[0181] Specifically, each initial path includes a path number, starting entity, entities traversed, ending entity, entity sequence, relation type sequence, relation direction sequence, relation edge weight sequence, node weight sequence, relation hop count, and path length. The construction device first extracts the node entities and relation types from the initial path. During extraction, the entity sequence is used as the reading object, sequentially obtaining the entity identifier, entity name, and entity category of each node entity; simultaneously, the relation type sequence is used as the reading object, sequentially obtaining the relation type, relation direction, and relation edge weight between adjacent entities. Relation types include reinforcing relations, acting on relations, influencing relations, associating relations, evaluating relations, applying to relations, superior relations, subordinate relations, and synonymous relations.
[0182] Furthermore, the construction device obtains the accumulated weights based on the node entities and relationship types. Specifically, the construction device first reads the node weight of the first node entity in the path and uses this node weight as the current weight value; then it reads the weight of the first relationship edge and adds this relationship edge weight to the current weight value; then it reads the node weight of the second node entity and adds it to the current weight value.
[0183] The construction device continuously performs addition processing according to the order of node entities and relation edges in the path, until the last node entity and the last relation edge in the path have been processed. The value obtained after processing is the accumulated weight of the initial path. Thus, the accumulated weight reflects both the credibility of the node entities in the path and the credibility of the relation edges between entities.
[0184] The edge weight is determined by the number of relation sources, the relation source level, and the review status. The number of relation sources is determined by the number of text entries supporting the relation; the relation source level is assigned in a fixed order: experimental data, standard documents, patent texts, paper texts, and user logs; the review status is 1 when it is reviewed, and the corresponding edge does not proceed to this step when it is unreviewed. The construction device adds the values corresponding to the number of relation sources, the relation source level, and the review status to obtain the edge weight. The node weight uses the node weight values obtained in the previous node screening stage and stores them in the path record along with the node identifier.
[0185] Furthermore, after obtaining the accumulated weights, the construction device assigns access tags to the node entities based on the accumulated weights. The construction device establishes an independent entity access table for each initial path, which is empty at the start of path processing. The construction device reads node entities sequentially according to the entity sequence.
[0186] When reading the first node entity, the construction device writes the entity identifier, path number, access sequence number, current accumulated weight, and access status of the node entity into the entity access table, and records the access status as "accessed". When continuing to read subsequent node entities, the construction device first checks whether the same entity identifier already exists in the entity access table; if the same entity identifier does not exist in the entity access table, the construction device writes the node entity into the entity access table and records the access status as "accessed"; if the same entity identifier already exists in the entity access table, the construction device determines that the node entity has appeared in the same path and records the access sequence number again.
[0187] In this embodiment, when the construction device determines whether an access marker is in an accessed state, it uses the entity identifier as the judgment object. The construction device compares the entity identifier of the current node entity with the entity identifiers already written in the entity access table item by item.
[0188] If the entity identifier does not exist in the entity access table, the current node entity is considered unaccessed, and the path can continue processing. If the entity identifier exists in the entity access table, the current node entity is considered accessed, and the construction device stops the branch containing that node entity from extending further. The above access flags only take effect within the current path and do not reference access records in other paths.
[0189] Furthermore, when an access is marked as visited, the construction device generates a loop detection result. The loop detection result includes the path number, duplicate entity identifier, duplicate entity name, first access sequence number, second access sequence number, loop start position, loop end position, entity sequence within the loop, relation type sequence within the loop, and accumulated weight when the loop is triggered.
[0190] The construction device determines the loop start position based on the first access sequence number and the loop end position based on the subsequent access sequence number. It then writes the node entities and relationship types between these two positions as loop segments into the loop detection result table. Simultaneously, the construction device writes a loop marker into the original path record to indicate that entity back-pointing has occurred on that path.
[0191] As a preferred embodiment, the construction device obtains the truncated path based on the loop detection results. During truncation, the construction device retains the entities and relationships from the path start point to the first occurrence of the repeating entity, and deletes the entities and relationships from the point where the repeating entity reappears as well as thereafter. If the first occurrence of the repeating entity is the path start point, the construction device retains the path content from the path start point to the entity before the repeating entity reappears, and terminates the continued extension of the path.
[0192] For paths that do not generate loop detection results, the construction device directly uses the original path as the truncated path. The truncated path record includes the original path number, the truncated entity sequence, the truncated relation type sequence, the truncated position, the sequence of retained relation edge weights, the sequence of retained node weights, and the accumulated weights after truncation. The accumulated weights after truncation are recalculated. During the calculation, only the node weights and relation edge weights retained in the truncated path are added item by item in the path order; the weights in the deleted segments are not included in the calculation.
[0193] Furthermore, the construction device performs constraint processing on the truncated path to determine the convergence search range.
[0194] Specifically, constraint processing includes path length constraints, relation type constraints, cumulative weight constraints, and terminating entity category constraints. Path length constraints are used to limit the number of relation edges in a truncated path.
[0195] In this embodiment, the upper limit of the path length is 3. This upper limit of the path length is determined through sample path verification: the construction device uses 3000 carbon quantum dot-enhanced oral question texts in the field of synergistic disinfection with slightly acidic hypochlorous acid and their manually annotated reasoning paths, and verifies the candidate path length upper limits as integers between 1 and 5; for each candidate path length upper limit, the construction device counts the number of samples within that length that can obtain manually annotated reasoning paths, and the number of paths generated within that length that do not belong to manually annotated reasoning paths; the construction device divides the former number by 3000 to obtain the annotated path acquisition value, divides the latter number by the total number of paths generated under that length to obtain the irrelevant path generation value, and then subtracts the irrelevant path generation value from the annotated path acquisition value to obtain the length evaluation value; the integer with the first position of the length evaluation value is determined as the path length upper limit, which is 3 in this embodiment.
[0196] Specifically, the relation type constraint is determined based on the intent category of the current spoken question text. When the current intent category is a disinfection object query, the construction device retains truncated paths containing the action relation and disinfection action relation; when the current intent category is an action condition query, the construction device retains truncated paths containing the condition influence relation and influence relation; when the current intent category is a reaction mechanism query, the construction device retains truncated paths containing the reaction mechanism relation, influence relation, and association relation; when the current intent category is a safety evaluation query, the construction device retains truncated paths containing the safety evaluation relation, evaluation relation, application relation, and influence relation; when the current intent category is an application scenario query, the construction device retains truncated paths containing the application relation and action object relation. Truncated paths that do not satisfy the corresponding relation type constraint are not included in the convergence search range.
[0197] Furthermore, the cumulative weight constraint is used to exclude truncated paths that do not meet the required confidence level. The lower limit of the cumulative weight is determined using labeled samples before device deployment.
[0198] Specifically, the construction device uses values between 0.50 and 0.95 as the lower limit of candidate cumulative weights, with a value interval of 0.01, and uses each candidate cumulative weight lower limit to filter truncated paths in 3000 labeled samples. For each candidate cumulative weight lower limit, the construction device counts three categories of quantities: Category 1 is the number of paths with a cumulative weight greater than the candidate value and belonging to manually labeled inference paths; Category 2 is the number of paths with a cumulative weight greater than the candidate value but not belonging to manually labeled inference paths; Category 3 is the number of paths belonging to manually labeled inference paths but with a cumulative weight less than or equal to the candidate value. The construction device divides the quantity in Category 1 by the sum of the quantities in Category 1 and Category 2 to obtain the precision; divides the quantity in Category 1 by the sum of the quantities in Category 1 and Category 3 to obtain the recall; and multiplies the product of precision and recall by 2 and divides it by the sum of precision and recall to obtain the overall evaluation value.
[0199] Specifically, when the sum of precision and recall is 0, the overall evaluation value is recorded as 0. The construction device selects the candidate value ranked first in the overall evaluation value as the lower limit of the cumulative weight; when two candidate values have the same overall evaluation value, the candidate value ranked first is selected. In this embodiment, the lower limit of the cumulative weight is determined to be 0.76.
[0200] In this embodiment, the termination entity category constraint is used to determine whether the path reaches the entity category corresponding to the current query intent. Disinfection object queries the corresponding object entity, action condition queries the corresponding condition entity, reaction mechanism queries the corresponding mechanism entity, safety evaluation queries the corresponding safety evaluation entity, and application scenario queries the corresponding application scenario entity. The construction device reads the termination entity category of the truncated path and compares it with the entity category corresponding to the current query intent category.
[0201] When the two constraints are consistent, the truncated path enters the convergence search range; when they are inconsistent, the truncated path does not enter the convergence search range. After applying path length constraints, relation type constraints, cumulative weight constraints, and terminating entity category constraints, the convergence search range is obtained by constructing the device.
[0202] Furthermore, the construction device obtains the evaluation length value based on the convergence search range. The evaluation length value is determined by the number of relation edges retained in the truncated path, the loop truncation marker, and the adaptation result of the terminating entity category.
[0203] Specifically, the construction device first counts the number of relation edges retained in the truncated path and uses this number as the base length value. If the path has a loop truncation marker, the base length value is incremented by 1 to obtain the evaluated length value; if the path does not have a loop truncation marker, the base length value is the evaluated length value. Paths whose terminating entity category does not match the result corresponding to the current query intent category have already been excluded in the aforementioned constraint processing and are no longer calculated for the evaluated length value.
[0204] Through this process, paths that have experienced loop truncation are marked separately in the length evaluation, while paths that do not have loops are evaluated based on the actual number of relationship edges retained.
[0205] Furthermore, the construction device obtains a set of candidate relation paths by evaluating the length value. Specifically, the construction device reads the evaluated length value, accumulated weight, relation type sequence, and terminating entity category of each path within the convergence search range. Paths with an evaluated length value less than or equal to 3, an accumulated weight greater than 0.76, a relation type sequence that meets the current intent category requirements, and a terminating entity category that matches the current intent category are written into the candidate relation path set.
[0206] If two paths have the same starting and ending entities, the construction device compares the cumulative weights of the two paths and retains the path with the highest cumulative weight. If the cumulative weights are the same, the device compares the evaluation length values and retains the path with the highest evaluation length value. If both the cumulative weight and the evaluation length values are the same, the path with the earlier generation time is retained. Each path in the candidate relation path set includes a path number, entity sequence, relation type sequence, cumulative weight, access marker record, loop detection result, truncation position, evaluation length value, and ending entity category.
[0207] Example 8:
[0208] S7 includes extracting node feature vectors and topological features of candidate relationship paths to obtain connectivity scores; calculating semantic similarity based on connectivity scores and node feature vectors to obtain relationship weight distribution; determining path confidence scores of candidate relationship paths through relationship weight distribution and semantic similarity; if the path confidence score is greater than a preset threshold, extracting the path entity sequence and entity relationship sequence of the candidate relationship path to obtain a set of target knowledge triples.
[0209] In this embodiment, after obtaining the set of candidate relationship paths, the construction device reads the candidate relationship paths sequentially according to their path numbers. Each candidate relationship path stores an entity sequence, a relationship type sequence, a relationship direction sequence, a relationship edge weight sequence, a node weight sequence, an evaluation length value, accumulated weights, a starting entity, a ending entity, and a path generation time. The construction device first reads each node entity in the entity sequence and retrieves the corresponding node feature vector from the node feature storage area.
[0210] Among them, the node feature vector is obtained by pre-sequence semantic encoding, node mapping and node standardization, and is used to represent the semantic meaning of carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effect, disinfection object, action conditions, reaction mechanism, safety evaluation index and application scenario in the current text context.
[0211] Furthermore, the construction device synchronously reads the topological features of the candidate relationship paths. The topological features include the number of entities, the number of relationship edges, the starting entity category, the ending entity category, the consistency of relationship direction, the continuity of relationship type, the entity category connection result, and the truncation mark.
[0212] Specifically, the number of entities is obtained by counting the number of entity identifiers in the entity sequence; the number of relation edges is obtained by counting the number of relation records in the relation type sequence; the starting entity category and the ending entity category are read from the category fields of the entities at the beginning and end of the path, respectively; the consistency of relation direction is obtained by checking whether adjacent relation edges in the path are connected along the reasoning direction from the starting entity to the ending entity; the continuity of relation type is obtained by comparing adjacent relation types with the relation transfer table; the entity category connection result is obtained by comparing adjacent entity categories with the domain entity transfer table; and the truncation mark comes from the results of the preceding loop detection and path truncation processing.
[0213] As a preferred embodiment, after obtaining the node feature vectors and topological structure features, the construction device calculates the connectivity score of the candidate relationship paths. The connectivity score is jointly determined by the relationship edge connectivity item, the relationship direction item, the entity category connection item, and the path completeness item. The calculation process of the relationship edge connectivity item is as follows: the construction device reads the weight of each relationship edge in the candidate relationship path, adds up all the relationship edge weights one by one, and then divides the sum by the number of relationship edges to obtain the relationship edge connectivity item.
[0214] Specifically, the calculation process for the relation direction term is as follows: the construction device checks the direction of each relation edge in the path; when all relation edges are connected along the reasoning direction from the starting entity to the ending entity, the relation direction term is 1; when there is 1 directional back-pointing, 0.2 is deducted from 1; when there are 2 directional back-pointings, 0.4 is deducted from 1; when the value after deduction is less than 0, the relation direction term is 0.
[0215] Specifically, the calculation process for the entity category connection item is as follows: The construction device reads adjacent entity categories according to the entity sequence and compares each item with the domain entity transfer table. Each instance of an adjacent entity category connection matching the domain entity transfer table is counted as one valid connection. The construction device divides the number of valid connections by the total number of adjacent entity category connections to obtain the entity category connection item. The value of the path completeness item is determined by the truncation marker; when there is no truncation marker on the candidate relationship path, the path completeness item is valued at 1; when there is a truncation marker on the candidate relationship path, the path completeness item is valued at 0.8. The construction device multiplies the relationship edge connectivity item by 0.35, the relationship direction item by 0.20, the entity category connection item by 0.25, and the path completeness item by 0.20, then adds the products of these four items to obtain the connectivity score of the candidate relationship path.
[0216] Specifically, the four calculated weights were determined using labeled path samples before the deployment of the construction device. The labeled path samples included 3000 spoken question texts in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection, along with corresponding manually labeled paths. The construction device combined the calculated weights of relation edge connectivity, relation direction, entity category connection, and path completeness in increments of 0.05, ensuring the sum of the four calculated weights was 1. For each set of calculated weights, the construction device calculated the connectivity scores for labeled and unlabeled paths, and counted the number of samples where the labeled path ranked first among the candidate paths for the same question text.
[0217] In this embodiment, the construction device uses the weight combination ranked first as the operating parameter. The weight of the relation edge connectivity item is 0.35, the weight of the relation direction item is 0.20, the weight of the entity category connection item is 0.25, and the weight of the path integrity item is 0.20.
[0218] Furthermore, the construction device calculates semantic similarity based on connectivity scores and node feature vectors. Before calculation, the construction device first performs length normalization on the node feature vectors.
[0219] In the length normalization process, the construction device multiplies each dimension of the node feature vector by itself to obtain the square value of each dimension; then, it adds all the square values to obtain the sum of squares; then, it takes the square root of the sum of squares to obtain the vector length; finally, it divides each dimension of the node feature vector by the vector length to obtain the normalized node feature vector. The starting entity, the entity that passes through, and the terminating entity are all processed in the same way.
[0220] In this embodiment, for the starting entity and the ending entity, the construction device multiplies the normalized feature vector of the starting entity node with the normalized feature vector of the ending entity node according to the corresponding dimensions, and adds the products of all dimensions to obtain the semantic similarity between the starting and ending entities.
[0221] For two adjacent entities in the path, the construction device multiplies the normalized node feature vectors of the two entities along their corresponding dimensions and sums the products of all dimensions to obtain the semantic similarity of the adjacent entity pair. When the candidate relationship path contains more than two adjacent entity pairs, the construction device sums the semantic similarities of each adjacent entity pair and divides by the number of adjacent entity pairs to obtain the average semantic similarity of the adjacent entities. When the candidate relationship path contains traversed entities, the construction device multiplies the semantic similarity of the starting and ending entities by 0.40, the average semantic similarity of adjacent entities by 0.40, and the connectivity score by 0.20, and then sums the products of these three terms to obtain the semantic similarity of the candidate relationship path. When the candidate relationship path does not contain traversed entities, the construction device multiplies the semantic similarity of the starting and ending entities by 0.80, the connectivity score by 0.20, and then sums the products of these two terms to obtain the semantic similarity of the candidate relationship path.
[0222] Furthermore, the construction device generates a relation weight distribution based on connectivity scores and semantic similarity. The relation weight distribution is used to determine the contribution ratio of each relation edge in the candidate relation path to the path determination result.
[0223] For each relation edge in the candidate relation path, the construction device calculates the relation contribution value. The relation contribution value is determined by the relation edge weight, relation type adaptation value, semantic similarity of adjacent entities, and connectivity score. The relation edge weight is converted from the number of relation sources, relation source level, and review status; the relation type adaptation value is determined by whether the intent category of the current spoken question text corresponds to the relation type, with a value of 1 when they correspond, and paths that do not correspond have been deleted in previous steps; the semantic similarity of adjacent entities is the semantic similarity between the entities at both ends of the relation edge; the connectivity score uses the value already calculated for the current candidate relation path.
[0224] Specifically, the calculation process for the relation contribution value is as follows: the construction device multiplies the relation edge weight by 0.35, the relation type adaptation value by 0.25, the semantic similarity of adjacent entities by 0.25, and the connectivity score by 0.15. The products of these four terms are then summed to obtain the relation contribution value for that relation edge. The construction device performs this process on every relation edge in the candidate relation path.
[0225] Subsequently, the construction device sums the relationship contribution values of all relationship edges within the path to obtain a total contribution value; then, it divides the relationship contribution value of each relationship edge by the total contribution value to obtain the weight percentage of each relationship edge in the current candidate relationship path. The weight percentages of each relationship edge are arranged according to the relationship type sequence to obtain the relationship weight distribution. When the total contribution value is 0, the construction device removes the candidate relationship path from the confidence calculation queue.
[0226] In this embodiment, the construction device determines the path confidence score of candidate relationship paths through relation weight distribution and semantic similarity. When determining the path confidence score, the construction device first calculates the relation distribution score.
[0227] The construction device multiplies the weight percentage of each relation edge by its relation contribution value to obtain the weighted contribution value of that relation edge. Then, it sums the weighted contribution values of all relation edges within the path to obtain the relation distribution score. Next, the construction device reads the semantic similarity, connectivity score, accumulated weight, and evaluation length of the candidate relation path. The evaluation length correction value is obtained by dividing the evaluation length value by 1; paths with an evaluation length value of 0 are not included in the path confidence score calculation.
[0228] Specifically, the path confidence score is determined by the relation distribution score, semantic similarity, connectivity score, cumulative weight, and evaluation length correction value. The construction device multiplies the relation distribution score by 0.30, the semantic similarity by 0.25, the connectivity score by 0.20, the cumulative weight by 0.15, and the evaluation length correction value by 0.10, and then adds the products of these five terms to obtain the path confidence score of the candidate relation path.
[0229] The five computational weights mentioned above were determined using 3000 labeled path samples before the deployment of the construction device. The construction device combines the five computational weights in increments of 0.05, ensuring that the sum of the five weights equals 1. For each set of computational weights, the construction device calculates the path confidence score for each candidate relationship path and counts the number of samples where the manually labeled path ranks first among the candidate paths in the same spoken question text. The construction device uses the weight combination with the highest number of samples as its operating parameters.
[0230] In this embodiment, the weight of relation distribution score is 0.30, the weight of semantic similarity is 0.25, the weight of connectivity score is 0.20, the weight of cumulative score is 0.15, and the weight of evaluation length correction value is 0.10.
[0231] Furthermore, the path confidence threshold was determined by annotating path samples before the device was deployed. The annotated path samples included 3,000 spoken question texts in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection, and each spoken question text was configured with manually annotated entity sequences and relation sequences.
[0232] Specifically, the construction device uses values between 0.50 and 0.95 as the confidence threshold for candidate paths, with a value interval of 0.01, and sequentially uses each candidate path confidence threshold to filter candidate relationship paths in the sample data. For each candidate path confidence threshold, the construction device counts three types of quantities: the first type is the number of paths with a confidence score greater than the candidate path confidence threshold and belonging to manually labeled paths; the second type is the number of paths with a confidence score greater than the candidate path confidence threshold but not belonging to manually labeled paths; and the third type is the number of paths belonging to manually labeled paths but with a confidence score less than or equal to the candidate path confidence threshold.
[0233] The device constructs a path confidence threshold by dividing the number of items in category 1 by the sum of the number of items in category 1 and category 2 to obtain the precision; it then divides the number of items in category 1 by the sum of the number of items in category 1 and category 3 to obtain the recall; finally, it multiplies the product of precision and recall by 2 and divides this product by the sum of precision and recall to obtain the overall evaluation value. When the sum of precision and recall is 0, the overall evaluation value is recorded as 0. The device determines the confidence threshold of the candidate path with the highest overall evaluation value as the path confidence threshold; when the overall evaluation values of two or more candidate path confidence thresholds are the same, the candidate path confidence threshold with the highest value is selected. In this embodiment, the path confidence threshold is set to 0.80.
[0234] Furthermore, the construction device compares the path confidence score of each candidate relation path with 0.80. When the path confidence score is greater than 0.80, the construction device identifies the candidate relation path as the target path and extracts the path entity sequence and entity relation sequence of the target path. When the path confidence score is less than or equal to 0.80, the construction device does not extract knowledge triples from the candidate relation path.
[0235] Specifically, when the construction device extracts the path entity sequence, it reads the entity identifier, entity name, entity category, and specification node identifier sequentially according to the order of entities in the target path, and writes the reading results into the path entity sequence table. When the construction device extracts the entity relationship sequence, it reads the relationship type, relationship direction, relationship edge weight, relationship source, and review status sequentially according to the order of relationships in the target path, and writes the reading results into the entity relationship sequence table.
[0236] Subsequently, the construction device generates knowledge triples based on the path entity sequence and entity relation sequence. During generation, the construction device uses two adjacent entities in the path as the preceding and following entities in the triple, and the relationship type between them as the relation in the triple. When the target path contains 2 entities, one knowledge triple is generated; when the target path contains 3 entities, 2 knowledge triples are generated; when the target path contains 4 entities, 3 knowledge triples are generated.
[0237] Furthermore, after the knowledge triples are generated, the construction device performs deduplication and consistency checks. During deduplication, the construction device uses the canonical node identifier of the preceding entity, the relation type, and the canonical node identifier of the following entity as unique keys. If two knowledge triples have the same unique key, the construction device retains the triple with the highest path confidence score and writes the path number, relation source, and relation weight distribution of the other triple into the source field of the retained triple.
[0238] During consistency verification, the construction device checks whether the two entity categories in the triple conform to the domain entity transfer table and whether the relation type belongs to the following categories: enhancement relation, acting relation, influence relation, association relation, evaluation relation, applied relation, superior relation, subordinate relation, and synonym relation. Triples that meet the verification conditions are written into the target knowledge triple set; triples that do not meet the verification conditions are not written into the target knowledge triple set.
[0239] After the above processing, the construction device obtains a set of target knowledge triples. Each record in the target knowledge triple set includes the previous entity canonical node identifier, the previous entity name, the relation type, the next entity canonical node identifier, the next entity name, the path confidence score, the relation weight distribution, the path number, and the relation source.
[0240] Example 9:
[0241] S8 includes obtaining a set of target knowledge triples, extracting the target entities from the set, mapping the entity relationships based on the target entities to obtain a set of entity relationships, organizing the entity relationship set into a graph to determine an initial knowledge graph, determining whether the number of isolated nodes in the graph is greater than a preset threshold, and if the number is greater than the preset threshold, completing the edge relationships in the graph to obtain a knowledge graph of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection.
[0242] In this embodiment, after the construction device obtains the target knowledge triple set, it reads the set records in the order of triple generation time and path confidence score.
[0243] Specifically, each target knowledge triple record includes the preceding entity's canonical node identifier, the preceding entity's name, the preceding entity's category, the relation type, the following entity's canonical node identifier, the following entity's name, the following entity's category, the path confidence score, the relation weight distribution, the path number, and the relation source. The construction device first uses the preceding and following entities as entity extraction objects, and writes their canonical node identifiers, entity names, entity categories, source path numbers, and path confidence scores into an entity temporary storage table.
[0244] Furthermore, the construction device merges entities in the entity temporary storage table to obtain the target entity. During merging, the construction device first compares the canonical node identifiers; entity records with the same canonical node identifier are merged into the same target entity.
[0245] Specifically, for entity records with empty node identifiers, the construction device performs character standardization processing on the entity names. The processing includes removing spaces, standardizing full-width and half-width characters, standardizing Arabic numeral formats, standardizing pH expression, standardizing available chlorine expression, standardizing Chinese chemical name expression, and standardizing synonym expression.
[0246] Specifically, after character normalization, the construction device continues to compare entity names and entity categories; records with the same entity name and entity category are merged into the same target entity. For merged entity records, the construction device retains the record with the highest path confidence score as the master entity record, and writes the path number, relation source, alias, and triplet number of the remaining records into the source field of the master entity record. After merging is complete, the construction device generates a target entity table; each target entity in the target entity table includes a normalized node identifier, entity name, entity category, source path number, alias field, and entity status.
[0247] Furthermore, after obtaining the target entity, the construction device performs relation mapping based on the target entity. The construction device reads the relation types in the target knowledge triple set one by one and calls the relation mapping table for standardization transformation.
[0248] Specifically, the relation mapping table pre-records the triple relation type, standard relation name, relation direction, allowed preceding entity category, allowed following entity category, and approval status. The construction device first determines whether both the preceding and following entities in the triple exist in the target entity table; if both exist, it proceeds to relation mapping processing; if either entity does not exist, the triple is not written into the entity relation set.
[0249] Subsequently, the construction device determines whether the relation type of the triple matches the relation mapping table, and whether the review status of the corresponding record in the relation mapping table is "reviewed". If the relation type matches and the review status is "reviewed", the construction device generates an entity relation record according to the standard relation name and relation direction in the relation mapping table; if the relation type does not match or the review status is not "reviewed", the triple is not written into the entity relation set.
[0250] As a preferred embodiment, the entity relationship record includes the identifier of the preceding entity specification node, the identifier of the following entity specification node, the standard relationship name, the relationship direction, the relationship edge weight, the path confidence score, the relationship source, and the path number. The relationship edge weight is jointly determined by the path confidence score, the relationship weight percentage, and the relationship source level.
[0251] Specifically, the construction device first reads the path confidence score of the path where the triple is located; then it reads the weight ratio corresponding to the relation type from the relation weight distribution; and then it reads the relation source level, which is configured with fixed values in the order of experimental data, standard documents, patent texts, paper texts and user logs.
[0252] The calculation process for relation edge weights is as follows: multiply the path confidence score by 0.50, multiply the relation weight percentage by 0.30, multiply the relation source level value by 0.20, and then add the products of these three terms. The resulting value is written into the relation edge weight field. The construction device performs the above relation mapping and weight calculation on each triple in the target knowledge triple set to form an entity relation set.
[0253] Furthermore, the construction device organizes the entity relationship set into a graph to determine the initial knowledge graph. During graph organization, the construction device first establishes a node table based on the target entity table. Node records in the node table include node identifier, canonical node identifier, node name, node category, source path number, node status, and creation time.
[0254] Specifically, the construction device then establishes an edge table based on the entity relationship set. The edge records in the edge table include edge identifier, previous node identifier, next node identifier, standard relationship name, relationship direction, relationship edge weight, path confidence score, relationship source, and edge status. Before writing to the edge table, the construction device performs entity category verification; during verification, the previous entity category, standard relationship name, and next entity category are compared with the domain entity transfer table. If the comparison results match, the edge record is written to the edge table; if the comparison results do not match, the edge record is not written to the edge table.
[0255] Specifically, when two or more edge records connect the same preceding node and the same following node, and have the same standard relation name, the construction device performs edge merging processing.
[0256] During the merging process, the construction device compares the relational edge weights of each edge record, retains the edge record with the highest relational edge weight as the primary edge record, and writes the path number, relational source, path confidence score, and relational weight percentage of the remaining edge records into the supplementary source field of the primary edge record. When two edge records connect the same preceding node and the same following node, but have different standard relational names, the construction device retains the corresponding edge records respectively, enabling the same group of entities to express different relational meanings. After the node table and edge table are written, the construction device obtains the initial knowledge graph.
[0257] In this embodiment, the construction device then determines the number of isolated nodes in the initial knowledge graph. An isolated node is a node record that exists in the node table, but the node identifier of that node does not appear in the preceding node identifier field or the following node identifier field of the edge table.
[0258] During the judgment process, the construction device reads the node identifiers from the node table one by one and searches for the node identifier in the preceding and following node identifier fields of the edge table. If the node identifier is not found in either field, the construction device adds the node to the isolated node list; if the node identifier is found in either field, the construction device does not add the node to the isolated node list. After completing the node table traversal, the construction device counts each node record in the isolated node list to obtain the number of isolated nodes. The isolated node list includes the node identifier, node name, node category, source path number, and reason for disconnection.
[0259] Specifically, the preset threshold for the number of isolated nodes is determined through sample graph verification before the deployment of the construction device. The sample graph verification data includes 3,000 spoken question texts in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection and corresponding manually annotated entity relationships. The construction device uses integers between 1 and 30 as candidate isolated node number thresholds and verifies the sample graphs one by one using each candidate isolated node number threshold. For each candidate isolated node number threshold, the construction device counts three types of quantities: the first type is the number of sample graphs with an isolated node number greater than the candidate threshold and which obtain manually annotated entity relationships after edge relationship completion; the second type is the number of sample graphs with an isolated node number greater than the candidate threshold but which do not obtain manually annotated entity relationships after edge relationship completion; the third type is the number of sample graphs with an isolated node number less than or equal to the candidate threshold and which can satisfy manually annotated entity relationships without edge relationship completion.
[0260] The construction device adds the number of type 1 nodes to the number of type 3 nodes to obtain the number of correctly processed nodes; then it divides the number of correctly processed nodes by 3000 to obtain the correct processing value. The construction device selects the candidate isolated node number threshold with the highest correct processing value as the preset threshold. When two or more candidate isolated node number thresholds have the same correct processing value, the construction device selects the candidate isolated node number threshold with the highest value.
[0261] In this embodiment, the preset threshold for the number of isolated nodes is set to 8.
[0262] Specifically, the construction device compares the number of isolated nodes in the initial knowledge graph with a preset threshold of 8. When the number of isolated nodes is less than or equal to 8, the construction device retains the initial knowledge graph as the output graph. When the number of isolated nodes is greater than 8, the construction device initiates edge relationship completion processing. Edge relationship completion processing uses nodes in the isolated node list as nodes to be completed and reads the node category, node feature vector, synonym representation, parent node, sibling node, source text, and source path number of the node to be completed.
[0263] Furthermore, when the construction device performs edge relation completion on the node to be completed, it first filters candidate connection nodes from the target entity table. The filtering criteria are the entity category transfer table, the relation mapping table, and node feature similarity. The construction device reads the node feature vector of the node to be completed and the node feature vector of the candidate connection nodes, and performs length normalization processing on each.
[0264] Specifically, the length normalization process is as follows: multiply the value of each dimension in the vector by itself to obtain the square value of each dimension; add all the square values to obtain the sum of squares; take the square root of the sum of squares to obtain the vector length; divide the value of each dimension in the vector by the vector length to obtain the normalized node feature vector.
[0265] Subsequently, the construction device multiplies the normalized feature vector of the node to be completed with the normalized feature vector of the candidate connected node along the same dimension, and adds all the products to obtain the node feature similarity.
[0266] In this embodiment, the construction device further calculates the relationship completion score between the node to be completed and the candidate connection nodes. The relationship completion score is jointly determined by node feature similarity, entity category transfer result, relationship mapping result, and source consistency.
[0267] Specifically, the entity category transfer result is determined based on the domain entity transfer table. When the category of the node to be completed matches the category of the candidate connection node in the domain entity transfer table, the entity category transfer result is 1; otherwise, the candidate connection node does not participate in the completion. The relationship mapping result is determined based on the relationship mapping table. When the standard relationship name can be determined by the relationship mapping table and the review status is "reviewed," the relationship mapping result is 1; if no reviewed relationship is found, the candidate connection node does not participate in the completion.
[0268] Source consistency is determined based on the node's origin; the value is 1 when the node to be completed and the candidate connection node come from the same path number, 0.8 when they come from the same domain text, and 0.6 when they do not come from the same path number or the same domain text. The relationship completion score is calculated as follows: multiply the node feature similarity by 0.40, multiply the entity category transfer result by 0.25, multiply the relationship mapping result by 0.25, multiply the source consistency by 0.10, and then add the products of the four terms together. The resulting value is the relationship completion score.
[0269] Specifically, the edge completion threshold is determined through sample graph verification before the construction device is deployed. The construction device uses values between 0.50 and 0.95 as candidate edge completion thresholds, with a value interval of 0.01, and uses each candidate edge completion threshold to filter the edges to be completed in 3000 sample graphs.
[0270] For each candidate edge completion threshold, the construction device counts three categories of quantities: Category 1 consists of completed edges with completion scores greater than the threshold and belonging to manually labeled entity relationships; Category 2 consists of completed edges with completion scores greater than the threshold but not belonging to manually labeled entity relationships; and Category 3 consists of completed edges belonging to manually labeled entity relationships but with completion scores less than or equal to the threshold. The construction device divides the quantity in Category 1 by the sum of the quantities in Category 1 and Category 2 to obtain the precision; divides the quantity in Category 1 by the sum of the quantities in Category 1 and Category 3 to obtain the recall; and multiplies the product of precision and recall by 2 and divides it by the sum of precision and recall to obtain the overall evaluation value. When the sum of precision and recall is 0, the overall evaluation value is recorded as 0. The construction device selects the candidate edge relationship completion threshold with the highest comprehensive evaluation value as the operating threshold; when two or more candidate edge relationship completion thresholds have the same comprehensive evaluation value, the construction device selects the candidate edge relationship completion threshold with the highest value. In this embodiment, the edge relationship completion threshold is determined to be 0.79.
[0271] Furthermore, when the completion score of the relationship between the node to be completed and the candidate connection node is greater than 0.79, the construction device generates a completion edge record. The completion edge record includes the previous node identifier, the next node identifier, the name of the completed relationship, the relationship direction, the relationship completion score, the basis for completion, the source field, and the review status.
[0272] The name of the completed relation is determined by the relation mapping table; the relation direction is determined according to the preceding and following entity category directions specified in the domain entity transfer table. If the relation completion scores of one node to be completed corresponding to two or more candidate connection nodes are all greater than 0.79, the construction device sorts them sequentially according to relation completion score, node feature similarity, source consistency, and relation mapping results, and selects the candidate connection node ranked first to generate a completed edge record. If the same group of nodes to be completed and candidate connection nodes match two or more completed relation names, the construction device selects the relation name ranked first as the completed relation name in the following order: enhancing relation, acting on relation, influencing relation, associating relation, evaluating relation, applied to relation, superior relation, subordinate relation, and synonym relation.
[0273] Furthermore, after the complete edge record is generated, the construction device writes the complete edge into the edge table and recalculates the number of isolated nodes in the graph.
[0274] Specifically, during recalculation, the construction device reads the node identifiers in the node table one by one and checks whether the node identifier appears in the previous or next node identifier field of the edge table. If the number of isolated nodes after completion is still greater than 8, the construction device continues to perform edge relationship completion on the remaining isolated nodes. The edge relationship completion process is executed for a maximum of 3 rounds; after the 3rd round of completion, the isolated nodes that are still not connected are retained in the node table, and the node status field is written as pending manual review. If the number of isolated nodes after completion is less than or equal to 8, the construction device stops the edge relationship completion process.
[0275] Furthermore, after completing the edge relationship completion, the device generates a knowledge graph of carbon quantum dots-enhanced synergistic disinfection of slightly acidic hypochlorous acid.
[0276] The knowledge graph includes a node table, an edge table, entity category information, relationship type information, relationship edge weights, path confidence scores, completion edge tags, and source records. The node table stores entities related to carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios. The edge table stores reinforcement relationships, action-to-relationships, influence relationships, association relationships, evaluation relationships, application-to-relationships, superior relationships, subordinate relationships, and synonym relationships between the aforementioned entities.
[0277] Example 10:
[0278] Figure 2 This is a structural block diagram of the network end of an exemplary electronic device of the present invention; as shown below. Figure 2As shown, the present invention also provides an electronic device (machine), which may include at least one processor 210, at least one memory 230 communicatively connected to the processor 210, and a communication bus 240 and a communication interface 220 connecting different system components (including the memory 230 and the processor 210). The processor 210, the memory 230 and the communication interface 220 are connected through the communication bus 240 and complete communication with each other. The communication interface 220 is used for data interaction with external devices. The memory 230 stores a machine-executable program that can be executed by the processor 210, and the processor 210 can execute the above-mentioned control logic by calling the machine-executable program.
[0279] Communication bus 240 represents one or more of several bus architectures, including a memory bus or memory controller, peripheral bus, graphics acceleration port, processor, or local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnection (PCI) bus.
[0280] Electronic devices typically include a variety of computer system readable media, which can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.
[0281] Memory 230 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 230 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the control logic described above.
[0282] A program / utility having a set (at least one) of program modules can be stored in memory 230. Such program modules include, but are not limited to, an operating system, one or more applications, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.
[0283] Machine-executable programs for performing this invention can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, C++, and Python, and may also include specialized engineering languages such as R. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0284] The present invention also discloses a storage medium on which a machine-executable program as described above is stored.
[0285] The aforementioned storage medium may be any combination of one or more computer-readable media. Computer-readable media may be, for example, computer-readable signal media or computer-readable storage media. Computer-readable storage media include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium may be, for example, any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0286] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0287] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0288] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for constructing a knowledge graph of synergistic disinfection using slightly acidic hypochlorous acid enhanced by carbon quantum dots, characterized in that... include: S1. Obtain text related to the synergistic disinfection of carbon quantum dots with slightly acidic hypochlorous acid and the spoken question texts of non-professional users, and obtain the question intent feature vector and the domain terminology feature vector containing domain semantic information; S2. Based on the feature vector of the question intent, perform similarity calculation with the feature vector of the standard term nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection to obtain the initial node mapping set; S3. For the initial node mapping set, if the maximum node similarity in the initial node mapping set is lower than a preset threshold, feature aggregation is performed on the associated nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection to obtain an extended node mapping set. S4. Filter nodes that are irrelevant to the candidate nodes by term category from the extended node mapping set. If the normalized score of the candidate node is greater than the node confidence threshold, then determine the target specification term node. S5. Based on the target specification term nodes, perform multi-hop relation reasoning in the field of carbon quantum dot enhanced slightly acidic hypochlorous acid synergistic disinfection, and use relation hop count limit and relation type filter to constrain the reasoning boundary to obtain the initial extended path set; S6. For the initial extended path set, the path weight is accumulated and the node access mark is set to prevent loop duplication. The convergence search range is set according to the path pruning rules and termination conditions. After evaluating the path length of each path, the candidate relationship path set is obtained. S7. For the candidate relation path set, if the path confidence score in the candidate relation path set is greater than the preset threshold, then extract the corresponding path entity sequence and entity relation sequence to obtain the target knowledge triple set.
2. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S1 includes: Lexical analysis was performed on texts and spoken question texts in the field of carbon quantum dot-enhanced synergistic disinfection with slightly acidic hypochlorous acid to obtain word segmentation sequences; Based on the word segmentation sequence, perform contextual semantic understanding to obtain the initial semantic feature matrix; Feature extraction is performed on the initial semantic feature matrix to determine the question intent feature vector, and entity word vectors are extracted from the initial semantic feature matrix to obtain the domain terminology feature vector; The question intent feature vector and the domain terminology feature vector are fused to obtain question intent feature vector and domain terminology feature vector containing domain semantic information.
3. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S2 includes: Obtain the feature vector of the question's intent and the node feature vector of standardized terminology in the field of carbon quantum dot-enhanced synergistic disinfection with slightly acidic hypochlorous acid; The node similarity value is calculated by comparing the feature vector of the question intent with the feature vector of the standard term node. If the node similarity value is greater than the matching threshold, the corresponding node is extracted as a candidate mapping node. Sort the candidate mapping nodes according to their node similarity values, and extract the initial node mapping set based on the sorting results.
4. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S3 includes: Determine the maximum node similarity of the initial node mapping set; If the maximum node similarity is lower than a preset threshold, then the associated nodes in the field of carbon quantum dot-enhanced slightly acidic hypochlorous acid synergistic disinfection are aggregated using a graph neural network to generate aggregated feature representations of the associated nodes. Determine semantically biased nodes among associated nodes based on aggregated feature representation; By completing semantically biased nodes based on the synonym mapping table, an extended node mapping set is obtained.
5. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S4 includes: Extract term category features from the extended node mapping set, and perform candidate node pruning based on the term category features to obtain the remaining node set; Semantic relevance is extracted from the remaining node set, and a weighted node set is obtained by calculating the semantic relevance using node weights. Terminology standardization is performed using a weighted set of nodes to obtain standardized candidates. Calculate the normalized score of the standardized candidate. If the normalized score is greater than the node confidence threshold, then determine the target specification term node.
6. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S5 includes: Obtain a multi-hop inference candidate entity set, which is generated by extracting adjacent entities from the target canonical term node; Determine whether the candidate entity set for multi-hop reasoning meets the reasoning boundary constraints, including removing the corresponding entity to obtain the filtered entity set if the number of relation hops in the candidate entity set for multi-hop reasoning is greater than the hop count limit threshold. Iterate through the filtered entity set to obtain the candidate path branch set; Based on the node access frequency of the candidate path branch set, perform branch priority sorting to obtain the initial expanded path set.
7. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S6 includes: Extract the node entities and relationship types of the initial path to obtain the accumulated weight; Access tags are assigned based on the accumulated weight and the node entity; Determine if the access flag indicates an accessed state; If the access is marked as accessed, a loop detection result is generated; The truncated path is obtained based on the loop detection results, and the convergence search range is determined by constraining the truncated path; The evaluation length value is obtained based on the convergence search range, and the candidate relation path set is obtained through the evaluation length value.
8. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that: S7 includes: Extract the node feature vectors and topological features of candidate relationship paths to obtain connectivity scores; Semantic similarity is calculated based on connectivity scores and node feature vectors to obtain relation weight distribution; The path confidence score of candidate relationship paths is determined by relation weight distribution and semantic similarity. If the path confidence score is greater than a preset threshold, the path entity sequence and entity relationship sequence of the candidate relationship path are extracted to obtain the target knowledge triple set.
9. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 1, characterized in that, It also includes S8, which, based on the target knowledge triplet set, graph-organizes the entity relationships between carbon quantum dots, slightly acidic hypochlorous acid, synergistic disinfection effects, disinfection targets, action conditions, reaction mechanisms, safety evaluation indicators, and application scenarios to obtain a knowledge graph of carbon quantum dots enhancing slightly acidic hypochlorous acid synergistic disinfection, specifically including: Obtain the set of target knowledge triples, and extract the target entity from the set; Obtain the entity relationship set by performing relationship mapping based on the target entity.
10. The method for constructing a knowledge graph of carbon quantum dots-enhanced synergistic disinfection with slightly acidic hypochlorous acid according to claim 9, characterized in that: S8 further includes: Organize the entity relationship set into a graph to determine the initial knowledge graph; Determine whether the number of isolated nodes in the graph exceeds a preset threshold; If the number exceeds a preset threshold, the edge relationships of the graph are completed to obtain a knowledge graph of carbon quantum dots-enhanced slightly acidic hypochlorous acid synergistic disinfection.
