Time sequence diagram embedding method and system

By dividing time periods in the timing chart, building basic edge sets and calculating timing weights, the problem of insufficient timing information capture capability in the prior art is solved, and a higher quality graph embedding is achieved.

CN119597982AActive Publication Date: 2025-03-11ZHEJIANG CHUANGLIN TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510142639.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-03-11
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

The existing timing chart embedding scheme cannot effectively capture the timing information of the two basic nodes acting within the same time period, resulting in insufficient timing information capture capabilities.

Method used

By dividing the timing chart into multiple time periods, a basic edge set is constructed, and the timing weight is calculated based on the number of active times the base nodes are active in each time period, a target matrix is ​​constructed to generate graph embeddings.

Benefits of technology

Effectively retain the timing information and structural information in the timing chart, improve the quality of the graph embedding, and can additionally capture timing distribution information such as "two basic nodes active in multiple time periods at the same time have correlation".

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597982A_ABST
    Figure CN119597982A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence diagram embedding method and system, which are used for generating corresponding diagram embedding based on a time sequence diagram, the time sequence diagram comprises a basic node and a basic edge with generation time, and the diagram embedding generation method comprises the following steps: dividing a time interval corresponding to the time sequence diagram into a plurality of time periods, and on the basis of the generation time, generating the time sequence diagram according to the plurality of time periods; constructing basic edge sets in one-to-one correspondence with the time periods; based on the occurrence frequency of each basic node in the basic edge set, determining the time sequence weight of the basic node in the corresponding time period; constructing a corresponding target matrix based on each time sequence weight; and generating graph embedding based on the target matrix. According to the method, the target matrix constructed based on the time sequence weight additionally retains time sequence information about time sequence distribution, such as'two basic nodes active in multiple time periods at the same time have correlation ', so that the graph embedding quality is effectively improved, and when the target matrix is a time sequence matrix, the graph embedding efficiency is improved. And rapid incremental updating of graph embedding can be realized based on an incremental singular value decomposition algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a timing diagram embedding method and system. Background Art

[0002] Temporal Graph: A temporal graph represents a complex graph in which each edge has a timestamp and the graph structure changes over time.

[0003] Graph Embedding: A method of mapping a graph into a low-dimensional vector space, which plays a huge role in industrial recommendation systems, community discovery and other applications.

[0004] Existing timing diagram embedding solutions include: The traditional static graph embedding method based on random walk is extended to the time-series graph, so as to improve the embedding quality by using the time-series information. In this scheme, the random walk must be performed in chronological order. The above-mentioned time series graph embedding scheme is optimized using graph neural network, specifically by aggregating node features by timestamp to generate graph embedding that retains timing information.

[0005] However, the above two solutions are unable to capture the timing information corresponding to “two basic nodes often act in the same time period”, and the ability to capture timing information is insufficient. Summary of the invention

[0006] Aiming at the defect that the timing diagram embedding solution disclosed in the prior art has insufficient timing capture capability, the present invention proposes a timing diagram embedding method and system.

[0007] In order to solve the above technical problems, the present invention is solved by the following technical solutions: A method for embedding a time sequence graph, generating a corresponding graph embedding based on a time sequence graph, wherein the time sequence graph includes a basic node and a basic edge with a generation time; The following steps are involved: Divide the time interval corresponding to the time series graph into a plurality of time periods, and construct a basic edge set corresponding to the time periods one by one based on the generation time; Based on the number of occurrences of each basic node in the basic edge set, determine the time series weight of the basic node in the corresponding time period; Construct a target matrix that retains both timing information and structural information based on each timing weight; A graph embedding is generated based on the target matrix.

[0008] The timing weights are associated with the basic nodes and time periods respectively. Constructing the target matrix based on the timing weights can effectively retain the timing information and structural information in the corresponding timing diagram. Compared with the existing technology, it can also additionally retain timing information about timing distribution, such as "two basic nodes that are active in multiple time periods at the same time are correlated".

[0009] Furthermore, after obtaining the basic edge set, a method for generating a temporal bipartite graph is also provided, comprising the following steps: Treat each basic edge set as a time series node; The basic nodes appearing in the basic edge set are connected to the corresponding time nodes through time edges, and the number of occurrences of the basic nodes is used as the time weight of the corresponding time edge to generate the corresponding time bipartite graph.

