Knowledge graph construction method based on parameter calculation logic
Through a method based on parameter calculation logic, domain knowledge is broken down into parameters and formulas, and a knowledge graph with dynamic computing capabilities is constructed. This solves the limitations of traditional knowledge graphs in mathematical calculations and cross-domain applications, and achieves more accurate knowledge expression and efficient computational reasoning.
Patent Information
- Application Number
- CN202510805385.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-23
AI Technical Summary
Traditional knowledge graphs have problems when dealing with mathematical calculation relationships, such as static relationship expression limitations, rough knowledge expression granularity, cross-domain application barriers, insufficient dynamic reasoning capabilities, and the separation of calculation logic and knowledge expression, which leads to limited application in scenarios requiring precise numerical reasoning.
Through a method based on parameter calculation logic, domain knowledge is broken down into parameters, formulas, and attributes to construct a knowledge graph with dynamic calculation and reasoning capabilities. A collaborative storage design of relational databases and graph databases is adopted to realize the dynamic processing of directed edge calculations and graph relationships of mathematical formulas.
It improves the accuracy of computational reasoning and is particularly suitable for industrial scenarios that require precise numerical reasoning. It solves the problem of coarse granularity in traditional knowledge graph expression and achieves a balanced optimization of knowledge storage density and computational efficiency.
Smart Images

