Knowledge graph classification method and system based on graph neural network

By constructing a knowledge graph classification model based on graph neural network, the problems of inefficiency and low accuracy in the existing technology are solved, efficient and accurate knowledge graph classification is achieved, and rapid processing needs of large-scale data are adapted.

CN120162441APending Publication Date: 2025-06-17CHONGQING HANHAI RUIZHI BIG DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510172140.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

The prior art is inefficient and inaccurate in knowledge graph classification, especially when processing data at large scale and complex structures, and it is difficult to meet the needs of real-time applications.

Method used

The method based on graph neural network is adopted to build a knowledge graph classification model, and the named entities and entity relationships are extracted through natural language processing and graph neural network algorithm, and the model is updated using a continuous learning mechanism.

Benefits of technology

It improves the efficiency and accuracy of knowledge graph classification, enhances the model's understanding of deep semantic information, adapts to the rapid processing of large-scale data, reduces the need for manual intervention, and improves the robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162441A_ABST
    Figure CN120162441A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of knowledge graph classification, and discloses a knowledge graph classification method and system based on a graph neural network. The method comprises the following steps: constructing a named entity and entity relationship extraction model and a knowledge graph classification model; collecting real-time knowledge graph data and a plurality of pieces of real-time knowledge data of corresponding fields; extracting a plurality of real-time extended named entities and a plurality of real-time extended entity relationships of each piece of real-time knowledge data by using a named entity and entity relationship extraction model; performing semantic extension on the real-time knowledge graph data to obtain real-time knowledge graph data after semantic extension; and performing knowledge graph classification on the real-time knowledge graph data after semantic extension by using a knowledge graph classification model to obtain a real-time knowledge graph classification result, and continuously updating the knowledge graph classification model. The problems of low classification efficiency and low classification accuracy in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of knowledge graph classification, and particularly relates to a knowledge graph classification method and system based on a graph neural network. Background Art

[0002] A knowledge graph is a structured semantic knowledge base that organizes and represents knowledge in a graphical manner, where nodes represent entities (such as people, places, things, etc.) or concepts, and edges represent the relationships between entities (such as belonging to, located in, created by, etc.). The purpose of the knowledge graph is to organize information in a way that is closer to human cognition, enabling computers to better understand and process complex information. The knowledge graph is an important research direction in the field of artificial intelligence, which is of great significance for realizing a more intelligent information processing system, and the knowledge graph has wide applications in fields such as information retrieval and semantic analysis. Knowledge graph classification is a key technology in multiple fields such as knowledge management, information retrieval, and semantic analysis, which is of great significance for improving the efficiency of information utilization, promoting knowledge innovation and application. With the continuous progress of technology, knowledge graph classification will demonstrate its value in more fields.

[0003] The existing knowledge graph classification technologies have the following defects:

[0004] 1) Low classification efficiency: When traditional methods process large-scale knowledge graphs, they often consume a large amount of computing resources and time, resulting in low classification efficiency and making it difficult to meet the requirements of real-time applications;

[0005] 2) Low classification accuracy: The existing technologies have deficiencies in classification accuracy. Especially when dealing with knowledge graph data with complex structures and high dimensions, misclassifications are likely to occur, affecting the application effect. Summary of the Invention

[0006] In order to solve the problems of low classification efficiency and low classification accuracy existing in the prior art, the purpose of the present invention is to provide a knowledge graph classification method and system based on a graph neural network.

[0007] The technical solution adopted by the present invention is as follows:

[0008] A knowledge graph classification method based on a graph neural network, comprising the following steps:

[0009] Using natural language processing algorithms, construct a named entity and entity relationship extraction model, and using graph neural network algorithms, construct a knowledge graph classification model;

[0010] Collect real-time knowledge graph data, obtain the real-time domain information of the real-time knowledge graph data, and according to the real-time domain information, collect a number of real-time knowledge data in the corresponding domain;

[0011] Use a named entity and entity relationship extraction model to extract several real-time extended named entities and several real-time extended entity relationships from each real-time knowledge data;

[0012] Based on several real-time extended named entities and several real-time extended entity relationships, semantically expand the real-time knowledge graph data to obtain semantically expanded real-time knowledge graph data;

[0013] Use a knowledge graph classification model to classify the semantically expanded real-time knowledge graph data to obtain a real-time knowledge graph classification result, and continuously update the knowledge graph classification model.

[0014] Furthermore, use natural language processing algorithms to construct a named entity and entity relationship extraction model, and use graph neural network algorithms to construct a knowledge graph classification model, including the following steps:

[0015] Collect several historical knowledge data and several knowledge graph data in different fields, and perform preprocessing to obtain several preprocessed historical knowledge data and several preprocessed knowledge graph data;

[0016] Based on several preprocessed historical knowledge data, use natural language processing algorithms to construct a named entity and entity relationship extraction model;

[0017] Based on several preprocessed knowledge graph data, use graph neural network algorithms to construct a knowledge graph classification model, and generate several historical knowledge graph classification experiences.

[0018] Furthermore, the named entity and entity relationship extraction model is constructed based on the BERT-BiLSTM-CRF-SVM algorithm, and the named entity and entity relationship extraction model includes a word embedding module constructed based on the BERT algorithm, a semantic feature extraction module constructed based on the BiLSTM algorithm, a named entity extraction module constructed based on the CRF algorithm, and an entity relationship extraction module constructed based on the SVM algorithm, which are connected in sequence.

