Knowledge graph embedding method and system for intelligent knowledge recommendation

By integrating attention mechanism and complex value embedding technology in knowledge graph embedding, the TransEx knowledge graph embedding method is constructed, which solves the problem of poor quality of knowledge graph embedding, and improves the accuracy and intelligence of knowledge recommendations.

CN119537611APending Publication Date: 2025-02-28XI AN JIAOTONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411706090.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, the quality of knowledge graph embedding is poor, making it difficult to characterize the rich structural and semantic relationships of the knowledge graph, resulting in low accuracy of knowledge recommendation.

Method used

The knowledge graph embedding method for knowledge intelligence recommendation is adopted, and the TransEx knowledge graph embedding method is constructed by integrating attention mechanism and complex value embedding technology, and the entity nodes and relationships in the knowledge graph are transformed into vector sequences, preserving the structure and semantic relationships of the graph.

Benefits of technology

It improves the accuracy of knowledge graph embedding, enhances the intelligence and interpretability of knowledge recommendations, and realizes personalized and accurate recommendations of knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537611A_ABST
    Figure CN119537611A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph embedding method and system for intelligent knowledge recommendation. A complex intelligent knowledge recommendation framework is built based on knowledge graph embedding and deep reinforcement learning technologies; on the basis of the built complex knowledge intelligent recommendation framework, a complex knowledge graph model is built in combination with complex knowledge characteristics; a TransEx knowledge graph embedding method is constructed by fusing an attention mechanism and a complex value embedding technology, entity nodes and relationships in a knowledge graph are converted into a vector sequence, and the structure and semantic relationships of the graph are reserved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Knowledge engineering is the development of artificial intelligence in knowledge processing, which aims to solve engineering problems by reusing human knowledge and experience through computer systems. In this field, there have been many studies and explorations on knowledge-assisted manufacturing decision-making. As a cutting-edge technology of knowledge engineering, knowledge graph (KG) can realize the acquisition, organization and utilization of massive process knowledge, and provide a foundation for building the learning and cognitive ability of intelligent manufacturing systems. Introducing knowledge graph into the knowledge recommendation system in the field of intelligent manufacturing can obtain more semantic information, and can more deeply explore the correlation between user retrieval intention and knowledge. At the same time, it provides explainability for the recommendation process and improves user satisfaction and acceptance of recommendation results. Knowledge graph embedding (KGE) is a technology that maps entities and relationships in knowledge graphs into continuous vector space. Through this mapping, knowledge originally stored in graph structure is converted into vector representations in low-dimensional space. These vector representations capture the semantic and structural information between entities and relationships. With the help of the information embedded in the knowledge graph, the knowledge recommendation system further combines deep reinforcement learning technology to achieve precise knowledge recommendation.

[0003] Traditional distance-based models use an evaluation function centered on distance, that is, the rationality of a fact is determined by measuring the distance between entities. Such models are effective on large-scale knowledge graphs, but their models are simple and cannot model complex relationships in knowledge graphs, especially when dealing with one-to-many, many-to-one, and many-to-many relationships. The representation ability is limited. The semantic matching-based model uses a similarity-based scoring function, that is, it measures the rationality of facts through semantic matching, but it is limited by its assumed linear relationship and is also difficult to handle more complex relationship patterns. The above two methods realize the vectorized expression of knowledge graphs in a relatively simple and intuitive way, but it is difficult to capture the complex semantic relationships in the knowledge graph to support complex knowledge recommendation tasks. It is necessary to optimize the embedding quality of the knowledge graph according to the requirements of complex knowledge recommendation tasks. The present invention will explore the optimization method of knowledge graph embedding, improve the embedding quality of knowledge graphs, and assist knowledge recommendation systems in achieving more accurate knowledge recommendations. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a knowledge graph embedding method and system for knowledge intelligent recommendation in response to the above-mentioned deficiencies in the prior art, so as to solve the current technical problem of low accuracy of knowledge recommendation due to the poor quality of knowledge graph embedding and the difficulty in representing the rich structure and semantic relationships of the knowledge graph.

[0005] The present invention adopts the following technical solutions:

[0006] A knowledge graph embedding method for knowledge intelligent recommendation includes the following steps:

[0007] S1. Build a complex knowledge intelligent recommendation framework based on knowledge graph embedding and deep reinforcement learning technology;

[0008] S2, based on the complex knowledge intelligent recommendation framework built in step S1, a complex knowledge graph is constructed in combination with the characteristics of complex knowledge;

[0009] S3. By integrating the attention mechanism and complex-valued embedding technology, the TransEx knowledge graph embedding method is constructed to convert the entity nodes and relationships in the knowledge graph into vector sequences while retaining the structure and semantic relationships of the graph.

