Intelligent manufacturing field standard file knowledge graph matching method and device
Through the BERT-based standard file knowledge graph matching method in the field of intelligent manufacturing, the measurement problem of the matching degree between query content and standard file knowledge graph in the field of intelligent manufacturing is solved, efficient and accurate retrieval effect is achieved, and data storage and search reasoning capabilities in the field of intelligent manufacturing are improved.
Patent Information
- Application Number
- CN202510165648.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-07-08
AI Technical Summary
Traditional search technology is difficult to meet the fast and accurate search needs of complex queries and semantic associations in the field of intelligent manufacturing. The existing knowledge graph technology is insufficiently combined with the field of intelligent manufacturing, and it is impossible to effectively measure the degree of matching between the query content and the knowledge graph of standard files.
The BERT-based standard file knowledge graph matching method in the field of intelligent manufacturing is used to calculate the degree of matching between the query content and the standard file knowledge graph in the field of intelligent manufacturing, including entity embedding, linear transformation, cosine similarity calculation and weight evaluation.
It has achieved an effective measurement of the degree of matching between the query content and the standard file knowledge graph, and improved the accuracy and efficiency of standard file retrieval in the field of intelligent manufacturing, and significantly improved the accuracy, recall rate and F1 value indicators.
Smart Images

Figure CN120277222A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and particularly to a method for matching a knowledge graph of standard documents in the field of intelligent manufacturing based on BERT. Background Art
[0002] With the rapid development of intelligent manufacturing, higher requirements are put forward for the intelligent management and optimization of manufacturing processes. Effectively managing and applying standard documents to guide and standardize manufacturing processes is crucial for ensuring the compliance, safety, and quality of manufacturing processes. However, the complexity of intelligent manufacturing projects is increasing day by day, and the quantity and update frequency of standard documents are also rising continuously. Traditional retrieval technologies are difficult to meet the needs of rapid and accurate retrieval, especially in dealing with complex queries and understanding the semantic associations of document contents, showing obvious deficiencies.
[0003] With the development of knowledge graph technology, knowledge graphs are increasingly applied in vertical fields, bringing possibilities for solving the problems of associative expression and relevance search and reasoning of data and knowledge in the field of intelligent manufacturing. However, existing research mainly focuses on the construction of knowledge graphs. How to combine knowledge graph technology with the specific needs of the intelligent manufacturing field to improve data storage efficiency and search and reasoning capabilities is still a direction worthy of exploration. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method for matching a knowledge graph of standard documents in the field of intelligent manufacturing based on BERT, which can effectively measure the matching degree between the query content and the entities in the knowledge graph of intelligent manufacturing standard documents.
[0005] The technical solution adopted by the present invention to solve its technical problems is: to provide a method for matching a knowledge graph of standard documents in the field of intelligent manufacturing, including the following steps:
[0006] Receive the query content, and extract the entity content related to the field of intelligent manufacturing from the query content;
[0007] Input the entity content related to the field of intelligent manufacturing into the intelligent matching model to obtain the matching degree between the query content and the knowledge graph of standard documents in the field of intelligent manufacturing to be matched;
[0008] Among them, the intelligent matching model includes:
[0009] An entity embedding layer part for generating an embedding representation of the word vectors of the entity content related to the field of intelligent manufacturing;
[0010] The linear transformation layer part is used to perform a linear transformation on the embedded representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched, so as to obtain query content word vectors and multiple entity content word vectors;
[0011] The semantic transformation layer part is used to calculate the cosine similarity between the query content word vectors and the multiple entity content word vectors, and transform the cosine similarity through an activation function to obtain multiple enhanced semantic similarities;
[0012] The weight calculation layer part is used to evaluate the importance of each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched, and determine the weight of the entity in the overall matching process according to the importance of each entity;
[0013] The matching calculation layer part is used to perform a weighted sum of the multiple enhanced semantic similarities by using the weight of the entity in the overall matching process to obtain the matching degree between the query content and the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched.
[0014] The knowledge graph of the standard documents in the field of intelligent manufacturing to be matched is obtained through the following method:
[0015] Based on multiple national standard documents in the field of intelligent manufacturing, a preliminary knowledge graph is constructed, and the preliminary knowledge graph describes the entries in the standard documents in the field of intelligent manufacturing, the keywords in each entry, the connections between standard documents, and the connections between keywords;
[0016] According to the theme classification in the field of intelligent manufacturing, the preliminary knowledge graph is divided into multiple samples to obtain multiple knowledge graphs of the standard documents in the field of intelligent manufacturing to be matched. Among them, each knowledge graph of the standard documents in the field of intelligent manufacturing to be matched contains standard document entities, entry entities, and keyword entities.
[0017] The linear transformation layer part includes:
[0018] The word vector generation unit is used to generate the word vectors of each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched, and obtain a word vector set;
[0019] The mean vector calculation unit is used to calculate the average of all the word vectors in the word vector set to obtain a mean vector;
[0020] The transformation matrix calculation unit is used to perform SVD decomposition on the covariance matrix of the word vectors in the word vector set, and calculate the transformation matrix by using the obtained orthogonal matrix and diagonal matrix;
[0021] A linear transformation unit is configured to perform a linear transformation on the embedded representation of the word vector and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched by using the mean vector and the transformation matrix, so as to obtain a query content word vector and a plurality of entity content word vectors.
[0022] The semantic transformation layer portion includes:
[0023] A normalization processing unit is configured to perform normalization processing on the query content word vector and the plurality of entity content word vectors;
[0024] A cosine similarity calculation unit is configured to calculate the inner products of the query content word vector and the plurality of entity content word vectors after normalization processing respectively, so as to obtain a plurality of cosine similarities;
[0025] A transformation unit is configured to perform transformation on the plurality of cosine similarities respectively through an activation function, so as to obtain a plurality of enhanced semantic similarities.
[0026] The activation function f h-sig (x) is: where x is the cosine similarity, α and β are set similarity thresholds, and -1 ≤ α < β ≤ 1.
[0027] The weight calculation layer portion includes:
[0028] An identification unit is configured to identify keyword entities directly connected to the entry entity in the knowledge graph of the standard documents in the field of intelligent manufacturing through an inclusion relationship;
[0029] An initialization unit is configured to initialize the weights of the keyword entities identified by the identification unit to 1, and initialize the weights of the keyword entities not identified by the identification unit to 0;
[0030] A statistics unit is configured to count the number n of other keyword entities connected to each keyword entity through a same category relationship;
[0031] A weight determination unit is configured to increase the weights on the basis of the initialized weights of each keyword entity, so as to obtain the weights of each keyword entity.
[0032] The technical solution adopted by the present invention to solve its technical problems is: to provide a knowledge graph matching device for standard documents in the field of intelligent manufacturing, including:
[0033] A receiving and extraction module is configured to receive a query content, and extract entity content related to the field of intelligent manufacturing from the query content;
[0034] A matching module, configured to input the entity content related to the intelligent manufacturing field into an intelligent matching model to obtain the matching degree between the query content and the knowledge graph of the standard documents in the intelligent manufacturing field to be matched;
[0035] Among them, the intelligent matching model includes:
[0036] An entity embedding layer part, configured to generate an embedded representation of the word vectors of the entity content related to the intelligent manufacturing field;
[0037] A linear transformation layer part, configured to perform a linear transformation on the embedded representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, to obtain a query content word vector and multiple entity content word vectors;
[0038] A semantic transformation layer part, configured to calculate the cosine similarity between the query content word vector and the multiple entity content word vectors, and transform the cosine similarity through an activation function to obtain multiple enhanced semantic similarities;
[0039] A weight calculation layer part, configured to evaluate the importance of each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, and determine the weight of the entity in the overall matching process according to the importance of each entity;
[0040] A matching calculation layer part, configured to perform a weighted sum on the multiple enhanced semantic similarities by using the weight of the entity in the overall matching process to obtain the matching degree between the query content and the knowledge graph of the standard documents in the intelligent manufacturing field to be matched.
[0041] The technical solution adopted by the present invention to solve its technical problems is: to provide an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the steps of the above-mentioned method for matching the knowledge graph of the standard documents in the intelligent manufacturing field are implemented.
[0042] The technical solution adopted by the present invention to solve its technical problems is: to provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for matching the knowledge graph of the standard documents in the intelligent manufacturing field are implemented.
[0043] Beneficial effects
[0044] Due to the above technical solution, compared with the prior art, the present invention has the following advantages and positive effects: The present invention realizes an effective measurement of the matching degree between the query content and the standard document knowledge graph, and has significant advantages in improving the accuracy and efficiency of standard document retrieval in the field of intelligent manufacturing. On the standard document knowledge graph dataset IM-StanDoc in the field of intelligent manufacturing, the accuracy rate of the knowledge graph matching task reaches 89.87%, and the precision, recall, and F1 value indicators are all higher than those of other models, and all have an improvement of more than 1%. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flowchart of the method for matching the standard document knowledge graph in the field of intelligent manufacturing in the first embodiment of the present invention;
[0046] Figure 2 is an overall framework diagram of the intelligent matching model in the first embodiment of the present invention;
[0047] Figure 3 is an example diagram of the preliminary knowledge graph in the first embodiment of the present invention;
[0048] Figure 4 is an example diagram of the standard document knowledge graph to be matched in the field of intelligent manufacturing in the first embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] The following further elaborates the present invention with reference to specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of this application.
[0050] The first embodiment of the present invention relates to a method for matching a standard document knowledge graph in the field of intelligent manufacturing, as Figure 1 shown, including the following steps:
[0051] Step 1, receive the query content, and extract the entity content related to the field of intelligent manufacturing from the query content;
[0052] Step 2, input the entity content related to the field of intelligent manufacturing into the intelligent matching model to obtain the matching degree between the query content and the standard document knowledge graph to be matched in the field of intelligent manufacturing.
[0053] The standard document knowledge graph to be matched in the field of intelligent manufacturing in this embodiment is obtained through the following method:
[0054] Dataset Acquisition: A preliminary knowledge graph is constructed based on more than 60 national standard documents in the field of intelligent manufacturing. These national standard documents are issued by the State Administration for Market Regulation, the Standardization Administration of China, etc., covering multiple aspects of the intelligent manufacturing field, including but not limited to general requirements, networked collaborative manufacturing, intelligent manufacturing services, etc. The preliminary knowledge graph is stored in the Neo4j graph database in the form of an attribute graph. As Figure 3 shown, the preliminary knowledge graph describes knowledge such as the entries in the standard documents in the intelligent manufacturing field, the keywords in each entry, the relationships between standard documents, and the relationships between keywords.
[0055] Dataset Construction: To improve the richness of the knowledge graph in the field of intelligent manufacturing, the preliminary knowledge graph is divided into multiple samples according to the theme classification in the intelligent manufacturing field, obtaining multiple knowledge graphs of standard documents in the intelligent manufacturing field to be matched. As Figure 2 shown, each knowledge graph of standard documents in the intelligent manufacturing field to be matched contains standard document entities, related entry entities and keyword entities, as well as the relationships between them.
[0056] To solve the difficulty that when matching knowledge graphs, the semantic information of entities is similar to the query content, the word vector gap is small, and it is difficult to infer whether they match through similarity, combined with the characteristics of entity diversity and relationship complexity in the intelligent manufacturing field, as Figure 2 shown, the intelligent matching model in this embodiment includes:
[0057] The entity embedding layer part is used to generate the embedding representation of the word vectors of the entity content related to the intelligent manufacturing field. The entity embedding layer part in this embodiment can select the pre-trained BERT-wwm-ext language model as the basis for entity embedding. In the MLM pre-training task of the model, the segmented Chinese words are uniformly masked, enabling the model to better understand and learn the semantics of the words. In the pre-training stage, the model uses LTP for word segmentation and is trained using rich data including Chinese encyclopedias such as Chinese Wikipedia, and has good performance and accuracy when processing Chinese texts.
[0058] The linear transformation layer part is used to perform linear transformation on the embedding representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of standard documents in the intelligent manufacturing field to be matched, obtaining the query content word vector and multiple entity content word vectors. The linear transformation layer part in this embodiment includes:
[0059] The word vector generation unit is used to generate the word vectors of each entity in the knowledge graph of standard documents in the intelligent manufacturing field to be matched, obtaining a word vector set;
[0060] A mean vector calculation unit, which is used to calculate the average of all word vectors in the word vector set to obtain a mean vector;
[0061] A transformation matrix calculation unit, which is used to perform SVD decomposition on the covariance matrix of the word vectors in the word vector set, and calculate a transformation matrix by using the obtained orthogonal matrix and diagonal matrix;
[0062] A linear transformation unit, which is used to perform a linear transformation on the embedded representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched by using the mean vector and the transformation matrix, so as to obtain query content word vectors and multiple entity content word vectors.
[0063] In this embodiment, a word vector set generated from 1,863 professional words that appear in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched is selected. The average of all vectors in the word vector set is calculated to obtain a mean vector μ. The covariance matrix of the vectors in the vector set is subjected to SVD decomposition, and a transformation matrix W is calculated by using the obtained orthogonal matrix U and diagonal matrix Λ. The calculation formula of the transformation matrix W is: After obtaining the mean vector μ and the transformation matrix W, a linear transformation is performed on the embedded representations of the word vectors corresponding to each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched and the word vectors corresponding to the query content. The calculation formula is: where x i is the embedding of the word vector corresponding to each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched or the word vector corresponding to the query content, is the query content word vector or the entity content word vector.
[0064] A semantic transformation layer part, which is used to calculate the cosine similarity between the query content word vectors and multiple entity content word vectors, and transform the cosine similarity through an activation function to obtain multiple enhanced semantic similarities. The semantic transformation layer part in this embodiment includes:
[0065] A normalization processing unit, which is used to perform normalization processing on the query content word vectors and multiple entity content word vectors;
[0066] A cosine similarity calculation unit, which is used to calculate the inner product of the query content word vectors and multiple entity content word vectors after normalization processing respectively to obtain multiple cosine similarities;
[0067] A transformation unit, which is used to transform multiple cosine similarities through an activation function respectively to obtain multiple enhanced semantic similarities.
[0068] The knowledge graph sample contains entry entities and keyword entities. The content of the entry entities is the serial number and title in the file, and the semantic information is relatively limited, which is not sufficient to reflect the detailed semantic requirements of the query content. Therefore, this embodiment does not consider the semantic similarity between the entry entities and the query content. To facilitate the calculation of the cosine value of two vectors, this embodiment first normalizes the word vectors of multiple entity contents and the word vector of the query content. The processing method is as follows: Among them, is the word vector of the query content or the word vector of the entity content, represents the norm of the word vector of the query content or the word vector of the entity content, and x norm is the word vector of the entity content or the word vector of the query content after normalization. The cosine value between the normalized word vector of the entity content and the word vector of the query content is equal to the inner product of the vectors, which can be obtained by dot product, and its value range is the interval [-1, 1]. Directly using the cosine value as the semantic similarity between the word vector of the entity content and the word vector of the query content has certain limitations. In the process of knowledge graph matching, what is concerned is the content that matches the query content, rather than the content that does not match. Therefore, this embodiment uses the activation function f h-sig (x) to transform the obtained cosine similarity, and convert the similarity value into a value with a value range of [0, 1], so as to enhance the performance of the semantic similarity. The activation function f h-sig (x) is: Among them, x is the cosine similarity, and α and β are set similarity thresholds, and -1 ≤ α < β ≤ 1.
[0069] The weight calculation layer part is used to evaluate the importance of each entity in the knowledge graph of the standard file in the field of intelligent manufacturing to be matched, and determine the weight of the entity in the overall matching process according to the importance of each entity. The weight calculation layer part of this embodiment includes:
[0070] An identification unit for identifying keyword entities directly connected to the entry entity through an inclusion relationship in the knowledge graph of the standard file in the field of intelligent manufacturing to be matched;
[0071] An initialization unit for initializing the weight of the keyword entity identified by the identification unit to 1, and initializing the weight of the keyword entity not identified by the identification unit to 0;
[0072] A statistical unit for counting the number n of other keyword entities connected to each keyword entity through the same category relationship;
[0073] A weight determination unit for increasing the weight of on the basis of the initialized weight of each keyword entity to obtain the weight of each keyword entity.
[0074] The importance of an entity is determined by its position in the knowledge graph and its relationships with other entities. In this embodiment, the entity relationships in the knowledge graph of standard documents in the field of intelligent manufacturing to be matched are mainly divided into inclusion relationships and other relationships. These relationships constitute the structural basis of the knowledge graph and are the key to evaluating the importance of entities. The weight calculation layer first identifies the keyword entities directly connected to the entry entity through the inclusion relationship and initializes the weights of these keyword entities to 1, and initializes the weights of other keyword entities to 0. Subsequently, other relationships between keyword entities are considered, and the weight of is increased for the n entities connected to an entity through the same category relationship. In this way, the weight of each entity obtained can reflect its importance in the knowledge graph. of the weight, and the weight of each entity obtained in this way can reflect its importance in the knowledge graph.
[0075] The matching calculation layer is used to perform a weighted sum of multiple enhanced semantic similarities using the weights of entities in the overall matching process to obtain the matching degree between the query content and the knowledge graph of standard documents in the field of intelligent manufacturing to be matched.
[0076] The value ranges of the multiple enhanced semantic similarities obtained after being processed by the activation function in the semantic transformation layer are between [0, 1]. To keep the value of the semantic similarity between the knowledge graph and the query content within the range of [0, 1], first, the weights of each keyword entity in the knowledge graph are normalized, and then they are used as weights to perform a weighted sum with the corresponding enhanced semantic similarities. The result of the sum is the matching degree between the query content and the knowledge graph of standard documents in the field of intelligent manufacturing to be matched.
[0077] In this embodiment, the accuracy rate of the knowledge graph matching task on the knowledge graph dataset IM-StanDoc of standard documents in the field of intelligent manufacturing reaches 89.87%. The precision, recall rate, and F1 value indicators are all higher than those of other models, and all have achieved an improvement of more than 1%. It can be seen that the present invention realizes an effective measurement of the matching degree between the query content and the knowledge graph of standard documents, and has significant advantages in improving the accuracy and efficiency of standard document retrieval in the field of intelligent manufacturing.
[0078] The second embodiment of the present invention relates to a knowledge graph matching device for standard documents in the field of intelligent manufacturing, including:
[0079] A receiving and extracting module, configured to receive query content and extract entity content related to the field of intelligent manufacturing from the query content;
[0080] A matching module, configured to input the entity content related to the field of intelligent manufacturing into an intelligent matching model to obtain the matching degree between the query content and the knowledge graph of standard documents in the field of intelligent manufacturing to be matched;
[0081] Wherein, the intelligent matching model includes:
[0082] An entity embedding layer part for generating an embedded representation of word vectors of the entity content related to the intelligent manufacturing field;
[0083] A linear transformation layer part for performing a linear transformation on the embedded representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, obtaining a query content word vector and a plurality of entity content word vectors;
[0084] A semantic transformation layer part for calculating the cosine similarity between the query content word vector and the plurality of entity content word vectors, and transforming the cosine similarity through an activation function to obtain a plurality of enhanced semantic similarities;
[0085] A weight calculation layer part for evaluating the importance of each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, and determining the weight of the entity in the overall matching process according to the importance of each entity;
[0086] A matching calculation layer part for performing a weighted sum on the plurality of enhanced semantic similarities by using the weight of the entity in the overall matching process to obtain the matching degree between the query content and the knowledge graph of the standard documents in the intelligent manufacturing field to be matched.
[0087] The knowledge graph of the standard documents in the intelligent manufacturing field to be matched is obtained through the following method:
[0088] Construct a preliminary knowledge graph based on multiple national standard documents in the intelligent manufacturing field, where the preliminary knowledge graph describes the entries in the standard documents in the intelligent manufacturing field, the keywords in each entry, the relationships between standard documents, and the relationships between keywords;
[0089] Divide the preliminary knowledge graph into multiple samples according to the theme classification in the intelligent manufacturing field to obtain multiple knowledge graphs of the standard documents in the intelligent manufacturing field to be matched, where each knowledge graph of the standard documents in the intelligent manufacturing field to be matched contains standard document entities, entry entities, and keyword entities.
[0090] The linear transformation layer part includes:
[0091] A word vector generation unit for generating word vectors of each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, obtaining a word vector set;
[0092] A mean vector calculation unit for averaging all the word vectors in the word vector set to obtain a mean vector;
[0093] A transformation matrix calculation unit, configured to perform SVD decomposition on the covariance matrix of the word vectors in the word vector set, and calculate a transformation matrix by using the obtained orthogonal matrix and diagonal matrix;
[0094] A linear transformation unit, configured to perform a linear transformation on the embedded representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched by using the mean vector and the transformation matrix, so as to obtain query content word vectors and multiple entity content word vectors.
[0095] The semantic transformation layer part includes:
[0096] A normalization processing unit, configured to perform normalization processing on the query content word vectors and the multiple entity content word vectors;
[0097] A cosine similarity calculation unit, configured to calculate the inner products of the query content word vectors and the multiple entity content word vectors after the normalization processing respectively, so as to obtain multiple cosine similarities;
[0098] A transformation unit, configured to perform a transformation on the multiple cosine similarities respectively through an activation function, so as to obtain multiple enhanced semantic similarities.
[0099] The activation function f h-sig (x) is: where x is the cosine similarity, α and β are set similarity thresholds, and -1 ≤ α < β ≤ 1.
[0100] The weight calculation layer part includes:
[0101] An identification unit, configured to identify keyword entities directly connected to the item entity in the knowledge graph of the standard documents in the field of intelligent manufacturing to be matched through an inclusion relationship;
[0102] An initialization unit, configured to initialize the weights of the keyword entities identified by the identification unit to 1, and initialize the weights of the keyword entities not identified by the identification unit to 0;
[0103] A statistics unit, configured to count the number n of other keyword entities connected to each keyword entity through a same category relationship;
[0104] A weight determination unit, configured to increase the weights on the basis of the initialized weights of each keyword entity, so as to obtain the weights of each keyword entity.
[0105] The third embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the standard file knowledge graph matching method in the field of intelligent manufacturing in the first embodiment are implemented.
[0106] The fourth embodiment of the present invention relates to a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the standard file knowledge graph matching method in the field of intelligent manufacturing in the first embodiment are implemented.
[0107] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program code.
[0108] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0109] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction method, and the instruction method implements the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the functions in one Figure 1 one flow or multiple flows and / or blocks Figure 1Steps of the functions specified in one or more boxes.
[0111] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claimed rights.
Claims
1. A method for matching a knowledge graph of standard documents in the field of intelligent manufacturing, characterized in that, Including the following steps: Receiving the query content, and extracting the entity content related to the intelligent manufacturing field from the query content; Inputting the entity content related to the intelligent manufacturing field into the intelligent matching model to obtain the matching degree between the query content and the knowledge graph of the standard documents in the intelligent manufacturing field to be matched; Among them, the intelligent matching model includes: An entity embedding layer part for generating an embedding representation of the word vectors of the entity content related to the intelligent manufacturing field; a linear transformation layer part for performing a linear transformation on the embedding representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, to obtain a query content word vector and multiple entity content word vectors; A semantic transformation layer part for calculating the cosine similarity between the query content word vector and the multiple entity content word vectors, and transforming the cosine similarity through an activation function to obtain multiple enhanced semantic similarities; A weight calculation layer part for evaluating the importance of each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched, and determining the weight of the entity in the overall matching process according to the importance of each entity; A matching calculation layer part for performing a weighted sum of the multiple enhanced semantic similarities by using the weight of the entity in the overall matching process to obtain the matching degree between the query content and the knowledge graph of the standard documents in the intelligent manufacturing field to be matched.
2. The method for matching the knowledge graph of standard documents in the field of intelligent manufacturing according to claim 1, wherein The knowledge graph of the standard documents in the intelligent manufacturing field to be matched is obtained through the following method: Constructing a preliminary knowledge graph based on multiple national standard documents in the intelligent manufacturing field, where the preliminary knowledge graph describes the entries in the standard documents in the intelligent manufacturing field, the keywords in each entry, the connections between standard documents, and the connections between keywords; Dividing the preliminary knowledge graph into multiple samples according to the theme classification in the intelligent manufacturing field to obtain multiple knowledge graphs of the standard documents in the intelligent manufacturing field to be matched, where each knowledge graph of the standard documents in the intelligent manufacturing field to be matched contains standard document entities, entry entities, and keyword entities.
3. The method for matching a knowledge graph of standard documents in the field of intelligent manufacturing according to claim 1, wherein, The linear transformation layer part includes: A word vector generation unit for generating word vectors for each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched to obtain a word vector set; A mean vector calculation unit for averaging all the word vectors in the word vector set to obtain a mean vector; a transformation matrix calculation unit for performing an SVD decomposition on the covariance matrix of the word vectors in the word vector set, And calculating a transformation matrix by using the obtained orthogonal matrix and diagonal matrix; A linear transformation unit for performing a linear transformation on the embedding representation of the word vectors and the word vectors corresponding to each entity in the knowledge graph of the standard documents in the intelligent manufacturing field to be matched by using the mean vector and the transformation matrix to obtain a query content word vector and multiple entity content word vectors.
4. The method for matching knowledge graph of standard documents in the field of intelligent manufacturing according to claim 1, wherein, The semantic transformation layer part includes: A normalization processing unit for performing normalization processing on the query content word vector and multiple entity content word vectors; a cosine similarity calculation unit for calculating the inner products of the normalized query content word vector and multiple entity content word vectors respectively to obtain multiple cosine similarities; A transformation unit for respectively transforming multiple cosine similarities through an activation function to obtain multiple enhanced semantic similarities.
5. The method for matching a knowledge graph of standard documents in the field of intelligent manufacturing according to claim 4, wherein The activation function f h-sig (x) is as follows: where x is the cosine similarity, α and β are set similarity thresholds, and -1 ≤ α < β ≤ 1.
6. The method for matching the knowledge graph of standard documents in the field of intelligent manufacturing according to claim 1, wherein The weight calculation layer part includes: An identification unit for identifying keyword entities directly connected to the entry entity in the knowledge graph of the standard document in the field of intelligent manufacturing to be matched through an inclusion relationship; An initialization unit for initializing the weight of the keyword entity identified by the identification unit to 1 and initializing the weight of the keyword entity not identified by the identification unit to 0; A statistics unit for counting the number n of other keyword entities connected to each keyword entity through the same category relationship; A weight determination unit, configured to increase, on the basis of the initial weight of each keyword entity, the weight, so as to obtain the weight of each keyword entity.
7. An apparatus for matching a knowledge graph of standard documents in the field of intelligent manufacturing, characterized in that, Includes: A receiving and extraction module for receiving query content and extracting entity content related to the field of intelligent manufacturing from the query content; A matching module for inputting the entity content related to the field of intelligent manufacturing into the intelligent matching model to obtain the matching degree between the query content and the knowledge graph of the standard document in the field of intelligent manufacturing to be matched; Wherein, the intelligent matching model includes: An entity embedding layer part for generating an embedding representation of the word vector of the entity content related to the field of intelligent manufacturing; a linear transformation layer part for performing linear transformation on the embedding representation of the word vector and the word vector corresponding to each entity in the knowledge graph of the standard document in the field of intelligent manufacturing to be matched to obtain a query content word vector and multiple entity content word vectors; A semantic transformation layer part for calculating the cosine similarity between the query content word vector and multiple entity content word vectors and transforming the cosine similarity through an activation function to obtain multiple enhanced semantic similarities; A weight calculation layer part for evaluating the importance of each entity in the knowledge graph of the standard document in the field of intelligent manufacturing to be matched and determining the weight of the entity in the overall matching process according to the importance of each entity; A matching calculation layer part for performing weighted summation on multiple enhanced semantic similarities by using the weight of the entity in the overall matching process to obtain the matching degree between the query content and the knowledge graph of the standard document in the field of intelligent manufacturing to be matched.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for matching the knowledge graph of the standard document in the field of intelligent manufacturing as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for matching the knowledge graph of the standard document in the field of intelligent manufacturing as described in any one of claims 1-6.