[0019] Furthermore, the knowledge graph classification model is constructed based on the GAT-MLP-ISSA-CLA algorithm, and the knowledge graph classification model includes a graph structure feature extraction module constructed based on the GAT algorithm, a knowledge graph classification module constructed based on the MLP algorithm, a classification result optimization module constructed based on the ISSA algorithm, and a continuous learning module constructed based on the CLA algorithm. The continuous learning module is provided with an experience replay pool.

[0020] Furthermore, based on several preprocessed knowledge graph data, use graph neural network algorithms to construct a knowledge graph classification model, and generate several historical knowledge graph classification experiences, including the following steps:

[0021] Use the GAT-MLP-ISSA-CLA algorithm to construct an initial knowledge graph classification model; the initial knowledge graph classification model includes an initial graph structure feature extraction module, an initial knowledge graph classification module, an initial classification result optimization module, and an initial continuous learning module;

[0022] Combine the first loss function of the initial graph structure feature extraction module and the second loss function of the initial knowledge graph classification module to obtain an initial comprehensive loss function, and use the initial continuous learning module to set a loss elasticity weight for the initial comprehensive loss function to obtain a final comprehensive loss function;

[0023] According to a number of preprocessed knowledge graph data, perform iterative optimization training on the initial knowledge graph classification model, use the final comprehensive loss function to obtain the historical comprehensive loss value of each iteration of the optimization training, and obtain the historical knowledge graph classification experience of each iteration of the optimization training;

[0024] If the number of iterations of the optimization training is greater than the iteration number threshold, or the historical comprehensive loss value is less than the loss value threshold, then output the final knowledge graph classification model, and store a number of historical knowledge graph classification experiences in the experience replay pool of the final knowledge graph classification model, otherwise, continue the iterative optimization training.

[0025] Furthermore, use a named entity and entity relationship extraction model to extract a number of real-time extended named entities and a number of real-time extended entity relationships from each real-time knowledge data, including the following steps:

[0026] Use the word embedding module of the named entity and entity relationship extraction model to perform word embedding on the real-time knowledge data to obtain real-time word embedding vectors;

[0027] Use the semantic feature extraction module of the named entity and entity relationship extraction model to extract the real-time semantic features of the real-time word embedding vectors;

[0028] Use the named entity extraction module of the named entity and entity relationship extraction model to perform named entity annotation according to the real-time semantic features to obtain a number of real-time extended named entities;

[0029] Use the entity relationship extraction module of the named entity and entity relationship extraction model to perform entity relationship prediction according to the real-time semantic features of each real-time extended named entity to obtain real-time extended entity relationships between different real-time extended named entities;

[0030] Traverse all real-time knowledge data, and use the named entity and entity relationship extraction model to perform named entity and entity relationship extraction to obtain a number of real-time extended named entities and a number of real-time extended entity relationships of each real-time knowledge data.

[0031] Further, according to a number of real-time extended named entities and a number of real-time extended entity relationships, perform semantic extension on the real-time knowledge graph data to obtain semantically extended real-time knowledge graph data, including the following steps:

[0032] Parse the real-time knowledge graph data to obtain a corresponding number of real-time graph named entities, and obtain the Euclidean distance between each real-time graph named entity and a number of real-time extended named entities;

[0033] Take the real-time extended named entity with the closest Euclidean distance as the first target real-time extended named entity of the real-time graph named entity, and take a number of real-time extended entity relationships of the first target real-time extended named entity as the target real-time extended entity relationships of the real-time graph named entity;

[0034] Take the real-time extended named entity corresponding to the other side of each target real-time extended entity relationship of the first target real-time extended named entity as the second target real-time extended named entity;

[0035] Map all the first target real-time extended named entities, all the target real-time extended entity relationships, and all the second target real-time extended named entities to the corresponding real-time graph named entities to obtain semantically extended real-time knowledge graph data.

[0036] Further, use a knowledge graph classification model to classify the semantically extended real-time knowledge graph data to obtain a real-time knowledge graph classification result, and continuously update the knowledge graph classification model, including the following steps:

[0037] Use the graph structure feature extraction module of the knowledge graph classification model to extract the real-time graph structure features of the semantically extended real-time knowledge graph data;

[0038] Use the knowledge graph classification module of the knowledge graph classification model to perform knowledge graph classification according to the real-time graph structure features to obtain a real-time knowledge graph classification probability distribution;

[0039] Use the classification result optimization module of the knowledge graph classification model to optimize the real-time knowledge graph classification probability distribution to obtain a real-time knowledge graph classification result;

[0040] Obtain the real-time knowledge graph classification experience of the knowledge graph classification model, randomly extract a number of historical knowledge graph classification experiences from the experience replay pool of the continuous learning module, and mix them with the real-time knowledge graph classification experience to obtain a number of mixed knowledge graph classification experiences;

[0041] According to a number of mixed knowledge graph classification experiences, perform iterative continuous training on the knowledge graph classification model, and use the final comprehensive loss function to obtain the real-time comprehensive loss value for each iteration of continuous training;

[0042] If the number of iterations of continuous training is greater than the iteration number threshold, or the real-time comprehensive loss value is less than the loss value threshold, then output the updated knowledge graph classification model, and store the real-time knowledge graph classification experience in the experience replay pool of the updated knowledge graph classification model; otherwise, continue iterative continuous training.

[0043] Furthermore, use the classification result optimization module of the knowledge graph classification model to optimize the classification result of the real-time knowledge graph classification probability distribution, and obtain the real-time knowledge graph classification result, including the following steps:

[0044] According to the real-time knowledge graph classification probability distribution, set the solution vector of the classification result optimization module, and initialize according to the solution vector to obtain several initial solutions;