[0010] Preferably, in step S1, the complex knowledge intelligent recommendation framework includes:

[0011] Knowledge graph embedding module: All entities and relationships in the knowledge graph are represented as vector sequences of fixed length, and the structure and semantic relationships of the graph are preserved to the greatest extent;

[0012] The complex knowledge recommendation module receives questions in text form, uses a text embedding model to convert the text into a fixed-length vector sequence, and retains the semantic information in the text. Then, using a deep reinforcement learning model, based on the input text vector sequence, the deep reinforcement learning agent uses the key entities in the question as the starting point to search for the answer in the knowledge spectrum. After a multi-hop search, the answer entity is determined, and the reasoning path formed by the agent from the starting point entity to the answer entity is output as the basis for knowledge recommendation, thereby realizing intelligent recommendation of complex knowledge.

[0013] Preferably, step S2 specifically includes:

[0014] Refine the entity categories in each piece of complex knowledge and extract the key information from the complex knowledge;

[0015] Then some entity categories are stored as graph nodes, and other entity categories are stored as node attributes;

[0016] Finally, the entity nodes are semantically connected according to the set logical relationship to build a complex knowledge graph model.

[0017] Preferably, step S3 specifically includes:

[0018] S301. Given a triple (h, r, t) in a knowledge graph, h represents the head entity in the triple, r represents the relationship in the triple, and t represents the tail entity in the triple;

[0019] S302, concatenate the head entity and relation vector sequences in a triple and input them into the encoder of the Transformer. The encoder calculates based on the multi-head self-attention mechanism and outputs four groups of vector sequences Out(A), Out(B), Out(C), and Out(D). The dimension of each group of vector sequences is half of the dimension of the entity vector sequence.

[0020] S303, performing complex-value embedding calculation on the four outputs of the Transformer encoder and the vector sequence of the triple tail entity;

[0021] S304. After step S303 is calculated, the sigmoid function is used to calculate the triple probability score, and the loss function is the binary cross entropy loss function, which is used for training and optimization of the TransEx embedding model.

[0022] Preferably, in step S301, all entities and relationships in the knowledge graph are first converted into a vector sequence of fixed length, where the first half of the sequence is the real part and the second half is the imaginary part.

[0023] Preferably, in step S302, the four vector sequences Out(A), Out(B), Out(C), and Out(D) are:

[0024] Out(A),Out(B),Out(C),Out(D)=Transformer(e h ,e r )

[0025] Where Transformer(·) represents the encoder operation in Transformer; e h A vector sequence representing the head entity; e r A sequence of vectors representing relations.

[0026] Preferably, in step S302, the complex value embedding calculation process is as follows:

[0027]

[0028] Where Re(·) represents the complex-valued embedding operation; Represents the conjugate vector of the triple's tail entity.

[0029] Preferably, the specific calculation process is as follows:

[0030]

[0031] Among them, Out(A), Out(B), Out(C), and Out(D) represent the output of the Transformer encoder; Re(e t )、Im(et ) represents the real and imaginary parts of the triple tail entity vector sequence, and n represents the embedding dimension.

[0032] Preferably, in step S304, the loss function L is:

[0033]

[0034] in, Represents the predicted probability vector; y∈[0,1] |N| represents the binary label vector, and N represents the total number of samples.

[0035] In a second aspect, an embodiment of the present invention provides a knowledge graph embedding system for knowledge intelligent recommendation, including:

[0036] Framework module, which builds a complex knowledge intelligent recommendation framework based on knowledge graph embedding and deep reinforcement learning technology;

[0037] The construction module builds a complex knowledge graph based on the complex knowledge intelligent recommendation framework and the characteristics of complex knowledge;

[0038] The embedding module constructs the TransEx knowledge graph embedding method by integrating the attention mechanism and complex-valued embedding technology, which converts the entity nodes and relationships in the knowledge graph into vector sequences and retains the structure and semantic relationships of the graph.

[0039] In a third aspect, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned knowledge graph embedding method for knowledge intelligent recommendation when executing the computer program.