[0010] As an implementable method, a similarity matrix is ​​constructed based on temporal weights, and the similarity matrix is ​​used as a target matrix for graph embedding generation, which specifically includes the following steps: Combine the basic nodes in pairs to form several basic node pairs; Calculate the similarity corresponding to each basic node pair; constructing a similarity matrix based on the obtained similarities; Decomposing the similarity matrix to generate corresponding graph embedding; The method for calculating the similarity of a target base node pair includes the following steps: Calculate the product of the time series weights corresponding to the target basic node pairs in each time period to obtain the local similarity corresponding to the time period one by one; The local similarities are accumulated to obtain the similarities corresponding to the target basic node pairs.

[0011] As an implementable method, singular value decomposition or Cholesky decomposition is performed on the similarity matrix to generate a graph embedding.

[0012] For example: After performing singular value decomposition on the similarity matrix, the square root product of the obtained left singular matrix and the singular value matrix is ​​used as the graph embedding; Perform Cholesky decomposition on the similarity matrix and directly embed the decomposed matrix as a graph.

[0013] As an implementable method, the time series matrix is ​​directly used as the target matrix, and the steps of similarity calculation, similarity matrix construction, and similarity matrix decomposition are omitted, so as to further improve the embedding efficiency while ensuring the quality of graph embedding. Specifically: Constructing a timing matrix based on the timing weights, and using the timing matrix as a target matrix; The time series matrix is ​​subjected to singular value decomposition, and a corresponding graph embedding is generated based on the decomposition result.

[0014] Further: Perform truncated singular value decomposition on the time series matrix to obtain the corresponding left singular matrix, singular value matrix and right singular matrix; Based on the left singular matrix and the singular value matrix, a corresponding graph embedding is generated.

[0015] Furthermore, based on the structure of the timing matrix, a method for graph embedding update is provided, comprising the following steps: Record the singular value decomposition results corresponding to the current target matrix as the first left singular matrix, the first singular value matrix and the first right singular matrix; When a new basic node is added or the corresponding time length is reached, the corresponding incremental timing diagram is obtained, and the corresponding incremental matrix is ​​constructed based on the incremental timing diagram; Based on the first left singular matrix, the first singular value matrix, the first right singular matrix and the incremental matrix, based on an incremental singular value decomposition algorithm, generate a corresponding second left singular matrix, a second singular value matrix and a second right singular matrix; A corresponding graph embedding is generated and updated based on the second left singular matrix and the second singular value matrix.

[0016] Further: Construct a first matrix based on the first left singular matrix, the first singular value matrix and the increment matrix; Constructing a second matrix based on the identity matrix and the first right singular matrix; The product of the first matrix and the second matrix represents the target matrix after incremental update; Performing QR decomposition on the first matrix to obtain a first orthogonal matrix and a first upper triangular matrix; Performing QR decomposition on the second matrix to obtain a second orthogonal matrix and a second upper triangular matrix; constructing a third matrix based on the transpose of the second upper triangular matrix and the first upper triangular matrix; Performing singular value decomposition on the third matrix to obtain a corresponding third left singular matrix, a third singular value matrix, and a third right singular matrix; Generate the second left singular matrix based on the first orthogonal matrix and the third left singular matrix; Using the third singular value matrix as the second singular value matrix; The second right singular matrix is ​​generated based on the second orthogonal matrix and the third right singular matrix.

[0017] Further: The target matrix after the incremental update indicated by the first matrix and the second matrix is:

[0018] in: W new Represents the target matrix after incremental update; U represents the first left singular matrix; ∑ represents the first singular value matrix; W' represents the increment matrix; V represents the first right singular matrix; I represents the identity matrix; [U∑ W'] is the first matrix; is the second matrix.

[0019] The present invention also provides a timing diagram embedding system for executing any one of the timing diagram embedding methods described above.

[0020] The present invention has significant technical effects due to the adoption of the above technical solution: Through the design of basic edge sets and timing weights, the present invention can reflect the activity level of corresponding basic nodes in the corresponding time period through timing weights. Compared with the prior art, it can additionally retain timing information about timing distribution, thereby effectively improving the quality of graph embedding. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 It is a schematic diagram of the working process of a timing diagram embedding method of the present invention; Figure 2 It is a schematic diagram for converting a timing graph into a timing bipartite graph; Figure 3 It is a schematic diagram of the embedding generation process when the target matrix is ​​a similarity matrix; Figure 4 is a schematic diagram of the embedding generation process when the target matrix is ​​a time series matrix; Figure 5 Schematic diagram of the embedding update process when the target matrix is ​​a time series matrix. DETAILED DESCRIPTION

