Embedded representation method for tin smelting process flow super-relation knowledge graph
By constructing a hyper-relational knowledge graph of the tin smelting process flow, using large language models and graph neural networks for embedded representation learning, the problem of insufficient knowledge representation in the tin smelting process flow is solved, and the intelligent development of the tin smelting industry is realized.
Patent Information
- Application Number
- CN202510984116.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-07-17
AI Technical Summary
The existing technology is difficult to effectively construct and apply the super-relational knowledge graph of the tin smelting process flow, resulting in insufficient knowledge representation ability and the inability to make full use of the complex information in the tin smelting field.
By collecting knowledge text of the tin smelting process flow, setting prompt words, using large language models to build a hyperrelational knowledge graph, combining graph neural network and Transformer model for global and local embedding representation learning, and training the representation model to obtain the embedding representation of the tin smelting process flow.
It has realized the automatic construction and information aggregation of the super-relationship knowledge graph of the tin smelting process flow, improved the knowledge representation ability, and promoted the digital and intelligent development of the tin smelting industry.
Smart Images

Figure CN120470134A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for embedding a hyper-relational knowledge graph of a tin smelting process, and belongs to the technical field of knowledge representation. Background Art
[0002] In modern industry, tin smelting is a complex process that converts tin ore into pure tin, involving multiple stages and delicate operations. By constructing a knowledge graph of the tin smelting process and performing embedded representation learning, unstructured empirical knowledge can be transformed into a structured knowledge representation, making it valuable in the production process.
[0003] Currently, most knowledge graph embedding representation methods are based on the triple <head entity-relationship-tail entity>, which makes it difficult to model additional information about tin smelting and has limited knowledge representation capabilities. For example, for the tin smelting knowledge text "The reduction smelting process includes a weak reduction stage, which takes 20 minutes and the tin content in the slag drops from 15% to 5%", the triple <reduction smelting process-includes-weak reduction stage> is used for representation learning, ignoring the potential knowledge in additional information such as "required time" and "content change".
[0004] Related research has proposed hyper-relational knowledge graphs (KGs) that can represent more complex information. These methods, which introduce auxiliary key-value pairs to enhance the semantic information of simple triples, employ hyper-relational knowledge graph embedding methods based on the structure of hyper-relational facts (head entity-relationship-tail entity-auxiliary key-value pairs). Existing techniques attempt to learn hyper-relational facts by converting them into n-tuples, but this disrupts the structure of hyper-relational facts and results in suboptimal models. Consequently, some researchers have designed two convolutional neural network channels to directly learn embeddings from hyper-relational facts. However, these methods fail to adequately consider both local and global information.
[0005] Due to the complexity of the tin smelting process and the highly specialized nature of tin smelting knowledge, hyper-relational facts about the tin smelting process are currently lacking. Research on hyper-relational knowledge graph embedding representations is limited and has yet to be widely applied in practice. The urgent technical challenge of constructing a hyper-relational knowledge graph for the tin smelting process and embedding it for use in subsequent downstream tasks is how to solve this problem. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a hyper-relational knowledge graph embedding representation method for tin smelting process flow, which is used to extract tin smelting process flow knowledge, learn the potential feature information of the knowledge for downstream tasks, and promote the digital and intelligent development of the tin smelting industry.
[0007] The technical solution of the present invention is: a method for embedding a hyper-relational knowledge graph of a tin smelting process, which specifically comprises the following steps:
[0008] Step 1: Based on the various stages of the tin smelting process, collect and organize the knowledge text of the tin smelting process to be constructed. The various stages include roasting of tin concentrate, reduction smelting, slag fuming, fire refining and electrolytic refining;
[0009] Step 2: Set prompt words for extracting tin smelting process information, including entity type information set, relationship information set, and additional information set in the tin smelting process hyper-relational knowledge graph;
[0010] Step 3: The large language model extracts hyper-relational facts from the domain knowledge text of the tin smelting process to be constructed based on the prompt words, including the main triples and auxiliary key-value pairs. The head entity of the main triple is used as the first node, the tail entity as the second node, the relationship as the edge between the first and second nodes, and the auxiliary key and auxiliary value in the auxiliary key-value pair as the attribute and attribute value are attached to the corresponding relationship to construct the hyper-relational knowledge graph of the tin smelting process.
[0011] Step 4: Use hyper-relational facts as samples in the training set, perform global embedding representation learning and local embedding representation learning, train the representation model, and obtain the final embedding of the tin smelting process knowledge graph for downstream tasks.
[0012] The Step 2 is specifically as follows:
[0013] Step 2.1: Construct a prompt template. The information structure extracted in the prompt word is defined as a super-relational fact structure. Each super-relational fact consists of a main triple and n auxiliary key-value pairs that modify the main triple, where n is an integer greater than or equal to 0.
[0014] Step 2.2: Based on prior knowledge, the entity type information set, relationship information set, and additional information set of the tin smelting process are added to the prompt word. The entity type information set includes entity types and entity type definitions, such as "[Raw Materials]: Starting materials involved in the tin smelting process, mainly including tin ore and tin concentrate." The relationship information set describes the logical connections between the various stages of tin smelting and the interactions and transformations between raw materials, products, and impurities within each stage, including relationships such as "enter," "remove," and "produce." The additional information set contains additional information that supplements the entities and relationships, such as "temperature" and "impurity content."
[0015] Step 2.3: Example of adding m tin smelting process domain knowledge texts to extract information;
[0016] Step 2.4: Add output format requirements and methods for handling non-existent information to complete the prompt word setting.
[0017] The Step 4 is specifically as follows:
[0018] Step 4.1: Obtain hyper-relational facts in the hyper-relational knowledge graph of the tin smelting process as samples in the training set, and set initial embedding vectors for each target to be learned in the hyper-relational facts. The target to be learned includes the main triples Head entity in ,relation , tail entity and auxiliary key-value pairs Auxiliary keys in and auxiliary values , the embedding representation learning of the representation model includes global embedding representation learning and local embedding representation learning, and the embedding vector size is ,in is the dimension size;
[0019] Step 4.2: Perform global embedding representation learning. On the hyper-relational knowledge graph of the tin smelting process, use a graph neural network to pass messages and aggregate information between primary triples and auxiliary key-value pairs.
[0020] In the In the hidden layer, the node and neighbor node information are aggregated, and the auxiliary key-value pair level information is aggregated using the following formula:
[0021]
[0022] in, For the The auxiliary key-value pair embedding vector of the layer, For the Layer auxiliary key embedding vectors, For the Layer Auxiliary value embedding vectors, For the The auxiliary key-value pair weight matrix of the layer is , A set of auxiliary key-value pairs in a super-relational fact, including Auxiliary keys, for The i-th auxiliary key-value pair in ;
[0023] The relationship-secondary key-value pair level information is aggregated using the following formula:
[0024]
[0025] in, For the The relation-auxiliary key-value pair embedding vector of the layer, For the The relation embedding vector in the triplet of the layer, represents the Hadamard product, is a hyperparameter, ;
[0026] Aggregate entity-relationship-auxiliary key-value pair hierarchical information through the following formula, and update the node embedding vector by aggregating representations from neighboring nodes, and perform message passing on the hyper-relational knowledge graph:
[0027]
[0028] in, For the The head entity embedding vector of the layer, For the The head entity embedding vector of the layer, For the The tail entity embedding vector of the layer, For the The head entity weight matrix of the layer, For the The information aggregation weight matrix of the layer is , is the set of relationship-tail entity pairs connected to the head entity, for A relation-tail entity pair in Representative relationship, Represents the tail entity, is the nonlinear activation function ReLU;
[0029] Step 4.3: After learning the global embedding representation, we learn local embedding representations for each super-relational fact. We convert each super-relational fact into an input sequence, use masked language modeling and an attention-based model to capture the dependencies between different positions in the sequence data, and train the model to obtain the final embedding of the super-relational fact.
[0030] Perform sequence queries on hyper-relational facts and convert them into input sequences , the corresponding embedding vector is , mask the input sequence data, the masked part is represented by [MASK], and the information between the contexts is learned using a model based on the attention mechanism:
[0031]
[0032] in, is the Transformer encoder, the number of layers of the Transformer encoder is C, , For the Layer output;
[0033] For the i-th [MASK] mask position embedding vector , the model outputs a probability distribution :
[0034]
[0035] in, and are learnable parameters, and their sizes are and , is the number of candidate labels for the mask position, is the activation function;
[0036] The prediction loss of the mask position is calculated using the cross entropy loss function :
[0037]
[0038] in, is the number of mask positions, is the true label of the i-th mask position;
[0039] Step 4.4: Train the model parameters through backpropagation loss and gradient descent algorithm, and iteratively train multiple hyper-relational fact samples in the training dataset until the preset number of iterations is reached to obtain the trained representation model and the final independent embedding vector of each learning target for downstream tasks.
[0040] The beneficial effects of the present invention are: the present invention fills the gap in the hyper-relational knowledge graph of the tin smelting process, uses a large language model to realize the automatic construction of the hyper-relational knowledge graph of the tin smelting process, aggregates hyper-relational fact information, learns potential knowledge features, improves the embedding representation ability of the hyper-relational knowledge graph, and promotes the intelligent development of the tin smelting process. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of the steps of the present invention;
[0042] Figure 2 It is a schematic diagram of some super-relationship facts of the fire refining stage of the present invention;
[0043] Figure 3 It is a structural diagram of the embedding representation learning model of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0045] Example 1: Figure 1 As shown in the figure, a hyper-relational knowledge graph embedding representation method for tin smelting process flow is shown in the figure. The specific steps are as follows:
[0046] Step 1: Based on the various stages of the tin smelting process, collect and organize the knowledge texts in the field of tin smelting process to be constructed. The various stages include roasting, reduction smelting, slag fuming, fire refining and electrolytic refining of tin concentrate.
[0047] Specifically, based on each stage, we collected knowledge texts on the tin smelting process flow to be constructed from the book "Tin Metallurgy" published by the Metallurgical Industry Press, including the following: "Tin concentrate is subjected to boiling roasting to remove arsenic and desulfurization, and then magnetic separation to increase the tin grade in the tin concentrate to more than 50%, with an arsenic content of less than 0.45% and a sulfur content of less than 0.5%, and is placed in a silo." "The smelting method is to heat solid crude tin with high iron and arsenic content (called B crude tin in production), and the tin smelting plant equipment mainly uses a reverberatory furnace; in contrast, the condensation method is to cool the crude tin with low iron and arsenic content (called A crude tin) to melt into liquid, and the equipment used is composed of a refining pot and a mixer."
[0048] Step 2: Set prompt words for extracting tin smelting process information, including the entity type information set, relationship information set, and additional information set in the tin smelting process hyper-relationship knowledge graph.
[0049] Specifically, by adding one or more tin smelting process domain knowledge texts to extract information, adding output format requirements and methods for handling non-existent information, the following prompt words are constructed:
[0050] You are an intelligent model that can parse context and extract information from it. The extracted information is structured as a super-relational fact. Each super-relational fact consists of a primary triple and n auxiliary key-value pairs that modify the triple, where n is an integer greater than or equal to 0. Your task is to extract entity, relation, and auxiliary key-value pair information from a given sentence.
[0051] The head entity and tail entity in the triple can be extracted by referring to the entity type information set. The possible entity type information sets are as follows: [`raw materials`:` the starting materials involved in the tin smelting process, mainly including tin ore and tin concentrate`, `impurities`:` unwanted metal or non-metal elements and their compounds present in the tin raw materials that affect the purity of tin and need to be removed through the smelting process, such as lead, bismuth, copper, iron, sulfur, etc.`, `smelting equipment`:` a series of industrial equipment used to heat metals or alloys above the melting point to transform them into liquid. It has high-temperature heating capabilities and can control the temperature and atmosphere conditions during the heating process to meet the smelting requirements of different metals or alloys, such as reverberatory furnaces, top-blown furnaces, electric furnaces, etc.`, `chemical reagents`:` chemical substances used in the smelting process, such as reducing agents, fluxes, etc.`, `smelting products`:` products produced in the smelting process, including crude tin (B), crude tin (A), refined solder, crude solder, etc.`, `smelting by-products`:` non-main products produced in the smelting process, such as slag, smoke, etc.`].
[0052] The relationship in the triple can be extracted by referring to the relationship information set. The possible relationship sets are as follows: [`enter`, `contains impurities`, `output`, `need`, `use`, `next step`, `pass`, `generate`].
[0053] The extraction of auxiliary key-value pairs can refer to the additional information set. The possible additional information sets are as follows: [`content change`, `temperature change`, `reaction conditions`, `furnace grade`, `required time`, `heating time`, `operating conditions`, `product purity`, `detection method`, `impurity removal method`, `equipment used`].
[0054] Extract all possible triples and their corresponding auxiliary key-value pairs from the input sentence text. The requirements also apply: the head entity should not be equal to the tail entity, the entity should not appear in the relation set, and the extraction format is {head entity, relation, tail entity, [auxiliary key-value pair list]}. If there is no auxiliary key-value pair information, it is represented by NULL. The following is an extraction example:
[0055] Input sentence text: The reduction smelting process includes a weak reduction stage, which takes 20 minutes and reduces the tin content in the slag from 15% to 5%.
[0056] Output super-relationship facts: {Reduction smelting process, including, weak reduction stage, [time required: 20 minutes, content change: slag tin content drops from 15% to 5%]}"
[0057] Step 3: The large language model extracts the hyper-relational facts in the knowledge text of the tin smelting process to be constructed based on the prompt words, including the main triples and auxiliary key-value pairs. The head entity of the main triple is used as the first node, the tail entity as the second node, the relationship as the edge between the first and second nodes, and the auxiliary key and auxiliary value in the auxiliary key-value pair as attributes and attribute values are attached to the corresponding relationship to construct the hyper-relational knowledge graph of the tin smelting process.
[0058] Specifically, the Tongyi Qianwen language model is used to extract super-relational facts in the knowledge text of the tin smelting process to be constructed based on the prompt words. Some super-relational facts are as follows: Figure 2 As shown in the figure, a hyper-relational knowledge graph of tin smelting process is constructed.
[0059] Step 4: Use hyper-relational facts as samples in the training set, perform global embedding representation learning and local embedding representation learning, train the representation model, and obtain the final embedding of the tin smelting process knowledge graph for downstream tasks.
[0060] Step 4.1: Obtain hyper-relational facts in the hyper-relational knowledge graph of the tin smelting process as samples in the training set, and set initial embedding vectors for each target to be learned in the hyper-relational facts. The target to be learned includes the main triples Head entity in ,relation , tail entity and auxiliary key-value pairs Auxiliary keys in and auxiliary values , the embedding representation learning of the representation model includes global embedding representation learning and local embedding representation learning, and the embedding vector size is ,in is the dimension size; Figure 3 As shown in the figure, the embedding representation learning of the representation model includes two parts: global embedding representation learning based on graph convolutional neural network and local embedding representation learning based on Transformer;
[0061] Step 4.2: Perform global embedding representation learning. On the hyper-relational knowledge graph of the tin smelting process, use a graph neural network to pass messages and aggregate information between primary triples and auxiliary key-value pairs. The number of graph neural network layers is set to 3.
[0062] In the In the hidden layer, the node and neighbor node information are aggregated, and the auxiliary key-value pair level information is aggregated using the following formula:
[0063]
[0064] in, For the The auxiliary key-value pair embedding vector of the layer, For the Layer auxiliary key embedding vectors, For the Layer Auxiliary value embedding vectors, For the The auxiliary key-value pair weight matrix of the layer is , A set of auxiliary key-value pairs in a super-relational fact, including Auxiliary keys, for The i-th auxiliary key-value pair in ;
[0065] The relationship-secondary key-value pair level information is aggregated using the following formula:
[0066]
[0067] in, For the The relation-auxiliary key-value pair embedding vector of the layer, For the The relation embedding vector in the triplet of the layer, represents the Hadamard product, is a hyperparameter, ;
[0068] Aggregate entity-relationship-auxiliary key-value pair hierarchical information through the following formula, and update the node embedding vector by aggregating representations from neighboring nodes, and perform message passing on the hyper-relational knowledge graph:
[0069]
[0070] in, For the The head entity embedding vector of the layer, For the The head entity embedding vector of the layer, For the The tail entity embedding vector of the layer, For the The head entity weight matrix of the layer, For the The information aggregation weight matrix of the layer is , is the set of relationship-tail entity pairs connected to the head entity, for A relation-tail entity pair in Representative relationship, Represents the tail entity, is the nonlinear activation function ReLU;
[0071] Step 4.3: After learning the global embedding representation, we learn local embedding representations for each super-relational fact. We convert each super-relational fact into an input sequence, use masked language modeling and an attention-based model to capture the dependencies between different positions in the sequence data, and train the model to obtain the final embedding of the super-relational fact.
[0072] Perform sequence queries on hyper-relational facts and convert them into input sequences , the corresponding embedding vector is , mask the input sequence data, and the masked part is represented by [MASK], for example , using an attention-based model to learn information between contexts:
[0073]
[0074] in, is the Transformer encoder, , the number of layers of the Transformer encoder is C, C is 2, , For the Layer output, is the output of the last layer;
[0075] For the i-th [MASK] mask position embedding vector , the model outputs a probability distribution :
[0076]
[0077] in, and are learnable parameters, and their sizes are and , is the number of candidate labels for the mask position, is the activation function;
[0078] The prediction loss of the mask position is calculated using the cross entropy loss function :
[0079]
[0080] in, is the number of mask positions, is the true label of the i-th mask position;
[0081] Step 4.4: Train the model parameters through backpropagation loss and gradient descent algorithm, and iteratively train multiple hyper-relational fact samples in the training dataset until the preset number of iterations is reached to obtain the trained representation model and the final independent embedding vector of each learning target for downstream tasks.
[0082] The above describes the specific embodiments of the present invention in detail with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in this field without departing from the scope of the present invention.
Claims
1. A hyper-relational knowledge graph embedding method for tin smelting process flow, characterized by: The following steps are involved: Step 1: Based on the various stages of the tin smelting process, collect and organize the knowledge text of the tin smelting process to be constructed. The various stages include roasting of tin concentrate, reduction smelting, slag fuming, fire refining and electrolytic refining; Step 2: Set prompt words for extracting tin smelting process information, including entity type information set, relationship information set, and additional information set in the tin smelting process hyper-relational knowledge graph; Step 3: The large language model extracts hyper-relational facts from the domain knowledge text of the tin smelting process to be constructed based on the prompt words, including the main triples and auxiliary key-value pairs. The head entity of the main triple is used as the first node, the tail entity as the second node, the relationship as the edge between the first and second nodes, and the auxiliary key and auxiliary value in the auxiliary key-value pair as the attribute and attribute value are attached to the corresponding relationship to construct the hyper-relational knowledge graph of the tin smelting process. Step 4: Use hyper-relational facts as samples in the training set, perform global embedding representation learning and local embedding representation learning, train the representation model, and obtain the final embedding of the tin smelting process knowledge graph for downstream tasks.
2. The hyper-relational knowledge graph embedding method for tin smelting process according to claim 1 is characterized in that: The Step 2 is specifically as follows: Step 2.1: Construct a prompt template. The information structure extracted in the prompt word is defined as a super-relational fact structure. Each super-relational fact consists of a main triple and n auxiliary key-value pairs that modify the main triple, where n is an integer greater than or equal to 0. Step 2.2: Based on prior knowledge, the entity type information set, relationship information set, and additional information set of the tin smelting process flow are added to the prompt word. The entity type information set includes entity types and entity type definitions. The relationship information set describes the logical connections between the various stages of tin smelting and between raw materials, products, and impurities within each stage. The additional information set contains additional information that supplements the entities and relationships. Step 2.3: Example of adding m tin smelting process domain knowledge texts to extract information; Step 2.4: Add output format requirements and methods for handling non-existent information to complete the prompt word setting.
3. The method for embedding a hyper-relational knowledge graph of a tin smelting process according to claim 1 is characterized in that: The Step 4 is specifically as follows: Step 4.1: Obtain hyper-relational facts in the hyper-relational knowledge graph of the tin smelting process as samples in the training set, and set initial embedding vectors for each target to be learned in the hyper-relational facts. The target to be learned includes the main triples Head entity in ,relation , tail entity and auxiliary key-value pairs Auxiliary keys in and auxiliary values , the embedding representation learning of the representation model includes global embedding representation learning and local embedding representation learning, and the embedding vector size is ,in is the dimension size; Step 4.2: Perform global embedding representation learning. On the hyper-relational knowledge graph of the tin smelting process, use a graph neural network to pass messages and aggregate information between primary triples and auxiliary key-value pairs. In the In the hidden layer, the node and neighbor node information are aggregated, and the auxiliary key-value pair level information is aggregated using the following formula: ; in, For the The auxiliary key-value pair embedding vector of the layer, For the Layer auxiliary key embedding vectors, For the Layer Auxiliary value embedding vectors, For the The auxiliary key-value pair weight matrix of the layer is , A set of auxiliary key-value pairs in a super-relational fact, including Auxiliary keys, for The i-th auxiliary key-value pair in ; The relationship-secondary key-value pair level information is aggregated using the following formula: ; in, For the The relation-auxiliary key-value pair embedding vector of the layer, For the The relation embedding vector in the triplet of the layer, represents the Hadamard product, is a hyperparameter, ; Aggregate entity-relationship-auxiliary key-value pair level information through the following formula, and update the node embedding vector by aggregating representations from neighboring nodes, and perform message passing on the hyper-relational knowledge graph: ; in, For the The head entity embedding vector of the layer, For the The head entity embedding vector of the layer, For the The tail entity embedding vector of the layer, For the The head entity weight matrix of the layer, For the The information aggregation weight matrix of the layer is , is the set of relationship-tail entity pairs connected to the head entity, for A relation-tail entity pair in Representative relationship, Represents the tail entity, is the nonlinear activation function ReLU; Step 4.3: After learning the global embedding representation, we learn local embedding representations for each super-relational fact. We convert each super-relational fact into an input sequence, use masked language modeling and an attention-based model to capture the dependencies between different positions in the sequence data, and train the model to obtain the final embedding of the super-relational fact. Perform sequence queries on hyper-relational facts and convert them into input sequences , the corresponding embedding vector is , mask the input sequence data, the masked part is represented by [MASK], and the information between the contexts is learned using a model based on the attention mechanism: ; in, is the Transformer encoder, the number of layers of the Transformer encoder is C, , For the Layer output; For the i-th [MASK] mask position embedding vector , the model outputs a probability distribution : ; in, and are learnable parameters, and their sizes are and , is the number of candidate labels for the mask position, is the activation function; The prediction loss of the mask position is calculated using the cross entropy loss function : ; in, is the number of mask positions, is the true label of the i-th mask position; Step 4.4: Train the model parameters through backpropagation loss and gradient descent algorithm, and iteratively train multiple hyper-relational fact samples in the training dataset until the preset number of iterations is reached to obtain the trained representation model and the final independent embedding vector of each learning target for downstream tasks.
Citation Information
Patent Citations
Water conservancy portal information recommendation method based on multi-layer attention mechanism and fused with map
CN111914895A
Global data space link prediction method and system based on super relation
CN115757822A
Super-relation knowledge graph representation method and system based on dynamic fusion of structure and text information
CN119323248A
Method and system for identifying biological entities for drug discovery
US20250022615A1
Cited By
A top-blown furnace tin smelting multi-target endpoint prediction method based on enhanced time sequence fusion
CN122388706A