[0045] Taking minimizing the classification error as the optimization goal, use the classification result optimization module of the knowledge graph classification model to iteratively optimize several initial solutions to obtain the optimal solution;

[0046] Decode the solution vector of the optimal solution to obtain the real-time probability distribution adjustment parameter with the optimal real-time knowledge graph classification probability distribution;

[0047] According to the optimal real-time probability distribution adjustment parameter, adjust the real-time knowledge graph classification probability distribution to obtain the adjusted real-time knowledge graph classification probability distribution;

[0048] Take the knowledge graph classification with the highest probability in the adjusted real-time knowledge graph classification probability distribution as the real-time knowledge graph classification result.

[0049] A knowledge graph classification system based on a graph neural network for implementing the knowledge graph classification method. The system includes a model construction unit, a knowledge data acquisition unit, a named entity extraction unit, a semantic extension unit, and a knowledge graph classification unit that are connected in sequence.

[0050] The beneficial effects of the present invention are:

[0051] A knowledge graph classification method and system based on a graph neural network provided by the present invention, through the efficient information processing ability of the knowledge graph classification model constructed by the graph neural network algorithm, speeds up the classification process of the knowledge graph, improves the classification efficiency, has a high degree of automation, reduces the need for manual intervention, reduces the labor cost, and adapts to the rapid processing requirements of large-scale knowledge graphs; through semantic expansion, it makes full use of external knowledge, enhances the semantic richness of the knowledge graph, and improves the semantic relevance of the classification results; the knowledge graph classification model effectively captures the deep semantic information in the knowledge graph, enhances the model's understanding ability of the semantics in the knowledge graph, and greatly improves the classification accuracy; by adopting a continuous learning mechanism, the knowledge graph classification model is continuously updated, enabling the model to absorb and integrate new knowledge in real time, ensuring that the classification results of the knowledge graph are always consistent with the latest information, the model continuously adapts to the changes in the data distribution, enhances the ability to resist noise and abnormal data, and improves the overall robustness.

[0052] Other beneficial effects of the present invention will be further described in the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is a flowchart of the knowledge graph classification method based on a graph neural network in the present invention.

[0054] Figure 2 is a structural block diagram of the knowledge graph classification system based on a graph neural network in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0055] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments.

[0056] Embodiment 1:

[0057] As Figure 1 shown, this embodiment provides a knowledge graph classification method based on a graph neural network, including the following steps:

[0058] S1: Using natural language processing algorithms, construct a named entity and entity relationship extraction model, and use graph neural network algorithms to construct a knowledge graph classification model, including the following steps:

[0059] S1-1: Collect a number of historical knowledge data and a number of knowledge graph data in different fields, and perform preprocessing to obtain a number of preprocessed historical knowledge data and a number of preprocessed knowledge graph data;

[0060] Ensure that the training and classification of the model are based on rich and diverse data sources; clean, format, deduplicate, etc. the collected data to improve data quality, reduce noise and redundancy, and lay a solid foundation for subsequent model training; the collection and preprocessing of multi-domain data enable the model to better generalize to new domains and new scenarios;

[0061] S1-2: According to a number of preprocessed historical knowledge data, use natural language processing algorithms to construct a named entity and entity relationship extraction model;

[0062] The named entity and entity relationship extraction model is constructed based on the Bidirectional Encoder Representations from Transformers (BERT)-Bidirectional Long Short-Term Memory (BiLSTM)-Conditional Random Field (CRF)-Support Vector Machine (SVM) algorithms, and the named entity and entity relationship extraction model includes a word embedding module constructed based on the BERT algorithm, a semantic feature extraction module constructed based on the BiLSTM algorithm, a named entity extraction module constructed based on the CRF algorithm, and an entity relationship extraction module constructed based on the SVM algorithm, which are connected in sequence;

[0063] The word embedding module converts each word in the input knowledge into a vector representation in a high-dimensional space, and uses the pre-training ability of BERT to capture the meaning changes of words in the context. The word vectors generated by BERT are rich in semantic information, which helps subsequent modules better understand the knowledge data; through the bidirectional LSTM network, learn the long-term dependence relationship and context information of the input sequence. BiLSTM can capture the complex relationships between words, improve the model's semantic understanding ability, provide more accurate input features for the named entity extraction module, and improve the accuracy of entity recognition; the named entity extraction module uses CRF to label the sequence, identifies the named entities in the text, and CRF can use context information for constraint, reduce mislabeling, improve the accuracy of entity recognition, and generate structured named entity results for subsequent processing and analysis; the entity relationship extraction module uses SVM to classify the extracted entity pairs, can handle a variety of complex relationship types, and enhances the model's relationship extraction ability;

[0064] S1-3: Based on a number of preprocessed knowledge graph data, use graph neural network algorithms to construct a knowledge graph classification model and generate a number of historical knowledge graph classification experiences; through the training and application of the classification model, accumulate the classification experiences of the historical knowledge graph, and use these experiences for subsequent classification tasks to improve the startup speed and classification accuracy of the model. Through continuous accumulation and utilization of experiences, the model can be continuously optimized to improve the long-term classification effect;

[0065] The knowledge graph classification model is constructed based on the Graph Attention Network (GAT)-Multilayer Perceptron (MLP)-Improved Sparrow Search Algorithm (ISSA)-Continuous Learning Algorithm (CLA). The knowledge graph classification model includes a graph structure feature extraction module constructed based on the GAT algorithm, a knowledge graph classification module constructed based on the MLP algorithm, a classification result optimization module constructed based on the ISSA algorithm, and a continuous learning module constructed based on the CLA algorithm. The continuous learning module is provided with an experience replay pool;