[0023] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements.

[0024] The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Instead, they are only examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the attached claims.

[0025] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0026] A time-series graph embedding method generates a corresponding graph embedding based on a time-series graph, wherein the time-series graph includes node data and edge data, wherein the node data includes a plurality of basic nodes, and the edge data includes a plurality of basic edges and a generation time corresponding to each basic edge.

[0027] In this embodiment, by designing the time series weight indicating the activity level of the corresponding basic node in the corresponding time period, more time series information can be retained, thereby improving the quality of graph embedding; Reference Figure 1 , the specific steps are: S100, dividing the time interval corresponding to the time series diagram into a plurality of time periods, and constructing a basic edge set corresponding to the time periods one by one based on the generation time; That is, each basic edge is assigned to a corresponding time period according to its generation time to form a corresponding basic edge set, and each basic edge set does not intersect with each other.

[0028] Those skilled in the art may determine the time interval spanned by the timing diagram according to actual conditions, for example, based on the generation time corresponding to the basic edge, which is not limited in detail in this embodiment; The time lengths of the divided time periods are equal, and the graph embedding will be incrementally updated based on the time lengths subsequently.

[0029] S200, determining the time series weight of each basic node in the corresponding time period based on the number of occurrences of each basic node in the basic edge set; As is known, an edge is represented by the two nodes it connects, i.e., one basic edge corresponds to two basic nodes; In this embodiment, the number of occurrences is directly used as the corresponding time series weight.

[0030] As an implementation method, the basic edge set is used as the timing node, and a timing bipartite graph is constructed based on the basic edge set. The nodes of the timing bipartite graph are the basic nodes and the timing nodes, the edges are the timing edges connecting the basic nodes and the timing nodes, and the weights corresponding to the timing edges are the timing weights.

[0031] The specific steps include: S210, taking each basic edge set as a time series node; S220 , connect the basic nodes appearing in the basic edge set to the corresponding sequential nodes through sequential edges, and use the number of occurrences of the basic nodes as the sequential weights of the corresponding sequential edges to generate a corresponding sequential bipartite graph.

[0032] In this embodiment, each basic edge in each basic edge set is traversed, the current corresponding basic edge is taken as the target edge, the two basic nodes corresponding to the target edge are respectively taken as target nodes, a timing edge connecting the target node and the corresponding timing node is constructed, and the timing weight of the timing edge is updated.

[0033] The specific method of generating a time series bipartite graph is as follows; Timing diagram G=(V,E) ,in V The first node set, including several basic nodes v ; E Represents the first edge set, including several basic edges e ; Divide the entire time period spanned by the time series graph G into k Segment, and for each basic edge in the first edge set E e According to their generation time, they are assigned to the corresponding time period, thus obtaining k A subset of mutually disjoint basic edges E 1 ,E 2 ,…,E k , that is, the basic edge set; and the union of all basic edge sets is the first edge set E , that is, for any i≠j,E i ∩E j = ,and .

[0034] Will kThe basic edge sets are regarded as new nodes, that is, time series nodes, and a second node set U containing each time series node is constructed. In this case, each time series node is labeled in chronological order. u 1 ,u 2 ,…,u k ∈U ,in u l correspond E l .

[0035] Initialize the temporal bipartite graph G'=(V'=(V∪U),E'= ) ,in V' is the third node set, including the first node set V and the second node set U, that is, the nodes in the temporal bipartite graph include the basic nodes corresponding to the temporal graph v And the time series nodes corresponding to the time periods u ; E' The second edge set contains several connecting basic nodes v and timing nodes u The timing edge.

