Industrial internet graph data representation learning method based on edge relation coding

By initializing embedding vectors for nodes and edges in industrial Internet graph data, constructing a self-centered network and performing biased random walks, generating and updating node sequences, the problem of edge relationship information loss is solved and the performance of downstream tasks is improved.

CN120804366APending Publication Date: 2025-10-17WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510636057.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing graph representation learning methods ignore the differences in edges in industrial Internet scenarios, resulting in the loss of edge relationship information and affecting the performance of downstream tasks.

Method used

By randomly initializing the embedding vector for each node and each edge in the graph network, constructing a self-centered network and performing biased random walks, generating a set of node sequences, extracting the context node sequence and updating the node vector, and iterating multiple times to obtain the final embedding vector matrix.

Benefits of technology

It improves the expressive power of node vectors, improves the effects of downstream tasks such as anomaly detection, link prediction, and personalized recommendation, and makes up for the shortcomings of traditional methods that ignore edge differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804366A_ABST
    Figure CN120804366A_ABST
Patent Text Reader

Abstract

The invention relates to the field of machine learning, in particular to an industrial internet graph data representation learning method based on edge relation coding, which comprises the following steps of: firstly, randomly initializing embedded vectors with equal dimensions for each node and each edge respectively; constructing a self-center network, updating an edge vector in the self-center network, executing biased random walk on nodes, and sampling a node sequence according to a certain length every time to generate a set; and extracting nodes in a node context window according to the set to generate a context node sequence, and summarizing to obtain a corresponding set. And finally, node vectors are updated in sequence, a final embedding vector is obtained through iteration for a certain number of times, and then a node embedding matrix is constructed. Therefore, the problem that the performance of a downstream task is affected by loss of edge relation information in a graph due to neglect of edge difference in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of machine learning, in particular to an industrial internet graph data representation learning method based on edge relationship coding. BACKGROUND

[0002] In the field of industrial internet, with the continuous interconnection of industrial devices and systems, the scale of the generated data is growing, and the structure is becoming increasingly complex. Graph structure data, as a data form that can naturally describe entities and their mutual relationships, has been widely used. Graph representation learning technology maps the nodes and edges in the graph to a low-dimensional vector space, preserving the structure and semantic information in the graph, and realizing the vectorization modeling of graph data. This not only improves the processability of data, but also helps to understand the potential relationship between elements in the graph, providing strong support for various tasks in the industrial internet. For example, in anomaly detection, based on graph representation, nodes or edges that deviate from the normal behavior pattern can be effectively identified, so as to timely discover potential system failures; in link prediction tasks, graph representation helps to predict potential but not yet apparent connection relationships, and to mine hidden associations between industrial devices; in personalized recommendation, graph representation can be used to match devices, services or production schemes that better meet the needs of users for users.

[0003] However, existing graph representation learning methods mostly focus on the topological structure of the graph, mainly learning embedding representation based on whether there is a connection relationship between nodes. Although such methods can extract the basic topological structure features of the graph and to some extent support the development of graph mining related tasks, they still have the problem of insufficient applicability in graph data modeling in the industrial internet scenario. Specifically, the edges in the industrial internet graph data not only indicate the connection relationship between entities, but also carry various types of semantic information such as physical connection relationship, data transmission path, functional dependency relationship, etc., reflecting the multidimensional heterogeneity characteristics of the interaction relationship between entities. If the types and semantics of the edges are ignored in the modeling process and only based on the connection relationship, it is easy to cause the loss of edge semantic information, so that the graph representation is difficult to accurately reflect the real semantic structure contained in the graph data, and thus affect the performance and reliability of downstream tasks such as anomaly detection, relationship prediction, etc. Therefore, it is necessary to improve the existing graph representation learning method, so that it can more effectively encode and utilize the edge relationship and its semantic information in the industrial internet graph data, thereby improving the expression ability of the graph representation and the processing effect of the downstream tasks. SUMMARY

[0004] The present application provides an industrial internet graph data representation learning method based on edge relationship coding, to solve the problem in the related art that the difference of edges is ignored, resulting in the loss of edge relationship information in the graph, thereby affecting the performance of downstream tasks.

[0005] The embodiment of the first aspect of the present application provides an industrial internet graph data representation learning method based on edge relation coding, comprising the following steps: randomly initializing a corresponding point embedding vector for each node in a graph network, and randomly initializing a corresponding edge embedding vector for each edge in the graph network, wherein the embedding dimension of each node is equal to the embedding dimension of each edge; constructing a self-center network with each node as the center, updating the vector of each edge in the self-center network of each node in turn, and performing biased random walk on each node for a first preset number of times in turn, and sampling a node sequence of a preset length each time to generate a node sequence set; based on the node sequence set, extracting nodes within a context window of each node in each node sequence to generate a corresponding context node sequence, and adding the context node sequence to a preset empty set to obtain a context node sequence set; updating the node vector of each node of the context node sequence set in turn, wherein the context node sequence set is updated for a second preset number of times to obtain final embedding vectors of all nodes, and a node embedding matrix is constructed based on the final embedding vectors.

[0006] Through the above technical solution, the embodiment of the present application can lay a foundation for subsequent accurate analysis by randomly initializing embedding vectors for each node and each edge in the graph network and ensuring equal dimensions, more comprehensively capture the structural information of the graph. Secondly, the self-center network is constructed, the edge vectors therein are updated, and the biased random walk is performed to generate a node sequence set, effectively integrating local structural information and enhancing the expression of the relationship between nodes and edges. Furthermore, the context node sequence is extracted and the node vector thereof is updated, the final embedding vector is obtained through multiple iterations to construct a matrix, further optimizing the node representation and improving the expression ability of the node vector, thereby improving the effect of downstream tasks such as anomaly detection, link prediction and personalized recommendation based on the graph representation learning, making up for the deficiency of traditional methods that ignore the difference between edges, and providing a more effective means for industrial internet graph data mining.