[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned knowledge graph embedding method for knowledge intelligent recommendation.

[0041] In a fifth aspect, a chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned knowledge graph embedding method for knowledge intelligent recommendation when executing the computer program.

[0042] In a sixth aspect, an embodiment of the present invention provides an electronic device, comprising a computer program, which, when executed by the electronic device, implements the steps of the above-mentioned knowledge graph embedding method for knowledge intelligent recommendation.

[0043] Compared with the prior art, the present invention has at least the following beneficial effects:

[0044] A knowledge graph embedding method for knowledge intelligent recommendation aims to optimize the knowledge graph embedding algorithm, retain more structures and semantic relationships of the graph when converting entities and relations in the knowledge graph into vector sequences, provide richer and more comprehensive knowledge support for the knowledge intelligent recommendation system, and realize personalized and accurate knowledge recommendation. This method designs a complex knowledge intelligent recommendation framework, introduces knowledge graph embedding technology and deep reinforcement learning technology into the knowledge recommendation framework, and improves the intelligence and interpretability of knowledge recommendation. The characteristics of complex knowledge in the field are analyzed, a complex knowledge graph model is constructed, the key information that needs to be stored for each piece of knowledge is clarified, and the knowledge is stored in the form of a knowledge graph, which enriches the semantic information between knowledge. A knowledge graph embedding algorithm TransEx that integrates attention mechanism and complex value embedding is proposed to optimize the effect of knowledge graph embedding. In order to verify the superiority of the proposed algorithm, the triples stored in the constructed knowledge graph are extracted, and a knowledge graph embedding algorithm verification dataset is constructed. Based on this dataset, the performance of different algorithms in the knowledge graph embedding task can be evaluated, and MRR and Hits@K are used as algorithm comparison evaluation indicators to verify the superiority of the algorithm. In this study, an effective method is provided for the knowledge graph embedding task for knowledge intelligent recommendation, which improves the accuracy of knowledge graph embedding.

[0045] Furthermore, the knowledge graph organizes domain knowledge in the form of a graph, and the structured representation makes knowledge more intuitive and easy to understand. On the one hand, the knowledge graph can obtain historical accumulated experience and cases, process, organize and manage the knowledge therein, and form a knowledge base. On the other hand, it can also perform semantic reasoning on similar or even repeated decision-making activities in the manufacturing process and discover new knowledge, thereby greatly promoting the accumulation, inheritance and reuse of manufacturing knowledge. Through the knowledge graph embedding technology, the reasoning and computing capabilities of the knowledge base have been enriched and improved. The introduction of the knowledge graph into the knowledge intelligent recommendation task has provided the possibility for efficient retrieval and intelligent recommendation of knowledge. Furthermore, deep reinforcement learning technology is introduced into the knowledge recommendation task to convert the knowledge recommendation process into a sequential decision-making process. Starting from the subject entity in the question, along the relationship path in the knowledge graph, the reasoning path pointing to the answer is gradually generated. By simulating the process of human brain thinking and problem solving, the required knowledge is provided to knowledge workers in a timely manner, and even part of the decision-making process is completed on behalf of people, and the decision plan is output for reference, so as to build an efficient reuse mechanism for complex knowledge and improve the accuracy and interpretability of recommended knowledge.

[0046] Furthermore, in order to achieve efficient reuse of complex knowledge, a complex knowledge graph model is constructed, the associations between knowledge are sorted out, the storage forms of different knowledge entities are clarified, and the semantic connection methods of different knowledge entities are designed, thus providing a semantic basis for efficient knowledge retrieval and recommendation.

[0047] Furthermore, since complex knowledge is stored in the form of a knowledge graph, the knowledge entity nodes are diverse and the semantic connections are richer, the traditional knowledge graph embedding method is difficult to handle such a complex relationship pattern. The present invention first uses the encoder in the Transformer to process the head entity and relationship vector sequence in the triple, and introduces a multi-head self-attention mechanism to improve the learning ability and expression ability of the algorithm, so that it can capture the correlation between data more carefully, thereby effectively improving the embedding quality of complex knowledge graphs. Then the output of the encoder in the Transformer is used to perform a complex-valued embedding calculation with the tail entity of the triple, and the Hermitian inner product of the complex space is used for radial transformation, so that the knowledge graph embedding algorithm can more comprehensively capture the symmetric and antisymmetric relationship of the graph. In addition, if the learning effect of the Transformer encoder is not good, the model can be degenerated into the ComplEx knowledge graph embedding algorithm to ensure the embedding quality of the algorithm.

[0048] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0049] In summary, the method of the present invention firstly designs a complex knowledge intelligent recommendation framework by combining knowledge graph embedding and deep reinforcement learning technology, and realizes the intelligent recommendation of complex knowledge; secondly, based on the characteristics of complex knowledge in the domain, a complex knowledge graph model is constructed to enhance the correlation between knowledge; then, the TransEx knowledge graph embedding method is proposed by integrating attention mechanism and complex value embedding, which retains more structures and semantic relationships of the graph when converting entities and relationships in the knowledge graph into vector sequences, providing richer and more comprehensive knowledge support for the knowledge intelligent recommendation system; finally, based on the complex knowledge graph in the domain, a knowledge graph embedding algorithm verification data set is constructed, and MRR and Hits@K are used as the main evaluation indicators to verify the algorithm performance.

[0050] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flow chart of the present invention;

[0052] Figure 2 A complex knowledge graph model built for the present invention;

