Knowledge graph representation method and representation platform for intelligent manufacturing standard in iron and steel industry
By building a knowledge graph of intelligent manufacturing standards in the steel industry, using named entity recognition models and self-attention mechanisms, the problem of incomplete industry standard system has been solved, the entity recognition accuracy and knowledge graph construction efficiency have been improved, and the unity and development of industry standards have been promoted.
Patent Information
- Application Number
- CN202411713263.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
The intelligent manufacturing standard system in my country's steel industry has not yet been established, resulting in unclear development paths for smart manufacturing-related technologies and unconsolidated standards, which affects the progress of the industry's intelligent transformation and upgrading.
A knowledge graph representation method of intelligent manufacturing standards in the steel industry is adopted. By constructing an initial knowledge graph, using a named entity recognition model for entity recognition and relationship extraction, combining self-attention mechanism and negative feedback mechanism, the dictionary is updated and the final knowledge graph is constructed.
It has improved the entity recognition accuracy and knowledge graph construction efficiency in the intelligent manufacturing standard text of the steel industry, discovered the correlation between standards, analyzed the shortcomings in the construction of the standard system, and promoted the unity and development of industry standards.
Smart Images

Figure CN119647473A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent manufacturing in the steel industry, and specifically relates to a knowledge graph representation method and representation platform for intelligent manufacturing standards in the steel industry. Background Art
[0002] The system of intelligent manufacturing standards in my country's steel industry has not yet established a complete top-level framework for intelligent manufacturing. The development paths of key technologies related to intelligent manufacturing, such as the Internet of Things, big data, cloud computing, and industrial robots, are not clear enough, and the standards have not yet been unified. Due to the lack of industry standard support in the process of implementing intelligent upgrading by steel companies and suppliers, the intelligent transformation and upgrading of my country's steel industry has indirectly led to slow progress and insignificant results.
[0003] However, as basic common and key technical standards in the field of intelligent manufacturing in the domestic steel industry continue to emerge, it is necessary to gradually establish an intelligent manufacturing standard system for the steel industry, further integrate and streamline mandatory standards, optimize and improve recommended standards, cultivate and develop group standards, actively participate in and even lead international standards related to intelligent manufacturing, and play a leading role in standards.
[0004] At present, the relevant standard library is only a simple storage and query of the standard text, and cannot find the relationship between the standards. Therefore, it is particularly important to manage the intelligent manufacturing standards of the steel industry, build a knowledge base of intelligent manufacturing standards for the steel industry, and explore the relationship among them, in order to analyze the formulation and implementation of intelligent manufacturing standards in the steel industry and establish an intelligent manufacturing standard system for the steel industry.
[0005] Due to the ambiguity of Chinese and the particularity of terms related to intelligent manufacturing in the steel industry, many knowledge graph construction methods are unable to accurately identify the semantics of terms related to standards for intelligent manufacturing in the steel industry, and have low accuracy in Chinese word segmentation, making it impossible to accurately construct a knowledge graph of intelligent manufacturing standards for the steel industry. Summary of the invention
[0006] In response to the above problems, the present invention provides a knowledge graph representation method and representation platform for the intelligent manufacturing standards of the steel industry, which improves the accuracy of entity recognition and the efficiency of knowledge graph construction in the text of the intelligent manufacturing standards of the steel industry, and is of great significance for discovering the correlation between standards and analyzing the shortcomings in the construction of the intelligent manufacturing standards system of the steel industry.
[0007] The method for representing the knowledge graph of intelligent manufacturing standards in the steel industry is divided into the following steps:
[0008] Step 1: Use the existing historical standard data of intelligent manufacturing in the steel industry to build an initial knowledge graph;
[0009] Standard data includes structured data: database tables of various stages of the process including project establishment, drafting, soliciting opinions, approval and release of smart manufacturing standards in the steel industry; and unstructured data: including texts and pictures of smart manufacturing standards in the steel industry.
[0010] Step 2: For the new intelligent manufacturing standard data of the steel industry, use the named entity recognition model to identify and mark the new entities in the standard data.
[0011] The named entity recognition model refers to introducing a dictionary on the existing Chinese NER model, and adding an embedding representation layer and a self-attention mechanism of the dictionary; manually providing feedback on the entities recognized by the model, and updating the standard dictionary for intelligent manufacturing in the steel industry for training and updating the NER model;
[0012] The NER model is a model based on deep learning or an improved model based on deep learning.
[0013] Specifically:
[0014] Step 201, constructing a term dictionary using the collected historical standard data;
[0015] Step 202: for the given new standard data, match it with the dictionary in the form of a text sequence to obtain and save a set of matching entities.
[0016] The specific matching steps are as follows:
[0017] First, a fixed-length string is taken from the beginning of the text sequence;
[0018] The length is usually the length of the longest entity in the dictionary;
[0019] Then, the string is searched in the dictionary. If found, it is considered an entity and saved. If not found, the length of the string is shortened and the search continues until a matching entity is found or the string length is 1.
[0020] A string length of 1 means that each word in the text sequence is treated as an entity and saved.
[0021] Step 203, treating each saved entity as a token, and performing position encoding for each token;
[0022] Position encoding means: assigning a start and end position to each token in the order in which the token appears in the text sequence; that is, the position of the first and last characters in the input character sequence. If it is a single word, the start and end positions are the same.
[0023] Step 204, the position code of each token is input into the embedding representation layer, and the four kinds of relative position information of each pair of tokens are calculated, so as to obtain the relative position embedding value of each pair of tokens;
[0024] The four types of relative position information are: the information between the start position of the i-th token and the start position of the j-th token; the information between the start position of the i-th token and the end position of the j-th token; the information between the end position of the i-th token and the start position of the j-th token; the information between the i-th token and the end position of the j-th token;
[0025] First, based on the relative positions of two tokens, the following four relative distances are calculated:
[0026]
[0027] Among them, head[i] and tail[i] represent the start and end positions of the i-th token respectively. represents the distance between the start positions of the i-th token and the j-th token, represents the distance between the start position of the i-th token and the end position of the j-th token. Indicates the distance between the end positions of the i-th token and the j-th token. Represents the distance between the end position of the i-th token and the start position of the j-th token.
[0028] Then, using the relative distance, the start and end positions of each token are odd or even numbers, and four corresponding relative position encodings are calculated:
[0029] When the starting positions of the i-th token and the j-th token are both even numbers, the calculation formula is:
[0030]
[0031] When the starting positions of the i-th token and the j-th token are both odd numbers, the calculation formula is:
[0032]
[0033] The starting position of the i-th token and the ending position of the j-th token are both even numbers, and the calculation formula is:
[0034]
[0035] The starting position of the i-th token and the ending position of the j-th token are both odd numbers, and the calculation formula is:
[0036]
[0037] The end position of the i-th token and the start position of the j-th token are both even numbers, and the calculation formula is:
[0038]
[0039] The end position of the i-th token and the start position of the j-th token are both odd numbers, and the calculation formula is:
[0040]
[0041] The distance between the end positions of the i-th token and the j-th token is an even number, and the calculation formula is:
[0042]
[0043] The distance between the end positions of the i-th token and the j-th token is an odd number, and the calculation formula is:
[0044]
[0045] k represents the dimension index of the position encoding, d model Indicates the size of the input dimension;
[0046] Finally, a nonlinear transformation is used to calculate the relative position embedding between each pair of tokens. The calculation formula is as follows:
[0047]
[0048] Among them, W r is a learnable parameter, is the concatenation operator; R ij Embed the vector for the relative position between the i-th token and the j-th token;
[0049] Step 205, input the relative position embedding value of each pair of tokens into the self-attention mechanism to calculate the correlation between the pair of tokens;
[0050] The correlation between the i-th token and the j-th token is calculated as follows:
[0051] Att(A,V)=softmax(A)V
[0052] A is a large matrix whose elements are as follows:
[0053]
[0054] V=E x W v
[0055] Among them, W q , W k,R , W v , W k,E ,u,v are learnable parameters; E x The embedding matrix representing the token embedding comparison table; E xi Represents the embedding vector of the i-th token in the token embedding table. R xj Represents the relative position embedding vector of the jth token relative to other input tokens.
[0056] Step 206, input the correlation of each pair of tokens into the neural network system respectively, and after the decoding layer, obtain and label each entity in the standard data;
[0057] The entities include the name of the standard, the name of the responsible organization, the name of the main drafting organization of the standard, the name of the main drafter of the standard, the name of the normative referenced document and the name of the standard terminology, etc.
[0058] Step 3: Obtain the attributes of each new entity and extract the relationship between the new entities;
[0059] Among them, entity relationships specifically include reference relationships, terminology relationships, standard replacement relationships, drafting unit relationships, drafting person relationships, etc.
[0060] Step 4: Traverse each new entity and make a judgment, use the graph search algorithm to add each new entity and its corresponding relationship entity to the initial knowledge graph, and update it to the final knowledge graph;
[0061] For the new entity a, if it does not exist in the initial knowledge graph, then add the new entity a to the knowledge graph; continue to determine whether the new entity a has a relationship entity b. If not, then end and continue to traverse the next new entity c;
[0062] If entity b exists, determine whether the new entity b exists in the initial knowledge graph. If not, directly add the new entity b to the knowledge graph and supplement the relationship between the two entities. If the new entity b exists in the initial knowledge graph, directly supplement the relationship between the new entity a and the new entity b. Continue to traverse the next new entity c.
[0063] For the new entity a, when it exists in the initial knowledge graph, continue to determine whether the new entity a has a relationship entity b. If not, end and continue to traverse the next new entity c;
[0064] If entity b exists, determine whether the new entity b exists in the initial knowledge graph. If not, directly add the new entity b to the knowledge graph and supplement the relationship between the two entities. If the new entity b exists in the initial knowledge graph, directly supplement the relationship between the new entity a and the new entity b. Continue to traverse the next new entity c.
[0065] Step 5: Save the entities, relationships and corresponding attributes of each entity identified in the final knowledge graph as nodes, edges and attributes in the graph database; and apply them to specific application scenarios;
[0066] Specifically: each entity is represented as a node in the graph database; the relationship between entities is represented as a directed edge in the graph database.
[0067] The knowledge graph representation platform of the intelligent manufacturing standard of the steel industry includes: a client and a server;
[0068] The client receives the analysis dimensions such as the intelligent manufacturing standards or standard system of the steel industry for the specified analysis input by the user through the interactive interface, and sends them to the server;
[0069] The server performs entity recognition, relationship extraction and other steps based on the existing smart manufacturing standard data of the steel industry to build a knowledge graph of smart manufacturing standards for the steel industry; receives the analysis dimensions sent by the client, performs knowledge reasoning, and feeds back the reasoning results to the client;
[0070] The client displays the knowledge graph and the server's reasoning results on the interactive interface.
[0071] The advantages of the present invention are:
[0072] The named entity recognition model adopted in the present invention builds a dictionary in combination with the field terms related to the intelligent manufacturing standards of the steel industry, which can encode the field terms and enhance the model's understanding of the semantics of the intelligent manufacturing standards of the steel industry; a self-attention mechanism is added after encoding and before input into the neural network, so that the neural network can pay more attention to the input features with higher weights and adaptively extract the features at each moment; at the same time, a negative feedback mechanism is introduced for the training and updating of the NER model. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a flow chart of a knowledge graph representation method of intelligent manufacturing standards for the steel industry according to the present invention;
[0074] Figure 2 is an example diagram of the present invention linking entities and relationships to an initial knowledge graph;
[0075] Figure 3It is an embodiment architecture diagram of the named entity recognition model adopted by the present invention;
[0076] Figure 4 It is a schematic diagram of the architecture of a knowledge graph representation platform for intelligent manufacturing standards in the steel industry according to the present invention;
[0077] Figure 5 is a schematic diagram of an interactive interface provided by an embodiment of the present invention;
[0078] Figure 6 It is a structural block diagram of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to facilitate those skilled in the art to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only partial embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.
[0080] In view of this, the embodiments of this specification provide a knowledge graph representation method for intelligent manufacturing standards in the steel industry. One or more embodiments of this specification also involve a knowledge graph representation device for intelligent manufacturing standards in the steel industry, a knowledge graph representation platform for intelligent manufacturing standards in the steel industry, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.
[0081] The invention discloses a knowledge graph representation method for intelligent manufacturing standards in the steel industry, which uses natural language processing and knowledge graph technology, processes and parses the text of the intelligent manufacturing standards in the steel industry, identifies entities in the standards and extracts relationships, and finally constructs a knowledge graph and knowledge base for the intelligent manufacturing standards in the steel industry. Specifically, it includes standard text parsing, entity recognition and named entity recognition, entity linking, relationship extraction, knowledge representation and storage, knowledge reasoning and application.
[0082] like Figure 1 As shown, the specific steps are as follows:
[0083] Step 1: Use the existing historical standard data of intelligent manufacturing in the steel industry to build an initial knowledge graph;
[0084] Standard data includes structured data: database tables of various stages of the process including project establishment, drafting, soliciting opinions, approval and release of smart manufacturing standards in the steel industry; and unstructured data: including texts and pictures of smart manufacturing standards in the steel industry.
[0085] Step 2: For the new intelligent manufacturing standard data of the steel industry, use the named entity recognition model to identify and mark the new entities in the standard data.
[0086] The new entities include the standard name, responsible unit, main drafting unit of the standard, main drafter of the standard, normative reference documents, standard terminology, etc.
[0087] Due to the ambiguity of Chinese and the particularity of terms related to smart manufacturing in the steel industry, the embedding layer of the traditional NER model cannot use character vectors or word vectors alone to accurately express the semantics of smart manufacturing terms in the steel industry. This embodiment introduces a dictionary into the Chinese NER model to better obtain word boundary information and avoid the impact of Chinese word segmentation errors on Chinese NER. First, a dictionary of terms related to smart manufacturing in the steel industry is constructed, and the character vector is combined with the dictionary information in the embedding representation layer and sequence modeling layer of the Chinese NER model to better obtain the semantic information of smart manufacturing terms in the steel industry. The NER model here can be a model based on deep learning or an improved model based on deep learning.
[0088] Specifically:
[0089] Step 201, constructing a term dictionary using the collected historical standard data;
[0090] Step 202: for the given new standard data, match it with the dictionary in the form of a text sequence to obtain and save a set of matching entities.
[0091] The specific matching steps are as follows:
[0092] First, a fixed-length string is taken from the beginning of the text sequence;
[0093] The length is usually the length of the longest entity in the dictionary;
[0094] Then, the string is searched in the dictionary. If found, it is considered an entity and saved. If not found, the length of the string is shortened and the search continues until a matching entity is found or the string length is 1.
[0095] A string length of 1 means that each word in the text sequence is treated as an entity and saved.
[0096] Step 203, treating each saved entity as a token, and performing position encoding for each token;
[0097] Position encoding means: assigning a start and end position to each token in the order in which the token appears in the text sequence; that is, the position of the first and last characters in the input character sequence. If it is a single word, the start and end positions are the same.
[0098] For example, if the input sequence is "the robot's motion range is a performance indicator of the robot", the tokens "motion", "range", "motion range" and so on are split. For example, the start and end positions of "motion" are 5 and 6 respectively, and the start and end positions of "motion range" are 5 and 8 respectively;
[0099] Step 204, the position code of each token is input into the embedding representation layer, and the four kinds of relative position information of each pair of tokens are calculated, so as to obtain the relative position embedding value of each pair of tokens;
[0100] The four types of relative position information are: the information between the start position of the i-th token and the start position of the j-th token; the information between the start position of the i-th token and the end position of the j-th token; the information between the end position of the i-th token and the start position of the j-th token; the information between the i-th token and the end position of the j-th token;
[0101] First, based on the relative positions of two tokens, the following four relative distances are calculated:
[0102]
[0103] Among them, head[i] and tail[i] represent the start and end positions of the i-th token respectively. represents the distance between the start positions of the i-th token and the j-th token, represents the distance between the start position of the i-th token and the end position of the j-th token. Indicates the distance between the end positions of the i-th token and the j-th token. Represents the distance between the end position of the i-th token and the start position of the j-th token.
[0104] Then, using the relative distance, the start and end positions of each token are odd or even numbers, and four corresponding relative position encodings are calculated:
[0105] When the starting positions of the i-th token and the j-th token are both even numbers, the calculation formula is:
[0106]
[0107] When the starting positions of the i-th token and the j-th token are both odd numbers, the calculation formula is:
[0108]
[0109] The starting position of the i-th token and the ending position of the j-th token are both even numbers, and the calculation formula is:
[0110]
[0111] The starting position of the i-th token and the ending position of the j-th token are both odd numbers, and the calculation formula is:
[0112]
[0113] The end position of the i-th token and the start position of the j-th token are both even numbers, and the calculation formula is:
[0114]
[0115] The end position of the i-th token and the start position of the j-th token are both odd numbers, and the calculation formula is:
[0116]
[0117] The distance between the end positions of the i-th token and the j-th token is an even number, and the calculation formula is:
[0118]
[0119] The distance between the end positions of the i-th token and the j-th token is an odd number, and the calculation formula is:
[0120]
[0121] k represents the dimension index of the position encoding, d model Indicates the size of the input dimension;
[0122] Finally, a nonlinear transformation is used to calculate the relative position embedding between each pair of tokens. The calculation formula is as follows:
[0123]
[0124] Among them, W r is a learnable parameter, is the concatenation operator; R ij Embed the position vector for the relative position between the i-th token and the j-th token;
[0125] For example: input sequence [x1,x2,x3], calculate the relative embedding position of each token [R11,R12,R13], [R21,R22,R23] and [R31,R32,R33]; finally it becomes a large matrix
[0126] Step 205, input the relative position embedding value of each pair of tokens into the self-attention mechanism, and calculate the correlation between the relative position embeddings of the pair of tokens;
[0127] The correlation between the i-th token and the j-th token is calculated as follows:
[0128] Att(A,V)=softmax(A)V
[0129] A is a large matrix whose elements are as follows:
[0130]
[0131] V=E x W v
[0132] Among them, W q , W k,R , W v , W k,E ,u,v are learnable parameters; E x The embedding matrix representing the token embedding comparison table; E xi Represents the embedding vector of the i-th token in the token embedding table. R xj Represents the relative position embedding vector of the jth token relative to other input tokens.
[0133] Step 206, input the correlation of each pair of tokens into the neural network system respectively, and after the decoding layer, obtain and label each entity in the standard data;
[0134] The entities include the name of the standard, the name of the responsible organization, the name of the main drafting organization of the standard, the name of the main drafter of the standard, the name of the normative referenced document and the name of the standard terminology, etc.
[0135] The decoding adopts conditional random field (CRF) decoding;
[0136] Step 3: Obtain the attributes of each new entity and extract the relationships between the new entities to represent them as relationships in the knowledge graph;
[0137] Among them, entity relationships specifically include reference relationships, terminology relationships, standard replacement relationships, drafting unit relationships, drafting person relationships, etc.
[0138] Step 4: Traverse each new entity and make a judgment, use the graph search algorithm to link each new entity and its corresponding relationship to the initial knowledge graph, and update it to the final knowledge graph;
[0139] For the new entity a, if it does not exist in the initial knowledge graph, then add the new entity a to the knowledge graph; continue to determine whether the new entity a has a relationship entity b. If not, then end and continue to traverse the next new entity c;
[0140] If entity b exists, determine whether the new entity b exists in the initial knowledge graph. If not, directly add the new entity b to the knowledge graph and supplement the relationship between the two entities. If the new entity b exists in the initial knowledge graph, directly supplement the relationship between the new entity a and the new entity b. Continue to traverse the next new entity c.
[0141] For the new entity a, when it exists in the initial knowledge graph, continue to determine whether the new entity a has a relationship entity b. If not, end and continue to traverse the next new entity c;
[0142] If entity b exists, determine whether the new entity b exists in the initial knowledge graph. If not, directly add the new entity b to the knowledge graph and supplement the relationship between the two entities. If the new entity b exists in the initial knowledge graph, directly supplement the relationship between the new entity a and the new entity b. Continue to traverse the next new entity c.
[0143] For example, in the standard text "General Requirements for Coil Unbundling Robot Systems", "The following terms and definitions apply to this document.
[0144] Vision is the ability to perceive the environment through optical information.”
[0145] Identify the entities "vision" and "the ability to perceive the environment through optical information", and mark the relationship as Figure 2 shown.
[0146] Step 5: Save the entities, relationships and corresponding attributes of each entity identified in the final knowledge graph as nodes, edges and attributes in the graph database; and apply them to specific application scenarios;
[0147] Specifically, each entity is represented as a node in the graph database, and the relationship between entities is represented as a directed edge in the graph database. For example, for a standard entity A and a term B, an edge is created from node A to node B, and it is marked as a "term" relationship.
[0148] Attributes and relationships are similar and are both identified from standard texts. For example, the standard text "Emergency stop is an important function of the robot, that is, it can override other functions to remove the power of the robot driver and stop all the moving parts of the robot." identifies the entities "Emergency stop", "Robot", "Remove the power of the robot driver beyond other functions to stop all the moving parts of the robot". A functional attribute of the entity "Robot" is "Emergency stop"; the definition of "Emergency stop" is "Remove the power of the robot driver beyond other functions to stop all the moving parts of the robot", and the relationship between these two entities is "Definition".
[0149] Application scenarios include intelligent search, recommendation systems, and intelligent question and answer.
[0150] The knowledge graph representation platform of the intelligent manufacturing standard of the steel industry includes: a client and a server;
[0151] The client receives the analysis dimensions such as the intelligent manufacturing standards or standard system of the steel industry for the specified analysis input by the user through the interactive interface, and sends them to the server;
[0152] The server performs entity recognition, relationship extraction and other steps based on the existing smart manufacturing standard data of the steel industry to build a knowledge graph of smart manufacturing standards for the steel industry; receives the analysis dimensions sent by the client, performs knowledge reasoning, and feeds back the reasoning results to the client;
[0153] The client is also used to display the knowledge graph of the intelligent manufacturing standards of the steel industry and the reasoning results of the server in the interactive interface.
[0154] Example:
[0155] The execution subject of the knowledge graph representation method of the intelligent manufacturing standard of the steel industry provided in this embodiment is a computing device used to represent the knowledge graph of the intelligent manufacturing standard of the steel industry. The knowledge graph representation method of the intelligent manufacturing standard of the steel industry provided can be implemented by at least one of software, hardware circuits, and logic circuits set in the execution subject.
[0156] like Figure 3 As shown in the figure, the architecture diagram of the named entity recognition model provided in this embodiment is divided into the following steps during model training:
[0157] Step 1: Build a standard dictionary for intelligent manufacturing in the steel industry, including a character-level dictionary and a word-level dictionary. The dictionary can be built based on industry rules and expert knowledge.
[0158] In this embodiment, "bag unpacking robot" is selected and split into five single-character words "unpack", "bag", "machine", "device" and "person" and four words "bag unpacking", "machine", "robot" and "bag unpacking robot".
[0159] Step 2: Embedding the standard text: Based on the dictionary, the standard text is split at the character and word levels and positionally encoded.
[0160] Step 3: Self-attention analysis. Step 2 only completes the position encoding of the standard text, indicating the order of characters or words in the text, but cannot find the positional relationship. The introduction of the self-attention mechanism enables the neural network to pay more attention to the input features with higher weights and adaptively extract the features at each moment.
[0161] Step 4: Decoding. After the semantic information of the text is extracted through the neural network model, the character sequence representation is input into the decoding layer for sequence labeling. In this embodiment, the basic neural network model used can be a neural network model such as a CNN model, an RNN model, and an LSTM model.
[0162] Step 5: Perform model training.
[0163] This embodiment also provides an interactive function. After the knowledge graph of intelligent manufacturing standards for the steel industry is constructed, the knowledge graph is sent to the client for display. This allows users to visually observe the knowledge graph, and modify entities with recognition errors and send them to the server to update the dictionary of intelligent manufacturing standard terms for the steel industry, so as to better support the update of the recognition model.
[0164] like Figure 4 As shown in the figure, a schematic diagram of the architecture of the knowledge graph platform for intelligent manufacturing standards in the steel industry is given:
[0165] The client is used to receive user input instructions through the interactive interface, including displaying the knowledge graph panorama and some standard knowledge graph relationship diagrams; receiving user feedback on entities that were incorrectly identified by the model; and feeding back the information received through the interactive interface to the server.
[0166] The server is used to deploy applications, receive user instructions from the client, infer the relationships between knowledge graphs, and send the inferred information to the server.
[0167] Specifically, the display content of the interactive interface is as follows: Figure 5 As shown, the user enters the standard knowledge graph to be viewed and the error entity that needs feedback in the interactive interface, and the knowledge graph relationship diagram is displayed at the bottom.
[0168] Figure 6The block diagram of a computing device provided according to this embodiment is shown. The components of the computing device include but are not limited to a memory and a processor. The processor and the memory are connected via a bus, and the database is used to store data.
[0169] The computing device may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device, a mobile phone or other type of mobile device, or a stationary computing device such as a desktop computer or PC. The computing device may also be a mobile or stationary server.
[0170] Among them, the processor is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned steel industry intelligent manufacturing standard knowledge graph representation method.
[0171] This embodiment also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-mentioned steel industry intelligent manufacturing standard knowledge graph representation method.
[0172] This embodiment also provides a computer program, wherein when the computer program is executed in a computer, the computer is instructed to execute the above-mentioned standard knowledge graph representation method for intelligent manufacturing in the steel industry.
Claims
1. A knowledge graph representation method for intelligent manufacturing standards in the steel industry, characterized in that: The specific steps are as follows: Step 1: Use the existing historical standard data of intelligent manufacturing in the steel industry to build an initial knowledge graph; Step 2: For the new intelligent manufacturing standard data of the steel industry, use the named entity recognition model to identify and mark the new entities in the standard data; Specifically: Step 201, constructing a term dictionary using the collected historical standard data; Step 202: for the given new standard data, match it with the dictionary in the form of a text sequence to obtain a set of matching entities and save them; The specific matching steps are as follows: First, take a fixed-length string from the beginning of the text sequence; The length is usually the length of the longest entity in the dictionary; Then, the string is searched in the dictionary. If it is found, it is considered an entity and saved. If it is not found, the length of the string is shortened and the search is continued until a matching entity is found or the string length is 1. Step 203, treating each saved entity as a token, and performing position encoding for each token; Position encoding means: assigning a start and end position to each token in the order in which the token appears in the text sequence; that is, the position of the first and last characters in the input character sequence. If it is a single word, the start and end positions are the same; Step 204, the position code of each token is input into the embedding representation layer, and the four kinds of relative position information of each pair of tokens are calculated, so as to obtain the relative position embedding value of each pair of tokens; First, based on the relative positions of two tokens, the following four relative distances are calculated: Among them, head[i] and tail[i] represent the start and end positions of the i-th token respectively. represents the distance between the start positions of the i-th token and the j-th token, represents the distance between the start position of the i-th token and the end position of the j-th token. Indicates the distance between the end positions of the i-th token and the j-th token. Indicates the distance between the end position of the i-th token and the start position of the j-th token; Then, using the relative distance, the start and end positions of each token are odd or even numbers, and four corresponding relative position encodings are calculated: When the starting positions of the i-th token and the j-th token are both even numbers, the calculation formula is: When the starting positions of the i-th token and the j-th token are both odd numbers, the calculation formula is: The starting position of the i-th token and the ending position of the j-th token are both even numbers, and the calculation formula is: The starting position of the i-th token and the ending position of the j-th token are both odd numbers, and the calculation formula is: The end position of the i-th token and the start position of the j-th token are both even numbers, and the calculation formula is: The end position of the i-th token and the start position of the j-th token are both odd numbers, and the calculation formula is: The distance between the end positions of the i-th token and the j-th token is an even number, and the calculation formula is: The distance between the end positions of the i-th token and the j-th token is an odd number, and the calculation formula is: k represents the dimension index of the position encoding, d model Indicates the size of the input dimension; Finally, a nonlinear transformation is used to calculate the relative position embedding between each pair of tokens. The calculation formula is as follows: Among them, W r is a learnable parameter, is the concatenation operator; R ij Embed the vector for the relative position between the i-th token and the j-th token; Step 205, input the relative position embedding value of each pair of tokens into the self-attention mechanism to calculate the correlation between the pair of tokens; The correlation between the i-th token and the j-th token is calculated as follows: Att(A,V)=softmax(A)V A is a large matrix whose elements are as follows: V. E x W v Among them, W q , W k,R , W v , W k,E ,u,v are learnable parameters; E x The embedding matrix representing the token embedding comparison table; E xi Represents the embedding vector of the i-th token in the token embedding table; R xj Represents the relative position embedding vector of the jth token relative to other input tokens; Step 206, input the correlation of each pair of tokens into the neural network system respectively, and after the decoding layer, obtain and label each entity in the standard data; Step 3: Obtain the attributes of each new entity and extract the relationship between the new entities; Step 4: Traverse each new entity and make a judgment, use the graph search algorithm to add each new entity and its corresponding relationship entity to the initial knowledge graph, and update it to the final knowledge graph; Step 5: Save the entities, relationships, and corresponding attributes of each entity identified in the final knowledge graph as nodes, edges, and attributes in the graph database, and apply them to specific application scenarios.
2. A knowledge graph representation method for intelligent manufacturing standards in the steel industry as claimed in claim 1, characterized in that: In step 1, the standard data includes structured data: database tables of each stage of the process of project establishment, drafting, soliciting opinions, approval and publication of smart manufacturing standards for the steel industry; and unstructured data: including texts and pictures of smart manufacturing standards for the steel industry.
3. The knowledge graph representation method for intelligent manufacturing standards in the steel industry according to claim 1, characterized in that: In step 2, the named entity recognition model refers to introducing a dictionary on the existing Chinese NER model, and adding an embedding representation layer and a self-attention mechanism of the dictionary; manually providing feedback on the entities recognized by the model, and updating the standard dictionary for intelligent manufacturing in the steel industry for training and updating the NER model.
4. A knowledge graph representation method for intelligent manufacturing standards in the steel industry as claimed in claim 3, characterized in that: In step 2, the NER model is a model based on deep learning or an improved model based on deep learning.
5. The knowledge graph representation method for intelligent manufacturing standards in the steel industry according to claim 1, characterized in that: In step 206, the entities include the standard name, the name of the responsible unit, the name of the main drafting unit of the standard, the name of the main drafter of the standard, the name of the normative reference document and the name of the standard terminology.
6. The knowledge graph representation method of the intelligent manufacturing standard of the steel industry according to claim 1, characterized in that: In step 3, the entity relationship specifically includes reference relationship, terminology relationship, standard replacement relationship, drafting unit relationship, and drafter relationship.
7. The knowledge graph representation method of the intelligent manufacturing standard of the steel industry according to claim 1 is characterized in that: The step 4 is specifically as follows: For the new entity a, if it does not exist in the initial knowledge graph, then add the new entity a to the knowledge graph; continue to determine whether the new entity a has a relationship entity b. If not, then end and continue to traverse the next new entity c; If entity b exists, determine whether the new entity b exists in the initial knowledge graph. If not, directly add the new entity b to the knowledge graph and supplement the relationship between the two entities. If the new entity b exists in the initial knowledge graph, directly supplement the relationship between the new entity a and the new entity b. Continue to traverse the next new entity c. For the new entity a, when it exists in the initial knowledge graph, continue to determine whether the new entity a has a relationship entity b. If not, end and continue to traverse the next new entity c; If entity b exists, determine whether the new entity b exists in the initial knowledge graph. If not, directly add the new entity b to the knowledge graph and supplement the relationship between the two entities. If the new entity b exists in the initial knowledge graph, directly supplement the relationship between the new entity a and the new entity b. Continue to traverse the next new entity c.
8. The knowledge graph representation method for intelligent manufacturing standards in the steel industry according to claim 1, characterized in that: The step 5 specifically includes: representing each entity as a node in the graph database; and representing the relationship between entities as directed edges in the graph database.
9. A knowledge graph representation platform using the knowledge graph representation method of the steel industry intelligent manufacturing standard according to claim 1, comprising: Client and server; The client receives the analysis dimensions of the intelligent manufacturing standard of the steel industry for the specified analysis input by the user through the interactive interface and sends them to the server; The server performs entity recognition and relationship extraction based on the existing smart manufacturing standard data of the steel industry, and builds a knowledge graph of smart manufacturing standards for the steel industry; Receive the analysis dimensions sent by the client, perform knowledge reasoning, and feed back the reasoning results to the client; The client displays the knowledge graph and the server's reasoning results on the interactive interface.
Citation Information
Cited By
A knowledge representation logic system that fuses industry standards
CN122905042A