Graph structure data processing method and device, equipment, storage medium and program product
By embedding node features into hyperbolic space and using residual connections of hyperbolic graph neural networks, the problem of over-smoothing of node features in traditional graph convolutional networks in e-commerce data is solved, achieving more accurate node feature expression and hierarchical relationship characterization, and improving model performance.
Patent Information
- Application Number
- CN202510656875.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-10-17
AI Technical Summary
When traditional graph convolutional neural networks process e-commerce data in Euclidean space, it is difficult to effectively retain the hierarchical information of products and users, resulting in over-smoothing of node features, affecting the accuracy and generalization ability of the model.
The node features in the graph structure data are embedded in the hyperbolic space, and the preset hyperbolic graph neural network is used to process the node features through multiple convolutional layers. The residual connection is used to pass the initial embedded features and the output features of the first convolutional layer to the second convolutional layer, retaining the initial information of the nodes and avoiding over-smoothing problems.
It improves the distinguishability and accuracy of node features, enhances the characterization of hierarchical relationships between nodes, and improves the classification and recommendation accuracy of the model in complex network structures.
Smart Images

Figure CN120804501A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a graph structure data processing method and device, equipment, a storage medium and a program product. BACKGROUND
[0002] In the recall business of an e-commerce platform, user interaction behaviors (such as clicking, searching, and purchasing), commodity attribute data (such as category, brand, and price), and transaction records and the like data construct large-scale graph structure data. Such data has significant complexity: on the one hand, commodities are densely associated through co-purchase relationships and recommendation networks; on the other hand, user behavior sequences (such as click stream paths and cross-category browsing) imply dynamic interaction patterns, further forming a heterogeneous network containing multi-level structures.
[0003] Hyperbolic space provides a mathematical model suitable for modeling hierarchical data in e-commerce recall scenarios. Its exponentially growing space characteristics enable it to more naturally express hierarchical data, thereby more accurately capturing information such as nested relationships between commodities, hierarchical patterns of user browsing paths, and the like. Hyperbolic graph neural networks (HGCNs) are applied to model such data and exhibit superiority in hierarchical graph data modeling. However, as the number of network layers increases, HGCNs are susceptible to over-smoothing problems, causing the features of different commodity or user nodes to tend to homogenization, making it difficult for the model to distinguish individual characteristics of the nodes. SUMMARY
[0004] The main purpose of the embodiments of the present application is to provide a graph structure data processing method, device, equipment, storage medium and program product, which realizes that the convolutional layer of the hyperbolic neural network can retain the initial information of each node in the node feature propagation process, avoids the problem of over-smoothing of node features caused by loss of initial information, improves the distinguishability of node features, and more accurately depicts the hierarchical relationship between nodes.
[0005] In a first aspect, the embodiments of the present application provide a graph structure data processing method, comprising: obtaining to-be-processed graph structure data; embedding node features in the graph structure data into a hyperbolic space to obtain initial embedding features of nodes in the graph structure data in the hyperbolic space; and determining target features of nodes in the graph structure data according to the initial embedding features by using a preset hyperbolic graph neural network, wherein the hyperbolic graph neural network is configured to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
[0006] In a second aspect, an embodiment of the present application provides a node classification method, comprising: obtaining commodity graph structure data, wherein commodity node features are included in the commodity graph structure data; embedding the commodity node features in the commodity graph structure data into hyperbolic space to obtain initial embedding features of commodity nodes in the commodity graph structure data in the hyperbolic space; determining target features of the commodity nodes in the commodity graph structure data according to the initial embedding features of the commodity nodes by using a preset hyperbolic graph neural network, wherein the hyperbolic graph neural network is configured to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer; and classifying commodity nodes according to the target features of the commodity nodes.
[0007] In a third aspect, an embodiment of the present application provides an information recommendation method, comprising: obtaining graph structure data formed by users and commodities, wherein user node features and commodity node features are included in the graph structure data; embedding the user node features and the commodity node features in the graph structure data into hyperbolic space to obtain initial embedding features of nodes in the graph structure data in the hyperbolic space; determining target features of the user nodes and target features of the commodity nodes in the graph structure data according to the initial embedding features of the user nodes and the initial embedding features of the commodity nodes by using a preset hyperbolic graph neural network, wherein the hyperbolic graph neural network is configured to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer; and determining recommendation information for the user according to a hyperbolic distance between the target features of the user nodes and the target features of the commodity nodes.
[0008] In a fourth aspect, an embodiment of the present application provides a graph structure data processing apparatus, comprising:
[0009] An obtaining module is configured to obtain graph structure data to be processed;
[0010] An embedding module is configured to embed node features in the graph structure data into hyperbolic space to obtain initial embedding features of nodes in the graph structure data in the hyperbolic space;
[0011] A determining module is configured to determine target features of nodes in the graph structure data according to the initial embedding features by using a preset hyperbolic graph neural network, wherein the hyperbolic graph neural network is configured to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
[0012] In a fifth aspect, an embodiment of the present application provides an electronic device, including:
[0013] at least one processor; and
[0014] a memory communicatively coupled to the at least one processor;
[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the method described in any one of the above aspects.
[0016] In a sixth aspect, an embodiment of the present application provides a cloud device, including:
[0017] at least one processor; and
[0018] a memory communicatively coupled to the at least one processor;
[0019] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the cloud device to execute the method described in any one of the above aspects.
[0020] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in any one of the above aspects is implemented.
[0021] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any of the above aspects when executed by a processor.
[0022] The graph structure data processing method, apparatus, device, storage medium and program product provided in the embodiments of the present application embed the node features in the graph structure data to be processed into a hyperbolic space, and use a preset hyperbolic graph neural network to determine the target features of the node based on the initial embedding features of the node in the hyperbolic space, wherein the hyperbolic graph neural network processes the node features through multiple convolutional layers. During the node feature processing, the initial embedding features of the node and the output features of the first convolutional layer are introduced into the second convolutional layer, so that during the node feature propagation process, the convolution layer of the hyperbolic neural network can retain the initial information of the node, avoid the problem of over-smoothing of the node features caused by the loss of initial information, improve the distinguishability of the node features, and more accurately characterize the hierarchical relationship between nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, further serve to explain the principles of the application. It is to be expressly understood that the drawings are included herein for illustrative purposes and that the application is not limited to the embodiments presented in the drawings.
[0024] Figure 1 A structural schematic diagram of an electronic device provided for an embodiment of the application;
[0025] Figure 2 An application scenario schematic diagram of a graph structure data processing system provided for an embodiment of the application;
[0026] Figure 3 A flow schematic diagram of a graph structure data processing method provided for an embodiment of the application;
[0027] Figure 4 A distribution schematic diagram of each node after graph structure data is embedded in hyperbolic space provided for an embodiment of the application;
[0028] Figure 5 A flow schematic diagram of a graph structure data processing method provided for an embodiment of the application;
[0029] Figure 6 A flow schematic diagram of a node classification method provided for an embodiment of the application;
[0030] Figure 7 A flow schematic diagram of an information recommendation method provided for an embodiment of the application;
[0031] Figure 8 A structural schematic diagram of a graph structure data processing apparatus provided for an embodiment of the application;
[0032] Figure 9 A structural schematic diagram of a cloud device provided for an embodiment of the application.
[0033] The above-described drawings show specific embodiments of the application, and more detailed descriptions will be given hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of the application in any way, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0034] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The same numbers are used in different drawings to represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the implementations consistent with the application.
[0035] The term "and / or" is used herein to describe the association between associated objects, which specifically means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone.
[0036] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant national and regional laws, regulations and standards, and provide corresponding operation portal for user to choose authorization or refusal.
[0037] In order to clearly describe the technical solutions of the embodiments of the present application, first, the terms involved in the present application are explained:
[0038] Riemannian manifold: A Riemannian manifold or Riemannian space is a real smooth manifold with a positive definite metric tensor g It is a topological space, which is locally homeomorphic to Euclidean space at each point .
[0039] Tangent space: The local topological property of each point in the manifold is homeomorphic to Euclidean space. The local Euclidean space is called tangent space, denoted as
[0040] Lorentz model: A mathematical model used to define hyperbolic space, described by Lorentz inner product and metric tensor. A d-dimensional Lorentz model is defined by the manifold , where the Lorentz inner product is defined as:
[0041]
[0042] where g is the metric tensor, g = diag([-1, 1, …, 1]) represents a diagonal matrix.
[0043] Exponential map: A mapping from the tangent space to the Riemannian manifold. Taking the Lorentz model as an example, let x be a point in the Lorentz manifold, and v be a vector in the tangent space , the exponential map is defined as:
[0044]
[0045] where is the norm of vector v.
[0046] Logarithmic map: The inverse map of the exponential map, mapping a point on the manifold back to the tangent space. In the case of the Lorentz model, the logarithmic map, denoted as
[0047]
[0048] Parallel transport: A generalization of parallel translation in non-Euclidean geometry. In the case of the Lorentz model, for two points Parallel transport is defined as:
[0049]
[0050] where g(·) represents the metric tensor and c(x, y) is the distance between points x and y.
[0051] Product manifold: A product manifold is a manifold constructed by taking the Cartesian product of a sequence of Riemannian manifolds, each of which is called a component. Given a sequence of Lorentz models where d j is the dimension of the jth component, the product manifold is defined as Operations on are performed component-wise. For example, The coordinates of a point x on j can be represented as x = [x1, …, x k ], where Similarly, the coordinates of a tangent vector can be represented as v = [v1, …, v j , …, v k ], where The exponential map on is defined as where is the exponential map on . The logarithmic map on is defined as where is the logarithmic map on
[0052] Dirichlet energy: A measure of the "smoothness" of a function, related to the problem of over-smoothing.
[0053] HGCNs: Hyperbolic Graph Neural Networks, a graph convolutional network for modeling hierarchical graph data, which uses the characteristics of hyperbolic space to represent hierarchical data.
[0054] GCN: Graph Convolutional Network.
[0055] The graph structure data processing method of the embodiments of the present application can be applied to any field that needs to process graph structure data.
[0056] Taking the recall business scenario of an e-commerce platform as an example, user interaction behaviors (such as clicks, searches, purchases), product attribute data (such as categories, brands, prices), and transaction records, etc. data, large-scale graph structure data is constructed. Such data has significant complexity: on the one hand, goods are densely associated through co-purchase relationships and recommendation networks; on the other hand, user behavior sequences (such as click stream paths, cross-category browsing) imply dynamic interaction patterns, further forming a heterogeneous network containing multiple hierarchical structures. As the mainstream technology for processing graph data, traditional graph convolutional neural networks (GCN) usually propagate and aggregate node features based on Euclidean space. However, the data topology characteristics in the e-commerce scenario fundamentally contradict the Euclidean geometry assumption, which has the following limitations:
[0057] Traditional graph convolutional neural networks usually learn graph structure in Euclidean space, while e-commerce data often presents more complex topological structures, especially hierarchical, tree-like association of product category relationships, brand hierarchy, etc. For example, on an e-commerce platform, product categories are gradually refined from large categories (such as "electronic products") to subcategories (such as "smartphones"), forming a natural hierarchical relationship. However, the volume of Euclidean space grows polynomially with the radius, making it difficult to effectively model this exponentially expanding hierarchical structure. Therefore, when using traditional graph convolutional networks to process such graph structure data, the hierarchical information of goods and users cannot be fully preserved, thus the node features in the graph structure data cannot be accurately learned and extracted, which further affects the precision and generalization ability of the system.
[0058] Hyperbolic space provides a mathematical model that is more suitable for modeling hierarchical data in e-commerce recall scenarios. Its exponentially growing spatial properties enable it to express hierarchical data more naturally, thereby more accurately capturing information such as the nested relationships between products and the hierarchical patterns of user browsing paths. Hyperbolic graph neural networks (HGCNs) have been applied to modeling such data and have demonstrated superiority in modeling hierarchical graph data. However, as the number of network layers increases, HGCNs are susceptible to oversmoothing, which causes the features of different product or user nodes to become homogenized, making it difficult for the model to distinguish the individual characteristics of nodes, thus affecting the accuracy of recommendations and predictions.
[0059] In order to solve at least one of the above problems, an embodiment of the present application provides a graph structure data processing solution, which embeds the node features in the graph structure data to be processed into a hyperbolic space, and uses a preset hyperbolic graph neural network to determine the target features of each node based on the initial embedding features of each node in the hyperbolic space, wherein the hyperbolic graph neural network processes the node features through multiple convolutional layers. During the node feature processing, the initial embedding features of each node and the output features of the first convolutional layer are introduced into the second convolutional layer, so that during the node feature propagation process, the convolution layer of the hyperbolic neural network can retain the initial information of each node, avoid the problem of over-smoothing of node features caused by the loss of initial information, improve the distinguishability of node features, more accurately characterize the hierarchical relationship between nodes, and enhance the learning and extraction capabilities of node features in graph structure data.
[0060] The following detailed description of some embodiments of the present application is provided in conjunction with the accompanying drawings. The following embodiments and features thereof may be combined with one another unless they conflict with each other. Furthermore, the sequence of steps in the following method embodiments is provided for illustrative purposes only and is not intended to be a strict limitation.
[0061] like Figure 1 As shown, this embodiment provides an electronic device 1, including: at least one processor 11 and a memory 12, Figure 1 A processor is taken as an example. The processor 11 and the memory 12 are connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 so that the electronic device 1 can execute all or part of the process of the method in the following embodiment, so as to achieve that during the node feature propagation process, the convolution layer of the hyperbolic neural network can retain the initial information of each node, avoid the problem of over-smoothing of node features caused by the loss of initial information, improve the distinguishability of node features, and more accurately characterize the hierarchical relationship between nodes.
[0062] In one embodiment, the electronic device 1 may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, or a large computing system composed of multiple computers.
[0063] Figure 2 An application scenario 200 of a graph structure data processing system is provided in an embodiment of the present application. As shown in the figure, Figure 2 The system includes a server 210 and a terminal 220, wherein:
[0064] The server 210 can be a data platform providing graph structure data processing services, such as a data recall system platform in an e-commerce scenario. In an actual scenario, a data recall system platform can have multiple servers 210, Figure 2 and one server 210 is taken as an example.
[0065] The terminal 220 can be a mobile device for logging in to the data recall system platform, such as a computer, a mobile phone, a tablet, etc. The terminal 220 can also have multiple, Figure 2 and two terminals 220 are taken as an example for illustration.
[0066] The terminal 220 and the server 210 can transmit information through the Internet, so that the terminal 220 can access data on the server 210. The terminal 220 and / or the server 210 can be implemented by an electronic device 1.
[0067] The graph structure data processing scheme of an embodiment of the present application can be deployed on the server 210, or on the terminal 220, or partially on the server 210 and partially on the terminal 220. In an actual scenario, it can be selected based on actual needs, and this embodiment does not limit.
[0068] When the graph structure data processing scheme is deployed on the server 210 in whole or in part, the terminal 220 can be opened to call an interface to provide algorithm support for the terminal 220.
[0069] The method provided in an embodiment of the present application can be implemented by an electronic device 1 executing corresponding software code, and data interaction with a server is performed. The electronic device 1 can be a local terminal device. When the method is run on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0070] In one possible implementation, the method provided in an embodiment of the present application provides a graphical user interface through a terminal device, wherein the terminal device can be a local terminal device mentioned above, or a client device in the cloud interaction system mentioned above.
[0071] Please refer to Figure 3 which is a graph structure data processing method of an embodiment of the present application. The method can be executed by Figure 1 the electronic device 1, and can be applied to Figure 2In the graph structure data processing application scenario shown in the figure, in the node feature propagation process, the convolutional layer of the hyperbolic neural network can retain the initial information of each node, avoid the problem of over-smoothing of node features caused by loss of initial information, improve the distinguishability of node features, and more accurately depict the hierarchical relationship between nodes. The terminal 220 is taken as an example, and the method comprises the following steps:
[0072] Step 301: Obtain the graph structure data to be processed;
[0073] In this step, the graph structure data takes nodes (entities) and edges (relationships) as core elements, is suitable for describing complex multi-level data networks, and the graph structure data to be processed can be graph structure data in an e-commerce scenario, such as graph structure data composed of commodity categories, or graph structure data composed of user behavior and commodity data. Taking the graph structure data composed of user behavior and commodity data as an example, the node types in the graph structure data include but are not limited to users, commodities, orders, logistics nodes, etc., forming a multi-modal entity network; the edge relationships of the graph structure data include but are not limited to user-commodity (purchase / collection), commodity-category (belonging), order-logistics (delivery path), etc., forming a dynamic relationship graph.
[0074] The features of each node in the graph structure data can be described in the form of a feature vector. For example, the graph structure data is an undirected graph wherein represents a set of n nodes, and ε represents a set of edges. The adjacency matrix of the undirected graph records the connection information of the edges. If there is an edge between nodes v i and v j , then A ij = 1, otherwise A ij = 0, where i and j represent the numbers of the nodes, and i and j are positive integers. In addition, the node feature matrix of the undirected graph records the d-dimensional feature vectors of the nodes.
[0075] Optionally, in order to stabilize the gradient changes in the model training process, the graph structure data can use a normalized adjacency matrix wherein D is the degree matrix of the graph structure data, and I is the unit matrix. The unit matrix I is added to the adjacency matrix A to introduce a self-loop structure, so that the node can retain its own features in the feature propagation process, and avoid information loss. After adding the unit matrix I, each node of the new adjacency matrix increases a self-loop (i.e., A ii = 1), ensuring that the node can combine its own information when updating the features.
[0076] Step 302: embedding the node features in the graph structure data into the hyperbolic space to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space;
[0077] In this step, the hyperbolic space provides a mathematical model more suitable for modeling complex hierarchical data. Its exponentially increasing space characteristics enable it to more naturally express hierarchical data, thereby more accurately capturing the relationships between nodes, such as more accurately capturing the nested relationships between commodities, the hierarchical patterns of user browsing paths, and other information. By embedding the node features in the graph structure data into the hyperbolic space, initial embedding features of the nodes in the hyperbolic space are obtained, and the output features of the nodes can be processed using the geometric characteristics of the hyperbolic space to improve the accuracy of the expression of the node features.
[0078] In an embodiment, step 302 can specifically include: determining a target origin of the hyperbolic space; and projecting the node features in the graph structure data into the hyperbolic space based on the target origin by exponential mapping to obtain the initial embedding features of the nodes in the graph structure data in the hyperbolic space.
[0079] In this embodiment, selecting an appropriate target origin can optimize the geometric layout of the hyperbolic space, so that the node features can better maintain the topological relationships and distance characteristics of the original data during the projection process. The application of exponential mapping ensures the information fidelity in the conversion process from Euclidean space to hyperbolic space, thereby obtaining more expressive initial embedding features in the hyperbolic space.
[0080] Taking the Lorentz model as an example, the Lorentz model can be used to project the node features in the graph structure data into the hyperbolic space by exponential mapping. The initial embedding features can be represented by the following formula (1):
[0081]
[0082] where H (0) represents the initial Lorentz features (i.e., initial embedding features) of a node x embedded into the hyperbolic space, X represents the node features of node x in the graph structure data, assuming that the node features in the graph structure data form a feature matrix X is a component of the vector The vector may be a tangent vector in the tangent space passing through the origin, and satisfies the condition
[0083] The Lorentz model uses a pseudo-Euclidean coordinate system, with the origin defined as the point where all coordinate values are zero. The symmetry of hyperbolic space requires that the origin be used as a fixed reference point for all isometric transformations. Data operations in hyperbolic space all rely on the coordinates of the origin. For example, key operations such as the embedding position of graph-structured data, scalar multiplication in hyperbolic space, and vector concatenation all use the hyperbolic origin as their geometric basis. The geometric center of the graph-structured data or the core entity in the business logic can be selected as the origin. In practical scenarios, the target origin can be determined based on the graph-structured data to be processed. For example, in an e-commerce recommendation system, the platform homepage or user registration center node can be set as the target origin. For another example, if the graph-structured data is a three-level category tree (e.g., women's clothing → dress → floral dress), the center of the first-level category can be used as the target origin. If the graph-structured data is a heterogeneous graph constructed from user behavior data (clicks, purchases, favorites) across the entire platform, the target origin can be determined by calculating the mean of the hyperbolic embedding vectors of all nodes.
[0084] In one embodiment, determining the target origin of the hyperbolic space includes: embedding multiple node features of the graph structure data into the hyperbolic space based on a preset origin to obtain the embedded features of the multiple nodes of the graph structure data in the hyperbolic space; based on the embedded features, selecting a target node from multiple nodes as the target origin of the hyperbolic space, and the average of the sum of the squares of the distances between the target node and each node in the multiple nodes is minimized.
[0085] In this embodiment, the preset origin can be selected according to the characteristics of the graph structure data. For example, the root node of the graph structure data can be used as the preset origin. First, multiple node features of the graph structure data are embedded into the hyperbolic space based on the preset origin to ensure that each node has corresponding embedded features in the hyperbolic space. Then, by analyzing these embedded features, a target node is selected from multiple nodes as the target origin of the hyperbolic space. The selection criterion of the target node is that the mean of the sum of the squares of the distances between it and all other nodes is minimized. This method ensures that the position of the target origin in the hyperbolic space can minimize the deviation of the overall node distribution, thereby optimizing the compactness and balance of node embedding on a global scale. It not only improves the representation ability of graph structure data in the hyperbolic space, but also enhances the accuracy and efficiency of subsequent data processing and analysis.
[0086] like Figure 4 As shown in the figure, it is a schematic diagram of the distribution of nodes after the graph structure data provided by this application is embedded in the hyperbolic space, where the preset origin position is located at Figure 4The bottom of the hyperbolic space, in fact, the scene, when the graph structure data to be processed is directly embedded in the hyperbolic space by using the exponential mapping, the distribution of the embedded nodes will be significantly different due to the selection of the origin. Directly embedding the graph structure data to be processed in the hyperbolic space by using the exponential mapping, this operation paradigm ignores the regulation of the hyperbolic origin. Therefore, it is very important to select an origin position that can better maintain the inherent hyperbolic characteristics of the graph structure data. The embodiments of the present application reselect a new target node from the embedded nodes as a target origin, wherein O' is a target origin position that can better maintain the inherent hyperbolic characteristics of the original data. Figure 4
[0087] Alternatively, the target origin O' can be obtained by calculating the Fréchet mean, which is the "center point" of the data points in the metric space. The Fréchet mean is the optimal center in the sense of minimizing the square of the geodesic distance, and is defined as formula (2) as follows:
[0088]
[0089] Wherein N is the number of nodes in the graph structure data, and N is a positive integer. X i is the i-th node in the graph structure data embedded in the hyperbolic space based on the preset origin, P is the target node, M is the hyperbolic space, d(P, X i is the Fréchet distance between P and X i , and is the Fréchet mean. Based on the new target origin, the graph structure data is re-embedded in the hyperbolic space, which can improve the stability of the hyperbolic graph neural network in the training process and the accuracy of data modeling.
[0090] In practical scenarios, the Fréchet mean calculation in formula (2) is usually difficult, and the core reason lies in the complexity of the manifold geometry and the nonlinearity of the optimization problem. First, the calculation of geodesic distance itself is significantly challenging on a nonlinear manifold, unlike the straight-line distance in Euclidean space, the geodesic distance on a manifold needs to be obtained by solving differential equations or path integrals, and such calculations often lack analytical solutions and rely on numerical approximation methods (such as iterative solutions of exponential mapping and logarithmic mapping), whose computational complexity grows exponentially with the dimension and curvature characteristics of the manifold; second, the objective function (i.e., the average of the square of the geodesic distance) is usually non-convex on a non-flat manifold, resulting in multiple local minima in the optimization process, making traditional gradient descent algorithms prone to suboptimal solutions and difficult to guarantee global convergence. In addition, the anisotropy of the curvature of hyperbolic space further distorts the geometric characteristics of the optimization path, which needs to be alleviated by adaptive step size and covariant derivative correction in the Riemannian optimization framework, significantly increasing the theoretical threshold and implementation difficulty of algorithm design; finally, the sensitivity of the initial point and the complexity of the sample distribution (such as data points located in different coordinate charts of the manifold or the presence of outliers) also exacerbate numerical instability, making the calculation process highly dependent on parameter settings and preprocessing methods.
[0091] In an embodiment, considering the computational complexity and difficulty of calculating the Fréchet mean as the target origin O', the embodiments of the present application propose a more effective and efficient target origin O' selection strategy. Specifically, the Einstein midpoint estimator is used to approximate the calculation of the Fréchet mean. In the Lorentz model, the Einstein midpoint can be defined as formula (3) as follows:
[0092]
[0093] where μ is the approximate Fréchet mean, β is the curvature of the Lorentz model used, p i is the probability of node x i in the graph structure data, representing the number of times node x i occurs. For the above formula (3), the following theorem can be used to prove that the Einstein midpoint is the solution of the Fréchet mean (formula (2)), as shown below:
[0094] Theorem: Point is the optimal solution of the following minimization problem (formula (4)):
[0095]
[0096] where is the node feature matrix of the d-dimensional Lorentz model L, is the i-th node x iThe Fréchet distance between the points μ. p i ≥0,∑ i p i >0. and n is the number of nodes, n is a positive integer.
[0097] The origin selection strategy based on Einstein midpoints proposed in the embodiments of the application can dynamically select a target origin of a hyperbolic operation according to a graph structure data distribution, and improve the geometric rationality of feature embedding and the stability of network training.
[0098] Step 303: adopting a preset hyperbolic graph neural network, determining the target feature of the node in the graph structure data according to the initial embedding feature, wherein the hyperbolic graph neural network is used to determine the output feature of the second convolutional layer of the hyperbolic graph neural network according to the initial embedding feature and the output feature of the first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
[0099] In this step, the preset hyperbolic graph neural network is used to determine the target feature of each node based on the initial embedding feature of each node in the hyperbolic space, wherein the hyperbolic graph neural network processes the node feature through multiple convolutional layers. In the node feature processing process, by introducing the initial embedding feature of each node and the output feature of the first convolutional layer into the second convolutional layer, it is realized that each convolutional layer can retain the initial information of each node in the node feature propagation process, avoiding the problem of over-smoothing of the node feature caused by the loss of the initial information. Not only the discrimination ability of the node feature is enhanced, but also the accuracy and efficiency of the subsequent hyperbolic graph neural network processing are improved, so that the node classification, clustering and link prediction tasks in the complex network structure perform more outstandingly.
[0100] In an embodiment, according to the initial embedding feature and the output feature of the first convolutional layer of the hyperbolic graph neural network, the output feature of the second convolutional layer of the hyperbolic graph neural network is determined, comprising: adopting a residual connection to pass the initial embedding feature and the output feature of the first convolutional layer to the second convolutional layer to determine the output feature of the second convolutional layer.
[0101] In this embodiment, the residual connection is a technique in deep learning that optimizes the network by jumping the input signal, the core idea of which is to let the neural network layer learn the residual (difference) between the input and output, rather than directly learn the complete output mapping. By using residual connection to pass the initial embedding features and the output features of the first convolutional layer to the second convolutional layer, the performance and training efficiency of the deep neural network are significantly improved. This residual connection mechanism can effectively alleviate the problems of gradient disappearance and gradient explosion commonly encountered in the training process of deep networks. Specifically, the residual connection allows the hyperbolic graph neural network to perform complex feature transformation while preserving the information of the initial embedding features, making the feature transmission between different levels smoother, which not only helps to maintain the integrity and diversity of node features, but also speeds up the convergence speed of the network. In addition, through this connection method, the network can better capture the multi-level feature representation of the input data, improving the robustness and generalization ability of the model in processing complex data.
[0102] In actual scenarios, the feature propagation rule of the traditional GCN layer is generally as shown in the following formula (5):
[0103]
[0104] wherein, is the node feature representation output by the lth layer, H (l+1) is the node feature representation output by the (l+1)th layer, (·) is a nonlinear activation function (such as ReLU), W (l) is a learnable parameter, is the normalized adjacency matrix of the graph structure data. By stacking multiple GCN layers, the model can extract node features layer by layer to capture local and global structure information of the graph structure data.
[0105] However, the traditional graph convolutional network usually performs graph structure learning in Euclidean space, while e-commerce data often presents a more complex topological structure, for example, on an e-commerce platform, the product categories are gradually refined from the major category (such as “electronic products”) to the subcategory (such as “smartphones”), forming a natural hierarchical relationship. The volume of Euclidean space grows polynomially with the radius, making it difficult to effectively model this exponentially expanding hierarchical structure. Therefore, when using traditional graph convolutional networks for recommendation or classification, the hierarchical information of products and users may not be fully preserved, affecting the accuracy and generalization ability of the system. Although hyperbolic graph neural networks are applied to model such data and have shown superiority in hierarchical graph data modeling. However, with the increase of network layers, the traditional hyperbolic graph neural network is prone to over-smoothing, causing the features of different product or user nodes to become homogenized, making it difficult for the model to distinguish individual characteristics, thereby affecting the accuracy of recommendation and prediction.
[0106] Optionally, the embodiments of the present application propose a hyperbolic residual connection to solve the problem of over-smoothing. Taking the aforementioned Lorenz model as an example, assuming that the first convolutional layer is the (l-1)th convolutional layer of the hyperbolic graph neural network, and the second convolutional layer is the lth convolutional layer of the hyperbolic graph neural network, the preset residual hyperbolic graph convolution operator hgc(·) of the hyperbolic graph neural network can be defined by the following formula (6):
[0107]
[0108] wherein H represents the Lorenz feature of a node embedded in a hyperbolic space, H (0) represents the initial embedding feature of a certain node x embedded in a hyperbolic space, W is a learnable parameter, is a normalized adjacency matrix of the graph structure data, and I is an identity matrix, represents Lorenz matrix-vector multiplication, and represents Lorenz scalar multiplication, represents Lorenz vector addition. is a Lorenz activation function, α represents the weight of H (0) , β represents the weight of W, and α and β are hyperparameters of the hyperbolic graph neural network, which can be determined according to experiments, for example, α can be 10 -2 , and β can be 10 -4 .
[0109] In the lth convolutional layer, the calculation form of the residual hyperbolic graph convolution can be shown in the following formula (7):
[0110]
[0111] wherein W (l) is a learnable parameter of the lth convolutional layer, α l and β l are hyperparameters of the hyperbolic graph neural network, hgc(·) receives the node feature H (l-1) from the previous convolutional layer, and outputs the node feature H (l) of the lth layer, which realizes the transmission of the initial embedding feature and the output feature of the first convolutional layer to the second convolutional layer by using the residual connection, effectively alleviates the problems of gradient disappearance and gradient explosion commonly encountered in the training process of a deep network, avoids the problem of over-smoothing of node features caused by the loss of initial information, enhances the distinguishing ability of node features, and enables the hyperbolic graph neural network to better capture the multi-level feature representation of input data, thereby improving the robustness and generalization ability of the model in processing complex data.
[0112] In an embodiment, step 303 can specifically include: converting the initial embedding feature to a preset product manifold, using a preset hyperbolic graph neural network on the preset product manifold, and determining the target feature of the node in the graph structure data according to the initial embedding feature.
[0113] In this embodiment, the product manifold is a manifold composed of a series of Riemannian manifolds through Cartesian product, and the product manifold provides a more expressive geometric space, so that the representation of features in the space is more natural and compact. By converting the initial embedding features and / or the output features of the first convolutional layer to the preset product manifold, performing feature mapping on the product manifold, the network can better process data with complex topological structure, capture the inherent geometric structure and diversity of graph structure data, and thus more accurately determine the output features of the second convolutional layer on the product manifold, significantly improving the performance of hyperbolic graph neural network on complex data structure, and improving the effectiveness and robustness of feature learning. In addition, this method also enhances the generalization ability of the model, so that it can still maintain high accuracy and stability when facing diversified and complex input data.
[0114] Taking the graph structure data of the e-commerce recall system as an example, considering the complex geometric structure of the graph structure data in the recall system, the product manifold can be used to model and learn the optimal representation of the graph structure data, and the aforementioned hyperbolic residual connection extended product manifold. Specifically, the product manifold of k Lorentz models can be used, where k can be preset according to the specific needs of the graph structure data, and k is a positive integer. In actual scenarios, the dimensions of the k Lorentz models can be the same or different. If the dimensions of the k Lorentz models are the same, such as 16-dimensional node features that can be split into 4 4-dimensional Lorentz models, this is called equal division, and actual scenarios can also be unequally divided. The dimensions of each Lorentz model can be set according to the characteristics of the graph structure data, such as using experimental methods to determine the dimensions of each Lorentz model, the principle is that the dimension of the output node feature is more accurate, and the dimension is the final selected dimension.
[0115] Taking the product manifold with the dimensions of the k Lorentz models as d as an example, the product manifold can be defined as Where O represents the target origin of each Lorentz model. Then the initial embedding features H of the node (0) On this product manifold, it can be represented as the following formula (8):
[0116]
[0117] Where the Lorentz component of the initial embedding features H(0) of the node The initial representation corresponding to the jth Lorentz model, n is the number of nodes, and n is a positive integer.
[0118] On this basis, the residual hyperbolic graph convolution operation on the product manifold can be realized through the following formula (9):
[0119]
[0120] in, represents the feature representation of the j-th Lorentz component in the l-th convolutional layer.
[0121] In one embodiment, a residual connection is used to transfer the initial embedded features and the output features of the first convolutional layer to the second convolutional layer to determine the output features of the second convolutional layer, including: using a residual connection to transfer the initial embedded features and the output features of the first convolutional layer to the second convolutional layer to determine the convolution result of the second convolutional layer; using Gaussian noise to regularize the convolution result of the second convolutional layer to obtain the output features of the second convolutional layer.
[0122] In this embodiment, regularization is a technique in machine learning to prevent model overfitting, and its essence is to impose constraints on the model to prevent the model from paying too much attention to noise or irrelevant details in the training data. In actual scenarios, assuming that a hyperbolic graph neural network model is used to predict user purchasing behavior, if the model is too complex (for example, too many hidden layer neurons), it may perfectly fit the random fluctuations in the training data (such as a user buying a non-preferred product due to a temporary promotion), but perform poorly on new data. The role of regularization is to add additional penalty terms to the loss function of model training, limit the size of model parameters (such as weights), such as making some weights exactly zero, realizing automatic feature screening, and forcing the model to balance between fitting data and maintaining simplicity. In the hyperbolic space embedding model, constraining the embedding vector length of the user / product node can prevent the coordinate values of some nodes from being too large and destroying the spatial geometric structure.
[0123] Specifically, the aforementioned residual connection is first used to transfer the initial embedded features and the output features of the first convolutional layer directly to the second convolutional layer, which effectively alleviates the gradient vanishing problem in deep networks and ensures the efficient transmission of initial feature information between network layers. It not only retains the information of the initial features, but also enhances the network's ability to learn complex features. Secondly, Gaussian noise is introduced into the convolution results of the second convolutional layer for regularization, which helps prevent model overfitting. Gaussian noise enhances the generalization ability of the model by introducing random perturbations during the training process, making it more robust when facing unseen data. Combining these two techniques, the network can not only better capture and represent the multi-level features of the input data, but also improve the training efficiency and prediction accuracy of the model, ultimately achieving better performance.
[0124] Taking the product manifold scenario formed by the k Lorentz models as an example, we can regularize the hyperbolic graph neural network by adding preset Gaussian noise to the Lorentz component to alleviate the overfitting problem. Specifically, for the product manifold Input on in The regularized one can be defined using the following formula (10):
[0125] y = [y1,..., y j ,..., y k ],
[0126]
[0127]
[0128] where ξ is a Gaussian noise sampled from a Gaussian distribution with variance σ, σ = η(1 - η), η is the dropout rate. f θ (·) is a function with parameter θ, and ⊙ denotes the Lorentz scalar multiplication.
[0129] Alternatively, other noises can also be used to regularize the convolution result of the second convolution layer to obtain the output features of the second convolution layer, such as a noise opening that obeys a standard Bernoulli distribution.
[0130] In comparison, if ξ j is sampled from a Bernoulli distribution, the probability of ξ j = 0 is η, which causes the information of the jth Lorentz component of the lth layer of the hyperbolic graph neural network to be completely discarded, resulting in information loss and further leading to inaccurate learning of feature representation. Unlike this, if ξj is sampled from a Gaussian distribution with mean 1, the probability of ξj = 0 is very small, which can relatively improve the integrity of information and learn more accurate node feature representation.
[0131] Taking the use of Gaussian noise to regularize the convolution result of the second convolution layer as an example, based on the above hyperbolic residual connection and regularization definition, the present application proposes a hyperbolic graph neural network architecture based on a residual graph convolutional neural network, which is used to prevent the problem of over-smoothing. The formal expression of the hyperbolic graph neural network is that the node features of each layer are multiplied by a Gaussian noise to generate new node features, which can be shown in the following formula (11):
[0132]
[0133] wherein is the Gaussian noise applied by the lth convolution layer of the hyperbolic graph neural network to the node, and σ represents the variance of the Gaussian distribution. The Gaussian noise of each layer can be determined in a random sampling manner, so the Gaussian noise of each layer can be different. The multiplication process of the Gaussian noise can be realized through the defined Lorentz scalar multiplication, which is used to further optimize the effect of graph convolution.
[0134] The hyperbolic regularization technology used in the embodiments of this application introduces preset Gaussian noise into the hyperbolic representation, which not only adds perturbations without destroying the hyperbolic geometric structure, but also effectively alleviates the overfitting problem, thereby obtaining more accurate node features. Ultimately, the hyperbolic graph neural network maps the node features output by each convolutional layer to downstream tasks such as node classification, information recommendation, and link prediction through a fully connected layer and a softmax activation function. Since the node features generated by the embodiments of this application are more accurate, the task results output by the model are also more accurate.
[0135] Compared to the convolution operator in traditional hyperbolic graph convolutional networks (HGCNs), the hyperbolic residual connection-based hyperbolic graph neural network in the embodiment of the present application adds an information path from the initial embedding features of the node to each graph convolution layer through the hyperbolic residual connection. In this way, no matter how deep the hyperbolic graph neural network is, the node features at the top layer still combine the initial embedding features of the node, avoiding becoming indistinguishable. Next, the Dirichlet energy is used to prove that the hyperbolic residual connection has a mitigating effect on the over-smoothing problem of the hyperbolic graph neural network, as follows:
[0136] First, we define a Dirichlet energy for tracking node embeddings. y ), where the Dirichlet energy measures the "smoothness" of a unit-norm function. Indistinguishable parameters that cause oversmoothing have smaller Dirichlet energies. Specifically, smaller Dirichlet energies of the HGCN parameters indicate more severe oversmoothing and less discriminative node features learned by the model. Larger Dirichlet energies of the HGCN parameters indicate less oversmoothing, greater discriminative node features learned by the model, and ultimately more accurate node features.
[0137] Specifically, on the graph structure data G, the scalar function The Dirichlet energy of is defined as follows:
[0138]
[0139] in, represents the Lorentz model of dimension d, A is the adjacency matrix of G, and D is the degree matrix of G.
[0140] For a vector field F (d+1)×c =(f1, ..., f c ), where c represents the number of vectors f in the vector field, and its Dirichlet energy is The Dirichlet energy always pulls the node embedding in Lorentz space back to the tangent space at the origin.
[0141] If no initial embedding feature of nodes is introduced in the hyperbolic graph convolution operator hgc(·), i.e. The corresponding Dirichlet energy is as follows formula (13):
[0142]
[0143] where 0<λ<2 is the smallest non-zero eigenvalue of , and ||X||2 represents the largest singular value of the node feature X (here for any matrix X, we have ). represents the traditional hyperbolic operation without introducing the initial embedding feature of nodes, and taking the aforementioned formula (6) as an example, in the case of not introducing the initial embedding feature H (0) of nodes, at this time α=0, then
[0144] Therefore, according to the triangle inequality, we can get:
[0145] ||((1-β l )I+β l W (l) )u||2≤1-β l +β l ||W (l) u||2 (14)
[0146] In fact, for any weight matrix X, ||Xu||2 can be estimated as the following lemma 1:
[0147] Lemma 1: If X=(X ij ) is an n×n weight matrix, i.e. then for any and |||u|||2=1, we have
[0148] Therefore, it can be easily proved that in the HGCN without introducing the initial embedding feature H, its corresponding Dirichlet energy is:
[0149] E(H (l) )≤d(1-λ) 2 E(H (l-1) ) (15)
[0150] Therefore, if the graph structure data G is not enough to expand, such as then with the increase of the number of layers, the HGCN will be exponentially smoothed. If an initial embedding feature is added, such as introducing in the hyperbolic graph convolution operator hgc(·) in order to interfere with the reduction of Dirichlet energy, which is the motivation of the present application.
[0151] The interference of the initial embedding features is studied in detail in the embodiments of the present application. For simplicity, it is assumed that the feature values in the processing process are all positive, so that the activation function ReLU does not affect the evaluation of the Dirichlet energy. Therefore, in the case of introducing initial embedding features, there is:
[0152]
[0153] where y l = (1-β l )I+β l W (l) and z represents an intermediate calculation result, P represents a parallel projection operation, and the last equation is due to the linear property of parallel movement, where According to the definition of parallel movement, there is:
[0154]
[0155] Further according to the definition, there is:
[0156]
[0157] Similarly according to the definition, Then according to the property of parallel movement again, there is:
[0158]
[0159] where θ l represents the coefficient of the term log o (H (0) ), φ l represents the coefficient of the term , ψ l represents the coefficient of the term O, which is a coefficient dependent on α l , β l and the Lorentz norm of the above three vectors (H (0) , H (l-1) , ). It is noted that θ l only depends on α l and H (0) , and the influence of log o (H (0) ) can never be ignored. At the same time (z = (z0,...)) is obtained by removing z0 from z and rescaling it by a larger factor. In summary, there is:
[0160]
[0161] where, Similarly negligible. Thus this embodiment proves that in the hyperbolic graph neural network with initial embedding features introduced, its Dirichlet energy E(H (l) ) will be bounded away from zero, while the Dirichlet energy in the corresponding HGCNs without initial embedding features introduced reduces to zero. Further, it is proved that the hyperbolic graph neural network based on hyperbolic residual connection adopted by the present application can solve the problem of over-smoothing.
[0162] In summary, the hyperbolic residual connection can effectively prevent the node features from becoming indistinguishable by preserving the information of the initial embedding features of the nodes at each layer and adding the hyperbolic identity mapping, thereby alleviating the problem of over-smoothing. The Dirichlet energy used in the embodiments of the present application can characterize the nature of the problem of over-smoothing, and it is proved that the hyperbolic residual connection avoids the energy tending to 0, and it is further proved that the scheme of the embodiments of the present application can solve the problem of over-smoothing in traditional hyperbolic graph neural networks.
[0163] The above method provides a hyperbolic graph representation learning method based on product manifold. By introducing a hyperbolic residual connection operation and combining product manifold feature representation and hyperbolic regularization technology, the method realizes differentiated extraction and hierarchical expression of multi-dimensional features, preserves the initial information of nodes, prevents features from becoming indistinguishable, and can extract feature information from different angles to more accurately characterize the hierarchical relationship between nodes, making up for the shortcomings of traditional HGCNs in capturing long-range relationships in graphs. In addition, the embodiments of the present application use Einstein midpoint estimation to select a new origin for hyperbolic operation, which can further improve the rationality of data embedding and the stability of the network. The technology more accurately characterizes the hierarchical relationship between nodes, and thus can realize more accurate personalized recommendation in an e-commerce recall system, improving platform conversion rate and user experience.
[0164] Please refer to Figure 5 , which is a graph structure data processing method according to an embodiment of the present application. The method can be executed by an electronic device 1 as shown in Figure 1 , and can be applied to the graph structure data processing application scenario as shown in Figure 2 , so as to realize that the convolutional layer of the hyperbolic neural network can preserve the initial information of each node in the node feature propagation process, avoid the problem of over-smoothing of node features caused by loss of initial information, improve the distinguishability of node features, and more accurately characterize the hierarchical relationship between nodes. The present embodiment takes the terminal 220 as an execution end for example, and the method comprises the following steps:
[0165] Step 501: obtaining graph structure data to be processed;
[0166] Step 502: embedding a plurality of node features of the graph structure data into a hyperbolic space based on a preset origin, to obtain embedded features of the plurality of nodes of the graph structure data in the hyperbolic space;
[0167] Step 503: According to the embedded features, a target node is selected from the plurality of nodes as a target origin of the hyperbolic space, and the mean of the square distances between the target node and each node in the plurality of nodes is the smallest.
[0168] Step 504: Based on the target origin, the node features in the graph structure data are embedded into the hyperbolic space through exponential mapping to obtain initial embedding features of each node in the graph structure data in the hyperbolic space.
[0169] Step 505: The initial embedding features are converted to a preset product manifold.
[0170] Step 506: On the preset product manifold, the initial embedding features and the output features of the first convolutional layer are transmitted to the second convolutional layer through residual connection to determine the convolution result of the second convolutional layer.
[0171] Step 507: The convolution result of the second convolutional layer is regularized by Gaussian noise to obtain the output features of the second convolutional layer.
[0172] The details of each step of the above method can be referred to the related description of the foregoing embodiments, which will not be repeated here.
[0173] Please refer to Figure 6 , which is a node classification method of an embodiment of the present application. The method can be executed by the electronic device 1 shown in Figure 1 , and can be applied to the graph structure data processing application scenario of the e-commerce scenario shown in Figure 2 , so that in the propagation process of the commodity node features, the convolutional layer of the hyperbolic neural network can retain the initial information of each commodity node, avoid the problem of over-smoothing of commodity node features caused by loss of initial information, improve the distinguishability of commodity node features, and more accurately depict the hierarchical relationship between nodes. In this embodiment, the terminal 220 is taken as an example of the execution end. Compared with the foregoing embodiments, in this embodiment, the commodity graph structure data in the e-commerce scenario is taken as an example, and the method comprises the following steps:
[0174] Step 601: Obtain commodity graph structure data, which includes commodity node features.
[0175] Step 602: Embed the commodity node features in the commodity graph structure data into the hyperbolic space to obtain initial embedding features of the commodity nodes in the commodity graph structure data in the hyperbolic space.
[0176] Step 603: adopting a preset hyperbolic graph neural network, determining target features of the commodity nodes in the commodity graph structure data according to the initial embedding features of the commodity nodes, wherein the hyperbolic graph neural network is used to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
[0177] Step 604: classifying the commodity nodes according to the target features of the commodity nodes.
[0178] In the embodiments of the present application, taking the commodity graph structure data as an example, the commodity graph structure data includes commodity node features, the commodity nodes can be different commodity categories, and the edge relationship between the commodity nodes can be the relationship between the commodity categories. By embedding the commodity node features in the to-be-processed commodity graph structure data into a hyperbolic space and using a preset hyperbolic graph neural network, the target features of each commodity node are determined based on the initial embedding features of each commodity node in the hyperbolic space, wherein the hyperbolic graph neural network processes the commodity node features through multiple convolutional layers. In the process of processing the commodity node features, the initial embedding features of each commodity node and the output features of the first convolutional layer are introduced into the second convolutional layer, so that the convolutional layers of the hyperbolic neural network can retain the initial information of each commodity node in the propagation process of the commodity node features, avoid the problem of over-smoothing of the commodity node features caused by the loss of the initial information, improve the distinguishability of the commodity node features, and more accurately depict the hierarchical relationship between the commodity nodes. On this basis, the commodity nodes are classified according to the target features of the commodity nodes, which can improve the accuracy of the classification results.
[0179] Each step of the above method can be referred to the related description of the foregoing embodiments, which will not be repeated here.
[0180] Please refer to Figure 7 , which is an information recommendation method of an embodiment of the present application. The method can be executed by the electronic device 1 shown in Figure 1 , and can be applied to the graph structure data processing application scenario of the e-commerce scenario shown in Figure 2 , so as to realize that the convolutional layers of the hyperbolic neural network can retain the initial information of each node in the node feature propagation process, avoid the problem of over-smoothing of the node features caused by the loss of the initial information, improve the distinguishability of the node features, and more accurately depict the hierarchical relationship between the nodes. In the present embodiment, the terminal 220 is taken as an example of the execution end, compared with the foregoing embodiments, the present embodiment takes the graph structure data formed by the users and the commodities in the e-commerce scenario as an example, and the method includes the following steps:
[0181] Step 701: obtaining graph structure data formed by users and commodities, the graph structure data including user node features and commodity node features;
[0182] Step 702: embedding the user node features and the commodity node features in the graph structure data into a hyperbolic space to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space;
[0183] Step 703: determining target features of the user nodes and target features of the commodity nodes in the graph structure data according to the initial embedding features of the user nodes and the initial embedding features of the commodity nodes by using a preset hyperbolic graph neural network, wherein the hyperbolic graph neural network is used to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer;
[0184] Step 704: determining the recommendation information for the user according to the hyperbolic distance between the target features of the user nodes and the target features of the commodity nodes.
[0185] In this embodiment, taking the e-commerce scenario as an example, the user node features and the commodity node features in the graph structure data to be processed are embedded into a hyperbolic space, and the target features of each user node and each commodity node are determined based on the initial embedding features of each node in the hyperbolic space by using a preset hyperbolic graph neural network. The hyperbolic graph neural network processes the node features through multiple convolutional layers, and in the node feature processing process, the initial information of each node is preserved by introducing the initial embedding features of each node and the output features of the first convolutional layer into the second convolutional layer, thereby avoiding the problem of over-smoothing of the node features caused by loss of initial information, improving the distinguishability of the user node features and the commodity node features, and more accurately depicting the hierarchical relationship between nodes. Furthermore, according to the hyperbolic distance between the target features of the user nodes and the target features of the commodity nodes, the recommendation information for the user can be more accurately determined, the pertinence of information recommendation is improved, and the response capability of the system is improved.
[0186] Each step of the above method can be referred to the related description of the above embodiment, which will not be repeated here.
[0187] Please refer to Figure 8 which is a graph structure data processing apparatus 800 of an embodiment of the present application. The apparatus can be applied to a terminal and can be applied to the graph structure data processing application scenario shown in Figure 2 to realize that the convolutional layers of the hyperbolic neural network can preserve the initial information of each node in the node feature propagation process, avoid the problem of over-smoothing of the node features caused by loss of initial information, improve the distinguishability of the node features, and more accurately depict the hierarchical relationship between nodes. The apparatus comprises an acquisition module 801, an embedding module 802, and a determination module 803, and the functions and principles of each module are as follows:
[0188] The acquisition module 801 is configured to acquire graph structure data to be processed.
[0189] The embedding module 802 is configured to embed node features in the graph structure data into hyperbolic space to obtain initial embedding features of nodes in the graph structure data in the hyperbolic space.
[0190] The determination module 803 is configured to determine target features of nodes in the graph structure data according to the initial embedding features by using a preset hyperbolic graph neural network, wherein the hyperbolic graph neural network is configured to determine output features of a second convolutional layer of the hyperbolic graph neural network according to the initial embedding features and output features of a first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
[0191] In an embodiment, the embedding module 802 is configured to determine a target origin of the hyperbolic space, and embed node features in the graph structure data into the hyperbolic space by exponential mapping based on the target origin to obtain initial embedding features of nodes in the graph structure data in the hyperbolic space.
[0192] In an embodiment, the embedding module 802 is configured to embed a plurality of node features of the graph structure data into the hyperbolic space based on a preset origin to obtain embedded features of the plurality of nodes in the graph structure data in the hyperbolic space, and select a target node from the plurality of nodes as the target origin of the hyperbolic space according to the embedded features, and the mean of squared distances between the target node and nodes in the plurality of nodes is minimum.
[0193] In an embodiment, the determination module 803 is configured to pass the initial embedding features and the output features of the first convolutional layer to the second convolutional layer by using a residual connection to determine the output features of the second convolutional layer.
[0194] In an embodiment, the determination module 803 is configured to pass the initial embedding features and the output features of the first convolutional layer to the second convolutional layer by using a residual connection to determine a convolution result of the second convolutional layer, and perform regularization processing on the convolution result of the second convolutional layer by using Gaussian noise to obtain the output features of the second convolutional layer.
[0195] In an embodiment, the determination module 803 is configured to convert the initial embedding features to a preset product manifold, and determine target features of nodes in the graph structure data according to the initial embedding features by using a preset hyperbolic graph neural network on the preset product manifold.
[0196] The detailed description of the above-mentioned graph structure data processing apparatus 800 is described in the description of the related method steps in the above-mentioned embodiments, and the implementation principles and technical effects are similar, which will not be described here in detail.
[0197] Figure 9A structural schematic diagram of a cloud device 90 is provided for the exemplary embodiments of the present application. The cloud device 90 can be used to run the method provided by any of the above embodiments. As shown in Figure 9 , the cloud device 90 can include a memory 904 and at least one processor 905, Figure 9 , the processor is taken as an example.
[0198] The memory 904 is used to store computer programs and can be configured to store other various data to support the operation on the cloud device 90. The memory 904 can be an Object Storage Service (OSS).
[0199] The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk.
[0200] The processor 905 is coupled with the memory 904 and is used to execute the computer programs in the memory 904 for implementing the schemes provided by any of the above method embodiments, and the specific functions and the technical effects that can be achieved are not repeated here.
[0201] Further, as Figure 9 , the cloud device further includes a firewall 901, a load balancer 902, a communication component 906, a power supply component 903 and other components. Figure 9 , only some components are shown schematically, and it does not mean that the cloud device only includes Figure 9 the components shown.
[0202] In an embodiment, the above Figure 9The communication component 906 is configured to facilitate wired or wireless communication between the device where the communication component 906 is located and other devices. The device where the communication component 906 is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, LTE (Long Term Evolution, Long Term Evolution, referred to as LTE), 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component 906 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 906 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies.
[0203] In one embodiment, the above Figure 9 The power supply component 903 provides power to various components of the device where the power supply component 903 is located. The power supply component 903 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0204] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method of any of the aforementioned embodiments is implemented.
[0205] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method of any of the aforementioned embodiments when executed by a processor.
[0206] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division. In actual implementation, other division methods may be used. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not implemented.
[0207] The integrated modules realized in the form of software function modules can be stored in a computer readable storage medium. The software function modules are stored in a storage medium and include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute part of the steps of the method of various embodiments of the present application.
[0208] It should be understood that the processor described above can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution. The memory can include a high-speed RAM (Random Access Memory) memory, and can also include a non-volatile storage NVM (Nonvolatile memory), such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0209] The storage medium described above can be realized by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0210] An example storage medium is coupled to the processor such that the processor can read information from, and can write information to, the storage medium. Of course, the storage medium can be a part of the processor. Consistent with the teachings provided herein, the processor can execute instructions embodied by computer code stored on the storage medium, and the storage medium can store computer code which, when executed by the processor, causes the processor to perform methods as described herein. The processor and the storage medium can be supplemented by, or incorporated in, ASICs (application-specific integrated circuits).
[0211] It should be noted that, as used in this document, the terms "comprises" or "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0212] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent advantages or disadvantages of the embodiments.
[0213] Those skilled in the art can clearly understand the above-mentioned embodiment method by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device) to execute the methods of the embodiments of the present application.
[0214] In the technical solutions of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user data and other information comply with relevant laws and regulations and do not violate public order and good customs.
[0215] The above are only preferred embodiments of the present application, and do not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation made by using the contents of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A graph structure data processing method, characterized in that: include: Get the graph structure data to be processed; Embedding node features in the graph structure data into a hyperbolic space to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space; A preset hyperbolic graph neural network is used to determine the target features of the nodes in the graph structure data based on the initial embedding features, wherein the hyperbolic graph neural network is used to determine the output features of the second convolutional layer of the hyperbolic graph neural network based on the initial embedding features and the output features of the first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
2. The method according to claim 1, characterized in that The embedding of the node features in the graph structure data into a hyperbolic space to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space includes: determining a target origin of the hyperbolic space; Based on the target origin, node features in the graph structure data are embedded into the hyperbolic space through exponential mapping to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space.
3. The method according to claim 2, characterized in that Determining the target origin of the hyperbolic space includes: Embedding multiple node features of the graph structure data into the hyperbolic space based on a preset origin to obtain embedded features of the multiple nodes of the graph structure data in the hyperbolic space; According to the embedded features, a target node is selected from the multiple nodes as the target origin of the hyperbolic space, and the average of the squares of the distances between the target node and each node in the multiple nodes is minimized.
4. The method according to claim 1, wherein Determining the output feature of the second convolutional layer of the hyperbolic graph neural network according to the initial embedding feature and the output feature of the first convolutional layer of the hyperbolic graph neural network includes: The initial embedded features and the output features of the first convolutional layer are transferred to the second convolutional layer using a residual connection to determine the output features of the second convolutional layer.
5. The method according to claim 4, characterized in that The adopting of a residual connection to transfer the initial embedded features and the output features of the first convolutional layer to the second convolutional layer, and determining the output features of the second convolutional layer, includes: Using a residual connection to transfer the initial embedded features and the output features of the first convolutional layer to the second convolutional layer, and determine the convolution result of the second convolutional layer; Gaussian noise is used to regularize the convolution result of the second convolution layer to obtain output features of the second convolution layer.
6. The method according to any one of claims 1 to 5, characterized in that The method of using a preset hyperbolic graph neural network to determine target features of nodes in the graph structure data according to the initial embedding features includes: The initial embedding features are converted to a preset product manifold, a preset hyperbolic graph neural network is used on the preset product manifold, and target features of nodes in the graph structure data are determined based on the initial embedding features.
7. A node classification method, characterized in that: include: Acquire product graph structure data, wherein the product graph structure data includes product node features; Embedding the product node features in the product graph structure data into a hyperbolic space to obtain initial embedding features of the product nodes in the product graph structure data in the hyperbolic space; Using a preset hyperbolic graph neural network, based on the initial embedding features of the product nodes, determine the target features of the product nodes in the product graph structure data, wherein the hyperbolic graph neural network is used to determine the output features of the second convolutional layer of the hyperbolic graph neural network based on the initial embedding features and the output features of the first convolutional layer of the hyperbolic graph neural network, where the first convolutional layer is located before the second convolutional layer; The commodity nodes are classified according to the target features of the commodity nodes.
8. An information recommendation method, characterized in that: include: Obtaining graph structure data formed by users and products, wherein the graph structure data includes user node features and product node features; Embedding user node features and product node features in the graph structure data into a hyperbolic space to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space; Using a preset hyperbolic graph neural network, based on the initial embedding features of the user node and the initial embedding features of the product node, determine the target features of the user node and the target features of the product node in the graph structure data, wherein the hyperbolic graph neural network is used to determine the output features of the second convolutional layer of the hyperbolic graph neural network based on the initial embedding features and the output features of the first convolutional layer of the hyperbolic graph neural network, the first convolutional layer being located before the second convolutional layer; Recommendation information for the user is determined according to the hyperbolic distance between the target feature of the user node and the target feature of the product node.
9. A graph structure data processing device, characterized in that: include: An acquisition module is used to obtain graph structure data to be processed; An embedding module, configured to embed node features in the graph structure data into a hyperbolic space to obtain initial embedding features of the nodes in the graph structure data in the hyperbolic space; A determination module is used to use a preset hyperbolic graph neural network to determine the target features of the nodes in the graph structure data based on the initial embedding features, wherein the hyperbolic graph neural network is used to determine the output features of the second convolutional layer of the hyperbolic graph neural network based on the initial embedding features and the output features of the first convolutional layer of the hyperbolic graph neural network, and the first convolutional layer is located before the second convolutional layer.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when the computer program is executed by a processor.
Citation Information
Patent Citations
Lightweight residual neural network model
CN115131579A
Commodity recommendation method, model training method, device and equipment
CN118279017A
Network violence identification method based on multi-mode complete hyperbolic graph neural network
CN118966196A
Image processing method, and training method and device of image generation model
CN119048883A
Fraudulent user identification method and device, equipment, storage medium and program product
CN119917912A