[0007] Optionally, in an embodiment of the present application, the specific calculation formula of the random walk probability of each node is:

[0008]

[0009] wherein t is the k-1 step walk node; v is the k step walk node; x is the k+1 step walk node; μ is a preset backtracking probability of node v to node t; e v,x is the embedding vector of the edge with node v and node x as endpoints; E is the set of edges in the graph; e t,v is the embedding vector of the edge with node t and node x as endpoints; ||e t,v is the length of the vector e t,v ; ||ev,x || is the length of the vector e v,x .

[0010] By the technical solution, the edge embedding vector and the association between nodes are comprehensively considered, the probability under different conditions is set, and the walking path selection of the node in the graph is accurately guided. When a specific edge exists and the node relationship meets the condition, the walking probability is determined according to the operation of the edge embedding vector, so that the walking process can better adapt to the structural characteristics of the graph, and the potential semantic and structural relationship between nodes can be effectively mined. Compared with the traditional method, the probability calculation method based on the edge embedding vector provides a more targeted and accurate data basis for subsequent analysis, which helps to improve the effect of graph representation learning.

[0011] Optionally, in an embodiment of the application, the updating of the vector of each edge in the self-centered network of each node in sequence comprises: for each node, randomly sampling at least one first negative sample to form a first negative sample set, and constructing an extended node set of the target node based on the first negative sample set; and updating the embedding vector of each node in the extended node set of the target node to update the embedding vector of the target node and the embedding vector of the edge.

[0012] By the technical solution, the relevant set is constructed by randomly sampling at least one negative sample for each node, the contrast information is introduced, the position relationship and potential contact of the node in the graph can be more comprehensively considered. In the process of updating the embedding vector of each node in the target node and the extended node set, the rich information is fully utilized, which can not only effectively adjust the representation of the node itself, but also optimize the embedding vector of the edge.

[0013] Optionally, in an embodiment of the application, the update formula of the embedding vector of each node in the extended node set is:

[0014]

[0015] wherein η is the learning rate of vector update; I(·) is an indicator function, which takes the value of 1 when (·) is true, and takes the value of 0 when (·) is false; σ is a Sigmoid function; e i,j is the embedding vector of the edge (v i ,v j ); is the transpose of the embedding vector of the edge (v i ,v j ).

[0016] By the technical solution, the embodiments of the present application can flexibly control the step of updating by introducing the learning rate, make the adjustment of the embedding vector more reasonable and accurate, and avoid excessive or insufficient updating. Secondly, the combination of the indicator function and the Sigmoid function is used to perform differential processing according to whether the node is a target node and other conditions, and the uniqueness of the node and the association characteristics with the edge are fully considered. Furthermore, the information of the edge is deeply integrated into the updating process of the node embedding vector by using the embedding vector of the edge and its transpose, which effectively enhances the mutual expression between the node and the edge, thereby improving the quality of graph representation learning.

[0017] Optionally, in an embodiment of the present application, the updating of the node vector of each node of the context node sequence in the context node sequence set in turn comprises: for each node, randomly sampling at least one second negative sample to form a second negative sample set; updating the embedding vector of each node in the extended node set of the node to update the embedding vector of the node.

[0018] By the technical solution, the embodiments of the present application can form a set by randomly sampling at least one negative sample for each node, introduce more contrast information, and help to more comprehensively understand the feature difference of the node in the context environment. When updating the embedding vector of the node, the processing of each node in the extended node set fully utilizes these rich information resources, can more finely adjust the node vector, and makes it more accurately reflect the semantic and structural relationship of the node in the graph.

[0019] Optionally, in an embodiment of the present application, the updating formula of the embedding vector of each node in the extended node set is:

[0020] θ u =θ u +η[I(u=v)-σ(θ ω T θ u )]θ ω

[0021] wherein, η is the learning rate of vector updating; N v is the extended node set of node v; I(·) is an indicator function, which takes value 1 when (·) is true, and takes value 0 when (·) is false; σ is a Sigmoid function; θ ω T is the transpose of the vector θ ω of the node θ ω .

[0022] By the technical solution, the learning rate in the embodiment of the application makes the updating process adjustable, can flexibly adjust the updating range according to the actual situation, and ensures that the updating of the embedding vector is within a reasonable range. The indicator function clearly defines the calculation logic under different conditions, enhancing the pertinence and adaptability of the formula. The Sigmoid function processes the complex relationship between node vectors, making it nonlinear and more in line with the complex characteristics of graph data. The use of node vectors and their transposes in the calculation deeply integrates the information of context nodes, enabling the updating of the embedding vector of each node in the expanded node set to fully consider the correlation and differences between nodes, greatly improving the accuracy and richness of the node vector representation.

[0023] The second embodiment of the application provides an industrial internet graph data representation learning device based on edge relationship coding, comprising: an initialization module for randomly initializing a corresponding point embedding vector for each node in a graph network, and randomly initializing a corresponding edge embedding vector for each edge in the graph network, wherein the embedding dimension of each node and the embedding dimension of each edge are equal; a first generation module for constructing a self-centered network centered on each node, updating the vector of each edge in the self-centered network of each node in turn, and performing a first preset number of biased random walks on each node in turn, and sampling a node sequence of a preset length each time to generate a node sequence set; a second generation module for extracting nodes within a context window of each node in each node sequence based on the node sequence set, generating a corresponding context node sequence, and adding it to a preset empty set to obtain a context node sequence set; a learning and construction module for updating the node vector of each node of the context node sequence set in turn, wherein a second preset number of update iterations are performed on the context node sequence set to obtain the final embedding vector of all nodes, and a node embedding matrix is constructed based on the final embedding vector.