[0066] The graph structure feature extraction module uses GAT to learn the node relationships and structural information in the knowledge graph, aggregates the features of neighbor nodes through the attention mechanism, and generates a feature representation rich in structural information for each node, which can effectively capture the complex structure in the knowledge graph and improve the utilization efficiency of the model for graph structure information. Through the attention mechanism, the model can focus on important neighbor nodes and generate more accurate feature representations; the knowledge graph classification module uses MLP to classify the extracted graph structure features, and through multiple-layer non-linear transformations, learns the complex mapping relationship from features to classification probabilities, can learn complex non-linear relationships, and improve the accuracy of knowledge graph classification. The structure of MLP is simple and flexible, and can adapt to a variety of different knowledge graph classification tasks; the classification result optimization module takes minimizing the classification error as the optimization goal, optimizes the classification probability distribution, has stronger resistance to noise and outliers, and enhances the robustness of the model in complex environments; the continuous learning module enables the model to continuously learn new knowledge and adapt to the dynamic changes of the knowledge graph. By setting up an experience replay pool to store past training data or experiences, it is used to alleviate the forgetting problem, enabling the model to be continuously updated and expanded to adapt to the continuous growth and changes of the knowledge graph. The experience replay pool helps the model retain old knowledge when learning new knowledge, reduce the forgetting effect, and maintain the coherence of knowledge;

[0067] Based on a number of preprocessed knowledge graph data, use graph neural network algorithms to construct a knowledge graph classification model and generate a number of historical knowledge graph classification experiences, including the following steps:

[0068] S1-3-1: Build an initial knowledge graph classification model using the GAT-MLP-ISSA-CLA algorithm; the initial knowledge graph classification model includes an initial graph structure feature extraction module, an initial knowledge graph classification module, an initial classification result optimization module, and an initial continuous learning module;

[0069] S1-3-2: Combine the first loss function of the initial graph structure feature extraction module and the second loss function of the initial knowledge graph classification module to obtain an initial comprehensive loss function, and use the initial continuous learning module to set a loss elasticity weight for the initial comprehensive loss function to obtain a final comprehensive loss function; the comprehensive loss function balances the learning objectives of different modules and promotes the overall optimization of the model, and the loss elasticity weight enables the model to flexibly adjust the training focus, adapt to complex data distributions, and prevent experience forgetting;

[0070] S1-3-3: According to a number of preprocessed knowledge graph data, perform iterative optimization training on the initial knowledge graph classification model, use the final comprehensive loss function, obtain the historical comprehensive loss value of each iteration of the optimization training, and obtain the historical knowledge graph classification experience of each iteration of the optimization training; through iterative training, the model gradually converges to the optimal state, and the historical knowledge graph classification experience accumulated in each round of iteration provides valuable data for subsequent continuous training;

[0071] S1-3-4: If the number of iterations of the optimization training is greater than the iteration number threshold, or the historical comprehensive loss value is less than the loss value threshold, then output the final knowledge graph classification model and store a number of historical knowledge graph classification experiences in the experience replay pool of the final knowledge graph classification model, otherwise, continue the iterative optimization training;

[0072] S2: Collect real-time knowledge graph data, obtain the real-time domain information of the real-time knowledge graph data, and according to the real-time domain information, collect a number of real-time knowledge data in the corresponding domain;

[0073] S3: Use a named entity and entity relationship extraction model to extract a number of real-time extended named entities and a number of real-time extended entity relationships for each real-time knowledge data, including the following steps:

[0074] S3-1: Use the word embedding module of the named entity and entity relationship extraction model to perform word embedding on the real-time knowledge data to obtain real-time word embedding vectors;

[0075] S3-2: Use the semantic feature extraction module of the named entity and entity relationship extraction model to extract the real-time semantic features of the real-time word embedding vectors;

[0076] S3-3: Use the named entity extraction module of the named entity and entity relationship extraction model to perform named entity annotation based on real-time semantic features, and obtain several real-time extended named entities;

[0077] S3-4: Use the entity relationship extraction module of the named entity and entity relationship extraction model to perform entity relationship prediction based on the real-time semantic features of each real-time extended named entity, and obtain the real-time extended entity relationships between different real-time extended named entities;

[0078] S3-5: Traverse all real-time knowledge data, and use the named entity and entity relationship extraction model to perform named entity and entity relationship extraction, and obtain several real-time extended named entities and several real-time extended entity relationships for each real-time knowledge data;

[0079] S4: Semantically expand the real-time knowledge graph data based on several real-time extended named entities and several real-time extended entity relationships to obtain the semantically expanded real-time knowledge graph data, including the following steps:

[0080] S4-1: Parse the real-time knowledge graph data to obtain the corresponding several real-time graph named entities, and obtain the Euclidean distance between each real-time graph named entity and several real-time extended named entities; This provides a clear list of named entities for semantic expansion, ensuring the accuracy of the expansion. Through parsing, it reduces data noise in subsequent processing and improves processing efficiency;

[0081] S4-2: Use the real-time extended named entity with the closest Euclidean distance as the first target real-time extended named entity of the real-time graph named entity, and use several real-time extended entity relationships of the first target real-time extended named entity as the target real-time extended entity relationships of the real-time graph named entity; By calculating the Euclidean distance, the extended named entity most similar to the real-time graph named entity can be found, improving the accuracy of matching, providing a quantitative similarity assessment, and facilitating subsequent decision-making and optimization;