[0036] Construct the second edge set E' The method is to traverse all basic edge sets E l , the basic edge set E l Each basic edge in is used as the target edge, and the corresponding time series edge is constructed based on the basic nodes connected by the target edge; When the second edge set does not contain the timing edge, adding the timing edge to the second edge set and setting its timing weight to 1; When the second edge set contains the timing edge, increasing the timing weight of the timing edge by 1; For example: The basic edge collection E l Middle base edge (v i ,v j ) as the target edge and the base edge ( v i ,v j ) corresponding to the basic node v i and base nodes v j As the target node, the target node v i The corresponding timing edge is ( vi ,u l ), target node v j The corresponding timing edge is ( v j ,u l ): When the bipartite graph G' The second side set E' There is no temporal edge in v i ,u l ), then on the second side set E' Add a time series edge with a time series weight of 1 ( v i ,u l ), if the timing edge ( v i ,u l ) already exists, then the timing edge ( v i , u l )’s timing weight increases by 1; Same as above, when the sequential bipartite graph G' The second side set E' There is no temporal edge in v j ,u l ), then on the second side set E' Add a time series edge with a time series weight of 1 ( v j ,u l ), otherwise, the timing edge ( v j ,u l )’s timing weight is increased by 1.

[0037] Reference Figure 2 , a specific example is used to introduce the generation of a corresponding time series bipartite graph based on a time series graph. In the time series graph G, there are 7 basic nodes and 6 basic edges. The first edge set E is divided into 3 basic edge sets according to the generation time of the basic edges. E 1 ={(1,2),(2,4)},E 2 ={(2,3),(4,6)},E 3 ={(2,5),(3,7)} ; Based on the basic edge setE 1 ={(1,2),(2,4)} For example, in the time series bipartite graph G' Three time series edges are generated in 1,u 1 ),( 2,u 1 )and( 4,u 1 ). Since the base nodes 1 and 4 are E 1 It only appears once in the average, and the time series edge ( 1,u 1 )and( 4,u 1 ) has a corresponding time series weight of 1, while the basic node 2 has a corresponding time series weight of 1. E 1 It appears in both basic edges of , and the time sequence edge ( 2,u 1 ) has a weight of 2.

[0038] Reference Figure 2 ,The time series bipartite graph generated in this embodiment can explicitly contain additional time series information about the time series distribution through the connection between the basic nodes and the time series nodes, for example, it can reflect that “two basic nodes that are active in multiple time periods are correlated”; Reference Figure 2 The time series bipartite graph generated by this embodiment can not only effectively retain the time series information in the corresponding time series graph, but also can effectively retain the time series information in the time series bipartite graph through the second-order neighbors (i.e. v i →u l →v j ) to obtain the structural information of the corresponding timing diagram.

[0039] S300, constructing a target matrix retaining timing information and structural information based on each timing weight, and generating a graph embedding based on the target matrix; The target matrix is ​​a similarity matrix or a time series matrix, and the time series matrix is ​​a sparse matrix.

[0040] That is, based on the mapping relationship between the timing weight and the basic node and the timing node (time period), the timing information and structural information in the corresponding timing diagram can be effectively retained.

[0041] Reference Figure 3 As an implementable method, the target matrix is ​​a similarity matrix, a similarity matrix is ​​constructed, and the similarity matrix is ​​decomposed to obtain the corresponding graph embedding.

[0042] The specific steps are as follows: S410, calculating the similarity corresponding to each basic node pair; The basic node pair includes a first basic node and a second basic node. The first basic node and the second basic node are two different basic nodes. In this embodiment, the basic nodes are pre-combined in pairs to form a plurality of basic node pairs.

[0043] The basic node pair to be calculated for similarity is used as the target basic node pair. In this embodiment, the corresponding local similarity is obtained by calculating the product of the time series weights corresponding to the target basic node pair in each time period, and all local similarities are accumulated to obtain the similarity; The calculation formula is:

[0044] in: Sim( v i ,v j ) represents the base node v i and base nodes v j similarity; w(v i ,u l ) Represents the base node v i and timing nodes u l The corresponding timing weight; w(v j ,u l ) Represents the base node v j and timing nodes u l The corresponding timing weight.

[0045] This similarity definition takes into account the time distribution associated with the nodes, where the more similar the generation time distribution of the edges around two nodes is, the more similar the two nodes are considered to be.

[0046] S420, constructing a similarity matrix based on the obtained similarities, and decomposing the similarity matrix to generate corresponding graph embedding; A person skilled in the art may construct a corresponding similarity matrix based on the prior art, provided that he or she knows the similarities of each basic node pair, and this specification will not elaborate on it.