[0024] Through the above technical solution, the embodiment of the application can lay a foundation for subsequent accurate analysis by randomly initializing embedding vectors for each node and each edge in the graph network and ensuring that the dimensions are equal, more comprehensively capturing the structural information of the graph. Secondly, the self-centered network is constructed, the edge vectors therein are updated, and the biased random walk is performed to generate a node sequence set, effectively integrating local structural information and enhancing the expression of the relationship between nodes and edges. Furthermore, the context node sequence is extracted and its node vector is updated, and the final embedding vector matrix is obtained through multiple iterations, further optimizing the node representation and improving the expression ability of the node vector, thereby improving the effect of downstream tasks such as anomaly detection, link prediction and personalized recommendation based on the graph representation learning, making up for the shortcomings of traditional methods that ignore the difference between edges, and providing a more effective means for graph data mining.

[0025] Optionally, in an embodiment of the present application, the first generation module comprises: a specific calculation formula of the random walk probability of each node is:

[0026]

[0027] wherein t is a node walked in the k-1th step; v is a node walked in the kth step; x is a node walked in the k+1th step; μ is a preset backtracking probability of the node v to the node t; e v,x is an embedding vector of an edge with the node v and the node x as endpoints; E is a set of edges in the graph; e t,v is an embedding vector of an edge with the node t and the node x as endpoints; ||e t,v is a length of the vector e t,v ; ||e v,x is a length of the vector e v,x .

[0028] Through the above technical solution, the embodiment of the present application can comprehensively consider the embedding vector of the edge and the association between the nodes, and accurately guide the node to select the walk path in the graph by setting the probability under different conditions. When a specific edge exists and the node relationship meets the condition, the walk probability is determined according to the operation of the edge embedding vector, which makes the walk process better adapt to the structural characteristics of the graph and effectively mine the potential semantic and structural relationship between the nodes. Compared with the traditional method, this probability calculation method based on the edge embedding vector provides a more targeted and accurate data basis for subsequent analysis, which helps to improve the effect of graph representation learning.

[0029] Optionally, in an embodiment of the present application, the first generation module comprises: a first construction unit, configured to randomly sample at least one first negative sample for each node to form a first negative sample set, and construct an extended node set of the target node based on the first negative sample set; and a first update unit, configured to update the embedding vector of each node in the extended node set of the target node to update the embedding vector of the target node and the embedding vector of the edge.

[0030] Through the above technical solution, the embodiment of the present application can construct a related set by randomly sampling at least one negative sample for each node, introduce comparison information, and more comprehensively consider the positional relationship and potential contact of the node in the graph. In the process of updating the embedding vector of each node in the target node and the extended node set, the rich information is fully utilized, which can not only effectively adjust the representation of the node itself, but also optimize the embedding vector of the edge.

[0031] Optionally, in an embodiment of the present application, the first update unit comprises: an update formula of the embedding vector of each node in the extended node set is:

[0032]

[0033] wherein, η is a learning rate of vector update; I(·) is an indicator function, which takes value 1 when (·) is true, and takes value 0 when (·) is false; σ is a Sigmoid function; e i,j is an embedding vector of edge (v i ,v j ); is a transpose of the embedding vector of edge (v i ,v j ).

[0034] Through the above technical solutions, the embodiment of the present application can flexibly control the step of updating by introducing a learning rate, so that the adjustment of the embedding vector is more reasonable and accurate, and excessive or insufficient updating is avoided. Secondly, the combination of the indicator function and the Sigmoid function is used to skillfully perform differential processing according to whether the node is a target node and other conditions, and the uniqueness of the node and the association characteristics with the edge are fully considered. Furthermore, the embedding vector of the edge and its transpose are used to deeply integrate the information of the edge into the updating process of the node embedding vector, effectively enhancing the mutual expression between the node and the edge, thereby improving the quality of graph representation learning.

[0035] Optionally, in an embodiment of the present application, the learning construction module comprises: a second construction unit, configured to randomly sample at least one second negative sample for each node to form a second negative sample set; and a second updating unit, configured to update the embedding vector of each node in the extended node set of the node to update the embedding vector of the node.

[0036] Through the above technical solutions, the embodiment of the present application can form a set by randomly sampling at least one negative sample for each node, introduce more contrast information, and help to more comprehensively understand the feature differences of the node in the context environment. When updating the embedding vector of the node, the processing of each node in the extended node set fully utilizes these rich information resources, can more finely adjust the node vector, and makes it more accurately reflect the semantic and structural relationship of the node in the graph.

[0037] Optionally, in an embodiment of the present application, the second updating unit comprises: the updating formula of the embedding vector of each node in the extended node set is:

[0038] θ u =θ u +η[I(u=v)-σ(θ ω T θ u )]θ ω

[0039] wherein, η is the learning rate of vector update; N v is the extended node set of node v; I(·) is an indicator function, which takes the value of 1 when (·) is true, and takes the value of 0 when (·) is false; σ is a Sigmoid function; θ ω T is the vector θ ω of node θ ω .

[0040] Through the above technical solutions, the learning rate in the embodiment of the application makes the updating process adjustable, can flexibly adjust the amplitude of updating according to the actual situation, and ensures that the updating of the embedding vector is in a reasonable range. The indicator function clearly defines the calculation logic under different conditions, enhances the pertinence and adaptability of the formula. The Sigmoid function processes the complex relationship between node vectors, makes it nonlinear, and is more suitable for the complex characteristics of graph data. The vector of the node and its transpose are used to participate in the calculation, deeply fuse the information of the context nodes, make the updating of the embedding vector of each node in the extended node set fully consider the association and difference between nodes, and greatly improve the accuracy and richness of the node vector expression.