[0082] S4-3: Use the real-time extended named entity corresponding to the other side of each target real-time extended entity relationship of the first target real-time extended named entity as the second target real-time extended named entity; By introducing the most relevant extended entities and relationships, it enriches the semantic content of the real-time knowledge graph, ensures a high correlation between the extended relationships and the original entities, and improves the accuracy of the expansion;

[0083] S4-4: Map all first target real-time extended named entities, all target real-time extended entity relationships, and all second target real-time extended named entities to their corresponding real-time graph named entities to obtain real-time knowledge graph data after semantic extension. By introducing the second target extended named entity, the semantic network of the knowledge graph is further extended, the connectivity of knowledge is increased, more potential entity relationships are revealed, and the semantic understanding of the knowledge graph is deepened;

[0084] S5: Use the knowledge graph classification model to classify the real-time knowledge graph data after semantic extension to obtain the real-time knowledge graph classification result, and continuously update the knowledge graph classification model, including the following steps:

[0085] S5-1: Use the graph structure feature extraction module of the knowledge graph classification model to extract the real-time graph structure features of the real-time knowledge graph data after semantic extension. The extracted graph structure features contain rich semantic information, which helps to improve the accuracy of classification, can adapt to the real-time changing knowledge graph data, and ensure the timeliness of features;

[0086] S5-2: Use the knowledge graph classification module of the knowledge graph classification model to perform knowledge graph classification according to the real-time graph structure features to obtain the real-time knowledge graph classification probability distribution. For each possible knowledge graph category in the real-time knowledge graph classification probability distribution, the model will output a probability value indicating the possibility that the input data belongs to this category. The sum of these probability values is usually 1. Through effective feature utilization, accurate knowledge graph classification is achieved, and the classification probability distribution is provided for subsequent optimization and decision-making;

[0087] S5-3: Use the classification result optimization module of the knowledge graph classification model to optimize the real-time knowledge graph classification probability distribution to obtain the real-time knowledge graph classification result, including the following steps:

[0088] S5-3-1: According to the real-time knowledge graph classification probability distribution, set the solution vector of the classification result optimization module, and initialize according to the solution vector to obtain several initial solutions;

[0089] Specifically, use the Circle chaotic mapping sequence for initialization to obtain the initial ISSA population. The initial ISSA population includes several initial ISSA individuals (initial solutions);

[0090] The formula is:

[0091]

[0092] In the formula, X' c is the initial ISSA individual of the Circle chaotic mapping; X c *is the randomly generated initial ISSA individual; c is the ISSA individual indicator;

[0093] S5-3-2: With minimizing the classification error as the optimization objective, use the classification result optimization module of the knowledge graph classification model to iteratively optimize several initial solutions to obtain the optimal solution, including the following steps:

[0094] S5-3-2-1: With minimizing the classification error as the optimization objective, set the fitness function;

[0095] The formula of the fitness function is:

[0096] f(X c ) = minMSE

[0097] In the formula, f(X c ) is the fitness function of the ISSA individual X c ; MSE is the classification error value; X c is the ISSA individual variable; c is the ISSA individual indicator;

[0098] S5-3-2-2: Use the fitness function to obtain the fitness value of each initial ISSA individual in the initial ISSA population;

[0099] S5-3-2-3: Sort the initial ISSA individuals according to the fitness values of the initial ISSA individuals to obtain the initial discoverer, the initial joiner, and the initial predator;

[0100] S5-3-2-4: Update the initial ISSA population to obtain the updated ISSA population; the updated ISSA population includes the updated discoverer, the updated joiner, and the updated predator;

[0101] The update formula of the discoverer is:

[0102]

[0103] In the formula, are the c-th discoverer ISSA individuals in the (t + 1)-th and t-th iterations respectively; t max is the maximum number of iterations; ξ is a random number between 0 and 1; Q is a normally distributed random number; L is a 1×D matrix with all elements being 1; R2 is the warning value; ST is the safety threshold;

[0104] The update formula of the joiner is:

[0105]

[0106] In the formula, They are the c-th joiner ISSA individuals in the (t + 1)-th and t-th iterations respectively; It is the best position occupied by the exposed individual; It is the current worst position; ξ is a random number between 0 and 1; L is a 1×D matrix whose elements are all 1 or -1; c is the ISSA individual indicator; h is the total number of ISSA individuals; A + It is the update parameter;

[0107] The update formula of the predator is:

[0108]

[0109] In the formula, They are the c-th predator ISSA individuals in the (t + 1)-th and t-th iterations respectively; δ is the step size control parameter, and δ = a"·γ", a" is the convergence factor, and γ" is a non-zero positive real number for step size control; It is the current best position; f c 、f g 、f w They are the current, best, and worst fitnesses of the ISSA individuals respectively; γ is the minimum constant to prevent the denominator from being 0;

[0110]

[0111] In the formula, a" is the convergence factor; tanh(.) is the hyperbolic tangent function; a max 、a min They are the maximum and minimum values of the convergence factor respectively; λ is the decreasing rate parameter, k" is the decreasing period parameter, λ = -2π, k" = π;

[0112] S5-3-2-6: Use the dynamic reverse learning algorithm to perform dynamic reverse learning on the updated ISSA population to generate a dynamically reversed ISSA population;

[0113] The formula is:

[0114]

[0115] In the formula, It is the dynamically reversed ISSA individual; γ * is the decreasing inertia coefficient; ub is the upper limit of the search space in the constraint condition; lb is the lower limit of the search space in the constraint condition; is the updated ISSA individual;

