CN112257841A - Data processing method, device and equipment in graph neural network and storage medium - Google Patents

Data processing method, device and equipment in graph neural network and storage medium Download PDF

Info

Publication number
CN112257841A
CN112257841A CN202010915884.9A CN202010915884A CN112257841A CN 112257841 A CN112257841 A CN 112257841A CN 202010915884 A CN202010915884 A CN 202010915884A CN 112257841 A CN112257841 A CN 112257841A
Authority
CN
China
Prior art keywords
neural network
graph neural
graph
data
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010915884.9A
Other languages
Chinese (zh)
Inventor
寇晓宇
林衍凯
李鹏
周杰
张岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University
Tencent Technology Shenzhen Co Ltd
Original Assignee
Peking University
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Tencent Technology Shenzhen Co Ltd filed Critical Peking University
Priority to CN202010915884.9A priority Critical patent/CN112257841A/en
Publication of CN112257841A publication Critical patent/CN112257841A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data processing method, a data processing device, electronic equipment and a storage medium in a graph neural network, wherein the method comprises the following steps: acquiring an initial structure of a first graph neural network and data to be processed in a data stream; triggering a decoupling process and decoupling the relation triples in the first graph neural network into a plurality of embedded components; determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network; triggering an updating process to update the relation triple in the initial structure of the first graph neural network to form a second graph neural network; therefore, dynamic data are processed by the graph neural network, continuous learning of the graph neural network can be realized in different data to form a new graph neural network, and meanwhile, the acquired knowledge of the initial graph neural network is kept, so that the richness and the foresight of data processing can be improved, and the use experience of a user is improved.

Description