[0041] The third aspect of the application provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the edge relation coding based industrial internet graph data representation learning method as described in the above embodiments.

[0042] The fourth aspect of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the edge relation coding based industrial internet graph data representation learning method as described above.

[0043] The fifth aspect of the application provides a computer program, which comprises a computer program, and the computer program is executed to implement the edge relation coding based industrial internet graph data representation learning method as described above.

[0044] The embodiment of the present application lays a foundation for subsequent accurate analysis by randomly initializing embedding vectors of each node and each edge in the graph network and ensuring equal dimensions, and more comprehensively captures the structural information of the graph. Secondly, a self-center network is constructed, edge vectors in the network are updated, and a node sequence set is generated by performing biased random walk, effectively integrating local structural information and enhancing the expression of the relationship between nodes and edges. Furthermore, context node sequences are extracted and node vectors are updated, and the final embedding vector matrix is obtained through multiple iterations, further optimizing node representation and improving the expression ability of node vectors, thereby improving the effect of downstream tasks such as anomaly detection, link prediction and personalized recommendation based on the graph representation learning, making up for the deficiency of traditional methods that ignore the difference of edges, and providing a more effective means for industrial internet graph data mining.

[0045] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0046] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, taken in conjunction with the accompanying drawings, in which:

[0047] Figure 1 A flow chart of an industrial internet graph data representation learning method based on edge relationship coding according to an embodiment of the present application is provided.

[0048] Figure 2 A structural schematic diagram of an industrial internet graph data representation learning device based on edge relationship coding according to an embodiment of the present application is provided.

[0049] Figure 3 A structural example diagram of an electronic device according to an embodiment of the present application is provided. DETAILED DESCRIPTION

[0050] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numbers represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.

[0051] An edge relation encoding-based industrial internet graph data representation learning method is described below with reference to the accompanying drawings. In view of the problem that the related art mentioned in the background art ignores the difference between edges, resulting in the loss of edge relation information in the graph, thereby affecting the performance of downstream tasks, the present application provides an edge relation encoding-based industrial internet graph data representation learning method. In this method, the embedding vectors of each node and each edge in the graph network are randomly initialized and the dimensions are ensured to be equal, which lays a foundation for subsequent accurate analysis and more comprehensively captures the structure information of the graph. Secondly, a self-center network is constructed and the edge vectors are updated, and a biased random walk is performed to generate a set of node sequences, effectively integrating local structure information and enhancing the expression of the relationship between nodes and edges. Furthermore, the context node sequence is extracted and the node vector is updated, and the final embedding vector matrix is obtained through multiple iterations to further optimize the node representation and improve the expression ability of the node vector, thereby improving the effect of downstream tasks such as anomaly detection, link prediction and personalized recommendation based on the graph representation learning, and making up for the shortcomings of the traditional method of ignoring the difference between edges. Thus, the problem that the related art ignores the difference between edges, resulting in the loss of edge relation information in the graph, thereby affecting the performance of downstream tasks, is solved.

[0052] The present application can be further described in detail through a specific embodiment. It should be understood that the embodiment described herein is only used to illustrate and explain the present application, and is not used to limit the present application. In this embodiment, three social networks are used as implementation objects, as shown in Table 1, for graph embedding processing. For each given graph network, the corresponding graph representation vector is calculated.

[0053] Table 1

[0054] Data Number of nodes Number of edges Blog net 10,312 333,983 Flickr net 80,513 5,899,882 Youtube net 1,138,499 2,945,443

[0055] Specifically, Figure 1 A flowchart of an edge relation encoding-based industrial internet graph data representation learning method provided by the embodiment of the present application.

[0056] As Figure 1 shown, the edge relation encoding-based industrial internet graph data representation learning method includes the following steps:

[0057] In step S101, for each node in the graph network, a corresponding point embedding vector is randomly initialized, and for each edge in the graph network, a corresponding edge embedding vector is randomly initialized, wherein the embedding dimension of each node and the embedding dimension of each edge are equal.

[0058] Specifically, the industrial internet graph data is defined as G={E,V}, where V={v1,v2,…,v n} represents n nodes constituting a network, E is a set of edges in the graph, (v i ,v j ) represents an edge in the graph G with node v i and node v j as endpoints. At the same time, the embedding vector of node u is represented by θ u , and the embedding vector of edge (v i,j ,v i ) is represented by e j .

[0059] In actual execution, for each node v in the graph G, a corresponding point embedding vector θ is randomly initialized, where d1 represents the embedding dimension of the node, and as preferred, d1∈N + , (θ v ) j represents the value of the jth dimension; for each edge (v i ,v j ) in the graph G, a corresponding edge embedding vector e i,j is randomly initialized, where the embedding dimension d1 of the edge is equal to the embedding dimension of the node, (e i,j ) k represents the value of the kth dimension.

[0060] The embodiments of the present application can explicitly define the basic constituent elements of the graph network and the corresponding representation method at the definition level, providing a clear framework for subsequent processing. In actual execution, the random initialization method can give the nodes and edges diverse initial feature representations, avoiding preconceived bias. Moreover, setting the embedding dimensions of nodes and edges to be equal helps to maintain the consistency and coordination of the data structure in subsequent calculation and analysis, facilitating various operations and information integration, so that the entire graph representation learning process can be based on a unified dimension standard, laying a foundation for more accurately capturing the structural information and potential relationships of the graph, and improving the scientificity and effectiveness of graph data processing.

[0061] In step S102, a self-centered network centered on each node is constructed, the vector of each edge in the self-centered network of each node is updated in turn, and a biased random walk of a first preset number of times is performed on each node in turn, and a node sequence of a preset length is sampled each time to generate a node sequence set.

[0062] Specifically, a self-centered network G v ′ ={E v ′ ,V v ′} centered on each node v is constructed.

[0063] Among them, V v ′ ={v}∪{v i |(v i ,v)∈E} represents the node set consisting of node v and the nodes connected to node v in graph G, E v ′ ={(v i ,v j )|V i ,v j ∈V v ′ ,(v i ,v j )∈E} represents the set V v ′ The set of edges formed by all nodes in the graph G.

[0064] For each node v in turn, the self-centered network G v ′ ={E v ′ ,V v ′ Each edge (v i ,v j )∈E v ′ vector e of v i,j Update, and further, perform r biased random walks on each node v in the graph G, sampling a node sequence s of length l each time v =(v1,…,v k-1 ,v k ,v k+1 ,…,v l ), these sequences are combined into a node sequence set W. Among them, as a preference, r∈N + , l∈N + .

[0065] Optionally, in one embodiment of the present invention, the specific calculation formula for the random walk probability of each node is:

[0066]

[0067] Where t is the k-1th step walking node; v is the kth step walking node; x is the k+1th step walking node; μ is the preset backtracking probability from node v to node t, and as an optimal choice, μ∈(0,1); e v,x is the embedding vector of the edge with nodes v and x as endpoints; E is the set of edges in the graph; e t,vis the embedding vector of the edge with node t and node x as end points; ||e t,v is the norm of vector e t,v v,x is the norm of vector e v,x .

[0068] In actual execution, the vector of each edge in the self-center network of each node is updated in turn, including: for each node, at least one first negative sample is randomly sampled to form a first negative sample set, and an extended node set of the target node is constructed based on the first negative sample set; the embedding vector of each node in the extended node set of the target node is updated to update the embedding vector of the target node and the embedding vector of the edge.

[0069] Specifically, for each node v, n1 negative samples are randomly sampled, preferably n1∈N + , to form a negative sample set wherein node u j is a node not directly adjacent to node v; an extended node set N v of node v is constructed = {v}∪Neg v ; the embedding vector θ v of each node u in the extended node set N u of the target node v is updated, and the update calculation formula is:

[0070]

[0071] wherein η is the learning rate of vector update, preferably η∈(0,1); I(·) is an indicator function, which takes the value 1 when (·) is true, and takes the value 0 when (·) is false; σ is a Sigmoid function; e i,j is the embedding vector of the edge (v i , v j ); is the transpose of the embedding vector of the edge (v i , v j ).

[0072] On the one hand, the embedding vector of the target node v is updated as:

[0073]

[0074] wherein η is the learning rate of vector update; I(·) is an indicator function, which takes the value 1 when (·) is true, and takes the value 0 when (·) is false; σ is a Sigmoid function; e i,j is the embedding vector of the edge (v i , v j ); is the transpose of the embedding vector of the edge (v​i ,v j )’s embedding vector e i,j The transpose of N v Represents the expanded node set of node v;

[0075] On the other hand, updating the edge (v i ,v j )’s embedding vector e i,j for:

[0076]

[0077] in, Respectively represent the edge (v i ,v j )'s two endpoints v i and v j The embedding vector of .

[0078] The embodiment of the present invention can construct a self-centered network centered on each node and update the edge vectors therein, focus on the local structure of the node, deeply explore the relationship characteristics between the node and the adjacent nodes, and use negative samples to construct an extended node set to update the embedding vector, effectively enhancing the accuracy and richness of the node and edge representation. Secondly, multiple biased random walks are performed and the walk probability is calculated according to a specific formula, which fully considers the embedding vectors of the edges and the connections between the nodes, making the generated node sequence set more representative and better able to capture the overall structural information and potential semantic relationships of the graph. Furthermore, reasonable parameter values ​​are set throughout the process to ensure the feasibility and effectiveness of the algorithm. This comprehensive processing method improves the quality of graph representation learning compared to traditional methods.

[0079] In step S103 , based on the node sequence set, the nodes within the context window of each node in each node sequence are extracted to generate a corresponding context node sequence, and the corresponding context node sequence is added to the preset empty set to obtain a context node sequence set.

[0080] In the actual execution process, initialize an empty set W C , for each walk sequence s in the sequence set W, extract the nodes within the context window of each node v in the sequence s, and generate the context node sequence C(s,v) corresponding to s,v, and then add all the generated node sequences to the set W C In which C(s,v) is specifically expressed as:

[0081] C(s,v)=(ω -w ,ω -w-1 ,…,v,ω1,…,ω w ),

[0082] Where w is the context window length, preferably, w∈N + ,ω i is the context node with a distance i∈[-w,w] relative to node v.

[0083] The embodiment of the present invention can generate a context node sequence by extracting the nodes within the context window of the nodes in each node sequence and aggregating them into a set, which can effectively integrate the local context information of the nodes in the graph. In the actual execution process, clear operation procedures and parameter settings, such as the reasonable value of the context window length, make this integration more standardized and orderly. This method can more comprehensively capture the associations and mutual influences between nodes, enrich the information dimension of the graph data, provide a more detailed and accurate basis for subsequent analysis and processing, and help improve the effect of graph representation learning.

[0084] In step S104, the node vector of each node in the context node sequence is updated in sequence for the context node sequence set, wherein a second preset number of update iterations are performed on the context node sequence set to obtain the final embedding vectors of all nodes, and a node embedding matrix is ​​constructed based on the final embedding vectors.

[0085] Specifically, for the set W c The context node sequence C(s,v) corresponding to each s,v in C(s,v) is updated in turn with the node vector θ of each node ω in C(s,v) ω . For the set W c Perform m update iterations to obtain the final embedding vectors of all nodes, and these vectors form the node embedding matrix The embedding matrix Ψ contains the vector representation of all nodes in the graph G, and each row represents the embedding vector of a node, where, as an example, m∈N + .

[0086] In the actual execution process, the node vector of each node in the context node sequence is updated in sequence, including: for each node, randomly sampling at least one second negative sample to form a second negative sample set; updating the embedding vector of each node in the node's extended node set to update the node's embedding vector. Specifically, n2 negative samples are randomly sampled for node v to form a negative sample set Among them, u j It is the context node in C(s,v) that is not directly connected to node v, and constructs the extended node set N of node v v ={v}∪Neg c(s,v) , as a preference, n2∈N + ; The expanded node set N for node v v The embedding vector θ of each node u in uThe updating is performed, and the updating calculation formula is:

[0087] θ u = θ u + η [I (u = v) - σ (θ ω T θ u )] θ ω

[0088] wherein, η is a learning rate of vector updating, preferably, η is in (0, 1) ; N v is an extended node set of node v; I (·) is an indication function, and the function takes 1 when (·) is true, and takes 0 when (·) is not true; σ is a Sigmoid function; θ ω T is the transpose of the vector θ ω of node θ ω .

[0089] Further, the embedding vector θ ω of node ω is updated, and the updating calculation formula is:

[0090]

[0091] wherein, η is a learning rate of vector updating; N v denotes an extended node set of node v; I (·) denotes an indication function, and the function takes 1 when (·) is true, and takes 0 when (·) is not true; σ denotes a Sigmoid function; θ ω T denotes the transpose of the vector θ ω of node c.

[0092] The embodiment of the application can finally obtain a node embedding matrix by performing multiple updating iterations on the node vectors in the context node sequence set, and the node embedding matrix can comprehensively and systematically present the vector representation of all nodes in the graph, thereby providing a powerful data basis for analysis and processing of the graph. By introducing a negative sample set, more comparison information is added for subsequent node vector updating, thereby improving the accuracy and diversity of the node representation. In the updating formula, by setting a reasonable learning rate, the updating range is controlled within a certain range, so that the result deviation caused by too large or too small updating range is avoided, and the updating process is more scientific and robust. At the same time, the indication function and the Sigmoid function can flexibly adjust the updating strategy according to different states and relationships of the nodes. For the embedding vector updating of the node, the information of other nodes in the extended node set is considered, and the embedding vector of the node is further optimized by using the updating formula, so that not only the relationship between the node itself and the extended node is considered, but also the relationship is quantized and adjusted, so that the final embedding vector can more accurately reflect the characteristics and mutual relationship of the nodes in the graph.

[0093] The industrial internet graph data representation learning method based on edge relationship coding according to the embodiment of the present application can lay a foundation for subsequent accurate analysis by respectively randomly initializing embedding vectors of each node and each edge in the graph network and ensuring equal dimensions, and more comprehensively capture the structural information of the graph. Secondly, the self-center network is constructed, the edge vectors therein are updated, and the biased random walk is performed to generate a node sequence set, which effectively integrates the local structural information and enhances the expression of the relationship between the nodes and the edges. Furthermore, the context node sequence is extracted and the node vector thereof is updated, the final embedding vector is obtained through multiple iterations to construct a matrix, the node representation is further optimized, the expression capability of the node vector is improved, and thus the effect of the downstream task such as anomaly detection, link prediction and personalized recommendation based on the graph representation learning is improved, the deficiency of the traditional method of ignoring the edge difference is made up, and a more effective means is provided for the industrial internet graph data mining.

[0094] Secondly, the industrial internet graph data representation learning device based on edge relationship coding according to the embodiment of the present application is described with reference to the accompanying drawings.

[0095] Figure 2 is a block schematic diagram of the industrial internet graph data representation learning device based on edge relationship coding according to the embodiment of the present application.

[0096] As shown in Figure 2 , the industrial internet graph data representation learning device 10 based on edge relationship coding includes an initialization module 100, a first generation module 200, a second generation module 300 and a learning construction module 400.

[0097] Specifically, the initialization module 100 is configured to randomly initialize a corresponding point embedding vector for each node in the graph network, and randomly initialize a corresponding edge embedding vector for each edge in the graph network, wherein the embedding dimension of each node and the embedding dimension of each edge are equal.

[0098] The first generation module 200 is configured to construct a self-center network centered on each node, update the vector of each edge in the self-center network of each node in turn, and perform a first preset number of biased random walks on each node in turn, and sample a node sequence of a preset length each time to generate a node sequence set.

[0099] The second generation module 300 is configured to extract the nodes in the context window of each node in each node sequence based on the node sequence set, generate a corresponding context node sequence, and add it to a preset empty set to obtain a context node sequence set.

[0100] The learning module 400 is configured to sequentially update the node vector of each node in the context node sequence set, and perform a second preset number of update iterations on the context node sequence set to obtain a final embedding vector of all nodes, and construct a node embedding matrix based on the final embedding vector.

[0101] Optionally, in an embodiment of the present application, the first generation module 200 comprises: a specific calculation formula of the random walk probability of each node is:

[0102]

[0103] wherein t is the k-1 step walk node; v is the k step walk node; x is the k+1 step walk node; μ is a preset backtracking probability of the node v to the node t; e v,x is an embedding vector of an edge with the node v and the node x as endpoints; E is a set of edges in the graph; e t,v is an embedding vector of an edge with the node t and the node x as endpoints; ||e t,v || is a length of the vector e t,v ; ||e v,x || is a length of the vector e v,x .

[0104] Optionally, in an embodiment of the present application, the first generation module 200 comprises: a first construction unit and a first update unit.

[0105] The first construction unit is configured to, for each node, randomly sample at least one first negative sample to form a first negative sample set, and construct an extended node set of the target node based on the first negative sample set.

[0106] The first update unit is configured to update the embedding vector of each node in the extended node set of the target node to update the embedding vector of the target node and the embedding vector of the edge.

[0107] Optionally, in an embodiment of the present application, the first update unit comprises: an update formula of the embedding vector of each node in the extended node set is:

[0108]

[0109] wherein η is a learning rate of vector update; I(·) is an indicator function, which takes a value of 1 when (·) is true, and takes a value of 0 when (·) is false; σ is a Sigmoid function; e i,j is an embedding vector of an edge (v i ,v j ); is an embedding vector of an edge (v i ,v jtranspose of the embedding vector of the node v.

[0110] Optionally, in an embodiment of the present application, the learning construction module 400 comprises a second construction unit and a second update unit.

[0111] The second construction unit is configured to, for each node, randomly sample at least one second negative sample to form a second negative sample set.

[0112] The second update unit is configured to update the embedding vector of each node in the extended node set of the node to update the embedding vector of the node.

[0113] Optionally, in an embodiment of the present application, the second update unit comprises an update formula of the embedding vector of each node in the extended node set as follows:

[0114] θ u = θ u + η [I (u = v) - σ (θ ω t θ u )] θ ω

[0115] wherein η is a learning rate of vector update; N v is the extended node set of the node v; I (·) is an indicator function, which takes a value of 1 when (·) is true, and takes a value of 0 when (·) is false; σ is a Sigmoid function; θ ω T is the transpose of the vector θ ω of the node θ ω .

[0116] It should be noted that the foregoing explanation and description of the embodiment of the industrial internet graph data representation learning method based on edge relation coding also applies to the embodiment of the industrial internet graph data representation learning device based on edge relation coding, which will not be described here again.

[0117] According to the industrial internet graph data representation learning device based on edge relation coding provided by the embodiment of the present application, the embedding vectors of each node and each edge in the graph network are randomly initialized respectively and the dimensions are ensured to be equal, which lays a foundation for subsequent accurate analysis and more comprehensively captures the structural information of the graph. Secondly, the self-center network is constructed and the edge vectors are updated, and the biased random walk is performed to generate a node sequence set, which effectively integrates the local structural information and enhances the expression of the relationship between the nodes and the edges. Furthermore, the context node sequence is extracted and the node vector is updated, the final embedding vector matrix is obtained through multiple iterations, the node representation is further optimized, the expression ability of the node vector is improved, and thus the effect of the downstream tasks such as anomaly detection, link prediction and personalized recommendation based on the graph representation learning is improved, the deficiency of the traditional method of ignoring the edge difference is made up, and a more effective means is provided for the industrial internet graph data mining.

[0118] Figure 3 The electronic device provided by the embodiment of the present application is shown in the structural schematic diagram. The electronic device can include:

[0119] The memory 301, the processor 302 and the computer program stored in the memory 301 and executable on the processor 302.

[0120] The processor 302 implements the industrial internet graph data representation learning method based on edge relation coding provided in the above embodiment when executing the program.

[0121] Further, the electronic device further includes:

[0122] The communication interface 303 is used for communication between the memory 301 and the processor 302.

[0123] The memory 301 is used to store the computer program executable on the processor 302.

[0124] The memory 301 can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least one disk memory.

[0125] If the memory 301, the processor 302 and the communication interface 303 are implemented independently, the communication interface 303, the memory 301 and the processor 302 can be connected to each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 3 Only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0126] Optionally, in a specific implementation, if the memory 301, the processor 302 and the communication interface 303 are integrated on a chip, the memory 301, the processor 302 and the communication interface 303 can complete communication between each other through an internal interface.

[0127] The processor 302 can be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application.

[0128] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the edge relation coding based industrial internet graph data representation learning method as above.

[0129] The embodiment of the present application also provides a computer program, which includes a computer program, and the computer program is executed to implement the edge relation coding based industrial internet graph data representation learning method as above.

[0130] In the description of the application, reference to "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that a particular feature, structure, material, or characteristic being described is included in at least one embodiment or example of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment or example. Furthermore, the described specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples. In addition, the usage of "first", "second" and the like does not indicate any order but rather serves merely to name various components. Moreover, the usage of "top", "bottom", and the like is made for the purpose of illustration only and does not indicate any orientation. The terms "coupled" and "connected", along with their derivatives, can be used. It should be understood that these terms are not intended as synonyms for each other. Rather, particular features are described as being coupled or connected where the feature is in some way present, for example through shared use of one or more components, and can be communicatively, electrically, structurally, and / or mechanically connected, for example. Similarly, "coupled" or "connected" can be used to indicate that two or more members are either directly in contact or indirectly in contact through one or more intermediate members.

[0131] Furthermore, the terms "first", "second", and the like, merely denote different categories, and do not imply a relative importance or a specific order. Thus, features defined with "first", "second" and the like can include at least one of the features, either explicitly or implicitly. In the description of the application, the term "N" means at least two, for example two, three, etc., unless explicitly specified otherwise.

[0132] Any process or method descriptions or blocks in flow charts or otherwise described herein represent embodiments of modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps, and alternate implementations are possible. In some embodiments, the processes or methods described can be accomplished with one or more hardware items, for example, hardwired circuits, memory, logic circuits, look-up tables, microcode or the like, software programs, firmware programs, microcode routines, embedded logic, embedded software, or any combination thereof, which work together to cause a general purpose computer, a special purpose computer, or both, to perform the processes or methods described. The various embodiments further can interact with a user through one or more computer programs, software applications, firmware applications, operating systems, or the like, which interact with a user. Such software can be written in any of a variety of suitable programming languages and can be executed using a variety of suitable hardware and software configurations. It will be appreciated that computer programs, software applications, firmware applications, operating systems, or the like, can be written in any combination of one or more suitable programming languages, and that such software can be executed using one or more computing devices capable of netlist generation, simulation, synthesis, placement, routing, and the like.

[0133] The logic and / or steps represented in flow diagrams or otherwise described herein, for example, can be considered as a sequence of executable instructions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable storage medium or a computer-readable signal medium. The computer- readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (electrical connections), a portable computer diskette (a magnetic storage medium), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). Note that the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via, for example, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.