[0116] S5-3-2-7: Use the Gaussian mutation algorithm to perform Gaussian mutation on the updated ISSA population to generate a Gaussian mutated ISSA population;

[0117] The formula is:

[0118]

[0119] In the formula, is the ISSA individual with dynamic reverse; is the updated ISSA individual; σ is the standard deviation; N(0,σ 2 ) is a random number drawn from a normal distribution with a mean of 0 and a variance of σ 2 , which is used to simulate the process of Gaussian mutation;

[0120] S5-3-2-8: According to the fitness function, calculate the fitness values of all ISSA individuals in the updated ISSA population, the ISSA population with dynamic reverse, and the ISSA population with Gaussian mutation, and take the ISSA individual with the minimum fitness value as the optimal individual;

[0121] S5-3-2-9: If the number of iterations reaches the iteration number threshold or the fitness value of the optimal individual is less than the fitness value threshold, then take the optimal individual as the optimal solution;

[0122] S5-3-3: Decode the solution vector of the optimal solution to obtain the optimal real-time probability distribution adjustment parameter for the real-time knowledge graph classification probability distribution;

[0123] S5-3-4: According to the optimal real-time probability distribution adjustment parameter, adjust the real-time knowledge graph classification probability distribution to obtain the adjusted real-time knowledge graph classification probability distribution;

[0124] S5-3-5: Take the knowledge graph classification with the highest probability in the adjusted real-time knowledge graph classification probability distribution as the real-time knowledge graph classification result; The optimized classification result is more accurate, reducing the possibility of misclassification. The optimized classification result is more accurate, reducing the possibility of misclassification;

[0125] Knowledge graph classification can be divided into multiple types according to different classification criteria and purposes, which are set according to the actual scenario. Some common knowledge graph classification types:

[0126] Classification by knowledge domain:

[0127] General knowledge graph: Covers common sense knowledge in multiple fields;

[0128] Domain-specific knowledge graph: Professional knowledge for specific domains (such as medicine, law, finance, etc.);

[0129] Classification by knowledge source:

[0130] Structured knowledge graph: Knowledge extracted from structured data (such as databases);

[0131] Semi-structured knowledge graph: Knowledge extracted from semi-structured data (such as XML and JSON files);

[0132] Unstructured knowledge graph: Knowledge extracted from unstructured data (such as text and images);

[0133] Classification by knowledge representation:

[0134] Property graph: A knowledge graph where both nodes and edges have properties;

[0135] Label graph: A knowledge graph where edges have labels;

[0136] Hypergraph: A knowledge graph that allows edges to connect multiple nodes;

[0137] Classification by knowledge level:

[0138] Hierarchical knowledge graph: A knowledge graph with a hierarchical structure, such as a classification system; Flat knowledge graph: A knowledge graph without an obvious hierarchical structure;

[0139] Classification by knowledge dynamics:

[0140] Static knowledge graph: The knowledge content is relatively stable and not updated frequently;

[0141] Dynamic knowledge graph: The knowledge content is updated frequently to reflect real-time information;

[0142] Classification by knowledge application:

[0143] Semantic search knowledge graph: Used to enhance the semantic relevance of search results; Recommendation system knowledge graph: Used to improve the accuracy and diversity of recommendation systems; Intelligent question-answering knowledge graph: Used to support intelligent question-answering systems;

[0144] Decision support knowledge graph: Used to assist in decision-making analysis;

[0145] Classification by knowledge granularity:

[0146] Coarse-grained knowledge graph: Contains higher-level and more abstract knowledge;

[0147] Fine-grained knowledge graph: Contains lower-level and more specific knowledge;

[0148] Classification by knowledge integrity:

[0149] Complete knowledge graph: Attempts to cover all relevant knowledge in a certain field;

[0150] Partial knowledge graph: Only covers part of the relevant knowledge in a certain field;

[0151] S5-4: Obtain the real-time knowledge graph classification experience of the knowledge graph classification model, randomly extract a number of historical knowledge graph classification experiences from the experience replay pool of the continuous learning module, and mix them with the real-time knowledge graph classification experience to obtain a number of mixed knowledge graph classification experiences; By mixing historical and real-time experiences, the integration and complementarity of knowledge are realized, the diversity of training data is increased, and the generalization ability of the model is improved;

[0152] S5-5: According to a number of mixed knowledge graph classification experiences, iteratively and continuously train the knowledge graph classification model, use the final comprehensive loss function, and obtain the real-time comprehensive loss value of each iteration of continuous training; Through continuous training, the model evolves continuously, adapts to new data and scenarios. During the iterative training process, the performance of the model gradually improves, reaching a higher accuracy rate;

[0153] S5-6: If the number of iterations of continuous training is greater than the iteration number threshold, or the real-time comprehensive loss value is less than the loss value threshold, then output the updated knowledge graph classification model, and store the real-time knowledge graph classification experience in the experience replay pool of the updated knowledge graph classification model. Otherwise, continue the iterative continuous training; Ensure that the model is always in the latest state and adapts to the real-time changing environment. By storing experiences, it provides a data basis for future continuous learning, enabling the model to have the ability of self-evolution and adaptation to future changes.

[0154] Embodiment 2:

[0155] As Figure 2 shown, this embodiment provides a knowledge graph classification system based on a graph neural network for implementing the knowledge graph classification method. The system includes a model construction unit, a knowledge data acquisition unit, a named entity extraction unit, a semantic expansion unit, and a knowledge graph classification unit connected in sequence;