[0047] Those skilled in the art may generate graph embedding by performing singular value decomposition or Cholesky decomposition (square root method) on the similarity matrix.

[0048] When using singular value decomposition, technicians in this field can choose the singular value decomposition algorithm to be used according to actual needs. For example, truncated singular value decomposition (Truncated SVD) or fast randomized singular value decomposition (FastRandomized SVD) can be used, and the square root product of the obtained left singular matrix and the singular value matrix is ​​used as the graph embedding. This embodiment does not limit it in detail.

[0049] In this implementation, by designing the timing weight and similarity algorithm, the obtained similarity matrix can fully retain the timing information and structural information of the original timing graph, and a high-quality embedding representation can be obtained by performing singular value decomposition on the similarity matrix.

[0050] Reference Figure 4 As an implementable method, the corresponding time series matrix is ​​directly used as the target matrix, the target matrix is ​​subjected to singular value decomposition, and the corresponding graph embedding is generated based on the obtained left singular matrix and singular value matrix.

[0051] As an implementable method, in this embodiment, the time series matrix is ​​directly used as the target matrix, and the steps of similarity calculation, similarity matrix construction, and similarity matrix decomposition are omitted; In this embodiment, a target matrix retaining the timing information and the structural information is constructed based on each timing weight, and the specific steps of generating a graph embedding based on the target matrix are as follows: S510, constructing a timing matrix based on the timing weight; The timing matrix is ​​a sparse timing matrix.

[0052] The behavior of the timing matrix is ​​based on nodes, the columns are timing nodes, and the values ​​are corresponding timing weights; That is, the i-th row and l-th column of the time series matrix is ​​the corresponding time series weight w(v i ,u l ).

[0053] S520: Perform singular value decomposition on the time series matrix, and generate a corresponding graph embedding based on the left singular matrix and singular value matrix obtained by the decomposition.

[0054] In this embodiment, truncated singular value decomposition is used; The expression is: W=U∑V T ; in: W is the target matrix, i.e., the time series matrix; U is the left singular matrix obtained by performing singular value decomposition on the target matrix W; ∑ is the singular value matrix obtained by performing singular value decomposition on the target matrix W; V is the right singular matrix obtained by performing singular value decomposition on the target matrix W.

[0055] In this embodiment, the corresponding graph embedding Z is generated based on the left singular matrix and singular value matrix obtained by decomposition, where Z=U∑.

[0056] In practical applications, those skilled in the art may determine the dimensions of the left singular matrix, the singular value matrix, and the right singular matrix according to the embedding dimensions actually required, and this embodiment does not limit them in detail.

[0057] Perform Cholesky decomposition on the similarity matrix S, and the resulting matrix is ​​similar to the structure of the time series matrix W, so we can get S'=WW T , where S' is an equivalent matrix, which is highly similar to the similarity matrix S; Substitute the singular value decomposition result of the target matrix W into the expression of the corresponding equivalent matrix S', and know that VV T =I, I is the unit matrix, we can get: S'=UΣV T V(UΣ) T =UΣ(UΣ) T ; This proves that converting the decomposition of the similarity matrix S into the decomposition of the target matrix W in this embodiment has theoretical support.

[0058] Taking the scheme of decomposing the similarity matrix S to obtain graph embedding based on Fast Randomized SVD as an example, its time complexity and space complexity can be approximated to O(nonzero(S)), where nonzero(S) represents the number of nonzero elements in the similarity matrix S; For the general decomposition method, the number of non-zero elements in the similarity matrix S is O(n 2 ), where n is the number of basic nodes. It can be seen that for large-scale time series graphs with more than tens of millions of nodes, the solution of decomposing the similarity matrix to obtain graph embedding lacks practicality in terms of efficiency and space consumption; Existing solutions for embedding time series graphs based on random walk deep learning models or graph neural networks only focus on the quality of embedding and are difficult to handle large-scale time series graphs.

[0059] In this embodiment, when the time series matrix is ​​used as the target matrix to obtain graph embedding, its time complexity and space complexity can be approximated to O(nonzero(W)), where nonzero(W) represents the number of nonzero elements in the target matrix W; In this embodiment, the number of non-zero elements in W is at most O(m), where m is the number of underlying edges. It can be seen that the model runs very efficiently and only occupies a small amount of computing space, and can process large-scale time series graphs. In this embodiment, the corresponding graph embedding is generated by decomposing the time series matrix, and high-quality embedding can be generated for billion-level time series graphs within a few hours.