[0053] Figure 3 The TransEx knowledge graph embedding model proposed in this invention;

[0054] Figure 4 A validation dataset for the knowledge graph embedding algorithm constructed for the present invention;

[0055] Figure 5 The comparison results of the TransEx algorithm proposed in this invention and other algorithms;

[0056] Figure 6 A schematic diagram of a computer device provided by an embodiment of the present invention;

[0057] Figure 7 The block diagram of a chip provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0060] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0061] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects are in an "or" relationship.

[0062] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.

[0063] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0064] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0065] The present invention provides a knowledge graph embedding method for knowledge intelligent recommendation. First, by combining knowledge graph embedding and deep reinforcement learning technology, a complex knowledge intelligent recommendation framework is designed to achieve intelligent recommendation of complex knowledge; secondly, based on the characteristics of complex knowledge in the domain, a complex knowledge graph model is constructed; then, the TransEx knowledge graph embedding method is proposed by integrating attention mechanism and complex value embedding, which uses the powerful feature extraction ability of deep neural network to extract deeper semantic connections between entities in the knowledge graph, thereby achieving higher quality knowledge graph embedding; finally, based on the domain complex knowledge graph, a knowledge graph embedding algorithm verification data set is constructed, and the algorithm performance is verified using relevant indicators. Compared with traditional methods, the TransEx method proposed in the present invention improves the accuracy of knowledge graph embedding, improves the intelligence and interpretability of knowledge recommendation, and can effectively promote the efficient use of enterprise historical knowledge in product design, process planning and other links, thereby improving product design / process planning quality and shortening product design / process planning cycle.

[0066] See also Figure 1 The present invention provides a knowledge graph embedding method for knowledge intelligent recommendation, comprising the following steps:

[0067] S1. Build a complex knowledge intelligent recommendation framework based on knowledge graph embedding and deep reinforcement learning technology;

[0068] The complex knowledge intelligent recommendation framework takes text questions as input and outputs recommended knowledge consisting of reasoning chains composed of multiple triples in the knowledge graph. The complex knowledge intelligent recommendation framework consists of two modules, namely the knowledge graph embedding module and the complex knowledge recommendation module.

[0069] In the knowledge graph embedding module, all entities and relations in the knowledge graph are represented as vector sequences of fixed length, and the structure and semantic relations of the graph are preserved to the greatest extent;

[0070] In the complex knowledge recommendation module, questions in text form are received, and the text is first converted into a vector sequence of fixed length using a text embedding model, while retaining the semantic information in the text. Then, a deep reinforcement learning model is used. Based on the input text vector sequence, the deep reinforcement learning agent uses the key entities in the question as the starting point and searches for the answer in the knowledge graph. After multi-hop search, the answer entity is determined, and the reasoning path formed by the agent from the starting point entity to the answer entity is output as the basis for knowledge recommendation, thereby realizing intelligent recommendation of complex knowledge.

[0071] The framework for building complex knowledge intelligent recommendation is as follows:

[0072] S101, constructing a complex knowledge graph model, and storing the complex knowledge in the form of a knowledge graph based on the constructed model;

[0073] S102. Propose the TransEx knowledge graph embedding method that integrates the attention mechanism and complex-valued embedding, which transforms the nodes and relationships in the knowledge graph into a vector sequence that retains the graph structure and semantic information. The output vector sequence will serve as global information to provide knowledge support for the knowledge recommendation model.

[0074] S103. Based on deep reinforcement learning technology, a knowledge recommendation model is constructed. It takes design / questions as input and outputs knowledge consisting of triplets in multiple knowledge graphs, achieving high accuracy and explainable recommendation of complex knowledge.

[0075] S2. Based on the characteristics of complex knowledge, targeting the characteristics of complex knowledge with multiple entities and multiple relationships, a complex knowledge graph model is constructed to define the storage form of content of different entity categories, with some categories stored as entity nodes and some categories stored as entity attributes. Relationships are defined to associate entity nodes and enrich the semantic information between knowledge.

[0076] First, it is necessary to refine the entity categories in each complex knowledge and extract the key information in the complex knowledge. Some entity categories are stored as graph nodes and other entity categories are stored as node attributes. Finally, appropriate logical relationships are set to semantically connect the entity nodes to complete the construction of the complex knowledge graph model.

[0077] S3. Aiming at the characteristics of complex knowledge graphs with multiple entities and multiple relations, we propose the TransEx knowledge graph embedding algorithm by integrating the attention mechanism and complex value embedding technology. This algorithm can preserve as many structures and semantic relations of the graph as possible when converting entity nodes and relations in the knowledge graph into vector sequences.

[0078] See also Figure 3 , the specific steps are as follows:

[0079] S301. Given a triple (h, r, t) in a knowledge graph, h represents the head entity in the triple, r represents the relationship in the triple, and t represents the tail entity in the triple.

[0080] First, all entities and relations in the knowledge graph are converted into a vector sequence of fixed length, with the first half of the sequence being the real part and the second half being the imaginary part.

[0081] S302, concatenate the head entity and relationship vector sequences in a triple and input them into the Transformer encoder. The encoder calculates based on the multi-head self-attention mechanism and outputs four groups of vector sequences Out(A), Out(B), Out(C), and Out(D). The dimension of each group of vector sequences is half of the dimension of the entity vector sequence. The calculation formula is as follows:

[0082] Out(A),Out(B),Out(C),Out(D)=Transformer(e h ,e r )

[0083] Where Transformer(·) represents the encoder operation in Transformer; e h A vector sequence representing the head entity; e r A sequence of vectors representing relations.

[0084] S303, the four outputs of the Transformer encoder are subjected to complex-value embedding calculation with the vector sequence of the triple tail entity, and the calculation process is as follows:

[0085]

[0086] Where Re(·) represents the complex-valued embedding operation; Represents the conjugate vector of the triple's tail entity.

[0087] The specific calculation process is as follows:

[0088]

[0089] Among them, Out(A), Out(B), Out(C), and Out(D) represent the output of the Transformer encoder; Re(e t )、Im(e t ) represents the real and imaginary parts of the triple tail entity vector sequence.

[0090] S304. After the calculation is completed, the sigmoid function is used to calculate the triple probability score. The loss function is the binary cross entropy loss function. The calculation process is as follows:

[0091]

[0092] in, Represents the predicted probability vector; y∈[0,1] |N| represents a binary label vector.

[0093] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".

[0094] In yet another embodiment of the present invention, a knowledge graph embedding system for knowledge intelligent recommendation is provided. The system can be used to implement the above-mentioned knowledge graph embedding method for knowledge intelligent recommendation. Specifically, the knowledge graph embedding system for knowledge intelligent recommendation includes a framework module, a building module and an embedding module.

[0095] Among them, the framework module builds a complex knowledge intelligent recommendation framework based on knowledge graph embedding and deep reinforcement learning technology;

[0096] The construction module builds a complex knowledge graph model based on the complex knowledge intelligent recommendation framework and the characteristics of complex knowledge;

[0097] The embedding module constructs the TransEx knowledge graph embedding method by integrating the attention mechanism and complex-valued embedding technology, which converts the entity nodes and relationships in the knowledge graph into vector sequences and retains the structure and semantic relationships of the graph.

[0098] In another embodiment of the present invention, a terminal device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the knowledge graph embedding method for knowledge intelligent recommendation, including:

[0099] A complex knowledge intelligent recommendation framework is built based on knowledge graph embedding and deep reinforcement learning technology. Based on the built complex knowledge intelligent recommendation framework, a complex knowledge graph model is constructed in combination with the characteristics of complex knowledge. By integrating the attention mechanism and complex-valued embedding technology, the TransEx knowledge graph embedding method is constructed, which converts the entity nodes and relationships in the knowledge graph into vector sequences while retaining the structure and semantic relationships of the graph.

[0100] See also Figure 6 , the terminal device is a computer device. The computer device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When the computer program 63 is executed by the processor 61, the knowledge graph embedding method for knowledge intelligent recommendation in the embodiment is implemented. To avoid repetition, it is not described one by one here. Alternatively, when the computer program 63 is executed by the processor 61, the functions of each model / unit in the knowledge graph embedding system for knowledge intelligent recommendation in the embodiment are implemented. To avoid repetition, it is not described one by one here.

[0101] The computer device 60 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Figure 6This is only an example of the computer device 60 and does not constitute a limitation of the computer device 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0102] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0103] The memory 62 may be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 may also be an external storage device of the computer device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device 60.

[0104] Furthermore, the memory 62 may include both an internal storage unit of the computer device 60 and an external storage device. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 may also be used to temporarily store data that has been output or is to be output.

[0105] See also Figure 7 , the terminal device is a chip, and the chip 600 of this embodiment includes a processor 622, which may be one or more, and a memory 632 for storing a computer program executable by the processor 622. The computer program stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 622 may be configured to execute the computer program to execute the above-mentioned knowledge graph embedding method for knowledge intelligent recommendation.

[0106] In addition, the chip 600 may further include a power supply component 626 and a communication component 650, wherein the power supply component 626 may be configured to perform power management of the chip 600, and the communication component 650 may be configured to implement communication, for example, wired or wireless communication, of the chip 600. In addition, the chip 600 may further include an input / output interface 658. The chip 600 may operate based on an operating system stored in the memory 632.