[0156] The model construction unit is used to construct a named entity and entity relationship extraction model using natural language processing algorithms, and construct a knowledge graph classification model using graph neural network algorithms;

[0157] The knowledge data acquisition unit is used to collect real-time knowledge graph data, obtain the real-time domain information of the real-time knowledge graph data, and collect a number of real-time knowledge data in the corresponding domain according to the real-time domain information;

[0158] The named entity extraction unit is used to use the named entity and entity relationship extraction model to extract a number of real-time extended named entities and a number of real-time extended entity relationships of each real-time knowledge data;

[0159] The semantic expansion unit is used to semantically expand the real-time knowledge graph data according to a number of real-time extended named entities and a number of real-time extended entity relationships to obtain the semantically expanded real-time knowledge graph data;

[0160] A knowledge graph classification unit is used to classify real-time knowledge graph data after semantic expansion using a knowledge graph classification model, obtain real-time knowledge graph classification results, and continuously update the knowledge graph classification model.

[0161] A knowledge graph classification method and system based on a graph neural network provided by the present invention, through the efficient information processing ability of the knowledge graph classification model constructed by the graph neural network algorithm, speeds up the classification process of the knowledge graph, improves the classification efficiency, has a high degree of automation, reduces the need for manual intervention, reduces labor costs, and meets the rapid processing requirements of large-scale knowledge graphs; through semantic expansion, external knowledge is fully utilized, enhancing the semantic richness of the knowledge graph and improving the semantic relevance of the classification results; the knowledge graph classification model effectively captures deep semantic information in the knowledge graph, enhancing the model's understanding ability of the semantics in the knowledge graph and greatly improving the classification accuracy; adopting a continuous learning mechanism to continuously update the knowledge graph classification model enables the model to absorb and integrate new knowledge in real time, ensuring that the classification results of the knowledge graph are always consistent with the latest information, the model continuously adapts to changes in the data distribution, enhancing the ability to resist noise and abnormal data, and improving the overall robustness.

[0162] The present invention is not limited to the above optional implementation manners, and anyone can obtain other various forms of products under the inspiration of the present invention. The above specific implementation manners should not be construed as limiting the protection scope of the present invention, and the protection scope of the present invention should be defined by the claims, and the specification can be used to interpret the claims.

Claims

1. A knowledge graph classification method based on graph neural network, characterized by: The steps include: Use natural language processing algorithms to build named entity and entity relationship extraction models, and use graph neural network algorithms to build knowledge graph classification models; Collect real-time knowledge graph data, obtain real-time domain information of the real-time knowledge graph data, and collect some real-time knowledge data in the corresponding field based on the real-time domain information; Using a named entity and entity relationship extraction model, extracting a number of real-time extended named entities and a number of real-time extended entity relationships from each real-time knowledge data; According to a number of real-time extended named entities and a number of real-time extended entity relationships, semantically extend the real-time knowledge graph data to obtain semantically extended real-time knowledge graph data; Use the knowledge graph classification model to perform knowledge graph classification on the real-time knowledge graph data after semantic expansion, obtain real-time knowledge graph classification results, and continuously update the knowledge graph classification model.

2. According to claim 1, a knowledge graph classification method based on graph neural network is characterized in that: Use natural language processing algorithms to build named entity and entity relationship extraction models, and use graph neural network algorithms to build knowledge graph classification models, including the following steps: Collecting a number of historical knowledge data and a number of knowledge graph data in different fields, and preprocessing them to obtain a number of preprocessed historical knowledge data and a number of preprocessed knowledge graph data; Based on some pre-processed historical knowledge data, a named entity and entity relationship extraction model is constructed using a natural language processing algorithm; Based on several preprocessed knowledge graph data, a knowledge graph classification model is constructed using the graph neural network algorithm, and several historical knowledge graph classification experiences are generated.

3. According to claim 2, a knowledge graph classification method based on graph neural network is characterized in that: The named entity and entity relationship extraction model is constructed based on the BERT-BiLSTM-CRF-SVM algorithm, and the named entity and entity relationship extraction model includes a word embedding module constructed based on the BERT algorithm, a semantic feature extraction module constructed based on the BiLSTM algorithm, a named entity extraction module constructed based on the CRF algorithm, and an entity relationship extraction module constructed based on the SVM algorithm, which are connected in sequence.

4. According to claim 2, a knowledge graph classification method based on graph neural network is characterized in that: The knowledge graph classification model is constructed based on the GAT-MLP-ISSA-CLA algorithm, and the knowledge graph classification model includes a graph structure feature extraction module constructed based on the GAT algorithm, a knowledge graph classification module constructed based on the MLP algorithm, a classification result optimization module constructed based on the ISSA algorithm, and a continuous learning module constructed based on the CLA algorithm, which are connected in sequence. The continuous learning module is provided with an experience replay pool.

5. According to claim 4, a knowledge graph classification method based on graph neural network is characterized in that: Based on some preprocessed knowledge graph data, a knowledge graph classification model is constructed using the graph neural network algorithm, and some historical knowledge graph classification experiences are generated, including the following steps: Using the GAT-MLP-ISSA-CLA algorithm, an initial knowledge graph classification model is constructed; the initial knowledge graph classification model includes an initial graph structure feature extraction module, an initial knowledge graph classification module, an initial classification result optimization module, and an initial continuous learning module; The initial comprehensive loss function is obtained by combining the first loss function of the initial graph structure feature extraction module and the second loss function of the initial knowledge graph classification module, and the initial continuous learning module is used to set the loss elasticity weight for the initial comprehensive loss function to obtain the final comprehensive loss function; Based on some preprocessed knowledge graph data, the initial knowledge graph classification model is iteratively optimized and trained, and the final comprehensive loss function is used to obtain the historical comprehensive loss value of each iteration of the optimization training, and the historical knowledge graph classification experience of each iteration of the optimization training is obtained; If the number of iterations of the optimization training is greater than the iteration number threshold, or the historical comprehensive loss value is less than the loss value threshold, the final knowledge graph classification model is output, and several historical knowledge graph classification experiences are stored in the experience replay pool of the final knowledge graph classification model. Otherwise, the iterative optimization training continues.