[0060] In summary, this embodiment groups each basic edge according to its generation time, and based on the grouping result, that is, the basic edge set, calculates the timing weight corresponding to each basic node in each time period. The timing weight reflects the activity level of the corresponding basic node in the corresponding time period. The timing matrix constructed based on the timing weight can reflect the timing information and structural information corresponding to the timing graph. The timing matrix is ​​decomposed by singular value, and the corresponding graph embedding is generated based on the decomposition result. Not only the embedding quality is high, but also the generation efficiency is high, and it can generate a timing graph embedding with a scale of more than 1 billion edges.

[0061] Existing technologies often only focus on the timing information in the timing graph, but ignore the fact that the timing graph will undergo structural changes over time, and thus cannot update the embedding efficiently; Reference Figure 5 ,To address the above defects, when the target matrix is ​​a timing matrix, the ,structure of the timing matrix can be used to quickly and incrementally update the ,current graph embedding based on the incremental timing graph.

[0062] When a new basic node is added or the corresponding time length is reached, the corresponding incremental timing diagram is obtained, and the graph embedding is updated based on the incremental timing diagram. The specific steps are as follows: S610, constructing a corresponding incremental matrix based on the incremental timing diagram; In this embodiment, embedded updates are performed when new basic nodes are added or the corresponding time length is reached (forming new timing nodes), and based on the special properties of the timing matrix, the corresponding timing matrix can be incrementally increased in columns or rows based on the incremental timing diagram, which complies with the definition of incremental singular value decomposition.

[0063] In this embodiment: When a new basic node is added, the timing weight of the newly added basic node under each timing node is determined, and the corresponding incremental matrix is ​​generated; When the corresponding time length is reached, the basic edge set corresponding to the newly added time period is determined based on the incremental timing diagram to form a new timing node, and the timing weight of each basic node under the newly added timing node is determined to generate the corresponding incremental matrix.

[0064] S620, based on the first left singular matrix, the first singular value matrix, the first right singular matrix and the incremental matrix, generate a corresponding second left singular matrix, a second singular value matrix and a second right singular matrix based on an incremental singular value decomposition algorithm; Record the singular value decomposition results corresponding to the current target matrix (ie, the time series matrix) as the first left singular matrix, the first singular value matrix, and the first right singular matrix; The obtained second left singular matrix, second singular value matrix, and second right singular matrix correspond to the incremented target matrix.