Figure CN120688609A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graph construction technology, and specifically to a knowledge graph construction method based on parameter calculation logic. Background Art
[0002] With the rapid development of artificial intelligence technology, knowledge graphs, as an intelligent data modeling and reasoning tool, have been widely used in many fields such as finance, medical care, manufacturing, energy, etc.
[0003] However, the traditional knowledge graph construction method has the following technical defects:
[0004] (1) Limitations in static relationship expression: Traditional knowledge graphs mainly rely on predefined static semantic relationships (such as "is a kind of", "belongs to", etc.), and cannot effectively express and process dynamic parameter associations and real-time calculations based on mathematical formulas and programming logic, resulting in limited applications in scenarios that require precise numerical reasoning.
[0005] (2) The granularity of knowledge expression is coarse: Existing knowledge graphs are difficult to decompose and express complex domain knowledge in a refined manner, especially unable to integrate computational logic such as mathematical formulas and physical laws into the graph structure, resulting in incomplete knowledge expression.
[0006] (3) Barriers to cross-domain application: Traditional knowledge graph construction methods often rely on semantic knowledge or relationships in a specific field, resulting in high migration thresholds and complexity in cross-domain applications.
[0007] (4) Insufficient dynamic reasoning capabilities: In complex scenarios such as vertical fields such as high-end manufacturing, it is necessary to classify indicators into multiple attributes, customize hierarchical planning, and manage scalability. However, the existing system lacks dynamic reasoning capabilities based on real-time parameter changes.
[0008] (5) Separation of computing logic and knowledge expression: In existing technologies, computing logic usually exists as an external program or service, which is separated from the knowledge graph structure and cannot achieve deep integration of data and logic.
[0009] Therefore, there is an urgent need for a knowledge graph construction method based on parameter calculation logic so that the method can be flexibly applied in multiple fields. Summary of the Invention
[0010] The present invention aims to provide a method for constructing a knowledge graph based on parameter calculation logic. By expressing parameter calculation logic and constructing parameters, formulas, and indicator models, a knowledge graph with dynamic calculation and reasoning capabilities is realized. This method addresses the limitations of traditional knowledge graphs in processing mathematical calculation relationships and provides effective technical support for intelligent decision-making in vertical fields. By establishing domain knowledge foundation data, domain knowledge is decomposed into parameters, formulas, and attributes based on "first principles" and knowledge graphs are constructed through entity-relationships. This method provides accurate graph reasoning support for downstream large models and intelligent applications. By converting mathematical formulas into computational transfer functions with directed edges, a knowledge graph with mathematical operation capabilities is constructed, which improves the accuracy of computational reasoning compared to traditional graphs. This method is particularly suitable for industrial scenarios requiring precise numerical reasoning. Based on the "first principles" knowledge decomposition method, complex domain knowledge is refined into a combination of parameters and computational logic, making knowledge expression more precise and atomic, addressing the problem of coarse granularity in traditional knowledge graphs. Through the collaborative storage design of relational and graph databases, the method retains the query advantages of structured data while supporting dynamic computation of graph relationships, achieving a balanced optimization of knowledge storage density and computational efficiency.
[0011] In order to solve the above problems, the present invention provides the following technical solution: a method for constructing a knowledge graph based on parameter calculation logic, comprising the following steps:
[0012] Step 1: Create basic data sets: Collect and organize domain knowledge materials, systematically classify and organize the domain knowledge materials, and create corresponding basic data sets for different categories.
[0013] Step 2: Structural decomposition of knowledge elements: Based on the essential composition of domain knowledge, the first principle decomposition module is used to atomize the domain knowledge and decompose it into input parameters, calculation logic, output parameters, units and descriptions.
[0014] Step 3: Relational data storage: The data after disassembly in S2 is entered into the relational database system as basic data to support subsequent parameter calculation and knowledge graph construction.
[0015] Step 4. Entity node definition: Use the input parameters and output parameters entered in S3 as the graph node name, and use the description, unit, initial value and other related information as basic attributes to construct the node in the knowledge graph.
[0016] Step 5. Relationship definition: The calculation logic in S3 is used as the graph relationship and basic attributes, and is defined as the relationship node in the knowledge graph, indicating the association and interaction between different nodes.
[0017] Step 6: Construct directed relationships: Use the input parameter node defined in S4 as the starting node, the output parameter as the ending node, and the formula as the relationship to construct a directed relationship and clarify the direction of the causal and dependency relationships between the nodes in the knowledge graph.
[0018] Step 7. Parameter knowledge graph construction and storage: Store the constructed directed relationships in the form of triples into the graph database to complete the construction of the parameter knowledge graph and realize the structured and visual storage and management of domain knowledge.
[0019] Furthermore, in step 1, the steps of creating the corresponding basic data set are:
[0020] S101. Classification and collection of domain knowledge: Based on domain characteristics, the knowledge system is divided into parameter, formula, indicator and other categories;
[0021] S102, knowledge source standardization processing: standardization preprocessing of collected unstructured domain knowledge;
[0022] S103. Establishment of basic data set: creation of basic data sets of parameter library, formula library and indicator library.
[0023] Furthermore, in step 2, the steps of disassembling the module are:
[0024] S201, input parameter extraction: identifying the set of independent variables in the domain formula and generating an input parameter tuple with unit constraints;
[0025] S202, computational logic analysis: converting mathematical expressions into abstract syntax trees and extracting unit conversion rules;
[0026] S203, output parameter binding: establish a mapping relationship between dependent variables and calculation logic, and generate a parameter association matrix.
[0027] Furthermore, in step 3, the step of entering the disassembled data into the relational database system is as follows:
[0028] S301. Design and storage of parameter metadata table: store fields such as parameter name, description, unit, initial value, etc.
[0029] S302. Design and storage of formula relationship table: record expression AST structure, input / output parameter foreign keys;
[0030] S303. Design and storage of unit constraint table: maintain unit conversion coefficients and dimension compatibility rules.
[0031] Furthermore, in step 4, the steps of constructing the knowledge graph node are:
[0032] S401, parameter node generation: traverse the parameter metadata table and create an entity node with attributes;
[0033] S402, node type marking: adding a type mark to the node according to parameter characteristics;
[0034] S403. Node attribute extension: supports dynamic extension of node attributes, allowing the addition of domain-specific attribute information.
[0035] Furthermore, in step S401, the attributes of the entity node include: node ID, parameter name, unit, initial value, and description.
[0036] Furthermore, in step five, the steps of defining the knowledge graph relationship nodes are:
[0037] S501, calculation relationship definition: parse the formula relationship table and create calculation relationship edges;
[0038] S502, relationship type classification: classify relationships according to calculation logic type;
[0039] S503, relationship weight assignment: assign weight values to relationship edges based on factors such as computational complexity and parameter importance.
[0040] Furthermore, in step S501, the relationship edge attributes include: relationship ID, formula, abstract syntax tree, and unit constraint.
[0041] Furthermore, in step six, the steps of constructing the directed relationship are:
[0042] S601, input parameter node as source node: determine the starting point of calculation logic;
[0043] S602: Output parameter node as target node: determine the termination point of calculation logic;
[0044] S603, calculating the relationship edge annotation weight coefficient: the weight of the annotation edge is calculated based on factors such as formula complexity and calculation cost;
[0045] S604. Topological sorting verification: Use a topological sorting algorithm to verify that there is no circular dependency in the graph structure.
[0046] Furthermore, the steps of step seven are:
[0047] S701, Generate entity-relationship using Cypher statements: Convert graph data into Cypher statements of Neo4j graph database to generate entity nodes and relationships;
[0048] S702, batch data import: execute the generated Cypher statement to complete the batch import of graph data;
[0049] S703. Index optimization: Create indexes for frequently queried node attributes and relationship types to optimize query performance.
[0050] The present invention provides a method for constructing a knowledge graph based on parameter calculation logic, which has the following beneficial effects: through parameter calculation logic expression, construction of parameters, formulas, and indicator models, a knowledge graph with dynamic calculation and reasoning capabilities is realized, which solves the limitations of traditional knowledge graphs in processing mathematical calculation relationships and provides effective technical support for intelligent decision-making in vertical fields. By establishing domain knowledge basic data, domain knowledge is decomposed into parameters, formulas, and attributes based on "first principles", and a knowledge graph is constructed through entity-relationships, which can provide accurate graph reasoning support for downstream large models and intelligent applications. By converting mathematical formulas into calculation transfer functions with directed edges, a knowledge graph with mathematical operation capabilities is constructed, which improves the accuracy of calculation and reasoning compared with traditional graphs. It is particularly suitable for industrial scenarios requiring precise numerical reasoning. Based on the "first principles" knowledge decomposition method, complex domain knowledge is refined into a combination of parameters and calculation logic, making knowledge expression more precise and atomic, and solving the problem of coarse granularity of traditional knowledge graph expression. Through the collaborative storage design of relational databases and graph databases, it retains the query advantages of structured data while supporting dynamic calculation of graph relationships, achieving a balanced optimization of knowledge storage density and computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flow chart of a method for constructing a knowledge graph based on parameter calculation logic according to the present invention;
[0052] Figure 2 This is a flow chart of a method for constructing a knowledge graph based on parameter calculation logic according to the present invention;
[0053] Figure 3 This is a schematic diagram of the "first principles" disassembly of domain knowledge in a knowledge graph construction method based on parameter calculation logic of the present invention;
[0054] Figure 4 This is a schematic diagram of entity-relationship construction of a knowledge graph construction method based on parameter calculation logic of the present invention;
[0055] Figure 5 A parameter knowledge graph storage structure diagram of a knowledge graph construction method based on parameter calculation logic of the present invention;
[0056] Figure 6 This is a visualization diagram of a parameter knowledge graph of a knowledge graph construction method based on parameter calculation logic in the present invention. DETAILED DESCRIPTION
[0057] See also Figure 1-6 , the present invention provides a technical solution: a method for constructing a knowledge graph based on parameter calculation logic, comprising the following steps:
[0058] Step 1: Create basic data sets: Collect and organize domain knowledge materials, systematically classify and organize the domain knowledge materials, and create corresponding basic data sets for different categories.
[0059] Step 2: Structural decomposition of knowledge elements: Based on the essential composition of domain knowledge, the first principle decomposition module is used to atomize the domain knowledge and decompose it into input parameters, calculation logic, output parameters, units and descriptions.
[0060] Step 3. Relational data storage: Enter the disassembled data in S2 into the relational database system as basic data to support subsequent parameter calculation and knowledge graph construction.
[0061] Step 4. Entity node definition: Use the input and output parameters entered in S3 as the graph node name, and use the description, unit, initial value and other related information as basic attributes to construct the node in the knowledge graph.
[0062] Step 5. Relationship definition: Use the computational logic in S3 as the graph relationship and basic attributes, and define it as the relationship node in the knowledge graph, indicating the association and interaction between different nodes.
[0063] Step 6. Construct directed relationships: Use the input parameter node defined in S4 as the starting node, the output parameter as the ending node, and the formula as the relationship to construct a directed relationship and clarify the direction of the causal and dependency relationships between the nodes in the knowledge graph.
[0064] Step 7. Parameter knowledge graph construction and storage: Store the constructed directed relationships in the form of triples into the graph database to complete the construction of the parameter knowledge graph and realize the structured and visual storage and management of domain knowledge.
[0065] Specifically, in step 1, the steps to create the corresponding basic data set are:
[0066] S101. Classification and collection of domain knowledge: Based on domain characteristics, the knowledge system is divided into parameter, formula, indicator and other categories;
[0067] S102, knowledge source standardization processing: standardization preprocessing of collected unstructured domain knowledge;
[0068] S103. Establishment of basic data set: creation of basic data sets of parameter library, formula library and indicator library.
[0069] Specifically, in step 2, the steps of disassembling the module are:
[0070] S201, input parameter extraction: identifying the set of independent variables in the domain formula and generating an input parameter tuple with unit constraints;
[0071] S202, computational logic analysis: converting mathematical expressions into abstract syntax trees and extracting unit conversion rules;
[0072] S203, output parameter binding: establish a mapping relationship between dependent variables and calculation logic, and generate a parameter association matrix.
[0073] Specifically, in step 3, the steps for entering the disassembled data into the relational database system are:
[0074] S301. Design and storage of parameter metadata table: store fields such as parameter name, description, unit, initial value, etc.
[0075] S302. Design and storage of formula relationship table: record expression AST structure, input / output parameter foreign keys;
[0076] S303. Design and storage of unit constraint table: maintain unit conversion coefficients and dimension compatibility rules.
[0077] Specifically, in step 4, the steps for constructing a knowledge graph node are:
[0078] S401, parameter node generation: traverse the parameter metadata table and create an entity node with attributes;
[0079] S402, node type marking: adding a type mark to the node according to parameter characteristics;
[0080] S403. Node attribute extension: supports dynamic extension of node attributes, allowing the addition of domain-specific attribute information.
[0081] Specifically, in step S401, the attributes of the entity node include: node ID, parameter name, unit, initial value, and description.
[0082] Specifically, in step 5, the steps for defining knowledge graph relationship nodes are:
[0083] S501, calculation relationship definition: parse the formula relationship table and create calculation relationship edges;
[0084] S502, relationship type classification: classify relationships according to calculation logic type;
[0085] S503, relationship weight assignment: assign weight values to relationship edges based on factors such as computational complexity and parameter importance.
[0086] Specifically, in step S501 , the relationship edge attributes include: relationship ID, formula, abstract syntax tree, and unit constraint.
[0087] Specifically, in step six, the steps for constructing a directed relationship are:
[0088] S601, input parameter node as source node: determine the starting point of calculation logic;
[0089] S602: Output parameter node as target node: determine the termination point of calculation logic;
[0090] S603, calculating the relationship edge annotation weight coefficient: the weight of the annotation edge is calculated based on factors such as formula complexity and calculation cost;
[0091] S604. Topological sorting verification: Use a topological sorting algorithm to verify that there is no circular dependency in the graph structure.
[0092] Specifically, the steps of step seven are:
[0093] S701, Generate entity-relationship using Cypher statements: Convert graph data into Cypher statements of Neo4j graph database to generate entity nodes and relationships;
[0094] S702, batch data import: execute the generated Cypher statement to complete the batch import of graph data;
[0095] S703. Index optimization: Create indexes for frequently queried node attributes and relationship types to optimize query performance.
[0096] The present invention provides a method for constructing a knowledge graph based on parameter calculation logic, which includes the following steps: Step 1, basic data set creation: collect and organize domain knowledge materials, and systematically classify and organize the domain knowledge materials, and create corresponding basic data sets for different categories, S101, domain knowledge classification collection: divide the knowledge system into parameter class, formula class, indicator class and other categories according to domain characteristics; S102, knowledge source standardization processing: perform standardized preprocessing on the collected unstructured domain knowledge; S103, basic data set establishment: create parameter library, formula library, indicator library basic data set for subsequent knowledge graph construction Provide basic data support. The collected unstructured domain knowledge includes professional documents, standard specifications, parameter manuals, etc. Step 2: Structural decomposition of knowledge elements: Based on the essential composition of domain knowledge, the first principle decomposition module is used to atomize the domain knowledge and decompose it into input parameters, calculation logic, output parameters, units and descriptions. S201: Input parameter extraction: Identify the set of independent variables in the domain formula and generate input parameter tuples with unit constraints. For example, for the pressure calculation formula P=F / A, identify force F and area A as input parameters and extract their unit constraints (F: Newton N, A: square meter m) 2 ); S202, computational logic analysis: convert the mathematical expression into an abstract syntax tree and extract the unit conversion rules. For example, convert P = F / A into an AST structure containing a division operator and two operands, and record the unit conversion relationship (P: Pascal Pa = N / m 2); S203, output parameter binding: establish a mapping relationship between dependent variables and calculation logic, and generate a parameter association matrix. For example, establish pressure P as the output parameter, and form a mapping relationship with input parameters F, A and division operation; in order to more carefully process and analyze knowledge elements, the essential composition of domain knowledge is variables, mathematical identifiers and calculation formulas. Step 3, relational data storage: enter the data disassembled in S2 into the relational database system as basic data to support subsequent parameter calculations and knowledge graph construction. S301, parameter metadata table design and storage: store parameter name, description, unit, initial value and other fields. For example, create a Parameters table containing fields such as id, name, description, unit, default_value, etc.; S302, formula relationship table design and storage: record expression AST structure and input / output parameter foreign keys. For example, create a Formulas table containing fields such as id, expression, ast_json, input_params_ids (JSON array), outputparam_id, etc.; S303, unit constraint table Design and storage: Maintain unit conversion factors and dimension compatibility rules. For example, create a UnitConversions table containing fields such as source_unit, target_unit, conversion_factor, and dimension_signature. Step 4: Entity node definition: Use the input and output parameters entered in S3 as the graph node names, and use related information such as description, unit, and initial value as basic attributes to construct nodes in the knowledge graph. S401: Parameter node generation: Traverse the parameter metadata table and create entity nodes with attributes. For example, create a node for the parameter "pressure P" containing the attributes {id:"p001",name:"pressure",unit:"Pa",default_value:101325,description:"vertical force per unit area"}; S402: Node type tag: Add a type tag to the node based on the parameter characteristics; S403: Node attribute extension: Support dynamic extension of node attributes and allow the addition of domain-specific attribute information; the attributes of the entity node include: node ID, parameter name, unit, initial value, and description;These nodes will represent entity concepts in the knowledge graph, and type tags include "input parameters", "output parameters", "intermediate parameters", etc. Step 5, relationship definition: Use the calculation logic in S3 as the graph relationship and basic attributes, define it as the relationship node in the knowledge graph, and represent the association and interaction between different nodes. S501, calculation relationship definition: parse the formula relationship table and create calculation relationship edges. For example, create a relationship edge from the nodes "force F" and "area A" to the node "pressure P", mark the relationship type as "CALCULATEDBY", and the relationship attributes include {formula:"F / A", ast:{...}, unit_constraint:"Pa=N / m; 2"}; S502, relationship type classification: classify relationships according to the calculation logic type; S503, relationship weight assignment: assign weight values to relationship edges based on factors such as calculation complexity and parameter importance; relationship edge attributes include: relationship ID, formula, abstract syntax tree, unit constraint, calculation logic types include arithmetic operations, differential equations, statistical functions, etc. Step 6, directed relationship construction: use the input parameter node defined in S4 as the starting node, the output parameter as the end node, and the formula as the relationship to construct a directed relationship, clarifying the causal and dependency relationship direction between each node in the knowledge graph, S601, input parameter node as source node: determine the starting point of the calculation logic, input parameter node such as force F, area A; S602, output Parameter node as target node: determine the termination point of the calculation logic, and output parameter node such as pressure P; S603, calculate the relationship edge annotation weight coefficient: annotate the edge weight based on factors such as formula complexity and calculation cost, and the relationship edge annotation weight coefficient is such as the formula complexity weight 0.87. For example, the weighted sum of the number of operators, nesting level and calculation time complexity in the formula is used as the weight; S604, topological sorting verification: verify that there is no circular dependency in the graph structure through the topological sorting algorithm, verify that there is no circular dependency in the graph structure, and ensure the correct order of parameter calculation; if a circular dependency is detected, the system will give a warning and provide correction suggestions, execute ... If a circular dependency is detected, the system will give a warning and provide correction suggestions; Step 7, Parameter Knowledge Graph Construction and Storage: Store the constructed directed relationship in the graph database in the form of triples, thereby completing the construction of the parameter knowledge graph and realizing the structured and visual storage and management of domain knowledge. S701, Cypher statement generation entity-relationship: Convert the graph data into Cypher statements of the Neo4j graph database to generate entity nodes and relationships; S702, Batch data import: Execute the generated Cypher statements to complete the batch import of graph data; S703, Index optimization: Create indexes for frequently queried node attributes and relationship types to optimize query performance. The triple form is input node, output node, formula, using Neo4j. The o4j graph database storage system converts graph data into Cypher statements for storage, generates CREATE statements based on node attributes, for example: CREATE(p:Parameter{id:'p001',name:'Pressure',unit:'Pa',default_value:101325,description:'Vertical force per unit area'}), and generates CREATE statements based on relationship definitions, for example: MATCH(f:Parameter{id:'f001'}),(a:Parameter{id:'a001'}),(p:Parameter{id:'p001'}).
[0097] CREATE(f)-[:INPUTS_TO{weight:0.6}]->(calc:Calculation{formula:'F / A',ast:'{...}'})-[:OUTPUTS]->(p),
[0098] (a)-[:INPUTS_TO{weight:0.4}]->(calc)
[0099] Use Neo4j's batch import tool or the APOC library to execute the generated Cypher statements to efficiently import large amounts of data.
[0100] After the parameter knowledge graph of the present invention is constructed, it can support a variety of application scenarios, including:
[0101] (1) Graph query and analysis:
[0102] Parameter path query: Based on a given parameter node, analyze its upstream and downstream computational dependencies. For example, by querying the upstream parameter path of "efficiency η," you can find all the parameter sets that directly and indirectly affect the efficiency calculation.
[0103] Similarity calculation: Graph structure similarity algorithms are used to discover groups of parameters with similar computational patterns. For example, through subgraph isomorphism detection, all parameter pairs based on "division" relationships, such as pressure (force / area) and density (mass / volume), are identified.
[0104] Parameter influence assessment: Based on the centrality algorithm, the importance of the parameter in the overall knowledge network is evaluated. For example, the PageRank value or betweenness centrality of each parameter node is calculated to identify key parameters.
[0105] Intelligent parameter recommendation: Based on graph embedding and similarity calculation, it recommends relevant parameters or calculation paths to users.
[0106] (2) Graph knowledge integration:
[0107] Domain knowledge integration: Supports the merging and mapping of knowledge graphs from different domains. For example, the parameter knowledge graphs from the mechanical domain and the electrical domain can be integrated to establish cross-domain parameter associations.
[0108] Multi-source heterogeneous knowledge fusion: Integrate parameters and calculation logic from different data sources. For example, it can unify and integrate the internal enterprise parameter library, parameter definitions in industry standards, and calculation formulas in academic literature.
[0109] Knowledge graph evolution: Tracks and records the evolution of graph structures over time. For example, it records version changes of parameter definitions and the optimization history of calculation formulas to support knowledge traceability.
[0110] (3) Collaboration with large models:
[0111] Provide precise computing support for large models: Empower large models with the computing power of parameter knowledge graphs through APIs to improve their numerical reasoning accuracy.
[0112] Knowledge graph-assisted content generation: Utilize parameter relationship networks to provide structured knowledge background for large models, improving the professionalism and accuracy of content generation.
[0113] Interactive knowledge exploration: Combining the natural language understanding capabilities of large models with the structured representation of knowledge graphs, it supports users to explore complex parameter relationships through dialogue.
[0114] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A knowledge graph construction method based on parameter calculation logic, characterized in that: The following steps are involved: S1. Basic data set creation: Collect and organize domain knowledge materials, systematically classify and organize the domain knowledge materials, and create corresponding basic data sets for different categories; S2. Structural decomposition of knowledge elements: Based on the essential composition of domain knowledge, we use the first principles decomposition module to atomize domain knowledge and decompose it into input parameters, calculation logic, output parameters, units, and descriptions. S3, relational data storage: the data disassembled in S2 is entered into a relational database system as basic data to support subsequent parameter calculation and knowledge graph construction; S4. Entity node definition: Use the input parameters and output parameters entered in S3 as the graph node name, and use the description, unit, initial value and other related information as basic attributes to construct the node in the knowledge graph; S5, relationship definition: Using the calculation logic in S3 as the graph relationship and basic attributes, it is defined as the relationship node in the knowledge graph, indicating the association and interaction between different nodes; S6. Directed relationship construction: Use the input parameter node defined in S4 as the starting node, the output parameter as the ending node, and the formula as the relationship to construct a directed relationship, clarifying the direction of the causal and dependency relationships between the nodes in the knowledge graph; S7. Parameter knowledge graph construction and storage: Store the constructed directed relationships in the form of triples into the graph database to complete the construction of the parameter knowledge graph and realize the structured and visual storage and management of domain knowledge.
2. A method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S1, the steps of creating the corresponding basic data set are: S101. Classification and collection of domain knowledge: Based on domain characteristics, the knowledge system is divided into parameter, formula, indicator and other categories; S102, knowledge source standardization processing: standardization preprocessing of collected unstructured domain knowledge; S103. Establishment of basic data set: creation of basic data sets of parameter library, formula library and indicator library.
3. The method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S2, the steps of disassembling the module are: S201, input parameter extraction: identifying the set of independent variables in the domain formula and generating an input parameter tuple with unit constraints; S202, computational logic analysis: converting mathematical expressions into abstract syntax trees and extracting unit conversion rules; S203, output parameter binding: establish a mapping relationship between dependent variables and calculation logic, and generate a parameter association matrix.
4. A method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S3, the steps of entering the disassembled data into the relational database system are as follows: S301. Design and storage of parameter metadata table: store fields such as parameter name, description, unit, initial value, etc. S302. Design and storage of formula relationship table: record expression AST structure, input / output parameter foreign keys; S303. Design and storage of unit constraint table: maintain unit conversion coefficients and dimension compatibility rules.
5. The method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S4, the steps of constructing the knowledge graph node are: S401, parameter node generation: traverse the parameter metadata table and create an entity node with attributes; S402, node type marking: adding a type mark to the node according to parameter characteristics; S403. Node attribute extension: supports dynamic extension of node attributes, allowing the addition of domain-specific attribute information.
6. A method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S401, the attributes of the entity node include: node ID, parameter name, unit, initial value, and description.
7. The method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S5, the steps of defining the knowledge graph relationship nodes are: S501, calculation relationship definition: parse the formula relationship table and create calculation relationship edges; S502, relationship type classification: classify relationships according to calculation logic type; S503, relationship weight assignment: assign weight values to relationship edges based on factors such as computational complexity and parameter importance.
8. The method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S501, the relationship edge attributes include: relationship ID, formula, abstract syntax tree, and unit constraint.
9. The method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: In step S6, the steps of constructing the directed relationship are: S601, input parameter node as source node: determine the starting point of calculation logic; S602: Output parameter node as target node: determine the termination point of calculation logic; S603, calculating the relationship edge annotation weight coefficient: the weight of the annotation edge is calculated based on factors such as formula complexity and calculation cost; S604. Topological sorting verification: Use a topological sorting algorithm to verify that there is no circular dependency in the graph structure.
10. The method for constructing a knowledge graph based on parameter calculation logic according to claim 1, characterized in that: The steps of step S7 are: S701, Generate entity-relationship using Cypher statements: Convert graph data into Cypher statements of Neo4j graph database to generate entity nodes and relationships; S702, batch data import: execute the generated Cypher statement to complete the batch import of graph data; S703. Index optimization: Create indexes for frequently queried node attributes and relationship types to optimize query performance.
Citation Information
Patent Citations
Mathematical knowledge graph construction method based on big data
CN119398150A
Knowledge graph-based semantic association and logic rule reasoning method
CN120011368A
System for logic rule induction on knowledge graphs of engineering systems
US20240028868A1
Cited By
Formula editor implementation method based on knowledge graph
CN121212093A