6. The knowledge graph classification method based on graph neural network according to claim 3 is characterized by: Using a named entity and entity relationship extraction model, extracting a number of real-time extended named entities and a number of real-time extended entity relationships from each real-time knowledge data includes the following steps: Use the word embedding module of the named entity and entity relationship extraction model to embed real-time knowledge data and obtain real-time word embedding vectors; Use the semantic feature extraction module of the named entity and entity relationship extraction model to extract real-time semantic features of real-time word embedding vectors; Using the named entity extraction module of the named entity and entity relationship extraction model, named entity annotation is performed according to real-time semantic features to obtain a number of real-time extended named entities; An entity relationship extraction module using a named entity and entity relationship extraction model performs entity relationship prediction based on the real-time semantic features of each real-time extended named entity to obtain real-time extended entity relationships between different real-time extended named entities; All real-time knowledge data are traversed, and named entities and entity relationships are extracted using a named entity and entity relationship extraction model to obtain a number of real-time extended named entities and a number of real-time extended entity relationships for each real-time knowledge data.

7. A knowledge graph classification method based on graph neural network according to claim 6, characterized in that: According to a number of real-time extended named entities and a number of real-time extended entity relationships, semantically extending the real-time knowledge graph data to obtain semantically extended real-time knowledge graph data includes the following steps: Parse the real-time knowledge graph data to obtain a number of corresponding real-time graph named entities, and obtain the Euclidean distance between each real-time graph named entity and a number of real-time extended named entities; The real-time extended named entity with the closest Euclidean distance is used as the first target real-time extended named entity of the real-time graph named entity, and several real-time extended entity relationships of the first target real-time extended named entity are used as the target real-time extended entity relationships of the real-time graph named entity; Taking the real-time extended named entity corresponding to the other side of each target real-time extended entity relationship of the first target real-time extended named entity as the second target real-time extended named entity; Map all first target real-time extended named entities, all target real-time extended entity relationships, and all second target real-time extended named entities to corresponding real-time graph named entities to obtain real-time knowledge graph data after semantic expansion.

8. The knowledge graph classification method based on graph neural network according to claim 5 is characterized by: Use the knowledge graph classification model to perform knowledge graph classification on the real-time knowledge graph data after semantic expansion to obtain the real-time knowledge graph classification results, and continuously update the knowledge graph classification model, including the following steps: Use the graph structure feature extraction module of the knowledge graph classification model to extract the real-time graph structure features of the real-time knowledge graph data after semantic expansion; Use the knowledge graph classification module of the knowledge graph classification model to classify the knowledge graph according to the real-time graph structure characteristics and obtain the real-time knowledge graph classification probability distribution; Use the classification result optimization module of the knowledge graph classification model to optimize the classification results of the real-time knowledge graph classification probability distribution to obtain the real-time knowledge graph classification results; Obtain the real-time knowledge graph classification experience of the knowledge graph classification model, randomly extract a number of historical knowledge graph classification experiences from the experience playback pool of the continuous learning module, and mix them with the real-time knowledge graph classification experience to obtain a number of mixed knowledge graph classification experiences; Based on several hybrid knowledge graph classification experiences, the knowledge graph classification model is iteratively and continuously trained, and the final comprehensive loss function is used to obtain the real-time comprehensive loss value of each iteration of continuous training; If the number of iterations of continuous training is greater than the iteration number threshold, or the real-time comprehensive loss value is less than the loss value threshold, the updated knowledge graph classification model is output, and the real-time knowledge graph classification experience is stored in the experience replay pool of the updated knowledge graph classification model; otherwise, iterative continuous training continues.

9. The knowledge graph classification method based on graph neural network according to claim 8 is characterized by: Using the classification result optimization module of the knowledge graph classification model, the classification result optimization of the real-time knowledge graph classification probability distribution is performed to obtain the real-time knowledge graph classification result, including the following steps: According to the classification probability distribution of the real-time knowledge graph, the solution vector of the classification result optimization module is set, and initialization is performed based on the solution vector to obtain several initial solutions; Taking minimizing the classification error as the optimization goal, the classification result optimization module of the knowledge graph classification model is used to iteratively optimize several initial solutions to obtain the optimal solution; Decode the solution vector of the optimal solution to obtain the optimal real-time probability distribution adjustment parameters for real-time knowledge graph classification probability distribution; According to the optimal real-time probability distribution adjustment parameters, the real-time knowledge graph classification probability distribution is adjusted to obtain the adjusted real-time knowledge graph classification probability distribution; The knowledge graph classification with the highest probability in the adjusted real-time knowledge graph classification probability distribution is taken as the real-time knowledge graph classification result.

10. A knowledge graph classification system based on graph neural network, used to implement the knowledge graph classification method according to any one of claims 1 to 9, characterized in that: The system includes a model building unit, a knowledge data acquisition unit, a named entity extraction unit, a semantic expansion unit and a knowledge graph classification unit which are connected in sequence.