[0065] In this embodiment, the specific steps of incremental singular value decomposition are: S621, using the first matrix and the second matrix to represent the target matrix after the increment; In this embodiment: Construct a first matrix by using the first left singular matrix, the first singular value matrix and the increment matrix; Construct a second matrix by using the identity matrix and the first right singular matrix; The product of the first matrix and the second matrix represents the target matrix after incremental update; The expression is as follows: W new =[W,W']=

[0066] in: W new Represents the target matrix after incremental update; [U∑ W'] is the first matrix; is the second matrix.

[0067] U represents the first left singular matrix; ∑ represents the first singular value matrix; W' represents the increment matrix; V represents the first right singular matrix; I represents the identity matrix.

[0068] S622, performing QR decomposition on the first matrix to obtain a first orthogonal matrix Q1 and a first upper triangular matrix R1; S623, performing QR decomposition on the second matrix to obtain a second orthogonal matrix Q2 and a second upper triangular matrix R2; S624, based on the transposition R2 of the second upper triangular matrix T And the first upper triangular matrix R1 constructs the third matrix R1R2 T ; S625, the third matrix R1R2 T Perform singular value decomposition to obtain the corresponding third left singular matrix U R , the third singular value matrix ∑ R and the third right singular matrix V R ; That is, R1R2 T =U R ∑ R V R T ; S626, based on the first orthogonal matrix Q1 and the third left singular matrix U R Generate the second left singular matrix U I , U I =Q1U R ; S627, the third singular value matrix ∑ R As the second singular value matrix ∑ I ; S628, based on the second orthogonal matrix Q2 and the third right singular matrix V R Generate the second right singular matrix V I , V I T =V R T Q2 T .

[0069] S630: Generate and update the corresponding graph embedding based on the second left singular matrix and the second singular value matrix, that is, Z new =U I ∑ I ; Based on graph embedding Z new After completing the embedding update, embed it as the current graph and convert the obtained second left singular matrix U I , the second singular value matrix ∑ I and the second right singular matrix V I The singular value decomposition result corresponding to the current target matrix is ​​used for the next embedding update.

[0070] The incremental update method proposed in this embodiment can perform embedded update under the premise of theoretical error guarantee. The theoretical error guarantee is explained and proved below. Assume (M) d is the d-rank approximation of the matrix M; Let X = W new , we have X=[W,W'] and X'=[(W) d ,(W') d ], the approximation (X') returned by the above algorithm d =U I ∑ I V I T satisfy: ||(X') d - X|| F ≤3||(X) d - X| F Among them, ||*|| F represents the F-norm.

[0071] According to the triangle inequality of matrix norm, we can get: ||(X') d - X|| F = ||(X') d - X'+ X'-X|| F ≤||(X') d - X'|| F +||X'-X|| F。

[0072] On the one hand, due to (X') d is the d-rank approximation of X', so we can get:

[0073] Among them, σ i (X') is the i-th largest singular value of X'.

[0074] On the other hand, based on the definition of the F-norm (Frobenius matrix norm) ,available:

[0075] in: W[ i,j ] represents the target matrix W i Line j Elements of a column; n is the number of nodes; k is the number of divided time periods; d is the dimension of embedding; β The number of newly added time segments.

[0076] Furthermore, for two matrices A and B, there exists: σ i ([A,B])≥max{σ i (A),σ i (B),σ i ([(A) d ,[(B) d ])}; From this we can get: σ i (X) = σ i ([W,W'])≥max{σ i (W),σ i (W'),σ i (X')}; The final derivation is:

[0077] Similarly, we can also get

[0078] Based on the above derivation process, it can be proved that the graph embedding update based on the incremental singular value decomposition algorithm in this embodiment has a theoretical error guarantee.

[0079] The method for generating and updating graph embedding disclosed in this embodiment can be applied to scenarios such as social network analysis and industrial equipment management; Social Network Analysis: In social networks, the interactions between users often have time-series characteristics, and in actual application scenarios, new users are added. When new users are added, the graph structure of the corresponding time-series graph will change; In this scenario, the basic node is the user node. Through the design of temporal weights and similarities, the graph embedding generated based on any target matrix can activate the temporal information corresponding to the interaction between users, and the quality of graph embedding is higher. At the same time, for graph embedding schemes based on the time series matrix as the target matrix, when a new user node is added or a new time series node is generated, the embedding update can be completed efficiently and with high quality based on the incremental singular value decomposition algorithm.

[0080] Industrial Equipment Management: In the specific industrial equipment management, the interaction of equipment includes timing characteristics, and there are also cases where new equipment is added; In this scenario, the basic node is the device node. The present invention can effectively capture the relationship between each device and the active time period through the timing bipartite graph design, so that the timing information of the device can be integrated into the embedding; For graph embedding solutions based on timing matrix as target matrix, it can not only meet the embedding requirements of large-scale timing graphs in such scenarios, but also complete the embedding update efficiently and with high quality based on incremental singular value decomposition algorithm when new devices are added or new timing nodes are generated, thus solving the defects of current timing graph embedding solutions in low embedding quality and slow embedding update time in large-scale timing graph embedding scenarios.

[0081] This specification also proposes a timing diagram embedding system for executing the timing diagram embedding method disclosed in any of the above embodiments. Since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0082] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0083] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] The present invention is described with reference to the flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

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

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

[0087] It should be noted that: The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.

[0088] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0089] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different. Any equivalent or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. The technicians in the technical field of the present invention can make various modifications or supplements to the specific embodiments described or replace them in a similar manner, as long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

Claims

1. A method for embedding a time sequence graph, generating a corresponding graph embedding based on a time sequence graph, wherein the time sequence graph includes a basic node and a basic edge with a generation time; It is characterized in that The following steps are involved: Divide the time interval corresponding to the time series graph into a plurality of time periods, and construct a basic edge set corresponding to the time periods one by one based on the generation time; Based on the number of occurrences of each basic node in the basic edge set, determine the time series weight of the basic node in the corresponding time period; A target matrix retaining the temporal information and the structural information is constructed based on each temporal weight, and a graph embedding is generated based on the target matrix.

2. The timing diagram embedding method according to claim 1, characterized in that After the basic edge set is obtained, a method for generating a temporal bipartite graph is also provided, including the following steps: Treat each basic edge set as a time series node; The basic nodes appearing in the basic edge set are connected to the corresponding time nodes through time edges, and the number of occurrences of the basic nodes is used as the time weight of the corresponding time edge to generate the corresponding time bipartite graph.

3. The timing diagram embedding method according to claim 1 or 2, characterized in that: The target matrix is ​​a similarity matrix. The specific steps to construct the similarity matrix are: Combine the basic nodes in pairs to form several basic node pairs; Calculate the similarity corresponding to each basic node pair; constructing a similarity matrix based on the obtained similarities; The method for calculating the similarity of a target base node pair includes the following steps: Calculate the product of the time series weights corresponding to the target basic node pairs in each time period to obtain the local similarity corresponding to the time period one by one; The local similarities are accumulated to obtain the similarities corresponding to the target basic node pairs.

4. The timing diagram embedding method according to claim 3, characterized in that: The similarity matrix is ​​subjected to singular value decomposition or Cholesky decomposition to generate a graph embedding.

5. The timing diagram embedding method according to claim 1 or 2, characterized in that: A timing matrix is ​​constructed based on the timing weights, and the timing matrix is ​​used as a target matrix.

6. The timing diagram embedding method according to claim 5, characterized in that: Perform truncated singular value decomposition on the time series matrix to obtain the corresponding left singular matrix, singular value matrix and right singular matrix; Based on the left singular matrix and the singular value matrix, a corresponding graph embedding is generated.

7. The timing diagram embedding method according to claim 6, characterized in that: Also included is a method for graph embedding update, comprising the following steps: Record the singular value decomposition results corresponding to the current target matrix as the first left singular matrix, the first singular value matrix and the first right singular matrix; When a new basic node is added or the corresponding time length is reached, the corresponding incremental timing diagram is obtained, and the corresponding incremental matrix is ​​constructed based on the incremental timing diagram; Based on the first left singular matrix, the first singular value matrix, the first right singular matrix and the incremental matrix, based on an incremental singular value decomposition algorithm, generate a corresponding second left singular matrix, a second singular value matrix and a second right singular matrix; A corresponding graph embedding is generated and updated based on the second left singular matrix and the second singular value matrix.

8. The timing diagram embedding method according to claim 7, characterized in that: Construct a first matrix based on the first left singular matrix, the first singular value matrix and the increment matrix; Constructing a second matrix based on the identity matrix and the first right singular matrix; The product of the first matrix and the second matrix represents the target matrix after incremental update; Performing QR decomposition on the first matrix to obtain a first orthogonal matrix and a first upper triangular matrix; Performing QR decomposition on the second matrix to obtain a second orthogonal matrix and a second upper triangular matrix; constructing a third matrix based on the transpose of the second upper triangular matrix and the first upper triangular matrix; Performing singular value decomposition on the third matrix to obtain a corresponding third left singular matrix, a third singular value matrix, and a third right singular matrix; Generate the second left singular matrix based on the first orthogonal matrix and the third left singular matrix; Using the third singular value matrix as the second singular value matrix; The second right singular matrix is ​​generated based on the second orthogonal matrix and the third right singular matrix.

9. The timing diagram embedding method according to claim 8, characterized in that: The target matrix after the incremental update indicated by the first matrix and the second matrix is: ; in: W new Represents the target matrix after incremental update; U represents the first left singular matrix; ∑ represents the first singular value matrix; W' represents the increment matrix; V represents the first right singular matrix; I represents the identity matrix; [U∑ W'] is the first matrix; is the second matrix.

10. A timing diagram embedding system, characterized in that: Used to execute the timing diagram embedding method described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Canonical correlation analysis method for embedding multiple sets into fractional order graph

    CN114841284A

  • Abnormal behavior detection method based on optimized graph embedding representation

    CN118820877A

  • Systems and methods for low-rank matrix approximation

    US20160055124A1

  • De-Biasing Graph Embeddings via Metadata-Orthogonal Training

    US20210056428A1

  • Graph embeddings via node-property-aware fast random projection

    US20220382741A1