Data processing method, device and equipment in graph neural network and storage medium
Technical Field
The present invention relates to information processing technologies, and in particular, to a data processing method, apparatus, device, and storage medium in a graph neural network.
Background
Artificial Intelligence (AI) is a comprehensive technique in computer science, and by studying the design principles and implementation methods of various intelligent machines, the machines have the functions of perception, reasoning and decision making. The artificial intelligence technology is a comprehensive subject and relates to a wide range of fields, for example, natural language processing technology and machine learning/deep learning and the like, and it is believed that with the development of the technology, the artificial intelligence technology will be applied in more fields and play more and more important values.
The graph neural network in the related art usually performs model training through a fixed training mode, and ignores the characteristic that data in the real world is continuously increased (the data is changed in real time), so that the graph neural network usually has larger deviation in data processing results in practical application, and the use of a user is influenced.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a data processing method, an apparatus, a server and a storage medium in a graph neural network, and a technical solution of the embodiment of the present invention is implemented as follows:
the embodiment of the invention provides a data processing method in a graph neural network, which comprises the following steps:
acquiring an initial structure of a first graph neural network and data to be processed in a data stream;
in response to the acquired data to be processed, triggering a decoupling process and decoupling relationship triples in the first graph neural network into a plurality of embedded components;
determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network;
and triggering an updating process based on the corresponding graph embedding result so as to update the relation triple in the initial structure of the first graph neural network and form a second graph neural network.
The embodiment of the invention also provides a data processing device in the graph neural network, which comprises:
the information transmission module is used for acquiring an initial structure of the first graph neural network and data to be processed in the data stream;
the information processing module is used for responding to the acquired data to be processed, triggering a decoupling process and decoupling the relation triples in the first graph neural network into a plurality of embedded components;
the information processing module is used for determining graph embedding corresponding to different embedding components based on the different embedding components matched with the relation triples in the first graph neural network;
and the information processing module is used for triggering an updating process based on the corresponding graph embedding result so as to update the relation triple in the initial structure of the first graph neural network and form a second graph neural network.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining an edge information set and a node information set in the first graph neural network based on the use environment of the first graph neural network;
the information processing module is used for determining a relation triple in the initial structure of the first graph neural network based on the edge information set and the node information set;
the information processing module is used for analyzing different types of data in the data stream based on the use environment of the first graph neural network and determining to-be-processed data matched with the use environment of the first graph neural network.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining an independent component set matched with node vector information in the relation triples in the first graph neural network based on semantic features of the nodes in the relation triples;
the information processing module is used for decoupling the relation triples in the first graph neural network based on the independent component sets matched with the node vector information in the relation triples to form different embedded components matched with the triples.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining attention parameters matched with relation triples in the first graph neural network when the first graph neural network is a knowledge graph,
and the information processing module is used for carrying out normalization processing on the attention parameter matched with the relation triple so as to realize that the association degree between the sideline information in the relation triple and the corresponding embedded component is represented by the attention parameter.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining at least 2 embedded components and performing series processing based on the node parameters in the relation triple when the first graph neural network is a reconstructed-based knowledge graph;
and the information processing module is used for carrying out normalization processing based on the result of the tandem processing so as to realize the graph embedding corresponding to different embedding components.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining at least 2 embedded components and performing component splicing processing based on node parameters in the relation triple when the first graph neural network is a bilinear-based knowledge graph;
and the information processing module is used for performing convolution processing based on the splicing processing result so as to realize the graph embedding corresponding to different embedding components.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a parameter splicing result in a relation triple in the first graph neural network when the first graph neural network is an information network;
the information processing module is used for carrying out linear change processing on the parameter splicing result in the relation triple to form corresponding attention parameters matched with the relation triple;
and the information processing module is used for carrying out normalization processing on the attention parameter matched with the relation triple so as to realize that the association degree between the sideline information in the relation triple and the corresponding embedded component is represented by the attention parameter.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining the incidence relation of different relation triples in the initial structure of the first graph neural network through the updating process;
the information processing module is used for determining a relation triple needing to be updated in the initial structure of the first graph neural network based on the incidence relation of the different relation triples;
the information processing module is configured to keep part of semantic information in the relation triple to be updated unchanged, perform data processing on the relation triple to be updated based on the data to be processed in the data stream, and form a second graph neural network, so as to implement representation of the semantic information of the data to be processed by the updated relation triple.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a first loss function and a second loss function which are matched with the second graph neural network;
the information processing module is used for determining a loss function matched with the second graph neural network based on the first loss function and the second loss function;
the information processing module is used for adjusting network parameters of the second graph neural network based on a loss function matched with the second graph neural network;
the information processing module is used for processing the data to be processed in different use environments through the second graph neural network until the loss function of the second graph neural network reaches the corresponding convergence condition.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a corresponding invalid relation triple as a negative example sample based on the data to be processed in the data stream when the first graph neural network is a knowledge graph;
the information processing module is used for determining a first loss function and a second loss function matched with the second graph neural network based on the negative example sample;
the information processing module is used for determining node labels and node category quantity in the first graph neural network when the first graph neural network is an information network;
the information processing module is used for determining a first loss function and a second loss function matched with the second graph neural network based on the node labels and the node category number in the first graph neural network.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a constraint loss function matched with the second graph neural network;
the information processing module is used for determining the weight hyperparameter of the regularization item corresponding to the constraint loss function;
and the information processing module is used for determining the sum of the first loss function, the second loss function and the constraint loss function as the loss function matched with the second graph neural network based on the weight hyperparameter of the regularization term corresponding to the constraint loss function.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a first knowledge graph corresponding to a target object in question and answer information based on corresponding question and answer information when the first graph neural network is a knowledge graph and the using environment of the first graph neural network is question and answer information processing;
the information processing module is used for determining the updated data matched with the target object in the network information based on the target object;
the information processing module is used for decoupling the first knowledge graph of the target object, updating the triples with different relationships in the first knowledge graph based on the updating data, and forming a second knowledge graph so as to realize response to the question information received by the terminal through the second knowledge graph.
An embodiment of the present invention further provides an electronic device, where the electronic device includes:
a memory for storing executable instructions;
and the processor is used for realizing the data processing method in the neural network of the figure when executing the executable instructions stored in the memory.
The embodiment of the invention also provides a computer-readable storage medium, which stores executable instructions, and the executable instructions are executed by a processor to realize the data processing method in the neural network of the figure.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention obtains the initial structure of the first graph neural network and the data to be processed in the data stream; in response to the acquired data to be processed, triggering a decoupling process and decoupling relationship triples in the first graph neural network into a plurality of embedded components; determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network; based on the corresponding graph embedding result, an updating process is triggered to update the relation triple in the initial structure of the first graph neural network to form a second graph neural network, so that the graph neural network is utilized to process dynamic data, continuous learning of the graph neural network can be realized in different data to form a new graph neural network, and meanwhile, the acquired knowledge of the initial graph neural network is kept, so that the richness and the foresight of data processing can be improved, and the use experience of a user is improved.
Drawings
Fig. 1 is a schematic view of a usage scenario of a data processing method in a graph neural network according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a structure of a data processing apparatus in a neural network according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating an alternative data processing method in the neural network according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating knowledge graph establishment in a data processing method in a graph neural network according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a first neural network decoupling process in an embodiment of the present invention;
FIG. 6 is a schematic flow chart illustrating an alternative data processing method in the neural network according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a triplet update process for different relationships of the first neural network in an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating a test effect of the data processing method in the neural network according to the embodiment of the present invention;
FIG. 9 is a diagram illustrating an exemplary data processing application environment in the neural network of the present invention;
FIG. 10 is a schematic flow chart illustrating an alternative data processing method in the neural network according to an embodiment of the present invention;
FIG. 11 is a schematic diagram illustrating an implementation of an intelligent question answering method in the neural network of the graph provided in the present application;
fig. 12 is a schematic process diagram of implementing financial information recommendation by a data processing method in a neural network according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
2) Based on the condition or state on which the operation to be performed depends, when the condition or state on which the operation depends is satisfied, the operation or operations to be performed may be in real time or may have a set delay; there is no restriction on the order of execution of the operations performed unless otherwise specified.
3) And (4) model training, namely performing multi-classification learning on the image data set. The model can be constructed by adopting deep learning frames such as Tensor Flow, torch and the like, and a multi-classification model is formed by combining multiple layers of neural network layers such as CNN and the like. The input of the model is a three-channel or original channel matrix formed by reading an image through openCV and other tools, the output of the model is multi-classification probability, and the webpage category is finally output through softmax and other algorithms. During training, the model approaches to a correct trend through an objective function such as cross entropy and the like.
4) Neural Networks (NN): an Artificial Neural Network (ANN), referred to as Neural Network or Neural Network for short, is a mathematical model or computational model that imitates the structure and function of biological Neural Network (central nervous system of animals, especially brain) in the field of machine learning and cognitive science, and is used for estimating or approximating functions.
5) Graph Neural Network (GNN): a neural network acting directly on a graph structure mainly processes data of a non-Euclidean space structure (graph structure). Have an input order that ignores nodes; in the calculation process, the representation of the node is influenced by the neighbor nodes around the node, and the connection of the graph is unchanged; the representation of graph structure enables graph-based reasoning. In general, a graph neural network consists of two modules: the system comprises a Propagation Module (Propagation Module) and an Output Module (Output Module), wherein the Propagation Module is used for transmitting information between nodes in the graph and updating the state, and the Output Module is used for defining an objective function according to different tasks based on vector representation of the nodes and edges of the graph. The graph neural network has: graph Convolutional Neural Networks (GCNs), Gated Graph Neural Networks (GGNNs), and Graph Attention Neural Networks (GAT) based on Attention mechanism.
6) Directed graph: representing the relationship from item to item, a directed graph may be represented by ordered triples (v (D), a (D), ψ D), where ψ D is the correlation function, which is the ordered pair of elements for which each element in a (D) corresponds to v (D).
7) Represents learning: also known as learning expressions. In the deep learning field, the expression means what form and what manner the input observation sample X of the model is expressed by the parameters of the model. The representation learning refers to learning a representation effective for the observation sample X. There are many forms of presentation learning, for example, supervised training of CNN parameters is a supervised presentation learning form, unsupervised pre-training of autoencoders and constraint boltzmann machine parameters is an unsupervised presentation learning form, and unsupervised pre-training and then supervised fine-tuning of DBN parameters is a semi-supervised shared presentation learning form.
The data processing method in the graph neural network provided by the embodiment of the present invention is described below, where fig. 1 is a schematic view of a usage scenario of the data processing method in the graph neural network provided by the embodiment of the present invention, referring to fig. 1, a client of software capable of displaying corresponding different information, such as a client or a plug-in for video playing, is arranged on a terminal (including a terminal 10-1 and a terminal 10-2), and a user can obtain and display different information (such as different target videos or text news) through the corresponding client; the terminal is connected to the server 200 through the network 300, a corresponding trained graph neural network is deployed in the server 200 to implement recommendation of information, the network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is implemented using a wireless link, but the data processing method in the graph neural network provided by the embodiment of the present invention may be applied not only to a use scenario of information recommendation, but also to link prediction, a dialog system, and various types of recommendation systems under streaming data.
As an example, the server 200 is used to deploy a data processing apparatus in a graph neural network to implement the data processing method in the graph neural network provided by the present invention, so as to obtain an initial structure of a first graph neural network and data to be processed in a data stream; in response to the acquired data to be processed, triggering a decoupling process and decoupling relationship triples in the first graph neural network into a plurality of embedded components; determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network; and triggering an updating process based on the corresponding graph embedding result so as to update the relation triple in the initial structure of the first graph neural network and form a second graph neural network.
Of course, the data processing apparatus in the graph neural network provided by the present invention may be applied to a use environment in which virtual resources or entity resources perform financial activities or perform information interaction through an entity financial resource payment environment (including but not limited to various types of entity financial resource recommendations) or social software, and financial information of different data sources is generally processed through the graph neural network in performing financial activities on various types of entity financial resources or performing virtual resource payment, so as to implement various types of entity financial resource recommendations. And finally presenting the financial recommendation information corresponding to the target object selected by the target User on a User Interface (UI). The financial information result (such as real-time stock price prediction and futures fluctuation) obtained by the user in the current display interface and processed by the graph neural network can be also called by other application programs.
Specifically, Graph Neural Network (GNN): a neural network acting directly on a graph structure mainly processes data of a non-Euclidean space structure (graph structure). Have an input order that ignores nodes; in the calculation process, the representation of the node is influenced by the neighbor nodes around the node, and the connection of the graph is unchanged; the representation of graph structure enables graph-based reasoning. In general, a graph neural network consists of two modules: the system comprises a Propagation Module (Propagation Module) and an Output Module (Output Module), wherein the Propagation Module is used for transmitting information between nodes in the graph and updating the state, and the Output Module is used for defining an objective function according to different tasks based on vector representation of the nodes and edges of the graph. The graph neural network has: graph Convolutional Neural Networks (GCNs), Gated Graph Neural Networks (GGNNs), and Graph attention Neural Networks (GAT) based on attention mechanism. Further, the graph representation learning technique is also called graph embedding, and mainly represents entities (and relations) in the multi-relation graph by using low-dimensional vectors or matrixes. In the real world, typical multiple relationship graphs are mainly divided into two categories: knowledge-graph (KG) and information networks. The GE mainly includes Knowledge Graph Embedding (KGE) and information Network Embedding (NE), and both are suitable for the data processing method in the graph neural network proposed in the present application.
As will be described in detail below for the structure of the data processing apparatus in the graph neural network according to the embodiment of the present invention, the data processing apparatus in the graph neural network may be implemented in various forms, such as a dedicated terminal (e.g., a terminal carrying the graph neural network) with the processing function of the data processing apparatus in the graph neural network, or a server provided with the processing function of the data processing apparatus in the graph neural network, for example, the server 200 in the foregoing fig. 1. Fig. 2 is a schematic diagram of a component structure of a data processing apparatus in a graph neural network according to an embodiment of the present invention, and it is understood that fig. 2 only shows an exemplary structure of the data processing apparatus in the graph neural network, and a part of or all of the structure shown in fig. 2 may be implemented as needed.
The data processing device in the graph neural network provided by the embodiment of the invention comprises: at least one processor 201, memory 202, user interface 203, and at least one network interface 204. The various components in the data processing apparatus in the neural network are coupled together by a bus system 205. It will be appreciated that the bus system 205 is used to enable communications among the components. The bus system 205 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 205 in fig. 2.
The user interface 203 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 202 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The memory 202 in embodiments of the present invention is capable of storing data to support operation of the terminal (e.g., 10-1). Examples of such data include: any computer program, such as an operating system and application programs, for operating on a terminal (e.g., 10-1). The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program may include various application programs.
In some embodiments, the data processing apparatus in the graph neural network provided in the embodiments of the present invention may be implemented by a combination of hardware and software, and as an example, the data processing apparatus in the graph neural network provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method in the graph neural network provided in the embodiments of the present invention. For example, a processor in the form of a hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field-Programmable Gate arrays (FPGAs), or other electronic components.
As an example of the data processing apparatus in the graph neural network provided by the embodiment of the present invention implemented by combining software and hardware, the data processing apparatus in the graph neural network provided by the embodiment of the present invention may be directly embodied as a combination of software modules executed by the processor 201, the software modules may be located in a storage medium, the storage medium is located in the memory 202, the processor 201 reads executable instructions included in the software modules in the memory 202, and the data processing method in the graph neural network provided by the embodiment of the present invention is completed in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
By way of example, the Processor 201 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor or the like.
As an example of the data processing apparatus in the graph neural network provided by the embodiment of the present invention being implemented by hardware, the apparatus provided by the embodiment of the present invention may be implemented by directly using the processor 201 in the form of a hardware decoding processor, for example, by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic elements.
The memory 202 in the embodiment of the present invention is used to store various types of data to support the operation of the data processing apparatus in the graph neural network. Examples of such data include: any executable instructions for operating on a data processing apparatus in a graph neural network, such as executable instructions, a program implementing the data processing method in the graph neural network of the embodiments of the present invention may be included in the executable instructions.
In other embodiments, the data processing apparatus in the graph neural network provided by the embodiment of the present invention may be implemented by software, and fig. 2 illustrates the data processing apparatus in the graph neural network stored in the memory 202, which may be software in the form of programs, plug-ins, and the like, and includes a series of modules, and as an example of the programs stored in the memory 202, the data processing apparatus in the graph neural network may include the following software modules, an information transmission module 2081 and an information processing module 2082. When the software modules in the data processing apparatus in the graph neural network are read into the RAM by the processor 201 and executed, the data processing method in the graph neural network provided by the embodiment of the present invention will be implemented, where the functions of each software module in the data processing apparatus in the graph neural network include:
the information transmission module 2081 is used for acquiring an initial structure of the first graph neural network and to-be-processed data in a data stream;
the information processing module 2082 is used for triggering a decoupling process and decoupling the relation triples in the first graph neural network into a plurality of embedded components in response to the acquired data to be processed;
the information processing module 2082, configured to determine, based on different embedding components that match relationship triples in the first graph neural network, graph embedding corresponding to the different embedding components;
the information processing module 2082 is configured to trigger an update process based on the corresponding graph embedding result, so as to update the relationship triple in the initial structure of the first graph neural network, and form a second graph neural network.
Before introducing the data processing method in the graph neural network proposed in the present application, a data processing manner of the related art is first introduced, specifically, most existing graph representation learning models (such as various graph neural networks) assume that training data is static, and characteristics that data in the real world is continuously increased (data is real-time changed) are ignored, so that data processing results of the graph representation learning models in practical application often have large deviation and influence the use of users. What is needed, therefore, is a solution to allow existing GE processing methods (including KGE and NE) to learn continuously on new data while trying to keep track of old learned knowledge.
Despite extensive research into continuous learning in the fields of NLP and computer vision, relatively little is being explored in the embedding of multiple relational maps. Representations can be learned on ever increasing graph data in the related art. However, this approach assumes that the timestamp information is known in advance, which prevents its direct application in other types of multiple relational graph fields.
In order to overcome the above-mentioned drawbacks, referring to fig. 3, fig. 3 is an optional flow diagram of a data processing method in a graph neural network according to an embodiment of the present invention, wherein an artificial intelligence technology is used in the technical solution provided by the present invention, and an artificial intelligence ai (artificial intelligence) is a theory, a method, a technique, and an application system that simulate, extend, and extend human intelligence, sense an environment, acquire knowledge, and use the knowledge to obtain an optimal result by using a digital computer or a machine controlled by a digital computer. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Machine Learning (ML) is a multi-domain cross discipline, and relates to a plurality of disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning.
With the research and progress of artificial intelligence technology, the artificial intelligence technology is developed and applied in a plurality of fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, unmanned aerial vehicles, robots, smart medical care, smart customer service, and the like.
The graph neural network in the embodiment of the present application may be adaptively adjusted according to different usage scenarios, and it is understood that the steps shown in fig. 3 may be performed by various electronic devices operating the data processing apparatus in the graph neural network, for example, a dedicated terminal (e.g., a financial product recommendation terminal, a news recommendation terminal), an electronic device, or an electronic device cluster for data processing functions in the graph neural network. The following is a description of the steps shown in fig. 3.
Step 301: the data processing device in the graph neural network acquires an initial structure of the first graph neural network and data to be processed in the data stream.
In some embodiments of the present invention, obtaining the initial structure of the first graph neural network and the data to be processed in the data stream may be implemented by:
determining an edge information set and a node information set in the first graph neural network based on the using environment of the first graph neural network; determining a relationship triplet in an initial structure of the first graph neural network based on the edge information set and the node information set; analyzing different types of data in the data stream based on the using environment of the first graph neural network, and determining to-be-processed data matched with the using environment of the first graph neural network. Taking the first graph neural network as an example of the knowledge graph, a typical knowledge graph can be regarded as a multi-relationship graph formed by a plurality of entities and relationships, wherein the entities are represented by nodes, and the relationships among the entities are represented by edges. In the data structure, graphs (Graph) are composed of nodes (V ertex) and edges (Edge), but these graphs usually contain only one type of nodes and edges, and multiple relational graphs usually include multiple types of nodes and multiple types of edges. In the knowledge graph, each node represents an "Entity (Entity)", each edge represents a "relationship (relationship)" between the entities, wherein the entities refer to things in the real world, such as names of people, places, names of organizations, concepts, proper nouns, etc., and the relationship is used to express a certain Relation between different entities, such as people- "living in" -beijing, zhangsan and lie are "friends", logistic regression is "leading knowledge" of deep learning, etc. In general, entities that can be said to be trending generally include two categories, one category being those that have been mentioned more recently in some time, such as movie stars, trending television shows, etc.; the other is a relatively important entity, and the knowledge of the entity is updated frequently, such as a movie star, a variety program and the like.
In particular, the multiple relation graph may be formally represented as G ═ (V, E),where V and E represent the node set and edge set on the graph, respectively. Given triplets in G
Figure BDA0002665002370000141
Their embedding can be expressed as u, v ∈ Rd,r∈RlWhere d and l represent vector dimensions.
Further, since the data flow in the network is updated in real time, different types of data in the data flow can be analyzed according to different use environments of the graph neural network, and the data to be processed matched with the use environment of the first graph neural network is determined. For example: in a real question-answering application service scene, the first graph neural network often needs knowledge with more accurate semantics, such as 'roxyput is a famous male singer' and 'dog belongs to a pet'. Thus, the first graph neural network artificially constructs a small taxonomy-based knowledgegraph. Wherein the nodes of the first graph neural network are entities corresponding to keywords (such as the aforementioned roxyput, male, and singer), and the edges of the graph represent relationships between the nodes. In the knowledge map of the category system, the models have a relationship of 'belonged' and an 'equivalence' relationship, and the 'belonged' relationship indicates that the relationship of 'Luo X you-belonged → singer' and the like exists between entities. In this process, the data stream may select data in a form of web pages, logs, texts and/or tables from a plurality of data sources as entity candidate data. The data source includes but is not limited to one or more of a news channel, a search log and a social platform, the data source preferably selects the news channel, and the news has the characteristics of high timeliness, strong authenticity and high accuracy, so that the timeliness and the effectiveness of the data acquired from the news channel as entity candidate data can be improved, and the applicability is higher.
In some embodiments of the present invention, when the first graph neural network is a knowledge graph, the financial information can be recommended through the knowledge graph, for example, referring to fig. 4, fig. 4 is a schematic diagram of establishing the knowledge graph in the data processing method in the graph neural network provided in the embodiment of the present invention, in a stock transaction scenario, taking Tencent science, the former sea bank, Tencent H stock as an example, Tencent science, the former sea bank, Tencent H stock as a same science block, and a relationship between the three is the same block. In addition, the Tengcong science and technology, the former sea bank belongs to the deep certificate Pan, and the Tengcong H stock belongs to the Changcheng Pan. Other stock index and large disc index plate index can be added into the knowledge map in the same way, to build the knowledge map of target stock, to provide map relation structure for the next trend forecast. Wherein, the information of the same plate includes: industry affiliation (e.g., real estate), corresponding company code, administrative affiliation (e.g., Shanghai securities exchange), etc., and thus, the generated article has attribute information including at least one of the following: industry affiliation, corresponding company code, management affiliation, fluctuation amplitude, fluctuation amount, fluctuation state (whether fluctuation stopping condition occurs), fluctuation time (when the stock fluctuation stopping occurs), and hand-off rate. Because the information of the knowledge graph, such as the rise and fall amplitude, the rise and fall amount, the rise and fall stop state, the rise and fall stop time, the hand-off rate and the like, is changed in real time, the information of the knowledge graph needs to be continuously updated, so that the content of the financial information recommendation through the knowledge graph is more accurate.
Step 302: and the data processing device in the graph neural network responds to the acquired data to be processed, triggers a decoupling process and decouples the relation triples in the first graph neural network into a plurality of embedded components.
In some embodiments of the present invention, in response to the acquired data to be processed, triggering a decoupling process and decoupling the relationship triples in the first graph neural network into a plurality of embedded components may be implemented by:
determining a set of independent components that match node vector information in a relationship triplet in the first graph neural network based on semantic features of nodes in the relationship triplet; and decoupling the relation triples in the first graph neural network based on the independent component sets matched with the node vector information in the relation triples to form different embedded components matched with the triples. Wherein the ith set of multiple relational data has a phaseMatched training set TiVerification set ViTest set Qi. The ith training set is defined as a set of relationship triplets, i.e., Ti { (u)1 Ti,r1 Ti,v1 Ti),.....(un Ti,rn Ti,vn Ti) Wherein N is TiTotal number of instances of (c). The definition of the ith validation set and test set is similar to the training set. Generally, on the ith data set, the GE model will be trained on Ti to learn the new triple representation, referring to fig. 5, fig. 5 is a schematic diagram of the first graph neural network decoupling process in the embodiment of the present invention, wherein when the ith data set is trained, TiWhen present, the first graph neural network needs to update the graph-embedded representation according to these new relationship triples. Thus, for each node u e V, one may want to learn a decoupled node vector representation u, which consists of k independent components, i.e. u ∈ V1u2...uk...uK](K is 0. ltoreq. K) and uK∈RdFor representing the kth semantic aspect of node u.
For a given TiThe object of this module is to extract semantic components in u and v that are most relevant to relation r. In particular, this process can be modeled using an attention mechanism, where (u, r, v) is assigned K attention values
Figure BDA0002665002370000161
Respectively representing the probability assigned to the kth semantic component. Then, the model selects the n semantic parts with the highest attention weight. The specific features in the selected top n most relevant embedded components can then be learned using existing GE methods and the feature learning process is denoted as f. Here, f can be any graph embedding operation aimed at fusing the characteristics of nodes u and v into the selected top n relevant components.
Step 303: the data processing apparatus in the graph neural network determines graph embeddings corresponding to different embedding components based on the different embedding components matching the relationship triplets in the first graph neural network.
In some embodiments of the present invention, determining graph embeddings corresponding to different embedding components based on the different embedding components matching the relationship triplets in the first graph neural network may be accomplished by:
when the first graph neural network is a knowledge graph, determining attention parameters matched with relation triples in the first graph neural network, and normalizing the attention parameters matched with the relation triples to realize that the attention parameters represent the association degree between the edge line information in the relation triples and the corresponding embedded components. Wherein the most relevant semantic component of the triples in the knowledge-graph is directly related to the relation r. Thus, the K attention values, the Kth attention value, can be directly set for each explicit relationship r
Figure BDA0002665002370000171
Is a trainable parameter that indicates the relevance of this edge to the kth embedded component. The calculation formula for normalization of attention weight refers to formula 1:
Figure BDA0002665002370000172
in some embodiments of the invention, the method further comprises:
when the first graph neural network is based on a reconstructed knowledge graph, determining at least 2 embedded components and performing series connection processing based on node parameters in the relation triple; based on the results of the concatenation process, a normalization process is performed to achieve a determination of graph embeddings corresponding to different embedded components. When the first graph neural network is a bilinear-based knowledge graph, determining at least 2 embedded components and performing component splicing processing based on node parameters in the relation triple; based on the results of the stitching process, a convolution process is performed to achieve the determination of the graph embedding corresponding to the different embedding components. Specifically, the KGE models can be classified into two types: model based on reconstruction and method based onBilinear models. Therefore, the data processing method provided by the invention can adapt to the effectiveness of the two technologies in feature extraction. In particular, two classical KGE models can be used as f to extract features, including TransE (based on reconstruction):
Figure BDA0002665002370000173
and ConvKB (bilinear based):
Figure BDA0002665002370000174
wherein the ratio of u,
Figure BDA0002665002370000175
is the concatenation of the first n most relevant embedded components selected by node u and node v;prepresenting a p-norm normalization operation; [.....]Representing a splicing operation; cov (-) denotes a convolutional layer having M filters, an
Figure BDA0002665002370000181
Is a trainable matrix. Where f is the scoring function for the triplet (u, r, v), which tends to score valid triplets higher.
In some embodiments of the present invention, determining graph embeddings corresponding to different embedding components based on the different embedding components matching the relationship triplets in the first graph neural network may be accomplished by:
when the first graph neural network is an information network, determining a parameter splicing result in a relation triple in the first graph neural network; carrying out linear change processing on the parameter splicing result in the relation triple to form a corresponding attention parameter matched with the relation triple; and normalizing the attention parameters matched with the relation triples so as to realize that the degree of association between the sideline information in the relation triples and the corresponding embedded components is represented by the attention parameters. Wherein, since NEs typically do not provide explicit relationships, they may first be determined from the representation of node u and node v
Figure BDA0002665002370000182
In particular, the overall embedded representation of u and v may be first stitched together and then a non-linear transformation performed to compute
Figure BDA0002665002370000183
Referring to equation 2:
Figure BDA0002665002370000184
graph attention networks (GAT) is a widely used learning-embedding method in information networks, which collects information from the neighborhood of nodes and assigns different importance weights to different neighboring nodes, thereby learning a better node representation. Thus, the present model utilizes GAT as f to extract the underlying features of NE. Given target node u and neighbor node vv ∈ Nu{ } { v | v ∈ Nu }, first according to the attention weight
Figure BDA0002665002370000185
The first n most relevant component parts of each pair of nodes (u, v) are determined. When the embedded representation of the kth part of u is to be updated, only those neighbor nodes vv of u that are related to the kth part of semantics need to be considered, and the specific selection method is to see whether the first n most related semantics of (u, v) include the kth block. In this way, the neighbors of the target node can be completely decomposed into different parts to play their roles separately, and then GAT is used to update each part, with specific reference to equation 3:
Figure BDA0002665002370000191
wherein, W3∈R1×dAnd W4 ∈ Rh×dIs two trainable matrices, h is the hidden layer size in GAT, and σ is a normalization function used to compute the relative attention weight value for each neighbor in the kth component.
Step 304: and the data processing device in the graph neural network triggers an updating process based on the corresponding graph embedding result so as to update the relation triple in the initial structure of the first graph neural network and form a second graph neural network.
Therefore, different business processes in corresponding use environments can be executed by utilizing different data in the data stream through the second graph neural network. For example, the financial information recommendation in the financial information processing scenario and the financial product recommendation or prediction may be performed through the second graph neural network, and of course, the corresponding question-answering process may be performed according to different data in the news data stream.
Referring to fig. 6, fig. 6 is an optional flowchart of a data processing method in a graph neural network according to an embodiment of the present invention, where a target user may select different financial scenarios for use, and it is understood that the steps shown in fig. 6 may be executed by various electronic devices that operate a data processing apparatus in the graph neural network, for example, a dedicated terminal, an electronic device, or an electronic device cluster that performs a data processing function in the graph neural network. The following is a description of the steps shown in fig. 6.
Step 601: determining, by the update process, an incidence relation of different relation triples in an initial structure of the first graph neural network.
Step 602: and determining the relation triples needing to be updated in the initial structure of the first graph neural network based on the incidence relation of the different relation triples.
Step 603: and keeping part of semantic information in the relation triple needing to be updated unchanged, and performing data processing on the relation triple needing to be updated based on the data to be processed in the data stream to form a second graph neural network so as to realize that the semantic information of the data to be processed is represented by the updated relation triple.
Specifically, referring to fig. 7, fig. 7 is a schematic diagram illustrating a process of updating a triplet of different relationships in a first graph neural network according to an embodiment of the present invention, where the updating of the triplet of different relationships in the first graph neural network may include: 1) and (3) neighbor activation:first the module needs to determine
Figure BDA0002665002370000192
Which relationship triples in (a) need to be updated. Since most nodes are not independent in the multi-relationship graph, the newly-appeared relationship triplets are likely to affect the embedding of old neighboring nodes connected with their edges. Thus, for each relationship triplet (u, r, v), their direct and indirect neighbor triplets (i.e., one degree neighbors and two degree neighbors) may be activated. In particular, the present invention relates to a method for producing,
Figure BDA0002665002370000201
is all on the previous graph and node uuOr a triplet where nodes v have edges connected. In fact, since the degree of some nodes is larger, all neighbors are added to TiAre expensive in computing resources to train together. Thus, a selection mechanism may be utilized that updates only a portion of the relevant neighbors: that is, for each neighbor triplet, it will be activated if and only if it shares the first n semantic components of most interest with the new target triplet.
2) And (3) partial semantic updating: the present invention does not have to update all semantic embeddings of activated neighbors. For example, if a relationship triplet (u ', r ', T '). epsilon (T)1....Ti-1) Only the first n semantic components that are most concerned may need to be updated, since other semantic components are not affected, and thus do not need to be changed. The embedded representations of the corresponding nodes and edges can be updated using the GE embedding method mentioned in the decoupling module. In the training process, the model can iteratively train the related semantic components of the new relation triple and the activated neighbor relation triple. Through the training process shown in the preamble step, the graph neural network model can learn the embedded representation of new data, can effectively prevent the problem of catastrophic forgetting, and ensures the result of continuous learning of the graph neural network.
In some embodiments of the invention, the method further comprises:
determining the second iconA first loss function and a second loss function matched via a network; determining a loss function matching the second graph neural network based on the first and second loss functions; adjusting network parameters of the second graph neural network based on a loss function matched to the second graph neural network; until the loss function of the second graph neural network reaches the corresponding convergence condition, so as to realize the processing of the data to be processed in different use environments through the second graph neural network. Wherein, for the new multi-relation graph data Ti, the model can be iteratively trained on Ti and the activated adjacent relation triple thereof. The loss functions of these two parts can be expressed as L respectivelynewAnd Lold. Specifically, when the first graph neural network is a knowledge graph, determining corresponding invalid relation triples as negative example samples based on data to be processed in the data stream; determining a first loss function and a second loss function that match the second graph neural network based on the negative examples samples,
for KGE, the model can be trained using the soft separation distance loss function shown in equation 4.
Figure BDA0002665002370000211
Wherein
Figure BDA0002665002370000212
Some invalid triples obtained by negative sampling on the ith group of data are represented as negative example samples if (u, r, v) ∈ TiOtherwise, y is-1.
In some embodiments of the present invention, when the first graph neural network is an information network, determining node labels and node category numbers in the first graph neural network; determining a first loss function and a second loss function that match the second graph neural network based on node labels and node class numbers in the first graph neural network. In particular, for NEs, cross-entropy loss can be similar to GAT usage criteria and at nodesTraining corresponding graph neural networks on classification tasks, and effectively improving the robustness of the graph neural networks through negative example sample sets, wherein LnewCan be expressed as shown in equation 5:
Figure BDA0002665002370000213
wherein C refers to the category of the node, if the node label is C, y (C) is 1, otherwise y (C) is 0; n (Ti) is TiC represents the total number of categories, and W5∈R|C|×dIs a trainable matrix. For KGE and NE, LoldThat is, the sum L is used on selected old relationship tripletsnewTrained in the same manner.
In some embodiments of the present invention, determining a loss function matching the second graph neural network based on the first and second loss functions may be implemented by:
determining a constraint loss function matched with the second graph neural network; determining a weight hyperparameter of a regularization term corresponding to the constraint loss function; and determining the sum of the first loss function, the second loss function and the constraint loss function as the loss function matched with the second graph neural network based on the weight hyper-parameter of the regularization term corresponding to the constraint loss function. In particular, the less the number of semantic components of interest in the relationship, the better the decoupling effect. Therefore, a regularization term L for constraint penalty can be added by equation 6normAdjusting the sum of the attention weights of the first n selected most relevant parts to 1:
Figure BDA0002665002370000214
thus, the final loss function of the model of the present invention is L ═ Lold+Lnew+βLnormWhere β represents the weight hyperparameter of the regularization term.
By the data processing method in the graph neural network, continuous learning can be achieved on new data, meanwhile, the phenomenon that old learned knowledge is forgotten can be reduced, and the use experience of a user is facilitated. Specifically, referring to fig. 8, fig. 8 is a schematic diagram illustrating a test effect of the data processing method in the graph neural network according to the embodiment of the present invention, wherein as the number of new relationship triples increases, the data processing method in the graph neural network provided by the present application realizes continuous learning, although the performance of the graph neural network and the performance of the related art model are degraded to some extent. Compared with the related art, the data processing method in the graph neural network provided by the invention achieves obviously better results, so that the data processing method in the graph neural network provided by the invention is more effective in processing continuous multi-relation graph data learning for decoupling and dynamically updating the relation triples, and is beneficial to improving the use experience of users.
The following describes a chat corpus tagging method provided by an embodiment of the present invention with a chat corpus tagging model encapsulated in a wechat applet, where fig. 9 is a schematic diagram of a data processing application environment in a neural network in an embodiment of the present invention, where as shown in fig. 9, along with the development of a human-computer interaction technology, more and more intelligent products based on the human-computer interaction technology, such as a chat robot (chat bot) and the like, come into play. The intelligent products can carry out chat communication with the users and generate corresponding answer information according to the questions of the users. However, in conventional techniques, neural networks based on pre-trained graphs are typically used to select appropriate responses based on input and context. In the process, chat FAQs are constructed, request-response pairs (Query-Reply Pair) are stored, and then Reply of similar Query is returned from the pre-trained graph neural network FAQs in a retrieval mode. Therefore, the intellectualization of the chat robot is limited by the quality and quantity of the FAQ library, and the chat robot cannot adapt to the data stream in the changing network, which will affect the user experience.
To solve this problem, referring to fig. 10, fig. 10 is an optional flowchart of a data processing method in a graph neural network provided in an embodiment of the present invention, which can implement processing of data in the graph neural network deployed in a question-answering server, and specifically includes the following steps:
step 1001: a graph neural network structure of an initial state in the question-answering server is determined.
Step 1002: triggering a decoupling process executed by a decoupling module, decoupling the relational triples into a plurality of embedded components, and learning graph embedding in different components.
Step 1003: and triggering an updating process executed by the updating module, and updating the decoupled graph embedding according to the data corresponding to the new relation triple.
Step 1004: and determining a corresponding loss function, and training the graph neural network to determine the model parameters of the new graph neural network in the question-answering server.
Step 1005: and receiving the question information sent by the terminal, and forming a corresponding answer through a new graph neural network.
Referring to fig. 11, fig. 11 is a schematic diagram illustrating that the data processing method in the neural network of the graph provided by the present application implements intelligent question answering, in some embodiments of the present invention, where the neural network of the graph is taken as a knowledge graph, and when the neural network of the first graph is taken as a knowledge graph and the usage environment of the neural network of the graph in the initial state is used for processing question answering information, a first knowledge graph corresponding to a target object in the question answering information is determined based on corresponding question answering information; determining updated data matched with the target object in the network information based on the target object; and decoupling the first knowledge graph of the target object, updating different relation triples in the first knowledge graph based on the updating data to form a second knowledge graph, so as to realize answering of the question information received by the terminal through the second knowledge graph. Thus, referring to fig. 11, in the process of implementing intelligent question answering by the data processing method in the graph neural network provided in the present application, it is known that some relevant triplets of the user nodes bark Obama and Michelle Obama are mainly related to three concepts: "family", "profession" and "location". If a new relation triple information (Michelle Obama, Daughter, Malia Ann Obama) appears in the conversation, only some information related to 'family' in Barack Obama needs to be updated, and the information such as 'occupation' or 'place' of the user does not need to be learned and updated. After updating, we can further conclude that the triplet (bark Obama, Daughter, Malia Ann Obama) is also true. Therefore, by operating the data processing method in the graph neural network provided by the invention, the knowledge reserve of the system can be continuously updated in the conversation process, and the reply can be more accurate.
Referring to fig. 12, fig. 12 is a schematic diagram illustrating a process of implementing financial information recommendation by a data processing method in a neural network according to an embodiment of the present invention, and in conjunction with the embodiment shown in the foregoing fig. 4, in a process of building a neural network, based on trend hidden variables of target stocks, plates, and discs and a knowledge graph of the target stocks obtained in the preceding steps, further, financial information (e.g., stock products, plate information) can be recommended by the knowledge graph of the stocks. Furthermore, the predicted trend of stocks, plates and large disks can be obtained by inputting the information in the stock map neural network into a trend prediction classifier. The tench science and technology of target nodes and some related triplets of the former sea bank are known to be mainly related to three concepts: "stock", "place on market" and "plate information". If a new relation triple information (former sea bank, oil price rising, fund buying) appears in the conversation, only some information related to the oil price rising in Tencent science and technology needs to be updated, and the information such as stock codes or stockholder information does not need to be learned and updated. After updating, we can further conclude that triples (Tencent science, stock codes, plate upsets) are also true. Therefore, by operating the data processing method in the graph neural network provided by the invention, the knowledge reserve of the system can be continuously updated in the financial information recommendation process, and the recommendation of the financial information and the stock change prediction can be more accurate.
The beneficial technical effects are as follows:
the embodiment of the invention obtains the initial structure of the first graph neural network and the data to be processed in the data stream; in response to the acquired data to be processed, triggering a decoupling process and decoupling relationship triples in the first graph neural network into a plurality of embedded components; determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network; based on the corresponding graph embedding result, an updating process is triggered to update the relation triple in the initial structure of the first graph neural network to form a second graph neural network, so that the graph neural network is utilized to process dynamic data, continuous learning of the graph neural network can be realized in different data to form a new graph neural network, and meanwhile, the acquired knowledge of the initial graph neural network is kept, so that the richness and the foresight of data processing can be improved, and the use experience of a user is improved.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (15)

1. A method of data processing in a graph neural network, the method comprising:
acquiring an initial structure of a first graph neural network and data to be processed in a data stream;
in response to the acquired data to be processed, triggering a decoupling process and decoupling relationship triples in the first graph neural network into a plurality of embedded components;
determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network;
and triggering an updating process based on the corresponding graph embedding result so as to update the relation triple in the initial structure of the first graph neural network and form a second graph neural network, so that different business processes in corresponding use environments are executed by using different data in the data stream through the second graph neural network.
2. The method of claim 1, wherein the obtaining the initial structure of the first graph neural network and the data to be processed in the data stream comprises:
determining an edge information set and a node information set in the first graph neural network based on the using environment of the first graph neural network;
determining a relationship triplet in an initial structure of the first graph neural network based on the edge information set and the node information set;
analyzing different types of data in the data stream based on the using environment of the first graph neural network, and determining to-be-processed data matched with the using environment of the first graph neural network.
3. The method of claim 1, wherein triggering a decoupling process and decoupling relationship triples in a first graph neural network into a plurality of embedded components in response to the acquired data to be processed comprises:
determining a set of independent components that match node vector information in a relationship triplet in the first graph neural network based on semantic features of nodes in the relationship triplet;
and decoupling the relation triples in the first graph neural network based on the independent component sets matched with the node vector information in the relation triples to form different embedded components matched with the triples.
4. The method of claim 1, wherein determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network comprises:
determining attention parameters that match relationship triplets in the first graph neural network when the first graph neural network is a knowledge graph,
and normalizing the attention parameters matched with the relation triples so as to realize that the degree of association between the sideline information in the relation triples and the corresponding embedded components is represented by the attention parameters.
5. The method of claim 4, further comprising:
when the first graph neural network is based on a reconstructed knowledge graph, determining at least 2 embedded components and performing series connection processing based on node parameters in the relation triple;
based on the results of the concatenation process, a normalization process is performed to achieve a determination of graph embeddings corresponding to different embedded components.
6. The method of claim 4, further comprising:
when the first graph neural network is a bilinear-based knowledge graph, determining at least 2 embedded components and performing component splicing processing based on node parameters in the relation triple;
based on the results of the stitching process, a convolution process is performed to achieve the determination of the graph embedding corresponding to the different embedding components.
7. The method of claim 1, wherein determining graph embeddings corresponding to different embedding components based on the different embedding components matching relationship triplets in the first graph neural network comprises:
when the first graph neural network is an information network, determining a parameter splicing result in a relation triple in the first graph neural network;
carrying out linear change processing on the parameter splicing result in the relation triple to form a corresponding attention parameter matched with the relation triple;
and normalizing the attention parameters matched with the relation triples so as to realize that the degree of association between the sideline information in the relation triples and the corresponding embedded components is represented by the attention parameters.
8. The method of claim 1, wherein triggering an update process based on the corresponding graph embedding result to update the relationship triples in the initial structure of the first graph neural network to form a second graph neural network comprises:
determining, by the update process, an incidence relation of different relation triples in an initial structure of the first graph neural network;
determining a relation triple needing to be updated in the initial structure of the first graph neural network based on the incidence relation of the different relation triples;
and keeping part of semantic information in the relation triple needing to be updated unchanged, and performing data processing on the relation triple needing to be updated based on the data to be processed in the data stream to form a second graph neural network so as to realize that the semantic information of the data to be processed is represented by the updated relation triple.
9. The method of claim 1, further comprising:
determining a first loss function and a second loss function that match the second graph neural network;
determining a loss function matching the second graph neural network based on the first and second loss functions;
adjusting network parameters of the second graph neural network based on a loss function matched to the second graph neural network;
until the loss function of the second graph neural network reaches the corresponding convergence condition, so as to realize the processing of the data to be processed in different use environments through the second graph neural network.
10. The method of claim 9, wherein determining a first loss function and a second loss function that match the second graph neural network comprises:
when the first graph neural network is a knowledge graph, determining corresponding invalid relation triples as negative example samples based on data to be processed in the data stream;
determining a first loss function and a second loss function that match the second graph neural network based on the negative examples samples, or,
when the first graph neural network is an information network, determining node labels and node category quantity in the first graph neural network;
determining a first loss function and a second loss function that match the second graph neural network based on node labels and node class numbers in the first graph neural network.
11. The method of claim 9, wherein determining a loss function that matches the second graph neural network based on the first and second loss functions comprises:
determining a constraint loss function matched with the second graph neural network;
determining a weight hyperparameter of a regularization term corresponding to the constraint loss function;
and determining the sum of the first loss function, the second loss function and the constraint loss function as the loss function matched with the second graph neural network based on the weight hyper-parameter of the regularization term corresponding to the constraint loss function.
12. The method of claim 1, further comprising:
when the first graph neural network is a knowledge graph and the using environment of the first graph neural network is question answering information processing,
determining a first knowledge graph corresponding to a target object in the question answering information based on the corresponding question answering information;
determining updated data matched with the target object in the network information based on the target object;
and decoupling the first knowledge graph of the target object, updating different relation triples in the first knowledge graph based on the updating data to form a second knowledge graph, so as to realize answering of the question information received by the terminal through the second knowledge graph.
13. A data processing apparatus in a graph neural network, the apparatus comprising:
the information transmission module is used for acquiring an initial structure of the first graph neural network and data to be processed in the data stream;
the information processing module is used for responding to the acquired data to be processed, triggering a decoupling process and decoupling the relation triples in the first graph neural network into a plurality of embedded components;
the information processing module is used for determining graph embedding corresponding to different embedding components based on the different embedding components matched with the relation triples in the first graph neural network;
the information processing module is configured to trigger an update process based on a corresponding graph embedding result to update the relationship triplet in the initial structure of the first graph neural network to form a second graph neural network, so as to implement different service processes in corresponding use environments by using different data in the data stream through the second graph neural network.
14. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor for implementing a data processing method in a neural network of any one of claims 1 to 12 when executing the executable instructions stored in the memory.
15. A computer-readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, implement a data processing method in a graph neural network according to any one of claims 1 to 12.
CN202010915884.9A 2020-09-03 2020-09-03 Data processing method, device and equipment in graph neural network and storage medium Pending CN112257841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010915884.9A CN112257841A (en) 2020-09-03 2020-09-03 Data processing method, device and equipment in graph neural network and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010915884.9A CN112257841A (en) 2020-09-03 2020-09-03 Data processing method, device and equipment in graph neural network and storage medium

Publications (1)

Publication Number Publication Date
CN112257841A true CN112257841A (en) 2021-01-22

Family

ID=74224212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010915884.9A Pending CN112257841A (en) 2020-09-03 2020-09-03 Data processing method, device and equipment in graph neural network and storage medium

Country Status (1)

Country Link
CN (1) CN112257841A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989133A (en) * 2021-03-29 2021-06-18 广州水沐青华科技有限公司 Graph data modeling power fingerprint identification method, storage medium and system for electrical equipment
CN113434692A (en) * 2021-06-22 2021-09-24 上海交通大学医学院附属仁济医院 Method, system and equipment for constructing graph neural network model and recommending diagnosis and treatment scheme
CN113504906A (en) * 2021-05-31 2021-10-15 北京房江湖科技有限公司 Code generation method and device, electronic equipment and readable storage medium
CN114359912A (en) * 2022-03-22 2022-04-15 杭州实在智能科技有限公司 Software page key information extraction method and system based on graph neural network
CN114881329A (en) * 2022-05-09 2022-08-09 山东大学 Tire quality prediction method and system based on guide map convolution neural network
WO2023056841A1 (en) * 2021-10-08 2023-04-13 北京字节跳动网络技术有限公司 Data service method and apparatus, and related product

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112989133A (en) * 2021-03-29 2021-06-18 广州水沐青华科技有限公司 Graph data modeling power fingerprint identification method, storage medium and system for electrical equipment
CN112989133B (en) * 2021-03-29 2022-10-04 广州水沐青华科技有限公司 Graph data modeling power fingerprint identification method, storage medium and system for electrical equipment
CN113504906A (en) * 2021-05-31 2021-10-15 北京房江湖科技有限公司 Code generation method and device, electronic equipment and readable storage medium
CN113434692A (en) * 2021-06-22 2021-09-24 上海交通大学医学院附属仁济医院 Method, system and equipment for constructing graph neural network model and recommending diagnosis and treatment scheme
CN113434692B (en) * 2021-06-22 2023-08-01 上海交通大学医学院附属仁济医院 Method, system and equipment for constructing graphic neural network model and recommending diagnosis and treatment scheme
WO2023056841A1 (en) * 2021-10-08 2023-04-13 北京字节跳动网络技术有限公司 Data service method and apparatus, and related product
CN114359912A (en) * 2022-03-22 2022-04-15 杭州实在智能科技有限公司 Software page key information extraction method and system based on graph neural network
CN114359912B (en) * 2022-03-22 2022-06-24 杭州实在智能科技有限公司 Software page key information extraction method and system based on graph neural network
CN114881329A (en) * 2022-05-09 2022-08-09 山东大学 Tire quality prediction method and system based on guide map convolution neural network

Similar Documents

Publication Publication Date Title
CN111444428B (en) Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium
CN111931062B (en) Training method and related device of information recommendation model
CN111241311B (en) Media information recommendation method and device, electronic equipment and storage medium
CN112257841A (en) Data processing method, device and equipment in graph neural network and storage medium
CN112131350B (en) Text label determining method, device, terminal and readable storage medium
CN113590849A (en) Multimedia resource classification model training method and multimedia resource recommendation method
CA3194708A1 (en) Diagnosing sources of noise in an evaluation
CN114565104A (en) Language model pre-training method, result recommendation method and related device
Hardt et al. Patterns, predictions, and actions: Foundations of machine learning
US12020267B2 (en) Method, apparatus, storage medium, and device for generating user profile
Wen et al. Neural attention model for recommendation based on factorization machines
CN109766454A (en) A kind of investor's classification method, device, equipment and medium
CN112580352B (en) Keyword extraction method, device and equipment and computer storage medium
CN111859149A (en) Information recommendation method and device, electronic equipment and storage medium
Alshmrany Adaptive learning style prediction in e-learning environment using levy flight distribution based CNN model
CN113326374B (en) Short text emotion classification method and system based on feature enhancement
Zhang et al. Multi-scale and multi-channel neural network for click-through rate prediction
CN116541517A (en) Text information processing method, apparatus, device, software program, and storage medium
Feng et al. Ontology semantic integration based on convolutional neural network
CN115482021A (en) Multimedia information recommendation method and device, electronic equipment and storage medium
Asim et al. Predicting influential blogger’s by a novel, hybrid and optimized case based reasoning approach with balanced random forest using imbalanced data
CN116955591A (en) Recommendation language generation method, related device and medium for content recommendation
Harris Searching for Diverse Perspectives in News Articles: Using an LSTM Network to Classify Sentiment.
Setiono et al. Automatic knowledge extraction from survey data: Learning M-of-N constructs using a hybrid approach
Qiu et al. Local Interpretable Explanations for GBDT

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination