CN111178515A - Node coding method of graph neural network, node coding terminal and electronic equipment - Google Patents
Node coding method of graph neural network, node coding terminal and electronic equipment Download PDFInfo
- Publication number
- CN111178515A CN111178515A CN202010277812.6A CN202010277812A CN111178515A CN 111178515 A CN111178515 A CN 111178515A CN 202010277812 A CN202010277812 A CN 202010277812A CN 111178515 A CN111178515 A CN 111178515A
- Authority
- CN
- China
- Prior art keywords
- graph neural
- sampling
- neural network
- nodes
- path
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning 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)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The embodiment of the invention discloses a node coding method of a graph neural network, a node coding terminal and electronic equipment, wherein the method comprises the following steps: determining a feature intersection between the at least two graph neural networks, the feature intersection having a number of nodes; and performing path sampling on the at least two graph neural networks alternately for a plurality of times, obtaining corresponding sampling paths after each path sampling, iteratively updating vector representations of all nodes in the at least two graph neural networks according to the sampling paths, initializing all nodes of feature intersection in the graph neural networks after alternation according to the updated vector representations of all nodes in the feature intersection set in the graph neural networks before alternation, and finishing node coding. The method makes up for the vacancy of application of federal learning on the data of the neural network of the graph. Compared with the method that only one side of graph neural network data is used, the method can utilize more graph information and encode more objective node representation.
Description
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a node coding method, a node coding terminal and electronic equipment of a graph neural network.
Background
Federal learning refers to efficient machine learning among multiple participants or multiple computing nodes on the premise of guaranteeing information security during big data exchange, protecting terminal data and personal data privacy and guaranteeing legal compliance.
However, the inventor of the present disclosure found in the technical research process that at least the following problems existed in the prior art: regardless of the image, text, or tabular structured data, the features of the samples applied by current federal learning are relatively independent and complete, i.e., there is no coupling between samples. However, when the data processed by the federal learning is network data, since the nodes in the network data are connected with each other, the nodes are not only the analyzed samples but also the characteristics of the relevant nodes. The nodes are coupled with each other, and the connection of the nodes defines the representation of the nodes. In the prior federal learning data processing, data of all parties are kept secret, and if only one party of local network construction node representation is used, distortion is inevitable.
Disclosure of Invention
In order to solve the technical problem that distortion is caused if only one local network is used for constructing node representation in the prior art, the embodiment disclosed by the invention provides a node coding method, a node coding terminal and electronic equipment of a graph neural network.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
a node encoding method of a graph neural network, the number of the graph neural networks being at least two, the node encoding method comprising:
determining a feature intersection between the at least two graph neural networks, the feature intersection having a number of nodes;
and performing path sampling on the at least two graph neural networks alternately for a plurality of times, obtaining a corresponding sampling path after each path sampling, iteratively updating vector representations of all nodes in the at least two graph neural networks according to the sampling path, initializing all nodes of feature intersection in the graph neural networks after alternation according to the vector representations updated by all nodes of feature intersection in the graph neural networks before alternation, and finishing node coding.
The at least two graph neural networks comprise a first graph neural network and a second graph neural network, the path sampling is alternately performed on the at least two graph neural networks for a plurality of times, a corresponding sampling path is obtained after each path sampling, the vector representations of all nodes in the at least two graph neural networks are iteratively updated according to the sampling path, all nodes of the feature intersection in the graph neural networks before alternation are initialized according to the vector representations updated by all nodes of the feature intersection in the graph neural networks before alternation, and the step of completing node coding comprises the following steps:
performing path sampling on any one of the first graph neural network and the second graph neural network to obtain a sampling path, and iteratively updating vector representations of all nodes in any one according to the sampling path;
initializing all nodes in the feature intersection of the other one of the first graph neural network and the second graph neural network according to the vector representations of all nodes in the feature intersection of any one of the first graph neural network and the second graph neural network to obtain the vector representations of all nodes in the feature intersection;
performing path sampling on the other one of the first graph neural network and the second graph neural network, obtaining a sampling path, and iteratively updating vector representations of all nodes in the other one according to the sampling path; and
initializing vector representations of all nodes in the feature intersection of any one according to the vector representations of all nodes in the feature intersection of the other one, and returning to the step of performing path sampling on any one of the first graph neural network and the second graph neural network until the encoding is finished.
Before path sampling is performed on any one of the first graph neural network and the second graph neural network for the first time, all nodes in feature intersection sets in any one are initialized by using random values, and initial values of vector representations of all the nodes are obtained.
The performing path sampling, obtaining a sampling path comprising:
in the first graph neural network or the second graph neural network, path sampling is executed for a plurality of times in a random walk mode, and a plurality of sampling paths are obtained; and
recording all sampling paths and outputting the sampling paths as sampling path texts.
In the first graph neural network or the second graph neural network, the step of performing path sampling for a plurality of times in a random walk manner to obtain a plurality of sampling paths includes:
determining a path starting point, wherein the path starting point is any node in the first graph neural network or the second graph neural network; and
performing path sampling in the first graph neural network or the second graph neural network in a random walk mode; and returning to the step of determining the starting point of the path until the path sampling is finished.
The step of iteratively updating the vector representations of all nodes in either of the plurality of nodes according to the sampling path and the step of iteratively updating the vector representations of all nodes in the other of the plurality of nodes according to the sampling path each comprise:
acquiring the sampling path text and the vector representation of the node; and
and sending the sampling path text and the vector representations of the nodes to word2vec model training, and iteratively updating the vector representations of all the nodes.
One of the first graph neural network and the second graph neural network has a true label for the node.
A node-encoding terminal of a graph neural network, comprising:
a receiving unit for receiving at least two graph neural networks;
an obtaining unit, configured to determine a feature intersection between the at least two graph neural networks, where the feature intersection has a plurality of nodes; and
and the coding unit is used for alternately performing path sampling on the at least two graph neural networks for a plurality of times, obtaining a corresponding sampling path after each path sampling, iteratively updating the vector representations of all nodes in the at least two graph neural networks according to the sampling path, initializing all nodes of the feature intersection in the graph neural networks after alternation according to the vector representations updated by all nodes of the feature intersection in the graph neural networks before alternation, and finishing node coding.
An electronic device, comprising:
a processor; and
a memory for storing computer program instructions;
wherein, when the computer program is loaded and run by the processor, the processor performs the node encoding method of the graph neural network as described above.
Compared with the prior art, the embodiment of the disclosure has the following beneficial effects:
and in at least 2 graph neural networks for carrying out federal learning, the vector representation of the nodes in the feature intersection is assisted to be adjusted through the information of the graph neural networks. And the nodes in the feature intersection are used as media, and are specially initialized through the node vector representation learned from the histogram neural network, so that the aim of information communication is fulfilled. After information exchange, each node is coded based on multi-party data, the coded representation of the node obtained by coding also has higher consistency, and meanwhile, the vector representation of the node is more objective.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a system architecture diagram of an application scenario of a node coding method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a node encoding method of one embodiment of the present invention;
FIG. 3 is a flowchart illustrating the step S200 according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of two neural networks of the present invention;
fig. 5 is a schematic diagram of a node encoding terminal according to an embodiment of the present invention;
FIG. 6 is an electronic device framework diagram of one embodiment of the invention;
FIG. 7 is a server framework diagram of one embodiment of the invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
The 'machine learning' is one of the core research fields of artificial intelligence, and how to continue machine learning on the premise of protecting data privacy and meeting legal compliance requirements is a trend which is currently concerned by the field of machine learning. The Federal study utilizes a technical algorithm to encrypt the built model, the two Federal parties can train the model to obtain model parameters under the condition that own Data is not given, the Federal study protects the privacy of user Data through a parameter exchange mode under an encryption mechanism, the Data and the model can not be transmitted, and the Data of the other party can not be guessed reversely, so that the possibility of leakage does not exist in a Data layer, and a stricter Data Protection law such as General Data Protection Regulation (GDPR) and the like is not violated, and the Data privacy can be guaranteed while the Data integrity is kept to a higher degree. Currently, the more common federal studies in the industry are: horizontal federal learning and vertical federal learning. Horizontal federal learning is that data features used by each party in modeling have the same dimension, but each has different samples and labels. In the longitudinal federal study, all the parties have some samples which can correspond to each other, but the feature dimensions of all the parties are different. However, when the data processed by the federal learning is network data, since the nodes in the network data are connected with each other, the nodes are not only the analyzed samples but also the characteristics of the relevant nodes. The nodes are coupled with each other, and the connection of the nodes defines the representation of the nodes. In the prior federal learning data processing, data of all parties are kept secret, and if only one party of local network construction node representation is used, distortion is inevitable. To address this issue, various embodiments of the model parameter training method based on federated learning of the present invention are presented.
In the embodiment of the present invention, the terminal, the electronic device, and the storage medium are all applicable to the system architecture shown in fig. 1, which includes at least one terminal, each of which is a data owner. At least one terminal learns each other by establishing a federal learning model.
A terminal may be a User Equipment (UE) such as a Mobile phone, a smart phone, a laptop, a digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, a Mobile Station (MS), etc.
The data owner holds sample data which is the data of the neural network of the graph, and the sample data held by the data owner is the data generated by the operation of the business system of the data owner, and the data can be represented by a network. Each node in the network exists independently of each other and is coupled to each other. Meanwhile, some sample data may also contain tag data.
Referring to fig. 1 and 4, node coding is performed by taking as an example that the system includes two data owners, i.e., a first graph neural network a of a first terminal and a second graph neural network B of a second terminal. The first graph neural network A and the second graph neural network B have different sample data dimensions, and the characteristic dimensions are partially overlapped. The first graph neural network A is a graph neural network generated by the operation of the first terminal and comprises M, N, J, E, H, L, K, P, I, Q nodes, R and the like which are coupled with each other, and the second graph neural network B is a graph neural network generated by the operation of the second terminal and comprises A, B, C, D, E, F, G, H, J nodes, O and the like which are coupled with each other. And there is a feature intersection, nodes J, E and H, of the first graph neural network a and the second graph neural network B. Wherein one of the first graph neural network A and the second graph neural network B has a real label of the node.
Fig. 2 is a schematic flowchart of a node encoding method of a graph neural network according to an embodiment of the present invention, where the method includes:
step S100: a feature intersection of the first graph neural network and the second graph neural network is determined, the feature intersection having a number of nodes.
Before performing this step, the first terminal and the second terminal establish a communication connection. Thus, the first and second terminals determine the feature intersection of the first and second graph neural networks a and B, i.e. nodes J, E and H, from the first and second graph neural networks a and B, respectively (only for the application scenario shown in fig. 4).
Step S200: and performing path sampling on the first graph neural network and the second graph neural network alternately for a plurality of times, acquiring corresponding sampling paths after each path sampling, iteratively updating vector representations of all nodes in the first graph neural network and the second graph neural network according to the sampling paths, initializing all nodes of feature intersection in the graph neural network after alternation according to the updated vector representations of all nodes in the feature intersection in the graph neural network before alternation, and finishing node coding.
Step S200 is a main step of encoding, and in this step, longitudinal federal learning is applied to training of the graph neural network. And the vector representation of the nodes in the feature intersection is adjusted in an auxiliary manner through the information of the histogram neural network. And the nodes in the feature intersection are used as media, and are specially initialized through the node vector representation learned from the histogram neural network, so that the aim of information communication is fulfilled. After information exchange, each node is coded based on multi-party data, the coded representation of the node obtained by coding also has higher consistency, and meanwhile, the vector representation of the node is more objective.
In this step, the first terminal and the second terminal may alternately sample the graph neural networks of both through the third terminal, then train the vector characterization of the nodes in the feature intersection in the corresponding graph neural network on which the path sampling operation is performed, and update the feature vectors of the corresponding nodes in the feature intersection in the iterative other graph neural network.
It is noted that, on the premise that the data interaction between the first terminal and the second terminal does not violate the law, the first terminal and the second terminal may perform step 200 independently of the third terminal. At this time, the node coding method provided by the embodiment of the invention omits a corresponding data encryption link in data interaction, and puts all calculation power into model training, so that the efficiency is higher compared with general federal learning.
Optionally, referring to fig. 3, step S200 specifically includes the following steps:
step S201: performing path sampling on any one of the first graph neural network and the second graph neural network, obtaining a sampling path, and updating vector representations of all nodes in any one according to the sampling path.
In this step, the graph neural network for which the path sampling is performed is referred to as (or referred to as) an active network. The selection of the active network is not limited and may be either of the first graph neural network a and the second graph neural network B. For example, taking the second graph neural network B as an active network, sampling from H to obtain one of the paths: h- > D- > C- > B- > A, and a path can also be obtained: h- > D- > E, or one of the paths is obtained from J: j- > O. The vector representation of all nodes in the iterative second graph neural network B is then updated based on the information obtained for these sampled paths.
Optionally, in order to make the information gathered by the path collection more possible, the step 201 includes the following steps:
step S2011: and in the first graph neural network or the second graph neural network, path sampling is performed for a plurality of times in a random walk mode until the path sampling is finished. The confirmation of the end of the path sampling can be that the sampling times reach a set threshold value, or that each node (except for an isolated node) in the active network appears in at least one path.
In this step, i.e., in an active network, path sampling is not predefined, and in the acquisition process, a sampling path is obtained by random walk. The length of the sampling path is also not limited. For example, taking the second graph neural network B as the active network, starting from H, a path is obtained by sampling along the coupling relationship between the nodes: h- > D- > G- > C. It is easy to understand that although random walk, the sampling path obtained by each path sampling is different.
Specifically, the step S2011 includes the following steps:
step S20111: and determining a path starting point, wherein the path starting point is any node in the active network.
With any node as a starting point, the obtained sampling path may have a large amount of paths that need to be sampled in order to include all nodes in the feature intersection, and therefore, as a preferred embodiment, the sampling amount may be reduced by directly starting with any node in the feature intersection.
Step S20112: in the active network (the first graph neural network or the second graph neural network), path sampling is performed in a random walk manner.
In order to take into account that the sampled paths include all nodes, it is preferable that all the paths are sampled based on the same starting point in this step. For example, based on starting point H: path H- > D- > G- > C, path H- > D- > C- > B- > A, and so on.
Returning to step S20111, steps S20111-S20112 are executed circularly, and a new path starting point is determined circularly each time until path sampling is completed.
It should be noted that, when sampling a path, the desired path includes all nodes, so as to update the vector characterization for all nodes in the network. However, referring to fig. 4, the node H in the neural network of the first diagram is an isolated node, and there is no coupling relationship with any node, so there is no node H in all the obtained paths, which is present or allowed in practical applications, and the presence of the isolated node does not affect the encoding of the present invention. An isolated node exists in a certain network, and although the vector representation of the node is not updated in the network, after the active network is switched, the vector representation of the node is updated in a new active network.
As step S2012: and recording all sampling paths, outputting all sampling paths as sampling path texts, and updating vector representations of all nodes in the active network (any one of the nodes).
In this step, specifically, the sampling path text and the vector representations of the nodes are input into a word2vec model for training, and the vector representations of all the nodes are updated iteratively.
In the step, the sampling path text in the previous step and the vector representation of the node needing to be updated and iterated are sent to a word2vec model, a new vector representation of each node is trained through the word2vec, and the new vector representation is used for replacing the old vector representation of each node.
Step 202: initializing all nodes in the feature intersection of the other one of the first graph neural network and the second graph neural network according to the vector characterization of all nodes in the feature intersection of any one of the first graph neural network and the second graph neural network to obtain the vector characterization of all nodes in the feature intersection.
In the step, an active network is switched, and all nodes of the feature intersection in the switched active network are initialized by using the vector representation of the nodes in the feature intersection trained in the previous step, namely, the corresponding node representation is specially initialized through the node representation learned from the other network, so that the aim of information exchange is fulfilled.
For example, after updating the vector representations of the nodes J, E and H in the second graph neural network B, in the next step, the third terminal sends information to the first terminal, or after the first terminal directly receives the updated information from the second terminal, the first terminal actively updates the vector representations of the nodes J, E and H in the first graph neural network a synchronously.
Step 203: performing path sampling on the other of the first graph neural network and the second graph neural network, obtaining a batch of sampling paths, and updating vector representations of all nodes in the other according to the sampling paths.
After synchronously updating the vector representations of the nodes J, E and H in the first graph neural network in the previous step, the third terminal or the first terminal performs path sampling based on the updated first graph neural network. The path sampling and the vector representation updating of the nodes are described in detail above and will not be described herein again.
Step 204: and initializing the vector representations of all the nodes in the feature intersection of any one according to the vector representations of all the nodes in the feature intersection of the other one, returning to the step S201, and circularly executing the steps S201-S204 until the coding is completed.
In this step, the nodes J, E and H in the second graph neural network B are updated based on the first graph neural network a, and then the step of performing path sampling on either of the first graph neural network and the second graph neural network is returned until the encoding is finished.
Preferably, the number of times of loop execution of steps 201 to 204 is set before step 201, for example, K =18 times of loop execution.
In addition, before path sampling is performed on any one of the first graph neural network and the second graph neural network for the first time, all nodes in feature intersection sets in any one are initialized by using random values, and initial values of vector representations of all the nodes are obtained.
Referring to fig. 4, in one specific implementation scenario, the method includes the following steps:
1. initializing nodes J, E and H in feature intersections of the first graph neural network and the second graph neural network using random values to obtain an initial node vector: ejB= Ej0、EeB= Ee0、EhB= Eh0。
2. And taking the second graph neural network B as an active network, and executing path sampling in the second graph neural network in a random walk mode to obtain a batch of sampling paths.
3. Outputting the obtained batch of sampling paths as texts, training the vector representation of each node in the second graph neural network B by using a word2vec model, and updating the vector representation of each node by using a new vector, namely EjB= Ej1、EeB=Ee1、EhB=Eh1。
4. Switching an active network, regarding the first graph neural network A as the active network, using the vector representation of each node in the feature intersection trained in the previous step to initialize the corresponding node of the first graph neural network: ejA=EjB= Ej1、EeA=EeB=Ee1、EhA=EhB=Eh1。
5. Repeat steps 2-5 k times, EjA=EjB= EjK、EeA=EeB=EeK、EhA=EhB=EhK. And finishing node coding.
The invention mainly utilizes the anchor points in the intersection as media, and carries out special initialization on the anchor point representation through the node representation learned from the network of the other side, thereby achieving the aim of information communication. For example, the information of the b network assists in adjusting the characterization of the anchor point and further influences other nodes in the a network. The consistency of node characterization among a plurality of networks is ensured while information is transferred.
The advantages of the invention are further illustrated herein in one particular application. This model plays a significant role in the evaluation of business credit in the cooperation of a company and a bank.
The company maintains the whole amount of enterprise investment network data and basic enterprise information, and periodically executes updating, and the bank has detailed capital flow records of part of enterprises. The full amount of data of the company can provide background information of the enterprise for the cooperative, and the capital flow of the enterprise can well explain the operation condition of the enterprise. However, huge full-scale data is not easy to transmit, and the fund flow of the cooperative bank is confidential data and cannot be leaked. Both parties have a network, the investment network of the company and the transaction network of the bank. The invention utilizes deep learning to model on an investment network and injects enterprise information in the network into the characterization vectors of the nodes. Through the scheme, the commonly involved enterprises are used as anchor points, and the basic information of the enterprises is provided for the capital flow network model of the business side, so that the basic information representation of the enterprises can be combined for further learning and representation optimization. In turn, the anchor point representation provided after the bank side model is optimized also provides partial detail information for the investment network model of the company so as to modify the relevant nodes. The mutual benefit and win-win situation is achieved on the premise that the privacy is not revealed.
In order to better implement the above-mentioned aspects of the embodiments of the present invention, the following also provides related terminals for implementing the above-mentioned aspects. Referring to fig. 5, an embodiment of the present application provides a node encoding terminal of a graph neural network, including:
a receiving unit 501, configured to receive the first graph neural network and the second graph neural network.
An obtaining unit 502 is configured to determine a feature intersection of the first graph neural network and the second graph neural network, where the feature intersection has a plurality of nodes.
The encoding unit 503 is configured to perform path sampling on the first graph neural network and the second graph neural network alternately for several times, obtain a corresponding sampling path after each path sampling, and iteratively update vector representations of all nodes in the first graph neural network and the second graph neural network according to the sampling path to complete node encoding.
It should be noted that, in the present embodiment, the method or the terminal of the present invention is described by taking two neural networks as an example, but it is easy to understand that the method or the structure described in each embodiment of the present invention is also applicable to a scenario with more than two neural networks. More generally, the node coding method of the present invention comprises the steps of:
determining a feature intersection between the at least two graph neural networks, the feature intersection having a number of nodes; and
and performing path sampling on the at least two graph neural networks alternately for a plurality of times, obtaining a corresponding sampling path after each path sampling, iteratively updating vector representations of all nodes in the at least two graph neural networks according to the sampling path, initializing all nodes of feature intersection in the graph neural networks after alternation according to the vector representations updated by all nodes of feature intersection in the graph neural networks before alternation, and finishing node coding.
The invention discloses a node coding terminal of a graph neural network, which comprises:
a receiving unit for receiving at least two graph neural networks;
an obtaining unit, configured to determine a feature intersection between the at least two graph neural networks, where the feature intersection has a plurality of nodes; and
and the coding unit is used for alternately performing path sampling on the at least two graph neural networks for a plurality of times, obtaining a corresponding sampling path after each path sampling, iteratively updating the vector representations of all nodes in the at least two graph neural networks according to the sampling path, initializing all nodes of the feature intersection in the graph neural networks after alternation according to the vector representations updated by all nodes in the feature intersection in the graph neural networks before alternation, and finishing node coding.
Referring to fig. 6, an embodiment of the present application further provides a block diagram of an electronic device, where the electronic device may be a smart phone, a tablet computer, a notebook computer, or a desktop computer. The electronic device may be referred to as a terminal, a portable terminal, a desktop terminal, or the like.
Generally, an electronic device includes: at least one processor 301; and a memory 302 for storing computer program instructions.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. The processor 301 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning such that the node coding model of the graph neural network can be trained autonomously for learning, improving efficiency and accuracy.
In some embodiments, the terminal may further include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, a display screen 305, and a power source 306.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, the front panel of the electronic device; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen 305 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 306 is used to power various components in the electronic device. The power source 306 may be alternating current, direct current, disposable or rechargeable. When the power source 306 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Fig. 7 shows a schematic structural diagram of a server according to an embodiment of the present application. The server is used for implementing the node coding method of the graph neural network provided in the above embodiment. Specifically, the method comprises the following steps:
the server includes a Central Processing Unit (CPU)401, a system memory 404 including a Random Access Memory (RAM)402 and a Read Only Memory (ROM)403, and a system bus 405 connecting the system memory 404 and the central processing unit 401. The server 400 also includes a basic input/output system (I/O system) 406, which facilitates the transfer of information between devices within the computer, and a mass storage device 407 for storing an operating system 413, application programs 414, and other program modules 415.
The basic input/output system 406 includes a display 408 for displaying information and an input device 409 such as a mouse, keyboard, etc. for user input of information. Wherein the display 408 and the input device 409 are connected to the central processing unit 401 through an input output controller 410 connected to the system bus 405. The basic input/output system 406 may also include an input/output controller 410 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input/output controller 410 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 407 is connected to the central processing unit 401 through a mass storage controller (not shown) connected to the system bus 405. The mass storage device 407 and its associated computer-readable media provide non-volatile storage for the server 400. That is, the mass storage device 407 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 404 and mass storage device 407 described above may be collectively referred to as memory.
The server 400 may also operate as a remote computer connected to a network via a network, such as the internet, according to various embodiments of the present application. That is, the server 400 may be connected to the network 412 through the network interface unit 411 connected to the system bus 405, or may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 411.
It should be noted that the above-described embodiments of the apparatus are merely schematic, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus necessary general hardware, and may also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, the implementation of a software program is a more preferable embodiment for the present invention. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, where the computer software product is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a Read-only memory (ROM), a random-access memory (RAM), a magnetic disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
Claims (9)
1. A node coding method of a graph neural network, wherein the number of the graph neural networks is at least two, the node coding method comprises the following steps:
determining a feature intersection between the at least two graph neural networks, the feature intersection having a number of nodes;
and performing path sampling on the at least two graph neural networks alternately for a plurality of times, obtaining a corresponding sampling path after each path sampling, iteratively updating vector representations of all nodes in the at least two graph neural networks according to the sampling path, initializing all nodes of feature intersection in the graph neural networks after alternation according to the vector representations updated by all nodes of feature intersection in the graph neural networks before alternation, and finishing node coding.
2. The node encoding method of claim 1, wherein the at least two graph neural networks comprise a first graph neural network and a second graph neural network, the at least two graph neural networks alternately perform path sampling for several times, and obtain a corresponding sampling path after each path sampling, and iteratively update vector representations of all nodes in the at least two graph neural networks according to the sampling path, and initialize all nodes of feature intersection in the graph neural networks after alternation with the vector representations updated by all nodes of feature intersection in the graph neural networks before alternation, thereby completing the step of node encoding, comprising:
performing path sampling on any one of the first graph neural network and the second graph neural network to obtain a sampling path, and iteratively updating vector representations of all nodes in any one according to the sampling path;
initializing all nodes in the feature intersection of the other one of the first graph neural network and the second graph neural network according to the vector representations of all nodes in the feature intersection of any one of the first graph neural network and the second graph neural network to obtain the vector representations of all nodes in the feature intersection;
performing path sampling on the other one of the first graph neural network and the second graph neural network, obtaining a sampling path, and iteratively updating vector representations of all nodes in the other one according to the sampling path;
and initializing the vector representation of all nodes in the feature intersection of any one according to the vector representation of all nodes in the feature intersection of the other one, and returning to the step of performing path sampling on any one of the first graph neural network and the second graph neural network until the encoding is finished.
3. The method of claim 2, wherein before the first path sampling is performed on either of the first and second graph neural networks, all nodes in feature intersections in either of the first and second graph neural networks are initialized with random values, resulting in initial values of vector representations of all nodes.
4. The node encoding method of a graph neural network of claim 2, wherein the performing path sampling to obtain a sampling path comprises: in the first graph neural network or the second graph neural network, path sampling is executed for a plurality of times in a random walk mode, and a plurality of sampling paths are obtained; and recording all sampling paths and outputting the sampling paths as sampling path texts.
5. The node coding method of the graph neural network according to claim 4, wherein the step of performing path sampling several times in a random walk manner in the first graph neural network or the second graph neural network to obtain several sampling paths comprises: determining a path starting point, wherein the path starting point is any node in the first graph neural network or the second graph neural network; and
performing path sampling in the first graph neural network or the second graph neural network in a random walk mode;
and returning to the step of determining the starting point of the path until the path sampling is finished.
6. The node encoding method of the neural network of claim 4, wherein the step of iteratively updating the vector representations of all nodes in either one of the nodes according to the sampling path and the step of iteratively updating the vector representations of all nodes in the other one according to the sampling path each comprise: acquiring the sampling path text and the vector representation of the node; and sending the sampling path text and the vector representations of the nodes to word2vec model training, and iteratively updating the vector representations of all the nodes.
7. The method of node encoding of graph neural network of claim 1, wherein one of the first graph neural network and the second graph neural network has a true label of the node.
8. A node encoding terminal of a graph neural network, comprising: a receiving unit for receiving at least two graph neural networks; an obtaining unit, configured to determine a feature intersection between the at least two graph neural networks, where the feature intersection has a plurality of nodes; and the coding unit is used for alternately performing path sampling on the at least two graph neural networks for a plurality of times, obtaining a corresponding sampling path after each path sampling, iteratively updating the vector representation of all nodes in the at least two graph neural networks according to the sampling path, initializing all nodes of the feature intersection in the graph neural networks after alternation according to the vector representation updated by all nodes of the feature intersection in the graph neural networks before alternation, and finishing node coding.
9. An electronic device, comprising: a processor; and a memory for storing computer program instructions;
wherein the processor executes the node encoding method of the graph neural network of any one of claims 1-7 when the computer program is loaded and run by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010277812.6A CN111178515A (en) | 2020-04-10 | 2020-04-10 | Node coding method of graph neural network, node coding terminal and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010277812.6A CN111178515A (en) | 2020-04-10 | 2020-04-10 | Node coding method of graph neural network, node coding terminal and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111178515A true CN111178515A (en) | 2020-05-19 |
Family
ID=70655187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010277812.6A Pending CN111178515A (en) | 2020-04-10 | 2020-04-10 | Node coding method of graph neural network, node coding terminal and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111178515A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111553470A (en) * | 2020-07-10 | 2020-08-18 | 成都数联铭品科技有限公司 | Information interaction system and method suitable for federal learning |
CN111597401A (en) * | 2020-05-20 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Data processing method, device, equipment and medium based on graph relation network |
CN112149808A (en) * | 2020-09-28 | 2020-12-29 | 上海交通大学 | Method, system and medium for expanding stand-alone graph neural network training to distributed training |
-
2020
- 2020-04-10 CN CN202010277812.6A patent/CN111178515A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111597401A (en) * | 2020-05-20 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Data processing method, device, equipment and medium based on graph relation network |
CN111553470A (en) * | 2020-07-10 | 2020-08-18 | 成都数联铭品科技有限公司 | Information interaction system and method suitable for federal learning |
CN112149808A (en) * | 2020-09-28 | 2020-12-29 | 上海交通大学 | Method, system and medium for expanding stand-alone graph neural network training to distributed training |
CN112149808B (en) * | 2020-09-28 | 2022-10-14 | 上海交通大学 | Method, system and medium for expanding stand-alone graph neural network training to distributed training |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111178515A (en) | Node coding method of graph neural network, node coding terminal and electronic equipment | |
CN111259446A (en) | Parameter processing method, equipment and storage medium based on federal transfer learning | |
CN114186256B (en) | Training method, device, equipment and storage medium of neural network model | |
CN113409134A (en) | Enterprise financing trust method and device based on federal learning | |
CN109711342B (en) | Face recognition method and device | |
CN115688731A (en) | Bank business index generation method and device, electronic equipment and storage medium | |
CN112148836A (en) | Multi-modal information processing method, device, equipment and storage medium | |
CN103580870A (en) | Mobile phone identity authentication terminal | |
CN104407995B (en) | Control system based on buffer consistency and method | |
CN112434746B (en) | Pre-labeling method based on hierarchical migration learning and related equipment thereof | |
CN104375963B (en) | Control system and method based on buffer consistency | |
CN111949187B (en) | Electronic whiteboard content editing and sharing method, system, equipment and server | |
CN114528893A (en) | Machine learning model training method, electronic device and storage medium | |
CN113886688B (en) | Method, device, terminal equipment and storage medium for predicting association relation of objects | |
CN113225234B (en) | Asset detection method, device, terminal equipment and computer readable storage medium | |
CN104516472A (en) | Processor and data processing method | |
CN114610911B (en) | Multi-modal knowledge intrinsic representation learning method, device, equipment and storage medium | |
CN103870959A (en) | Batch electronic transaction processing method and electronic signature device | |
CN203014831U (en) | Electronic signature equipment, client and system | |
CN114298895A (en) | Image realistic style migration method, device, equipment and storage medium | |
CN114663710A (en) | Track recognition method, device, equipment and storage medium | |
CN112199584A (en) | Personalized recommendation method, terminal device, recommendation device and storage medium | |
CN112346885A (en) | Electronic device control method, device, equipment and computer readable storage medium | |
CN113191072B (en) | Suspicious transaction monitoring method and device based on longitudinal federal logistic regression | |
CN115796305B (en) | Tree model training method and device for longitudinal federal learning |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200519 |