Task execution method, device, equipment and storage medium based on hypergraph learning
By constructing a hypergraph learning model, node features are obtained using the probability transfer matrix determined by supernode sets, hyperede edge sets, etc., and tasks are executed according to the similarity of feature, solving the problem of inaccurate interaction information caused by simplifying hypergraphs into ordinary graphs, and improving task execution effect.
Patent Information
- Application Number
- CN202310306282.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-03-21
AI Technical Summary
The hypergraph learning method in the existing graph neural network simplifies hypergraphs into ordinary graphs, resulting in low accuracy in the expression of interactive information between nodes inside the hypergraph, affecting the task execution effect in actual application scenarios.
By building a preset hypergraph learning model, the probability transfer matrix determined by the supernode set, hyper-edge set, edge-dependent node weight set and hyper-edge weight set are used to obtain the node characteristics of the task node, and perform the task according to the characteristic similarity of the node embedding features and the task embedded features.
It improves the accuracy of the expression of interactive information between nodes inside the hypergraph and improves the task execution effect in practical application scenarios.
Smart Images

Figure CN116304708B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of graph neural networks, and in particular, to a task execution method, device, electronic device, and readable storage medium based on hypergraph learning. Background Art
[0002] With the continuous development of neural networks, in tasks with high demands for the ability to characterize and mine non-linear high-order associations of data samples, it is necessary to use graph or hypergraph structures to organize data, and then graph neural networks are derived. A graph neural network (GNN) is a neural network acting on a graph structure. At the same time, hypergraph learning methods based on neural networks have also been widely applied.
[0003] Currently, common hypergraph learning methods based on neural networks are mainly divided into spectral methods and message passing methods. Among them, the former attempts to explain the interaction method of nodes inside a hyperedge from a physical perspective to obtain more interaction information, and the latter starts from the perspective of deep learning to increase the learning ability and generalization ability of the hypergraph model. However, in current graph neural networks, information interaction between nodes inside a hyperedge is still achieved from the perspective of simplifying the hypergraph into an ordinary graph. Therefore, the accuracy of expressing interaction information between nodes inside a hypergraph is low, and thus the execution effect of related tasks in the current actual application scenario is poor. Summary of the Invention
[0004] The main purpose of this application is to provide a task execution method, device, electronic device, and readable storage medium based on hypergraph learning, aiming to solve the technical problem that the execution effect of related tasks in the current actual application scenario is poor in the prior art.
[0005] To achieve the above object, this application provides a task execution method based on hypergraph learning. The task execution method based on hypergraph learning includes:
[0006] Obtain the node features of the task nodes corresponding to the task to be executed, where the task nodes are any hypernodes in the initial hypergraph;
[0007] Input the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set;
[0008] Execute the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed.
[0009] Optionally, the step of performing the to-be-executed task according to the feature similarity between the node embedding feature and the task embedding feature corresponding to the to-be-executed task includes:
[0010] According to the feature similarity, match a task execution label for the to-be-executed task;
[0011] According to the task execution label, perform the to-be-executed task.
[0012] Optionally, before the step of obtaining the node feature of the task node corresponding to the to-be-executed task, the task execution method based on hypergraph learning further includes:
[0013] Construct an initial hypergraph according to the data attributes between at least one task basic data, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set;
[0014] Determine the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph;
[0015] Construct a preset hypergraph learning model based on the Laplacian matrix of the initial hypergraph.
[0016] Optionally, the step of constructing a preset hypergraph learning model based on the Laplacian matrix of the initial hypergraph includes:
[0017] Extract the node feature matrix of the initial hypergraph by hypergraph convolution of the Laplacian matrix of the initial hypergraph;
[0018] Determine a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph;
[0019] Perform iterative filtering on the matrix signal corresponding to the node feature matrix according to the initial hypergraph filter until a Laplacian smoothing matrix is obtained;
[0020] Construct the preset hypergraph learning model based on the Laplacian smoothing matrix.
[0021] Optionally, the rules of the random walk are defined as follows:
[0022] Select a target hyperedge from multiple hyperedges containing the task node with the hyperedge weight probability;
[0023] Select a target hypernode from the target hyperedge with the hypernode weight probability;
[0024] Move the task node to the target hypernode within a preset time period.
[0025] Optionally, before the step of determining the Laplacian matrix of the initial hypergraph based on the probability transition matrix of the random walk on the initial hypergraph, the task execution method based on hypergraph learning further includes:
[0026] Obtain the node random probability of the task node;
[0027] Determine the probability transition matrix of the random walk on the initial hypergraph according to the complete random matrix of the node random probability and the basic probability transition matrix.
[0028] Optionally, the Laplacian matrix of the initial hypergraph is defined as follows:
[0029]
[0030] Where L is the Laplacian matrix of the initial hypergraph, I is the steady-state distribution, Φ is the diagonal matrix between nodes, P is the probability transition matrix of the random walk on the initial hypergraph, and the probability transition matrix of the random walk on the initial hypergraph is defined as follows:
[0031]
[0032] Where P0 is the basic probability transition matrix, is the node random probability, N is the number of hypernodes, E is the complete random matrix, and E T is the transpose matrix of the complete random matrix.
[0033] To achieve the above object, the present application further provides a task execution method device based on hypergraph learning. The task execution method device based on hypergraph learning includes:
[0034] An acquisition module, configured to acquire the node features of the task node corresponding to the task to be executed, where the task node is any hypernode in the initial hypergraph;
[0035] An input module, configured to input the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set;
[0036] An execution module, configured to execute the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed.
[0037] Optionally, the execution module is further configured to:
[0038] Match a task execution label for the task to be executed according to the feature similarity;
[0039] Execute the to-be-executed task according to the task execution tag.
[0040] Optionally, the task execution device based on hypergraph learning is further configured to:
[0041] Construct an initial hypergraph according to the data attributes between at least one task-based data, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set;
[0042] Determine the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph;
[0043] Construct a preset hypergraph learning model based on the Laplacian matrix of the initial hypergraph.
[0044] Optionally, the task execution device based on hypergraph learning is further configured to:
[0045] Extract the node feature matrix of the initial hypergraph by hypergraph convolution of the Laplacian matrix of the initial hypergraph;
[0046] Determine a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph;
[0047] Iteratively filter the matrix signal corresponding to the node feature matrix according to the initial hypergraph filter until a Laplacian smoothing matrix is obtained;
[0048] Construct the preset hypergraph learning model based on the Laplacian smoothing matrix.
[0049] Optionally, the rules of the random walk are defined as follows:
[0050] Select a target hyperedge from multiple hyperedges containing the task node with the hyperedge weight probability;
[0051] Select a target hypernode from the target hyperedge with the hypernode weight probability;
[0052] Move the task node to the target hypernode within a preset time period.
[0053] Optionally, the task execution device based on hypergraph learning is further configured to:
[0054] Obtain the node random probability of the task node;
[0055] Determine the probability transition matrix of random walks on the initial hypergraph according to the complete random matrix of the node random probability and the basic probability transition matrix.
[0056] Optionally, the Laplacian matrix of the initial hypergraph is defined as follows:
[0057]
[0058] Among them, L is the Laplacian matrix of the initial hypergraph, I is the steady-state distribution, Φ is the diagonal matrix between nodes, P is the probability transition matrix of random walk on the initial hypergraph, where the probability transition matrix of random walk on the initial hypergraph is defined as follows:
[0059]
[0060] Among them, P0 is the basic probability transition matrix, is the node random probability, N is the number of hypernodes, E is the completely random matrix, and E T is the transpose matrix of the completely random matrix.
[0061] The present application also provides an electronic device, which includes: a memory, a processor, and a program of the task execution method based on hypergraph learning stored on the memory and executable on the processor. When the program of the task execution method based on hypergraph learning is executed by the processor, the steps of the task execution method based on hypergraph learning as described above can be implemented.
[0062] The present application also provides a computer-readable storage medium, on which a program for implementing the task execution method based on hypergraph learning is stored. When the program for implementing the task execution method based on hypergraph learning is executed by the processor, the steps of the task execution method based on hypergraph learning as described above are implemented.
[0063] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the task execution method based on hypergraph learning as described above are implemented.
[0064] The present application provides a task execution method, device, electronic device, and readable storage medium based on hypergraph learning. That is, node features of task nodes corresponding to a task to be executed are obtained, where the task nodes are any hypernodes in an initial hypergraph; the node features are input into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set; and the task to be executed is executed according to the feature similarity between the node embedding features and task embedding features corresponding to the task to be executed.
[0065] In this application, any hypernode in the initial hypergraph is used as the task node of the task to be executed. Then, the node features of the task node are obtained, and by inputting the node features into the preset hypergraph learning model corresponding to the initial hypergraph, node features are obtained. Finally, the purpose of executing the task to be executed is achieved through the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed. That is to say, in this application, the node embedding features output by the preset hypergraph learning model constructed by the probability transition matrix jointly determined by the hypernode set, hyperedge set, edge-dependent node weight set, and hyperedge weight set are used to feedback the feature similarity degree with the task embedding features corresponding to the task to be executed, and then the task to be executed is executed. Since the edge-dependent node weight set is introduced when constructing the preset hypergraph learning model, the preset hypergraph learning model can consider the interaction information between nodes from a higher fine-grained perspective, that is, the purpose of ensuring the execution of the task to be executed through objective feature similarity can be achieved.
[0066] Based on this, by capturing richer node topology information and making full use of the high-order interaction relationships between the internal nodes of the hypergraph, the interaction information within the hypergraph is made more inclined to the real situation, rather than still from the perspective of simplifying the hypergraph into an ordinary graph to realize the information interaction between the internal nodes of the hyperedge. Therefore, the accuracy of the expression of the interaction information between the internal nodes of the hypergraph is improved, and thus the execution effect of related tasks in the current actual application scenario is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0068] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0069] Figure 1 It is a schematic flowchart of the task execution method based on hypergraph learning provided in Embodiment 1 of this application;
[0070] Figure 2 It is a schematic representation of the initial hypergraph of the task execution method based on hypergraph learning provided in Embodiment 1 of this application;
[0071] Figure 3 It is a schematic flowchart of the task execution method based on hypergraph learning provided in Embodiment 2 of this application;
[0072] Figure 4It is a schematic structural diagram of a task execution method and device based on hypergraph learning provided in the third embodiment of this application;
[0073] Figure 5 It is a schematic structural diagram of an electronic device provided in the fourth embodiment of this application.
[0074] The realization of the purpose, functional features and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0075] To make the above objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0076] Embodiment 1
[0077] First of all, it should be understood that in the existing hypergraph learning methods, since it starts from an angle of simplifying a hypergraph into an ordinary graph, information loss is likely to occur during the simplification process, which in turn leads to low accuracy in expressing the interaction information between the internal nodes of the hypergraph. Therefore, in this application, attention is paid to exploring a more accurate way of expressing the interaction between nodes in the hypergraph, so as to restore the high-order interaction relationship in the real situation to the greatest extent, and retain more complete interaction and structural information. Finally, the theory is combined with conventional real-world tools, so as to achieve better execution effects when performing related tasks in actual application scenarios.
[0078] The embodiment of this application provides a task execution method based on hypergraph learning. In the first embodiment of the task execution method based on hypergraph learning in this application, refer to Figure 1 , the task execution method based on hypergraph learning includes:
[0079] Step S10, obtaining the node features of the task nodes corresponding to the task to be executed, where the task nodes are any hypernodes in the initial hypergraph;
[0080] Step S20, inputting the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set;
[0081] Step S30, executing the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed.
[0082] In this embodiment, it should be noted that the task to be executed is used to represent the actual task waiting to be executed based on hypergraph learning. Specifically, it can be a classification task, a clustering task, a regression task, etc. Among them, the application field to which the task to be executed belongs is not limited. For example, the application field can specifically be the gene selection field, the disease prediction field, the system recommendation field, the autonomous driving field, and the social network field, etc. A hypergraph refers to a topological structure with stronger representation ability. Any hyperedge in the hypergraph can contain multiple hypernodes. The initial hypergraph refers to a hypergraph constructed from different perspectives of the domain-based data in the application field to which the task to be executed belongs. Among them, hypernodes and hyperedges are collected from different perspectives. For example, assuming that the system recommendation field is the music recommendation field and the task to be executed is the music recommendation task, then the listening relationship between users and music can be utilized. Each piece of music is used as a hypernode to form a hypernode set, and each user is used as a hyperedge. Among them, if the music corresponding to hypernodes v1, v2... v n is listened to by the user corresponding to hyperedge e, then hypernodes v1, v2... v n are connected to hyperedge e. Refer to Figure 2 , Figure 2 which is a schematic representation of the initial hypergraph. Among them, e1, e2, e3 are used to represent different hyperedges, and v1, v2... v6 are used to represent different hypernodes.
[0083] In addition, it should be noted that a task node is any hypernode in the initial hypergraph. Node features refer to the original features of the node. The preset hypergraph learning model is constructed from a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set. Among them, the hypernode set is the set of hypernodes, the hyperedge set is the set of hyperedges, the edge-dependent node weight set is the set of the dependence weights of nodes on different hyperedges. The edge-dependent node weight is used to represent the contribution degree of the hypernode in the hyperedge it depends on, and can reflect the high-order interaction relationship between different nodes inside the hypergraph. In the constructed hypergraph, the weights of the same hypernode in different hyperedges are different. When the edge-dependent node weight is larger, it indicates that the hypernode has a greater impact on other hypernodes within the hyperedge, that is, the direct interaction between this node and other hypernodes within the hyperedge is closer. The hyperedge weight set is the set of hyperedge weights. In an implementable manner, the hyperedge weight can represent the contribution degree of the hyperedge to the hypergraph. For example, assuming that music is used as a hypernode and a user is used as a hyperedge, the music play volume can be used as the hyperedge weight, the probability transition matrix.
[0084] Additionally, it should be noted that the node embedding feature is the output of a preset hypergraph learning model. The task embedding feature can be set by the user according to the task requirements of the task to be executed. The feature similarity is used to characterize the similarity between features, and specifically can be cosine similarity. For example, in an implementable manner, assuming the hypernode is music and the hyperedge is the user, the calculation method of cosine similarity is as follows:
[0085]
[0086] where u is the node embedding feature and m is the task embedding feature. The cosine similarity is in the range of [-1, 1]. The cosine similarity is used to determine the similarity between the user vector and the embedding space. For example, assuming the cosine similarity is close to 1, it indicates a high similarity between the node embedding feature and the task embedding feature, meaning a better match between the song and the user. Assuming the cosine similarity is close to 0, it indicates an orthogonal (and thus independent) relationship between the two feature vectors, meaning the user is not interested in the content. Assuming the cosine similarity is close to -1, it just means the two feature vectors are strongly opposite vectors, so there is a negative matching relationship between the user and the song.
[0087] As an example, steps S10 to S30 include: obtaining the task to be executed, selecting a hypernode in the initial hypergraph as the task node of the task to be executed, and extracting the node features of the task node; inputting the node features into the preset hypergraph learning model corresponding to the initial hypergraph to obtain the node embedding feature; calculating the cosine similarity between the node embedding feature and the task embedding feature corresponding to the task to be executed, and executing the task to be executed according to the cosine feature value close to the cosine similarity, where the similarity interval can specifically be -1, 0, and 1.
[0088] In an implementable manner, assuming the task to be executed is a music recommendation task, first construct a hypergraph network H based on the user and the music the user likes, and use the music the user marks as liked on the network as the node v ∈ V and the user as the hyperedge e ∈ E. Each hypernode has a feature vector x. Then, the initial music feature matrix X composed of the feature vectors x is input into the preset hypergraph learning model:
[0089]
[0090] where Y is the node embedding feature.
[0091] In an implementable manner, in order to obtain a more objective feedback on the generalization of the node, the node average embedding feature is used as the node embedding feature, that is:
[0092]
[0093] Among them, x e is the average embedded feature of the node, n is the number of feature outputs, and x1+…x n are the node embedded features from the first to the nth time. And, before calculating the feature similarity, the node embedded features are preprocessed by z-score normalization to normalize each node embedded feature to a common range and scale.
[0094] Among them, the steps of performing the to-be-executed task according to the feature similarity between the node embedded feature and the task embedded feature corresponding to the to-be-executed task include:
[0095] Step A10, matching a task execution label for the to-be-executed task according to the feature similarity;
[0096] Step A20, performing the to-be-executed task according to the task execution label.
[0097] In this embodiment, it should be noted that, in order to improve the execution efficiency of the task, before performing the task execution method based on hypergraph learning, a mapping relationship table between the task execution label and the feature similarity can be established, and after obtaining the feature similarity, directly query the task execution label corresponding to the feature similarity, and then perform the to-be-executed task according to the task execution label. Among them, the task execution label is used to identify the execution method of the task. For example, the task execution label can be "not recommend songs" or "recommend songs", etc.
[0098] As an example, steps A10 to A20 include: querying the task execution label corresponding to the to-be-executed task with the feature similarity as the index; performing the to-be-executed task through the task execution label.
[0099] Among them, before the step of obtaining the node feature of the task node corresponding to the to-be-executed task, the task execution method based on hypergraph learning further includes:
[0100] Step B10, constructing an initial hypergraph according to the data attributes between at least one task basic data, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set;
[0101] Step B20, determining the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph;
[0102] Step B30, constructing a preset hypergraph learning model based on the Laplacian matrix of the initial hypergraph.
[0103] In this embodiment, it should be noted that the data attribute is used to characterize the attribute dimension of the constructed hypergraph, and can specifically be distance, node attribute, network structure, etc. The Laplacian matrix of the initial hypergraph is the Laplacian matrix after symmetric normalization.
[0104] As an example, steps B10 to B30 include: taking at least one task basic data with different attributes as hypernodes and hyperedges, and constructing an initial hypergraph according to the node attributes between the hypernodes, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set; determining the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph; constructing a preset hypergraph learning model based on the Laplacian matrix of the initial hypergraph.
[0105] Among them, the determination of the Laplacian matrix of the initial hypergraph depends on the random walk rule of the probability transition matrix of random walks on the initial hypergraph, where the random walk rule is defined as follows:
[0106] Select a target hyperedge from multiple hyperedges containing the task node with the hyperedge weight probability; select a target hypernode from the target hyperedge with the hypernode weight probability; move the task node to the target hypernode within a preset time period.
[0107] Among them, the Laplacian matrix of the initial hypergraph is defined as follows:
[0108]
[0109] Among them, L is the Laplacian matrix of the initial hypergraph, I is the steady-state distribution, Φ is the diagonal matrix between nodes, and P is the probability transition matrix of the initial hypergraph, which can specifically be the basic probability transition matrix.
[0110] In an implementable manner, define H(V, E, w, r) as the initial hypergraph. At time t, the random walker moves from hypernode v t to u and walks according to the following rules: select a hyperedge e from the hyperedges containing node v with a probability of w(e) / d(v), select node u from hyperedge e with a probability of r t (u) / δ(e), and at time t + 1, hypernode v e moves to u, that is, v t = u. t
[0111] Among them, before the step of determining the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph, the task execution method based on hypergraph learning further includes:
[0112] Step C10: Obtain the node random probability of the task node;
[0113] Step C20: Determine the probability transition matrix of random walk on the initial hypergraph according to the complete random matrix and the basic probability transition matrix of the node random probability.
[0114] In this embodiment, it should be noted that usually the hypergraph is in a connected state after construction, but in reality, many networks are not in a connected state, but are composed of many connected components of different sizes. For a hypergraph in a non-connected state, it needs to be solved by a preset algorithm before determining the Laplacian matrix of the initial hypergraph. Among them, the preset algorithm can specifically be the PageRank algorithm.
[0115] As an example, steps C10 to C20 include: obtaining the node random probability of the task node; determining the probability transition matrix of random walk on the initial hypergraph according to the complete random matrix and the basic probability transition matrix of the node random probability, where the node random probability is used to represent the probability of randomly reaching other nodes on the hypergraph and can be specifically set according to requirements.
[0116] Among them, the probability transition matrix of random walk on the initial hypergraph is defined as follows:
[0117]
[0118] Among them, P0 is the basic probability transition matrix, is the node random probability, N is the number of hypernodes, E is the complete random matrix, and E T is the transpose matrix of the complete random matrix. In the non-connected case, a complete random matrix is added to the basic probability transition matrix through the PageRank algorithm. During the random walk process, the task node has a certain probability of being able to transfer to any hypernode on the initial hypergraph to ensure the connectivity of the entire graph neural network.
[0119] The embodiment of the present application provides a task execution method based on hypergraph learning, that is, obtaining the node features of the task node corresponding to the task to be executed, where the task node is any hypernode in the initial hypergraph; inputting the node features into the preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set; and executing the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed.
[0120] This application uses any supernode in the initial hypergraph as the task node of the task to be executed, thereby obtaining the node features of the task node, and obtains the node features by inputting the node features into the preset hypergraph learning model corresponding to the initial hypergraph, and finally achieves the purpose of executing the task to be executed through the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed. That is, this application constructs the node embedding features output by the preset hypergraph learning model obtained by the probability transfer matrix jointly determined by the supernode set, the superedge set, the edge-dependent node weight set and the hyperedge weight set, and feeds back the feature similarity between the task embedding features corresponding to the task to be executed, thereby executing the task to be executed. Since the edge-dependent node weight set is introduced when constructing the preset hypergraph learning model, the preset hypergraph learning model can consider the interactive information between nodes from a more fine-grained perspective, and the purpose of ensuring the execution of the task to be executed through objective feature similarity can be achieved.
[0121] Based on this, by capturing richer node topology information and making full use of the high-order interaction relationship between nodes within the hypergraph, the interaction information within the hypergraph is more inclined to the reality, rather than still simplifying the hypergraph into an ordinary graph to realize the information interaction between nodes within the hyperedge. Therefore, the accuracy of the expression of interaction information between nodes within the hypergraph is improved, thereby improving the execution effect of related tasks in the current actual application scenarios.
[0122] Embodiment 2
[0123] Further, refer to Figure 3 In another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above description and will not be described in detail later. On this basis, the step of updating the data to be synchronized according to the receiving sequence number of the receiving state vector to obtain the target synchronization data includes:
[0124] Step D10, extracting a node feature matrix of the initial hypergraph by convolving the Laplacian matrix of the initial hypergraph through the hypergraph;
[0125] Step D20, determining a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph;
[0126] Step D30, iteratively filtering the matrix signal corresponding to the node feature matrix according to the initial hypergraph filter until a Laplace smoothing matrix is obtained;
[0127] Step D40: constructing the preset hypergraph learning model based on the Laplace smoothing matrix.
[0128] In this embodiment, it should be noted that hypergraph convolution can extract cross-information on a high-order network. The hypergraph parameter matrix is used to represent the parameter matrix learned during the training of the neural network, and the Laplacian smoothing matrix is used to represent the Laplacian matrix after matrix factorization smoothing.
[0129] As an example, steps D10 to D40 include: obtaining the node feature matrix of the initial hypergraph by hypergraph-convolving the Laplacian matrix of the initial hypergraph; determining a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph; iteratively filtering the matrix signal corresponding to the node feature matrix according to the initial hypergraph filter until a Laplacian smoothing matrix is obtained; and constructing the preset hypergraph learning model based on the Laplacian smoothing matrix.
[0130] Among them, the specific steps of determining the hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph are as follows:
[0131] F = (2I - L)Θ
[0132] Among them, F is the hypergraph filter, and Θ is the hypergraph parameter matrix.
[0133] In an implementable manner, after obtaining the hypergraph filter, taking X as the node feature matrix, the matrix signal corresponding to X will filter out useless signals after multiple filtrations, while the effective signals on the hypergraph are retained, so as to achieve the purpose of feature transfer between nodes.
[0134] The embodiment of the present application provides a method for constructing a Laplacian matrix. That is, by hypergraph-convolving the Laplacian matrix of the initial hypergraph, the node feature matrix of the initial hypergraph is extracted; a hypergraph filter is determined according to the hypergraph parameter matrix of the initial hypergraph; the matrix signal corresponding to the node feature matrix is iteratively filtered according to the initial hypergraph filter until a Laplacian smoothing matrix is obtained; and the preset hypergraph learning model is constructed based on the Laplacian smoothing matrix. Since hypergraph convolution can be regarded as a special form of Laplacian smoothing. The combination of the hypergraph Laplacian matrix and the hyperparameters of the neural network is used to smooth the node features on the hypergraph, and the new features of the nodes are calculated as the weighted average of themselves and their neighbors, thereby completing the transfer of node information. Since the nodes in the same hyperedge are often closely connected, smoothing makes their features similar, laying a foundation for subsequent execution of the task to be executed.
[0135] Embodiment III
[0136] The embodiment of the present application further provides an apparatus for a task execution method based on hypergraph learning. Referring to Figure 4 , the apparatus for the task execution method based on hypergraph learning includes:
[0137] An acquisition module 101, configured to acquire the node features of a task node corresponding to a to-be-executed task, where the task node is any hypernode in an initial hypergraph;
[0138] An input module 102, configured to input the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set;
[0139] An execution module 103, configured to execute the to-be-executed task according to the feature similarity between the node embedding features and the task embedding features corresponding to the to-be-executed task.
[0140] Optionally, the execution module 103 is further configured to:
[0141] Match a task execution label for the to-be-executed task according to the feature similarity;
[0142] Execute the to-be-executed task according to the task execution label.
[0143] Optionally, the task execution device based on hypergraph learning is further configured to:
[0144] Construct an initial hypergraph according to the data attributes between at least one task basic data, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set;
[0145] Determine the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph;
[0146] Construct a preset hypergraph learning model based on the Laplacian matrix of the initial hypergraph.
[0147] Optionally, the task execution device based on hypergraph learning is further configured to:
[0148] Extract the node feature matrix of the initial hypergraph by hypergraph convolution of the Laplacian matrix of the initial hypergraph;
[0149] Determine a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph;
[0150] Iteratively filter the matrix signal corresponding to the node feature matrix according to the initial hypergraph filter until a Laplacian smoothing matrix is obtained;
[0151] Construct the preset hypergraph learning model based on the Laplacian smoothing matrix.
[0152] Optionally, the rules of the random walk are defined as follows:
[0153] Select a target hyperedge from multiple hyperedges containing the task nodes with the hyperedge weight probability;
[0154] Select a target hypernode from the target hyperedge with the hypernode weight probability;
[0155] Move the task node to the target hypernode within a preset time period.
[0156] Optionally, the task execution device based on hypergraph learning is further configured to:
[0157] Obtain the node random probability of the task node;
[0158] Determine the probability transition matrix of random walk on the initial hypergraph according to the complete random matrix and the basic probability transition matrix of the node random probability.
[0159] Optionally, the Laplacian matrix of the initial hypergraph is defined as follows:
[0160]
[0161] Where L is the Laplacian matrix of the initial hypergraph, I is the steady-state distribution, Φ is the diagonal matrix between nodes, P is the probability transition matrix of random walk on the initial hypergraph, and the probability transition matrix of random walk on the initial hypergraph is defined as follows:
[0162]
[0163] Where P0 is the basic probability transition matrix, is the node random probability, N is the number of hypernodes, E is the complete random matrix, and E T is the transpose matrix of the complete random matrix.
[0164] The task execution method and device based on hypergraph learning provided by the present invention adopt the task execution method based on hypergraph learning in the above embodiments to solve the technical problem of poor execution effect of related tasks in the current actual application scenario. Compared with the prior art, the beneficial effects of the task execution method and device based on hypergraph learning provided by the embodiments of the present invention are the same as those of the task execution method based on hypergraph learning provided by the above embodiments, and other technical features in the task execution method and device based on hypergraph learning are the same as those disclosed in the above embodiment methods, and will not be elaborated here.
[0165] Embodiment 4
[0166] An embodiment of the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the task execution method based on hypergraph learning in the first embodiment above.
[0167] Reference is made below to Figure 5 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0168] As Figure 5 shown, the electronic device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus.
[0169] Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device may allow the electronic device to communicate with other devices wirelessly or wirelessly to exchange data. Although the figure shows an electronic device having various systems, it should be understood that it is not required to implement or include all the shown systems. Instead, more or fewer systems may be implemented or included.
[0170] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0171] The electronic device provided by the present invention adopts the task execution method based on hypergraph learning in the above embodiment, and solves the technical problem of poor execution effect of related tasks in the current actual application scenario. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as those of the task execution method based on hypergraph learning provided by the above embodiment, and other technical features in the electronic device are the same as those disclosed in the method of the above embodiment, and will not be repeated here.
[0172] It should be understood that each part of the present disclosure can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0173] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
[0174] Embodiment 5
[0175] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the task execution method based on hypergraph learning in the above embodiment.
[0176] The computer-readable storage medium provided by the embodiments of the present invention may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0177] The above computer-readable storage medium may be included in an electronic device; or may exist separately without being assembled into the electronic device.
[0178] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by an electronic device, the electronic device is caused to: obtain the node features of the task nodes corresponding to the task to be executed, where the task node is any hypernode in the initial hypergraph; input the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set; and execute the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed.
[0179] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0180] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0181] The modules described in the embodiments of the present disclosure can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0182] The computer-readable storage medium provided by the present invention stores computer-readable program instructions for executing the above-mentioned task execution method based on hypergraph learning, and solves the technical problem of poor execution effect of related tasks in the current actual application scenarios. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiments of the present invention are the same as those of the task execution method based on hypergraph learning provided by the above embodiments, and will not be elaborated here.
[0183] Embodiment Six
[0184] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the above-mentioned task execution method based on hypergraph learning.
[0185] The computer program product provided by this application solves the technical problem of poor execution effect of related tasks in the current actual application scenarios. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiments of the present invention are the same as those of the task execution method based on hypergraph learning provided by the above embodiments, and will not be elaborated here.
[0186] The above are only the preferred embodiments of this application, and do not limit the patent scope of this application accordingly. Any equivalent structural or equivalent process transformation made by using the specification and drawings of this application, or directly or indirectly applied to other related technical fields, shall be equally included in the patent scope of this application.
Claims
1. A task execution method based on hypergraph learning, characterized in that The task execution method based on hypergraph learning includes: Obtain the node features of the task nodes corresponding to the task to be executed, where the task nodes are any hypernodes in the initial hypergraph; Input the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set; Execute the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed; Before the step of obtaining the node features of the task nodes corresponding to the task to be executed, the task execution method based on hypergraph learning further includes: Construct an initial hypergraph according to the data attributes between at least one task basic data, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set; Determine the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph; Extract the node feature matrix of the initial hypergraph by hypergraph convolution of the Laplacian matrix of the initial hypergraph; Determine a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph; Iteratively filter the matrix signal corresponding to the node feature matrix according to the hypergraph filter until a Laplacian smoothing matrix is obtained; Construct the preset hypergraph learning model based on the Laplacian smoothing matrix; The rules of the random walk are defined as follows: Select a target hyperedge from multiple hyperedges containing the task node with hyperedge weight probability; Select a target hypernode from the target hyperedge with hypernode weight probability; Move the task node to the target hypernode within a preset time period.
2. The task execution method based on hypergraph learning according to claim 1, characterized in that The step of executing the task to be executed according to the feature similarity between the node embedding features and the task embedding features corresponding to the task to be executed includes: Match a task execution label for the task to be executed according to the feature similarity; Execute the task to be executed according to the task execution label.
3. The task execution method based on hypergraph learning according to claim 1, wherein, Before the step of determining the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph, the task execution method based on hypergraph learning further includes: Obtain the node random probability of the task node; Determine the probability transition matrix of random walks on the initial hypergraph according to the completely random matrix of the node random probability and the basic probability transition matrix.
4. The task execution method based on hypergraph learning according to claim 3, wherein The Laplacian matrix of the initial hypergraph is defined as follows: where \(L\) is the Laplacian matrix of the initial hypergraph, \(I\) is the steady-state distribution, is the diagonal matrix between nodes, \(P\) is the probability transition matrix of random walk on the initial hypergraph, where the probability transition matrix of random walk on the initial hypergraph is defined as follows: Among them, is the basic probability transition matrix, is the node random probability, N is the number of super nodes, E is the completely random matrix, is the transpose matrix of the completely random matrix.
5. A task execution method and device based on hypergraph learning, characterized in that, The apparatus for the task execution method based on hypergraph learning includes: An acquisition module, configured to acquire the node features of a task node corresponding to a to-be-executed task, where the task node is any hypernode in an initial hypergraph; the acquisition module is further configured to construct an initial hypergraph according to the data attributes among at least one task basic data, where the initial hypergraph includes a hypernode set, a hyperedge set, a hyperedge-dependent node weight set of hypernodes, and a hyperedge weight set; determine the Laplacian matrix of the initial hypergraph according to the probability transition matrix of random walks on the initial hypergraph; extract the node feature matrix of the initial hypergraph by hypergraph convolution of the Laplacian matrix of the initial hypergraph; determine a hypergraph filter according to the hypergraph parameter matrix of the initial hypergraph; perform iterative filtering on the matrix signal corresponding to the node feature matrix according to the hypergraph filter until a Laplacian smoothing matrix is obtained; construct a preset hypergraph learning model based on the Laplacian smoothing matrix; the rules of the random walk are defined as follows: select a target hyperedge from multiple hyperedges containing the task node with the hyperedge weight probability; select a target hypernode from the target hyperedge with the hypernode weight probability; move the task node to the target hypernode within a preset time period; An input module, configured to input the node features into a preset hypergraph learning model corresponding to the initial hypergraph to obtain node embedding features, where the preset hypergraph learning model is constructed by a probability transition matrix jointly determined by a hypernode set, a hyperedge set, an edge-dependent node weight set, and a hyperedge weight set; An execution module, configured to execute the to-be-executed task according to the feature similarity between the node embedding features and the task embedding features corresponding to the to-be-executed task.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the method for task execution based on hypergraph learning according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, A program for implementing the method for task execution based on hypergraph learning is stored on the computer-readable storage medium, and the program for implementing the method for task execution based on hypergraph learning is executed by a processor to implement the steps of the method for task execution based on hypergraph learning according to any one of claims 1 to 4.
Citation Information
Patent Citations
Model determination method, device and equipment and computer readable storage medium
CN114676821A
Data classification method and device based on multi-head self-attention hypergraph neural network
CN115130544A