[0134] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware and in another embodiment, the hardware can be implemented using any or a combination of the following technologies, which are all well known in the art: a discrete logic circuit(s) having logic gates for implementing logic functions upon an application of data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array(s) (PGA), a field programmable gate array (FPGA), etc.

[0135] Those of skill in the art would understand that information and signals can be represented using any of a variety of technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that can be referenced throughout the above description can be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0136] In addition, each function unit in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software function module. When the integrated module is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0137] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A learning method for industrial Internet graph data representation based on edge relationship encoding, characterized by: The following steps are involved: For each node in the graph network, a corresponding point embedding vector is randomly initialized, and for each edge in the graph network, a corresponding edge embedding vector is randomly initialized, where the embedding dimension of each node is equal to the embedding dimension of each edge; Constructing a self-centered network centered on each node, updating the vector of each edge in the self-centered network of each node in turn, and performing a first preset number of biased random walks on each node in turn, sampling a node sequence of a preset length each time to generate a node sequence set; Based on the node sequence set, extract the nodes within the context window of each node in each node sequence, generate a corresponding context node sequence, and add it to a preset empty set to obtain a context node sequence set; The node vector of each node of the context node sequence is updated in sequence for the context node sequence set, wherein a second preset number of update iterations are performed on the context node sequence set to obtain final embedding vectors of all nodes, and a node embedding matrix is ​​constructed based on the final embedding vectors.