[0107] In another embodiment of the present invention, the present invention also provides a storage medium, specifically a computer-readable storage medium, which is a memory device in a terminal device for storing programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs. It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (Non-VolatileMemory), such as at least one disk memory.

[0108] The processor may load and execute one or more instructions stored in a computer-readable storage medium to implement the corresponding steps of the knowledge graph embedding method for knowledge intelligent recommendation in the above embodiment; the processor may load and execute the following steps:

[0109] A complex knowledge intelligent recommendation framework is built based on knowledge graph embedding and deep reinforcement learning technology. Based on the built complex knowledge intelligent recommendation framework, a complex knowledge graph model is constructed in combination with the characteristics of complex knowledge. By integrating the attention mechanism and complex-valued embedding technology, the TransEx knowledge graph embedding method is constructed, which converts the entity nodes and relationships in the knowledge graph into vector sequences while retaining the structure and semantic relationships of the graph.

[0110] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings here can usually be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0111] In order to verify the superiority of this method in the knowledge graph embedding task, the complex knowledge graph was further processed, and all triples in it were exported. Each data consists of a set of triples in the form of <head entity, relationship, tail entity>, and a knowledge graph embedding algorithm verification data set was constructed. MRR and Hits@K are used as the main evaluation indicators. The MRR indicator not only focuses on whether the model can find the correct answer, but also focuses on the ranking of the correct answer among all the answers provided by the model, reflecting the comprehensive performance of the model; Hits@K measures the proportion of the correct answer in the top K predictions given by the model, which is intuitive and easy to understand. By looking at different K values, the performance of the model at different levels can be understood, so as to more comprehensively evaluate the advantages and disadvantages of the model and better reflect the effectiveness of the model in practical applications.

[0112] See also Figure 2 , taking the process of process parameter knowledge recommendation as an example, a complex knowledge graph model was constructed. The process parameter decision knowledge graph storage model contains 10 types of graph nodes, 3 types of node attributes, and 9 types of graph relationships. The graph nodes include part material, part type, processing characteristics, processing procedures, machine tools, tools, fixtures, cutting fluids, cases, and process knowledge; node attributes include roughness, precision, and cutting parameters; graph relationships include HasType, HasMachiningCharacteristics, HasProcess, HasMaterials, HasToolType, HasCase, HasCuttingFlude, HasFixture, and HasMachine.

[0113] Among them, the part material node is connected to the process knowledge node through the relationship HasMaterials; the part type node is connected to the part material node through the relationship HasType; the machining feature node is connected to the part type node through the relationship HasMachiningCharacteristics; the machining process node is connected to the machining feature node through the relationship HasProcess; the machine tool node is connected to the machining process node through the relationship HasMachine; the tool node is connected to the machine tool node through the relationship HasToolType; each machining case node consists of three attributes, including machining accuracy, machining precision and cutting parameters, and the case node is connected to the tool node through the relationship HasCase; the fixture node is connected to the machining case node through the relationship HasFixture; the cutting fluid node is connected to the machining case node through the relationship HasCuttingFlude.

[0114] All entities and relations in the knowledge graph built based on the complex knowledge graph model are output as triples, and a knowledge graph embedding algorithm verification dataset is constructed. Each data piece consists of a set of triples. The link prediction method is used to verify the superiority of the proposed knowledge graph embedding method. When evaluating the performance of the algorithm, Mean Reciprocal Rank (MRR) and Hits@K are used as the main evaluation indicators.

[0115] See also Figure 4 ,The process of constructing the knowledge graph embedding algorithm verification dataset is as follows:

[0116] S401. First, convert the graph nodes in the complex knowledge graph into triples, with each triple as a piece of data, to construct an algorithm verification data set.

[0117] A knowledge graph embedding algorithm verification data set is generated based on the entities and relationships in the process parameter decision knowledge graph. Each piece of data consists of a set of triplets in the form of <head entity, relationship, tail entity>. In order to enhance the distinguishability of process entities, some process entities add the processed materials of the current process case as supplementary information. Finally, a total of 5792 pieces of data are constructed.

[0118] S402: Use a link prediction method to verify the superiority of the proposed knowledge graph embedding method. The link prediction task refers to the task of predicting missing triples based on existing entities and relationships in the knowledge graph. This task usually quantifies the rationality of a set of unrecognized triples by learning a scoring function.

[0119] by Figure 4Taking the 5791th data in as an example, the vector sequence of the head entity "thread_titanium alloy" and the relationship "has_process" in a triple is concatenated and input into the TransEx model, and a score ranking sequence composed of multiple tail entities is output. The higher the ranking of the real tail entity "semi-finishing turning_titanium alloy", the better the algorithm performance.

[0120] See also Figure 5 , the algorithm performance comparison results are as follows:

[0121] When evaluating the performance of the algorithm, Mean Reciprocal Rank (MRR) and Hits@K are used as the main evaluation indicators. MRR is a statistical method for measuring the effect of information retrieval, especially suitable for evaluating scenarios that only care about the highest ranking results. Specifically, the value of MRR is the average of the reciprocal rank (RR) of each query. For each query, if the correct answer ranks first, RR is 1, if it ranks second, RR is 1 / 2, and so on. The value range of MRR is from 0 to 1. The higher the value, the better the performance of the algorithm in knowledge graph embedding. The calculation formula is as follows:

[0122]

[0123] Where N represents the number of queries; rank i Represents the ranking of the correct answer to the i-th query.

[0124] by Figure 4 For example, the 5791th data in the data set is taken as an example. The vector sequence of the head entity "thread_titanium alloy" and the relationship "has_process" is used as the input. In the output tail entity score ranking sequence, if the real tail entity "semi-finishing turning_titanium alloy" is ranked 1, then RR is 1. If the real tail entity is ranked 2, then RR is 1 / 2.

[0125] Hits@K is another important indicator for evaluating link prediction performance. It measures the frequency of correct answers in the first K results returned by the model. K is an adjustable parameter, and different result list lengths can be selected for evaluation according to actual needs, such as 1, 3, 10, etc. The correct answer to each query is ranked 1 when it is less than or equal to K, otherwise it is 0. The closer the value of Hits@K is to 1, the better the model performance is. The calculation formula is as follows:

[0126]

[0127] Where N represents the number of queries; rank i Represents the ranking of the correct answer to the i-th query.

[0128] by Figure 4 For example, the 5791th data in the example is taken as the input of the vector sequence of the head entity "thread_titanium alloy" and the relationship "has_process". In the output tail entity score ranking sequence, if the real tail entity "semi-finishing turning_titanium alloy" is ranked 1, then Hits@1 is 1; if the real tail entity is ranked 2, then Hits@1 is 0.

[0129] In addition to the TransEx method proposed in this paper, ConvE, ComplEx and ConEx are selected as comparison algorithms, and finally MRR, Hits@10, Hits@3 and Hits@1 are used as evaluation indicators of the model. The results of the four algorithms in the process decision knowledge graph embedding task are shown in the figure. Figure 5 As shown, the TransEx model performed the best, with the values ​​of MRR, Hits@10, Hits@3 and Hits@1 being 0.7209, 0.8707, 0.7713 and 0.6379 respectively, all of which are the highest values.

[0130] Firstly, the present invention uses the knowledge graph as the knowledge base to improve the reasoning ability of the knowledge intelligent recommendation system, and designs a complex knowledge intelligent recommendation framework based on the knowledge graph embedding technology and deep reinforcement learning technology. It takes process problems as input and outputs process knowledge composed of multiple triples to realize personalized and explainable knowledge recommendation.

[0131] Secondly, a complex knowledge graph model was constructed, the entity categories and storage forms in the knowledge were refined, the semantic connection methods of different knowledge entities were designed, a unified semantic framework was provided, and multi-dimensional associations between knowledge were realized.

[0132] Then, for the complex knowledge graph embedding task, the TransEx knowledge graph embedding method was proposed by integrating the attention mechanism and complex-valued embedding, which retains more structural and semantic information of the graph during the knowledge graph embedding process.

[0133] Finally, a knowledge graph embedding algorithm validation dataset was constructed based on complex knowledge graphs, and MRR and Hits@K were used as the main evaluation indicators to verify the superiority of the proposed method. The knowledge graph embedding method proposed in this paper is suitable for complex knowledge graph embedding tasks with multiple entity and relationship features, which can retain more information in the knowledge graph embedding process, improve the quality of graph embedding, and provide an information basis for knowledge intelligent recommendation.

[0134] In summary, the present invention is a knowledge graph embedding method and system for knowledge intelligent recommendation. By combining knowledge graph embedding and deep reinforcement learning technology, a complex knowledge intelligent recommendation framework is designed to achieve intelligent recommendation of complex knowledge; based on the characteristics of complex knowledge in the field, a complex knowledge graph model is constructed to enhance the correlation between knowledge; the TransEx knowledge graph embedding method is proposed by integrating attention mechanism and complex value embedding, which retains more structure and semantic relationships of the graph when converting entities and relationships in the knowledge graph into vector sequences, providing richer and more comprehensive knowledge support for the knowledge intelligent recommendation system; based on the complex knowledge graph in the field, a knowledge graph embedding algorithm verification data set is constructed, and MRR and Hits@K are used as the main evaluation indicators to verify the algorithm performance. The present invention improves the accuracy of knowledge graph embedding, retains the rich structure and semantic information of the knowledge graph, improves the intelligence and interpretability of knowledge recommendation, and can effectively promote the efficient use of enterprise historical knowledge in product design, process planning and other links, thereby improving the quality of product design / process planning and shortening the product design / process planning cycle.

[0135] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0136] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0137] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0138] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0141] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0142] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0145] The above contents are only for explaining the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A knowledge graph embedding method for knowledge intelligent recommendation, characterized in that: The following steps are involved: S1. Build a complex knowledge intelligent recommendation framework based on knowledge graph embedding and deep reinforcement learning technology; S2, based on the complex knowledge intelligent recommendation framework built in step S1, a complex knowledge graph is constructed in combination with the characteristics of complex knowledge; S3. By integrating the attention mechanism and complex-valued embedding technology, the TransEx knowledge graph embedding method is constructed to convert the entity nodes and relationships in the knowledge graph into vector sequences while retaining the structure and semantic relationships of the graph.

2. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 1 is characterized in that: In step S1, the complex knowledge intelligent recommendation framework includes: Knowledge graph embedding module: All entities and relationships in the knowledge graph are represented as vector sequences of fixed length, and the structure and semantic relationships of the graph are preserved to the greatest extent; The complex knowledge recommendation module receives questions in text form, uses a text embedding model to convert the text into a fixed-length vector sequence, and retains the semantic information in the text. Then, using a deep reinforcement learning model, based on the input text vector sequence, the deep reinforcement learning agent uses the key entities in the question as the starting point to search for the answer in the knowledge spectrum. After a multi-hop search, the answer entity is determined, and the reasoning path formed by the agent from the starting point entity to the answer entity is output as the basis for knowledge recommendation, thereby realizing intelligent recommendation of complex knowledge.

3. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 1 is characterized in that: Step S2 is specifically as follows: Refine the entity categories in each piece of complex knowledge and extract the key information from the complex knowledge; Then some entity categories are stored as graph nodes, and other entity categories are stored as node attributes; Finally, the entity nodes are semantically connected according to the set logical relationship to build a complex knowledge graph model.

4. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 1 is characterized in that: Step S3 is specifically as follows: S301. Given a triple (h, r, t) in a knowledge graph, h represents the head entity in the triple, r represents the relationship in the triple, and t represents the tail entity in the triple; S302, concatenate the head entity and relation vector sequences in a triple and input them into the encoder of the Transformer. The encoder calculates based on the multi-head self-attention mechanism and outputs four groups of vector sequences Out(A), Out(B), Out(C), and Out(D). The dimension of each group of vector sequences is half of the dimension of the entity vector sequence. S303, performing complex-value embedding calculation on the four outputs of the Transformer encoder and the vector sequence of the triple tail entity; S304. After step S303 is calculated, the sigmoid function is used to calculate the triple probability score, and the loss function is the binary cross entropy loss function, which is used for training and optimization of the TransEx embedding model.

5. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 4 is characterized in that: In step S301, all entities and relationships in the knowledge graph are first converted into a vector sequence of fixed length, where the first half of the sequence is the real part and the second half is the imaginary part.

6. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 4 is characterized in that: In step S302, the four vector sequences Out(A), Out(B), Out(C), and Out(D) are: Out(A),Out(B),Out(C),Out(D)=Transformer(e h ,e r ) Where Transformer(·) represents the encoder operation in Transformer; e h A vector sequence representing the head entity; e r A sequence of vectors representing relations.

7. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 4 is characterized in that: In step S302, the complex value embedding calculation process is as follows: Where Re(·) represents the complex-valued embedding operation; Represents the conjugate vector of the triple's tail entity.

8. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 7 is characterized in that: The specific calculation process is as follows: Among them, Out(A), Out(B), Out(C), and Out(D) represent the output of the Transformer encoder; Re(e t )、Im(e t ) represents the real and imaginary parts of the triple tail entity vector sequence, and n represents the embedding dimension.

9. The knowledge graph embedding method for knowledge intelligent recommendation according to claim 1, characterized in that: In step S304, the loss function L is: in, Represents the predicted probability vector; y∈[0,1] |N| represents the binary label vector, and N represents the total number of samples.

10. A knowledge graph embedding system for knowledge intelligent recommendation, characterized in that: include: Framework module, which builds a complex knowledge intelligent recommendation framework based on knowledge graph embedding and deep reinforcement learning technology; The construction module builds a complex knowledge graph based on the complex knowledge intelligent recommendation framework and the characteristics of complex knowledge; The embedding module constructs the TransEx knowledge graph embedding method by integrating the attention mechanism and complex-valued embedding technology, which converts the entity nodes and relationships in the knowledge graph into vector sequences and retains the structure and semantic relationships of the graph.

Citation Information

Patent Citations

  • Knowledge graph embedding method and system for intelligent knowledge recommendation

    CN119808908A