2. The industrial Internet graph data representation learning method based on edge relationship coding according to claim 1 is characterized in that: The specific calculation formula for the random walk probability of each node is: Among them, t is the k-1th step walking node; v is the kth step walking node; x is the k+1th step walking node; μ is the preset backtracking probability from node v to node t; e v,x is the embedding vector of the edge with nodes v and x as endpoints; E is the set of edges in the graph; e t,v is the embedding vector of the edge with nodes t and x as endpoints; ||e t,v || is the vector e t,v The modulus length of ||e v,x || is the vector e v,x The mold length.

3. The industrial Internet graph data representation learning method based on edge relationship coding according to claim 1 is characterized in that: The updating of the vector of each edge in the self-centered network of each node in turn includes: For each of the nodes, randomly sampling at least one first negative sample to form a first negative sample set, and constructing an extended node set of the target node based on the first negative sample set; The embedding vector of each node in the extended node set of the target node is updated to update the embedding vector of the target node and the embedding vectors of the edges.

4. The industrial Internet graph data representation learning method based on edge relationship coding according to claim 3 is characterized in that: The updating formula of the embedding vector of each node in the extended node set is: Where η is the learning rate of vector update; I(·) is an indicator function, which takes the value of 1 when (·) holds and takes the value of 0 when it does not hold; σ is the Sigmoid function; e i,j For the edge (v i ,v j )’s embedding vector; For the edge (v i ,v j ) is the transpose of the embedding vector.

5. The industrial Internet graph data representation learning method based on edge relationship coding according to claim 1 is characterized in that: The updating of the node vector of each node of the context node sequence in sequence for the context node sequence set includes: For each of the nodes, randomly sampling at least one second negative sample to form a second negative sample set; The embedding vector of each node in the expanded node set of the node is updated to update the embedding vector of the node.

6. The industrial Internet graph data representation learning method based on edge relationship coding according to claim 5 is characterized in that: The updating formula of the embedding vector of each node in the extended node set is: i u =θ u +η[I(u=v)-σ(θ ω T i u )]θ ω Among them, η is the learning rate of vector update; N v is the extended node set of node v; I(·) is an indicator function, which takes the value of 1 when (·) holds and takes the value of 0 when it does not hold; σ is the Sigmoid function; θ ω T is the node θ ω The vector θ ω The transpose of .

7. An industrial Internet graph data representation learning device based on edge relationship coding, characterized in that: include: An initialization module, configured to randomly initialize a corresponding point embedding vector for each node in the graph network, and randomly initialize a corresponding edge embedding vector for each edge in the graph network, wherein the embedding dimension of each node is equal to the embedding dimension of each edge; A first generation module is configured to construct a self-centered network centered on each node, sequentially update the vector of each edge in the self-centered network of each node, and sequentially perform a first preset number of biased random walks on each node, sampling a node sequence of a preset length each time to generate a node sequence set; A second generating module is configured to extract nodes within a context window of each node in each node sequence based on the node sequence set, generate a corresponding context node sequence, and add the sequence to a preset empty set to obtain a context node sequence set; A learning construction module is used to sequentially update the node vector of each node of the context node sequence set, wherein a second preset number of update iterations are performed on the context node sequence set to obtain final embedding vectors of all nodes, and a node embedding matrix is ​​constructed based on the final embedding vectors.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the industrial Internet graph data representation learning method based on edge relationship encoding as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the industrial Internet graph data representation learning method based on edge relationship encoding as described in any one of claims 1 to 6.

10. A computer program product, characterized in that It includes a computer program, characterized in that the computer program is executed to implement the industrial Internet graph data representation learning method based on edge relationship encoding as described in any one of claims 1-6.