Data processing method and device, storage medium and program product

By generating target projection matrices and target curvatures in the recall process of e-commerce platforms, nodes are projected onto the target hyperbolic space, solving the problem that fixed distance metrics in existing technologies cannot accurately characterize user-product relationships, and achieving higher precision node relationship recognition and personalized adaptability of the recall system.

CN120804500APending Publication Date: 2025-10-17ZHEJIANG TMALL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510654353.1
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

Technical Problem

Existing hyperbolic learning methods, using fixed geodesic distance metrics, are insufficient to accurately characterize the complex and dynamically changing hierarchical user-product relationships in e-commerce platform recall operations, thus affecting the personalization capabilities and real-time adaptability of the recall system.

Method used

By generating a target projection matrix and target curvature suitable for node pairs, the node pairs to be processed are projected onto the target hyperbolic space, and the relationship between different nodes in the graph structure data is characterized by an adaptive feature distance metric.

Benefits of technology

The recognition accuracy of the relationship between nodes is improved, and the personalization ability and real-time adaptability of the recall system are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804500A_ABST
    Figure CN120804500A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, a storage medium and a program product, and the method comprises the steps: obtaining at least one to-be-processed node pair which comprises a first node feature and a second node feature; for the to-be-processed node pair, generating a target projection matrix and a target curvature suitable for the to-be-processed node pair according to the first node feature and the second node feature, the target projection matrix and the target curvature being used for projecting the to-be-processed node pair to a target hyperbolic space; and based on the feature distance of the to-be-processed node pair in the target hyperbolic space, determining relationship information of the first node and the second node. According to the method and the device, the relation information between different nodes in the graph structure data is described by adopting the feature distance measurement adaptive to the to-be-processed node, and the identification precision of the relation between the nodes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and particularly relates to a data processing method, device, storage medium and 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 multiple levels of structure.

[0003] Traditional recall algorithms usually rely on Euclidean space for data modeling, while e-commerce data often presents a significant hierarchical structure, such as a commodity classification system, user interest preference levels, and multi-level similarity between commodities. In Euclidean space, it is difficult to accurately depict these hierarchical relationships, thereby affecting the precision and generalization ability of the recall model. In contrast, hyperbolic space, with its negative curvature geometric characteristics, can more naturally represent and model hierarchical data, reducing the data distortion problem that may be caused by traditional Euclidean methods, thereby improving the recall effect in the e-commerce scenario.

[0004] However, existing hyperbolic learning methods usually adopt a fixed geodesic distance metric to evaluate the similarity between data nodes, and assume that this geodesic distance can effectively reflect the user-commodity relationship in the recommendation system. However, the hierarchical structure of data in the recall business is complex and dynamically changing, and a fixed distance metric often fails to accurately depict the relationship between data nodes at different levels, thereby leading to inaccurate depiction of the similarity between commodities and user preferences, thereby affecting the personalization ability and real-time adaptability of the recall system. SUMMARY

[0005] The main purpose of the embodiments of the present application is to provide a data processing method, device, storage medium and program product, which realize depicting the relationship information between different nodes in graph structure data by adopting a feature distance metric adaptive to the to-be-processed node, and improve the recognition accuracy of the relationship between nodes.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, comprising: obtaining at least one to-be-processed node pair, the to-be-processed node pair comprising a first node feature and a second node feature; for the to-be-processed node pair, generating a target projection matrix and a target curvature suitable for the to-be-processed node pair according to the first node feature and the second node feature, the target projection matrix and the target curvature being used to project the to-be-processed node pair to a target hyperbolic space; determining relationship information of the first node and the second node based on a feature distance of the to-be-processed node pair in the target hyperbolic space.

[0007] In a second aspect, an embodiment of the present application provides a node classification method, comprising: obtaining at least one to-be-processed commodity node pair in commodity graph structure data, the to-be-processed commodity node pair comprising a first commodity node feature and a second commodity node feature; for the to-be-processed commodity node pair, generating a target projection matrix and a target curvature suitable for the to-be-processed commodity node pair according to the first commodity node feature and the second commodity node feature, the target projection matrix and the target curvature being used to project the to-be-processed commodity node pair to a target hyperbolic space; determining a category relationship of the first commodity node and the second commodity node in the commodity graph structure data based on a feature distance of the to-be-processed commodity node pair in the target hyperbolic space.

[0008] In a third aspect, an embodiment of the present application provides an information recommendation method, comprising: obtaining at least one to-be-processed node pair in graph structure data, the to-be-processed node pair comprising a user node feature and a commodity node feature; for the to-be-processed node pair, generating a target projection matrix and a target curvature suitable for the to-be-processed node pair according to the user node feature and the commodity node feature, the target projection matrix and the target curvature being used to project the to-be-processed node pair to a target hyperbolic space; determining preference relationship information of the user node to the commodity node in the graph structure data based on a feature distance of the to-be-processed node pair in the target hyperbolic space; and determining commodity recommendation information for the user according to the preference relationship information.

[0009] In a fourth aspect, an embodiment of the present application provides a data processing apparatus, comprising:

[0010] The obtaining module is configured to obtain at least one to-be-processed node pair, the to-be-processed node pair comprising a first node feature and a second node feature.

[0011] The generating module is configured to, for the to-be-processed node pair, generate a target projection matrix and a target curvature suitable for the to-be-processed node pair according to the first node feature and the second node feature, the target projection matrix and the target curvature being used to project the to-be-processed node pair to a target hyperbolic space.

[0012] determine a relationship information between the first node and the second node based on the characteristic distance of the target hyperbolic space.

[0013] In a fifth aspect, an electronic device is provided, including:

[0014] at least one processor; and

[0015] a memory connected with the at least one processor in communication;

[0016] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the electronic device to perform the method of any of the above aspects.

[0017] In a sixth aspect, a cloud device is provided, including:

[0018] at least one processor; and

[0019] a memory connected with the at least one processor in communication;

[0020] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the cloud device to perform the method of any of the above aspects.

[0021] In a seventh aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method of any of the above aspects is implemented.

[0022] In an eighth aspect, a computer program product is provided, including a computer program, and when a processor executes the computer program, the method of any of the above aspects is implemented.

[0023] The data processing method, device, storage medium and program product provided by the embodiments of the present application can generate a target projection matrix and a target curvature suitable for the node pair by using the first node feature and the second node feature of the node pair to be processed, so that the target projection matrix and the target curvature are more targeted, so as to project the node pair to be processed into a more suitable target hyperbolic space, and then make the node pair to be processed be able to be represented in a more accurate manner in the target hyperbolic space, so as to better reflect the relationship of the node pair in the graph structure data. Then, the feature distance of the node pair to be processed in the target hyperbolic space is calculated, and the feature distance can more accurately measure the relationship information of the first node and the second node in the graph structure data. In this way, each node pair to be processed is mapped to a matching target hyperbolic space, and the relationship information between different nodes in the graph structure data is described by using a feature distance measurement that is adaptive to the node to be processed, so that the identification accuracy of the relationship between nodes is improved. BRIEF DESCRIPTION OF DRAWINGS

[0024] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles behind the present application. It is clear that the drawings described below are some embodiments of the present application, and other drawings can be obtained according to these drawings without creative labor for those skilled in the art.

[0025] Figure 1 A structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0026] Figure 2 An application scenario schematic diagram of a data processing system provided by an embodiment of the present application;

[0027] Figure 3 A flowchart of a data processing method provided by an embodiment of the present application;

[0028] Figure 4 A comparison schematic diagram of difficulty in distinguishing between nodes provided by an embodiment of the present application;

[0029] Figure 5 A training method flowchart of a hyperbolic metric generator provided by an embodiment of the present application;

[0030] Figure 6 An application scenario framework schematic diagram of a data processing method provided by an embodiment of the present application;

[0031] Figure 7 A hyperbolic metric conversion schematic diagram provided by an embodiment of the present application;

[0032] Figure 8A flowchart of a node classification method provided by an embodiment of the present application is shown in FIG. 1.

[0033] Figure 9 A flowchart of an information recommendation method provided by an embodiment of the present application is shown in FIG. 4.

[0034] Figure 10 A structural diagram of a data processing device provided by an embodiment of the present application is shown in FIG. 5.

[0035] Figure 11 A structural diagram of a cloud device provided by an embodiment of the present application is shown in FIG. 6.

[0036] The specific embodiments of the present application have been shown in the above-described drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0037] The exemplary embodiments will be described in detail herein with reference to the accompanying drawings. The same reference numbers in different drawings represent the same or similar elements unless otherwise represented. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application.

[0038] The term "and / or" is used herein to describe the association relationship of associated objects, and specifically represents that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone.

[0039] It should be noted that the user information (including but not limited to user device 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 laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0040] In order to clearly describe the technical solutions of the embodiments of the present application, the terms involved in the present application are first explained:

[0041] Hyperbolic manifold: Hyperbolic manifold is a concept in Riemannian geometry, which is a Riemannian manifold with constant negative curvature. In hyperbolic geometry, the sum of the internal angles of a triangle is less than 180 degrees, which is different from the sum of the internal angles of a triangle in Euclidean geometry, which is 180 degrees.

[0042] Poincare model: is a model in hyperbolic geometry, there are five basic model architecture in hyperbolic space, the embodiment of the application takes the Poincare model as an example. The n-dimensional Poincare model is defined as:

[0043]

[0044] Where c is the curvature, is the Riemannian metric.

[0045] Tangent space: is a core concept in differential geometry that describes the local linear structure of a manifold, defined as the set of all possible tangent vectors at a point on a manifold , which forms a vector space of the same dimension as the manifold For a point in the Poincare model, its tangent space contains all the tangent vectors at .

[0046] Exponential map: Refers to the mapping of a vector u in the tangent space to the manifold For a point and a tangent vector , the exponential map is defined as:

[0047]

[0048] Where, is the conformal factor. The exponential map at the origin of the Poincare model can be simplified as:

[0049]

[0050] Logarithmic map: the inverse mapping of the exponential map, the logarithmic map is the mapping of a point y on the manifold back to the tangent space. For a point and a tangent vector , the logarithmic map is defined as:

[0051]

[0052] Then the logarithmic map at the origin of the Poincare model can be simplified as:

[0053]

[0054] Geodesic distance: A concept in Riemannian geometry, referring to the shortest path between two points on a Riemannian manifold (such as a sphere, hyperbolic space, etc.). In Euclidean space, geodesics are straight lines, but in other types of spaces, geodesics can take on different shapes. For example, on a sphere, the geodesic distance between two points is the great circle path. The geodesic distance in hyperbolic space is defined as:

[0055]

[0056] where c is the curvature, y is the characteristic vector in hyperbolic space. The Möbius addition, defined as:

[0057]

[0058] Möbius multiplication: A multiplication operation in hyperbolic space. For an n-dimensional vector in Poincaré space and an n x n matrix M, the Möbius multiplication is defined as follows:

[0059]

[0060] Metric learning: A branch of machine learning that aims to learn the distance metric between samples. In metric learning, algorithms attempt to find a way to represent data such that similar samples are close to each other in this representation, while dissimilar samples are far apart. This technique can be used in clustering, classification, image recognition, and other fields.

[0061] The data processing method of the embodiments of the present application can be applied to any field that needs to measure the similarity between different data points.

[0062] In the recall business of an e-commerce platform, user interaction behaviors (such as clicks, searches, purchases), product attribute data (such as categories, brands, prices), and transaction records, etc. data, construct large-scale graph structure data. 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 clickstream paths, cross-category browsing) imply dynamic interaction patterns, further forming a heterogeneous network containing multi-level structures.

[0063] Traditional recall algorithms usually rely on Euclidean space for data modeling, while e-commerce data often presents a significant hierarchical structure, such as a commodity classification system, user interest preference hierarchy, and multi-level similarity between commodities. In Euclidean space, it is difficult to accurately depict these hierarchical relationships, thereby affecting the accuracy and generalization ability of the recall model. In contrast, hyperbolic space, with its negative curvature geometric characteristics, can more naturally represent and model hierarchical data, reducing data distortion problems that may be caused by traditional Euclidean methods, thereby improving recall effectiveness in e-commerce scenarios.

[0064] In hyperbolic space, hyperbolic learning algorithms can be roughly divided into three categories. The first category of methods chooses to learn the embedding representation of data in hyperbolic space. The second category of methods aims to extend the classic neural network architecture from Euclidean space to hyperbolic space, such as convolutional networks and graph networks. The third category of methods focuses on extending the learning paradigm from Euclidean space to hyperbolic manifolds, such as contrastive learning, self-supervised learning, and metric learning.

[0065] However, existing hyperbolic learning methods usually adopt a fixed geodesic distance metric to evaluate the similarity between data nodes, and assume that this geodesic distance can effectively reflect the user-item relationship in the recommendation system. However, the hierarchical structure of data in the recall business is complex and dynamic, and a fixed distance metric often cannot accurately depict the relationship between data nodes at different levels, resulting in inaccurate depiction of the similarity between commodities and user preferences, thereby affecting the personalization ability and real-time adaptability of the recommendation system.

[0066] To solve at least one of the above problems, the embodiments of the present application provide a data processing scheme, which generates a target projection matrix and a target curvature suitable for a node pair to be processed by using the first node feature and the second node feature of the node pair, so that the target projection matrix and the target curvature are more targeted, so as to project the node pair to be processed into a more adaptive target hyperbolic space, and then make the node pair to be processed represented in a more accurate manner in the target hyperbolic space, thereby better reflecting its relationship in the graph structure data. Then, the feature distance of the node pair to be processed in the target hyperbolic space is calculated, which can more accurately measure the relationship information between the first node and the second node in the graph structure data. In this way, each node pair to be processed is mapped to a matching target hyperbolic space, realizing the depiction of the relationship information between different nodes in the graph structure data by using a feature distance metric that is adaptive to the node to be processed, and improving the recognition accuracy of the relationship between nodes.

[0067] Some embodiments of the present application will be described in detail below with reference to the drawings. The following embodiments and features described below can be combined with each other in the case of no conflict between the embodiments. In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.

[0068] As shown in Figure 1 The present embodiment provides an electronic device 1, comprising: at least one processor 11 and a memory 12, Figure 1 The processor 11 and the memory 12 are connected through a bus 10. The memory 12 stores instructions executable by the processor 11, and the processor 11 executes the instructions to enable the electronic device 1 to perform all or part of the processes of the methods in the embodiments described below, so as to depict the relationship information between nodes in the graph structure data by using adaptive feature distance metrics, and improve the recognition accuracy of the relationship between nodes.

[0069] In an embodiment, the electronic device 1 can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, or a large-scale computing system composed of multiple computers.

[0070] Figure 2 A schematic diagram of a data processing system application scenario 200 provided by an embodiment of the present application is shown in Figure 2 As shown in the figure, the system comprises a server 210 and a terminal 220, wherein:

[0071] The server 210 can be a data platform providing data processing services, such as a data recall system platform in an e-commerce scenario. In actual scenarios, a data recall system platform can have multiple servers 210, Figure 2 In an embodiment, one server 210 is taken as an example.

[0072] The terminal 220 can be a mobile device used to log in to the data recall system platform, such as a computer, a mobile phone, a tablet computer, etc. The terminal 220 can also have multiple, Figure 2 In an embodiment, two terminals 220 are taken as an example.

[0073] The terminal 220 and the server 210 can transmit information through the Internet, so that the terminal 220 can access the data on the server 210. The terminal 220 and / or the server 210 described above can be implemented by the electronic device 1.

[0074] The data processing scheme of the present embodiment 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 actual scenarios, the selection can be based on actual needs, which is not limited in the present embodiment.

[0075] When the data processing scheme is deployed on the server 210 in whole or in part, a calling interface can be opened to the terminal 220 to provide algorithm support to the terminal 220.

[0076] The method provided by the embodiment of the application can be implemented by an electronic device 1 executing corresponding software code, and is implemented by data interaction with a server. The electronic device 1 can be a local terminal device. When the method is executed 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.

[0077] In a possible implementation, the method provided by the embodiment of the application provides a graphical user interface by a terminal device, wherein the terminal device can be the aforementioned local terminal device, or can be the aforementioned client device in the cloud interaction system.

[0078] Please refer to Figure 3 , which is a data processing method of an embodiment of the application. The method can be executed by the electronic device 1 shown in Figure 1 , and can be applied to the data processing application scenario shown in Figure 2 , to implement the relationship information between different nodes in the graph structure data by using the feature distance metric adaptive to the to-be-processed node, and improve the recognition accuracy of the relationship between the nodes. The embodiment takes the terminal 220 as an execution end for example, and the method includes the following steps:

[0079] Step 301: Obtain at least one to-be-processed node pair. The to-be-processed node pair includes a first node feature and a second node feature.

[0080] In this step, the node pair to be processed can be a node pair in the graph structure data, which takes nodes (entities) and edges (relationships) as core elements, is suitable for describing complex multi-level data networks, and 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 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. The node pair to be processed refers to a node pair formed by two nodes in the graph structure data that need to measure relationship information, which includes but is not limited to similarity, preference relationship, etc. between the two nodes. Taking the commodity graph structure as an example, the node pair to be processed can be a feature pair formed by two commodity node features that need to measure the similarity of the categories. Taking the graph structure data composed of user behavior and commodity data as an example, assuming that the preference degree of user A for a certain category B commodity needs to be measured, the node pair to be processed can include the user A node feature and the category B commodity node feature.

[0081] In actual scenarios, the hierarchical complexity of graph structure data varies greatly. Considering that creating geometric perception metrics can result in high computational cost, and many node features with simple hierarchical structure can be well described by fixed hyperbolic distance metrics. The embodiments of the present application propose a mechanism to identify difficult node pairs that are difficult to distinguish in graph structure data as node pairs to be processed. Only for these difficult node pairs, the corresponding target projection matrix and target curvature are generated, and then only for these difficult node pairs, adaptive distance measurement is performed, while other node pairs with simple data hierarchy can use fixed distance measurement, thereby reducing data computation.

[0082] In an embodiment, step 301 can specifically include: obtaining a plurality of to-be-tested node features and a preset reference node feature in the to-be-processed graph structure data. The hyperbolic distance between each to-be-tested node feature and the reference node feature is calculated. At least one target to-be-tested node is selected from the to-be-tested nodes, the difference between the hyperbolic distances of the target to-be-tested node and at least two different reference node features is less than a preset threshold, and the target to-be-tested node and at least two different reference nodes form a node pair to be processed, respectively.

[0083] In the embodiment, the to-be-tested node refers to a data node to be identified in the graph structure data, and the preset reference node refers to a data node of which the category is known in the graph structure data. Taking the commodity graph structure as an example, the to-be-tested node can be a commodity node of which the commodity category is unknown in the commodity graph structure data, such as a node of a certain shoe 1, and the preset reference node can be a commodity category node of which the commodity category is known, such as a node of a male shoe 2. At this time, the hyperbolic distance between the to-be-tested node feature and the preset reference node feature represents the possibility that the shoe 1 belongs to the male shoe 2. The smaller the hyperbolic distance, the greater the possibility that the shoe 1 belongs to the male shoe 2. Taking the graph structure data composed of user behavior and commodity data as an example, the to-be-tested node can be a user node, such as a node of a user A, and the preset reference node can be a commodity node of which the commodity category is known, such as a node of a male shoe 2. At this time, the hyperbolic distance between the to-be-tested node feature and the preset reference node feature represents the preference degree of the user A for the male shoe 2. The smaller the hyperbolic distance, the greater the preference degree of the user A for the male shoe 2.

[0084] Therefore, by calculating the hyperbolic distance between each to-be-tested node feature and each reference node feature, the similarity or the preference degree between the to-be-tested node and the preset reference node can be more accurately captured. By analyzing the difference degree of the hyperbolic distance between the to-be-tested node feature and different reference node features, if the difference degree of the hyperbolic distance between a certain to-be-tested node feature and at least two different reference node features is less than a preset threshold, it is indicated that the to-be-tested node has the similarity with multiple reference nodes. In this case, the traditional algorithm cannot distinguish which reference node is closer to the to-be-tested node. Such to-be-tested node belongs to a node that is difficult to identify, and therefore the to-be-tested node is identified from multiple to-be-tested nodes in the graph structure data as a target to-be-tested node. The target to-be-tested node and the at least two different reference nodes in the above difficult-to-distinguish relationship form to-be-processed node pairs respectively. The node pairs generate corresponding target projection matrices and target curvatures by using the method provided in the embodiment, and then perform distance measurement individually. This not only improves the accuracy of node relationship identification, but also enhances the mining ability of potential patterns in complex graph structures.

[0085] The preset threshold can be set according to actual needs. For example, the preset threshold can be a threshold close to 0.

[0086] In an embodiment, the at least one target to-be-tested node selected from the to-be-tested nodes has a difference in hyperbolic distance with respect to at least two different reference node features that is less than a preset threshold, the target to-be-tested node forms a to-be-processed node pair with each of the at least two different reference nodes, and the method comprises: for each to-be-tested node, determining a first reference node feature having a minimum hyperbolic distance with respect to a feature of the to-be-tested node and a second reference node feature having a second minimum hyperbolic distance with respect to the feature of the to-be-tested node. A first hyperbolic distance between the feature of the to-be-tested node and the first reference node feature is determined, and a second hyperbolic distance between the feature of the to-be-tested node and the second reference node feature is determined. If a difference between the first hyperbolic distance and the second hyperbolic distance is less than a preset threshold, the to-be-tested node forms a to-be-processed node pair with the first reference node and / or forms another to-be-processed node pair with the second reference node.

[0087] In the embodiment, for each to-be-tested node, a first reference node feature having a minimum hyperbolic distance with respect to a feature of the to-be-tested node and a second reference node feature having a second minimum hyperbolic distance with respect to the feature of the to-be-tested node are first determined. Then, a first hyperbolic distance between the feature of the to-be-tested node and the first reference node feature and a second hyperbolic distance between the feature of the to-be-tested node and the second reference node feature are calculated. When a ratio of the two distances is within a preset ratio range, it is indicated that the to-be-tested node has similar relationship features with respect to the two reference nodes in the hyperbolic space. The to-be-tested node feature can form a to-be-processed node pair with the first reference node feature and / or the second reference node feature, thereby improving the accuracy of node relationship identification.

[0088] In an actual scenario, a reference node can further include multiple sub-nodes, and the average of feature data of the multiple sub-nodes under the reference node can be taken as the feature of the reference node.

[0089] Taking the commodity graph structure data as an example, it is assumed that the reference node is a known category of commodity category node, and taking a commodity classification task as an example, one commodity category can include feature data of multiple sub-categories, such as sports shoes, casual shoes, and home shoes. At this time, the average of feature data of sports shoes, casual shoes, and home shoes can be calculated as the category prototype of the male shoe category, and the category prototype represents the basic features of the male shoe category.

[0090] Specifically, first, the category prototypes of all reference commodity category nodes are calculated, where the category prototype refers to the average of feature data of all sub-categories under a certain reference commodity category. For example, for all sub-category feature data of the commodity category node k, the average of the feature data of the sub-categories is taken as the category prototype of the commodity category node k. The category prototype is where N is the data amount of the commodity category node k, and N is a non-negative integer, is the feature data of the i-th sub-category of the commodity category node k. Secondly, the hyperbolic distance between the current to-be-tested node and the category prototypes of all reference nodes is calculated, and the first reference node and the second reference node closest to the to-be-tested node in the hyperbolic distance are selected from the reference nodes, assuming that the hyperbolic distance between the to-be-tested node and the first reference node is d1, and the hyperbolic distance between the to-be-tested node and the second reference node is d2, where d1 is less than or equal to d2. By calculating the ratio of d1 and d2, the proximity of the to-be-tested node to the classification boundary is determined. If the ratio of d1 and d2 is closer to 1, it means that it is more difficult to distinguish whether the to-be-tested node belongs to the category of the first reference node or the category of the second reference node, which is a more difficult situation for accurate classification. Such to-be-tested nodes are selected as difficult nodes, which can be screened by using the following formula (1):

[0091]

[0092] wherein, is a set formed by the features of a plurality of to-be-tested nodes, is a set of reference node features, d(·,·) represents a geodesic distance function, P1 is the first reference node, P2 is the second reference node, T is a boundary hyperparameter, T∈[0,1]. d(x,p1) is the distance between the to-be-tested node x and the nearest first reference node P1, and d(x,p2) is the distance between the to-be-tested node x and the second nearest second reference node P2. Then, d(x,p1) is necessarily less than or equal to d(x,p2). That is, the ratio between them is at most 1, so T is at most 1. The closer the ratio is to 1, the more difficult it is to classify the to-be-tested node x.

[0093] As shown in Figure 4 , it is a node difficulty comparison diagram provided by the present application. Taking an example of mapping all node features in a graph structure data to a Poincare ball model, all nodes are on the same Poincare ball model, so when a fixed feature distance metric is used to measure the similarity between nodes, some node pairs are easily distinguishable in similarity, while some other node pairs are difficult to distinguish in similarity.

[0094] As shown in Figure 4In (a), a node pair mode easy to distinguish similarity is shown, P1 is a first reference node with the smallest geodesic distance (d1) between all reference nodes and the to-be-tested node S, P2 is a second reference node with the second smallest geodesic distance (d2) between all reference nodes and the to-be-tested node S, since the difference degree of d1 and d2 is large, that is, the ratio of d1 and d2 is not close to 1, in this case, it is easy to determine that the geodesic distance between the to-be-tested node S and the first reference node P1 is smaller, and therefore the to-be-tested node S and the first reference node P1 are of the same type, or there is a stronger preference relationship between the to-be-tested node S and the first reference node P1. The node pair formed by such to-be-tested node S and first reference node P1 belongs to the node pair easy to distinguish similarity, and a fixed distance metric in the same hyperbolic space can be used for relationship recognition, thereby saving data calculation amount.

[0095] As Figure 4 In (b), a node pair mode difficult to distinguish similarity is shown, P1 is a first reference node with the smallest geodesic distance (d1) between all reference nodes and the to-be-tested node S, P2 is a second reference node with the second smallest geodesic distance (d2) between all reference nodes and the to-be-tested node S, since the difference degree of d1 and d2 is small, that is, the ratio of d1 and d2 is close to 1, in this case, it is difficult to determine whether the distance between the to-be-tested node S and the first reference node P1 is closer or the distance between the to-be-tested node S and the second reference node P2 is closer in the actual graph structure data, and therefore it is also difficult to accurately determine the actual relationship between the to-be-tested node S and the first reference node P1 and the second reference node P2, such to-be-tested node S belongs to a target to-be-tested node, the target to-be-tested node is screened out from all to-be-tested nodes, and the target to-be-tested node and the corresponding first reference node P1 form a to-be-processed node pair, or the target to-be-tested node and the corresponding first reference node P1 form a to-be-processed node pair, the to-be-processed node pair uses the scheme of the embodiment of the application to separately generate a target projection matrix and a target curvature suitable for the to-be-processed node pair, and then accurately depicts the actual relationship information between the target to-be-tested node and the first reference node and the second reference node, and provides more accurate data support for downstream tasks.

[0096] Step 302: For the to-be-processed node pair, a target projection matrix and a target curvature suitable for the to-be-processed node pair are generated according to the first node feature and the second node feature, and the target projection matrix and the target curvature are used to project the to-be-processed node pair to a target hyperbolic space.

[0097] In this step, for each to-be-processed node pair, the first node feature and the second node feature in the to-be-processed node pair are used to separately generate a target projection matrix and a target curvature suitable for the node pair, so that the target projection matrix and the target curvature are more targeted, so as to project the to-be-processed node pair into a more suitable target hyperbolic space, and then make the to-be-processed node pair be able to be represented in a more accurate manner in the target hyperbolic space, thereby better reflecting its relationship in the graph structure data.

[0098] Optionally, for a hyperbolic feature set {x} of a given data point, the scheme of the embodiment of the present application can generate an adaptive target projection matrix M and a target curvature c for a to-be-processed node pair feature (x i , x j ) formed by any two nodes in the set. ij (x i , x j ) represents a node pair feature formed by the i th node and the j th node in {x}. In order to facilitate explanation, M is used to represent M ij , and c is used to refer to c ij .

[0099] Specifically, the target projection matrix of the to-be-processed node pair (x i , x j ) can be generated by using the following formula (2), and the target curvature of the to-be-processed node pair (x i , x j ) can be generated by using the following formula (3):

[0100] M = g t (x i , x j ) (2)

[0101] c = g c (x i , x j ) (3)

[0102] In an embodiment, generating a target projection matrix suitable for a to-be-processed node pair according to a first node feature and a second node feature includes: inputting the first node feature and the second node feature into a first fully connected layer to obtain a first matrix output by the first fully connected layer. The target projection matrix suitable for the to-be-processed node pair is determined according to the first matrix.

[0103] ​In this embodiment, by inputting the first node feature and the second node feature into the first fully connected layer, the multi-dimensional feature information of the nodes can be effectively linearly combined and mapped, thereby obtaining the first matrix output by the first fully connected layer. Through the first fully connected layer with shared weights, the two node features are mapped to the same hidden space, forcing the model to learn the potential correlation between them and capturing the interaction patterns (such as similarity, complementarity, etc.) between nodes. This process not only captures the complex relationship between node features, but also flexibly adapts to the feature combination needs of different node pairs by adjusting the weights and biases of the fully connected layer. Then, according to the first matrix, a target projection matrix suitable for the to-be-processed node pair can be further determined, such as directly taking the first matrix as the target projection matrix. This target projection matrix can provide optimized feature representation in subsequent processing steps, making the relationship between nodes in the to-be-processed node pair clearer and easier to analyze, thereby improving the performance and accuracy of the overall system.

[0104] In an embodiment, determining the target projection matrix suitable for the to-be-processed node pair according to the first matrix comprises: adding a unit matrix to the first matrix to determine the target projection matrix suitable for the to-be-processed node pair.

[0105] In this embodiment, excessive changes in the first matrix lead to unstable model training. In order to maintain the stability of model training, a unit matrix can be added to the first matrix to form the target projection matrix of the to-be-processed node pair.

[0106] Optionally, the embodiment provides an adaptive projection matrix generator g t that accepts the to-be-processed node pair (x i , x j ) as input to adaptively generate a projection matrix M. In practical scenarios, excessive changes in M can lead to unstable training. To solve this problem, instead of directly taking the generated first matrix M res as the target projection matrix, the first matrix M res is treated as additional metric information representing the characteristics of the relationship between nodes, and the calculation method of the target projection matrix can be calculated using the following formula (4):

[0107] M×I+M res (4)

[0108] wherein, when the first matrix M res is a zero matrix, the target projection matrix is the same as the projection matrix in the traditional scheme, and the feature distance of the to-be-processed node pair is the geodesic distance, so the geodesic distance is a special case in the embodiment of the application. Therefore, the scheme of the embodiment of the application can include the case in the traditional scheme, and has a wider range of application.

[0109] In one embodiment, determining a target projection matrix suitable for the node pair to be processed based on the first matrix includes: splitting the first matrix into multiple sub-matrices, where the rank of the sub-matrices is smaller than the rank of the first matrix; and adding the identity matrix to the product of the multiple sub-matrices to determine the target projection matrix suitable for the node pair to be processed.

[0110] In this embodiment, when the dimensions of the first node feature and the second node feature in the node pair to be processed are relatively large, the dimensions of the corresponding generated first matrix will also be relatively large, which may result in huge computational overhead. Therefore, in order to reduce the amount of data computation, the first matrix can be decomposed into the product of multiple low-rank sub-matrices. For example, the decomposition of the first matrix can be achieved through multiple first fully connected layers. The product of the output matrices of the multiple first fully connected layers plus the identity matrix is ​​determined as the final target projection matrix, thereby reducing data computational overhead.

[0111] Take the above node pair to be processed (x i , x j ) res For example, the first matrix M of n dimensions res Decomposed into two sub-matrices and The product of , can be expressed as the following formula (5) the first matrix M res :

[0112]

[0113] in, k is the rank of the submatrix, which is much smaller than n. a (·) and f b (·) are the two first fully connected layers. The first matrix M after low rank decomposition res Substituting into formula (4), we can get the target projection matrix M:

[0114]

[0115] Optionally, the low-rank decomposition process of the first matrix can be implemented based on polynomial partitioning and Talagrand concentration inequality, ensuring that the error of the low-rank approximation is bounded with high probability.

[0116] The embodiment of the present application can also prove that the low-rank matrix It can be well approximated to the full rank matrix M. Specifically, by constructing a theoretical analysis to provide an upper bound on the approximation error, namely There exists an upper bound, where is the Möbius matrix multiplication with c = -1, |·| represents the absolute value calculation, and the analysis process is as follows:

[0117] Assume that the feature point space {x} is continuous. For any x, the approximation error With high probability, it is limited to the upper bound Where β is a constant. This analysis process proves the rationality and controllability of the low-rank decomposition scheme of the first matrix in the embodiment of the present application by providing an approximate error upper bound. Complexity analysis and error upper bound analysis prove that the additional time consumption and error introduced by the embodiment of the present application are controllable, and further prove that the embodiment of the present application can be deployed in the recall system in real scenarios to cope with the difficulties of its complex and dynamically changing data hierarchy structure, and to enhance the personalization ability and real-time adaptability of the recall system.

[0118] In one embodiment, the process of determining the target curvature in step 302 may specifically include: inputting the first node features into a second fully connected layer to obtain a second matrix, inputting the second node features into a third fully connected layer to obtain a third matrix, and determining a target curvature applicable to the node pair to be processed based on the second matrix and the third matrix.

[0119] In this embodiment, the first node feature is first input into the second fully-connected layer to obtain a second matrix, and the second node feature is input into the third fully-connected layer to obtain a third matrix, thereby achieving independent processing and deep feature extraction for the two node features. Using two fully-connected layers to process the two node features separately allows each node feature to be optimized in its own dedicated fully-connected layer, thereby capturing richer and more detailed feature information. Then, by comprehensively analyzing the second and third matrices output by the two fully-connected layers, the target curvature for the node pair to be processed can be more accurately determined.

[0120] In one embodiment, determining a target curvature applicable to the node pair to be processed based on the second matrix and the third matrix includes: calculating a Hadamard product of the second matrix and the third matrix to obtain a calculated fourth matrix; and performing a summing and pooling operation on the fourth matrix to obtain the target curvature applicable to the node pair to be processed.

[0121] In this embodiment, for the second matrix and the third matrix output by the two fully connected layers, the application of the Hadamard product enables the interaction of features to be reflected in an element-by-element multiplication manner, thereby retaining the local information and detail features in the original node feature matrix. The fourth matrix obtained by the Hadamard product is then subjected to a summation and pooling operation to further simplify and aggregate the feature information, thereby obtaining a target curvature suitable for the node pairs to be processed. Sum pooling not only reduces the feature dimension and reduces the computational complexity, but also effectively extracts global feature information, ensuring that the target curvature can accurately reflect the geometric and topological characteristics between the node pairs. The use of bilinear pooling to generate a suitable target curvature for the node pairs to be processed is achieved. By combining local and global information, the accuracy and efficiency of the model in node pair relationship analysis are improved, providing a solid foundation for subsequent network analysis and application.

[0122] Optionally, taking the above-mentioned node pair (x i , x j ) as an example, first, two fully connected layers, i.e., a second fully connected layer f1(·) and a third fully connected layer f2(·), are used to process x i , x j , respectively, as follows:

[0123] x′ i = f1(x i ) (9)

[0124] x′ j = f2(x j ) (10)

[0125] where x′ i is a second matrix, and x′ j is a third matrix, then the Hadamard product of x′ i and x′ j is calculated to obtain a fourth matrix W:

[0126]

[0127] where represents the Hadamard product. Next, the fourth matrix W is converted into the target curvature c by sum_pooling.

[0128] Optionally, in order to facilitate calculation, the value range of the target curvature is limited to [0, 1], for example, a sigmoid function σ(·) (which can map the input value to [0, 1]) can be applied to map the numerical value of the target curvature to [0, 1]. Finally, the output of the target curvature c is:

[0129] c = σ(sum_pooling(W)) (12)

[0130] Step 303: determining the relationship information of the first node and the second node in the graph structure data based on the feature distance of the node pair to be processed in the target hyperbolic space.

[0131] In this step, the node pair to be processed can be represented in the target hyperbolic space in a more accurate manner, and the relationship information of the first node and the second node in the graph structure data can be more accurately measured by calculating the feature distance of the node pair to be processed in the target hyperbolic space. In this way, each node pair to be processed is mapped to a matching target hyperbolic space, which realizes the description of the relationship information between different nodes in the graph structure data by using a feature distance measurement that is adaptive to the node to be processed, and improves the recognition accuracy of the relationship between nodes.

[0132] Optionally, taking the above-mentioned to-be-processed node pair (xi, xj) as an example, the feature distance between the nodes in (xi, xj) can be expressed by the following formula (13):

[0133]

[0134] wherein dc(·, ·) is a geodesic distance function.

[0135] The method in the above-mentioned embodiment realizes a hyperbolic metric generator, which comprises an adaptive projection matrix generator g t and a curvature generator g c In an embodiment, before step 301, a training process of the hyperbolic metric generator can also be included.

[0136] As shown in FIG. 5, a training method flowchart of a hyperbolic metric generator provided by the embodiment of the present application comprises the following steps: Figure 5

[0137] Step 501: input a training set D into a preset hyperbolic neural network, and perform step 502 when the hyperbolic neural network does not converge. The hyperbolic neural network comprises an initial projection matrix generator and a curvature generator.

[0138] Step 502: randomly sample a support set D s and a query set D q from the training set D.

[0139] Step 503: extract a feature set F s from the support set D s and a feature set F q from the query set D q .

[0140] Step 504: calculate the feature mean of each category node in F s as the category prototype of the category node, and obtain a category prototype set P.

[0141] Step 505: select a target to-be-tested node set H from F q by the above-mentioned formula (1).

[0142] Step 506: generate an adaptive target projection matrix M and a target curvature c for each to-be-processed node pair in the to-be-processed node pair set HxP by using the projection matrix generator g t and the curvature generator g c .

[0143] Step 507: calculate the feature distance of the to-be-processed node pair by the above-mentioned formula (13).

[0144] ​Step 508: Calculate the cross entropy loss and update the projection matrix generator ɡ t and curvature generatorɡ c .

[0145] Step 509: End the current loop.

[0146] Step 510: Return the final generated projection matrix generator ɡ t and curvature generatorɡ c .

[0147] In this embodiment, during the training process, the training set D is divided into the support set D s and query set D q Using a backbone network with exponential mapping from D s and D q Extract features F s and F q Through the target node mining solution from F q Then, the adaptive projection matrix generator ɡ is used in the set H×P. t and curvature generatorɡ c , to generate the adaptive target projection matrix M and target curvature c, and calculate the adaptive feature distance. By minimizing the cross entropy loss on the dataset, the adaptive projection matrix generator ɡ is updated using the gradient descent algorithm t and curvature generatorɡ c Parameters.

[0148] like Figure 6 As shown, it is a schematic diagram of the application scenario framework of a data processing method provided by an embodiment of the present application. It is assumed that the input multimodal data is two node pairs, wherein the first node pair is a positive sample pair, including two images, namely, a full-body image and a head image of an Alaskan dog, and the second node pair is a negative sample pair, including an image of a golden retriever and an image of a school bus. Among them, the actual similarity of the contents of the two images of the positive sample pair is very high, while the similarity of the contents of the two images of the negative sample pair is very small. First, the features of each image are extracted separately using a feature extractor, and then the features of each image are encoded using a hyperbolic manifold operation to obtain the hyperbolic features of each image. It is assumed that the hyperbolic features of the full-body image of the Alaskan dog in the first node pair are x1 and the hyperbolic features of the head image of the Alaskan dog are x2, and the hyperbolic features of the image of the golden retriever in the second node pair are x3 and the hyperbolic features of the school bus image are x4. Through the hyperbolic metric generator provided by the embodiment of the present application, the adaptive target projection matrix M of the hyperbolic feature pairs x1 and x2 can be generated respectively. 12 and target curvature c 12 , and the adaptive target projection matrix M that generates the hyperbolic feature pairs x3 and x4 34 and target curvature c34 , and then further generate a suitable distance metric based on the target projection matrix and target curvature. Indicates the use of the target projection matrix M 12 and target curvature c 12 Calculate the feature distance d between the hyperbolic features x1 and x2 12 , the characteristic distance d can be used 12 Accurately represents the similarity between hyperbolic features x1 and x2. Indicates the use of the target projection matrix M 34 and target curvature c 34 Calculate the feature distance d between the hyperbolic features x3 and x4 34 , the characteristic distance d can be used 34 Accurately represent the similarity between hyperbolic features x3 and x4.

[0149] like Figure 7 As shown in FIG, a schematic diagram of a hyperbolic metric conversion provided by an embodiment of the present application is provided. Assume that the two images in the negative sample pair (the image of the golden retriever and the image of the school bus) are not similar in actual image content, but in the original hyperbolic space, the feature distance between the hyperbolic features x3 and x4 is very close to the feature distance between the hyperbolic features x1 and x2. In this case, it is easy to cause the negative sample pair to be treated as the same type of image, which in turn leads to model misjudgment. Figure 6 Under the distance metric of the scene, using the target projection matrix M 12 and target curvature c 12 After projecting the original hyperbolic features x1 and x2 to the target hyperbolic space 12, the feature distance d between the hyperbolic features x1 and x2 is calculated. 12 , characteristic distance d 12 It is obviously smaller than the feature distance between the hyperbolic features x1 and x2 in the original hyperbolic space. On the other hand, when using the target projection matrix M 34 and target curvature c 34 After projecting the original hyperbolic features x3 and x4 to the target hyperbolic space 34, the feature distance d between the hyperbolic features x3 and x4 is calculated. 34 , characteristic distance d 34 is obviously larger than the characteristic distance between the hyperbolic features x3 and x4 in the original hyperbolic space. Figure 6 Under the distance measurement of the scene, the distance between the two image features of the positive sample pair with high similarity is made as close as possible, and the distance between the two image features of the negative sample pair with low similarity is made farther, which achieves a more accurate characterization of the relationship between nodes, thereby reducing model misjudgment and improving the accuracy of node relationship recognition.

[0150] In summary, the embodiment of the present application realizes low-rank distance measurement, and reduces the calculation cost when generating the projection matrix of the node pair. The calculation complexity of generating two low-rank matrices (n x k sub-matrix) is And the calculation complexity of directly generating an n x n matrix is Wherein k << n. Therefore, the low-rank distance measurement scheme proposed in the embodiment of the present application can significantly reduce the calculation complexity.

[0151] In addition, the time complexity components of the embodiment of the present application are the target node mining part, the curvature generation part and the projection matrix generation part. The time complexity of the target node mining part is Wherein, p is the number of reference nodes that need to calculate the distance, if it is a node classification task, p can be the number of categories of reference nodes, q is the number of nodes in the set For example, in the specific implementation process, the category prototype of each category of reference nodes can be obtained by calculating the mean value of all sub-category feature data of the corresponding reference nodes, and then the distance between the feature of the node to be measured and the category prototype is calculated to represent the similarity between the node to be measured and each category. The time complexity of the curvature generation part is Wherein, n is the dimension of the first node feature or the second node feature. The time complexity of the projection matrix generation part is Wherein, k is the rank of the sub-matrix. Therefore, the overall time complexity is:

[0152] O(n 2 (k+1)+pq)=O(n 2 (k+1)) (14)

[0153] Wherein, p and q are much smaller than n, so they can be ignored. This proves that the complexity of the embodiment of the present application is controllable, and will not increase the uncontrollable calculation burden in real application.

[0154] The above method introduces a geometric adaptive hyperbolic metric learning method, dynamically generates a specific projection matrix and curvature for each pair of samples, dynamically adjusts the hierarchical structure representation of the data points in the hyperbolic space, and can more accurately adapt and reflect the hierarchical structure between the data points, thereby improving the individualization ability and real-time adaptability of the recommendation system, and realizing more accurate intelligent recommendation under the recommendation recall system.

[0155] In addition, a low-rank decomposition scheme and a difficult-to-distinguish node pair mining mechanism are further introduced, which significantly reduces the calculation complexity, reduces the need for distance measurement of all node pairs, effectively reduces the calculation cost, and improves the calculation efficiency, especially when processing large-scale data sets.

[0156] Please refer toFigure 8 which is a node classification method of an embodiment of the present application, can be executed by the electronic device 1 shown in FIG. 8, and can be applied to the data processing application scenario shown in FIG. 7 to achieve the relationship information between different nodes in the graph structure data by adopting the feature distance measurement adaptive to the to-be-processed node, and improve the identification accuracy of the relationship between nodes. In this embodiment, the terminal 220 is taken as an 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: Figure 1 Figure 2

[0157] Step 801: Obtain at least one to-be-processed commodity node pair in the commodity graph structure data, the to-be-processed commodity node pair comprising a first commodity node feature and a second commodity node feature.

[0158] Step 802: For the to-be-processed commodity node pair, generate a target projection matrix and a target curvature adaptive to the to-be-processed commodity node pair according to the first commodity node feature and the second commodity node feature, and the target projection matrix and the target curvature are used to project the to-be-processed commodity node pair into a target hyperbolic space.

[0159] Step 803: Determine the category relationship between the first commodity node and the second commodity node in the commodity graph structure data based on the feature distance of the to-be-processed commodity node pair in the target hyperbolic space.

[0160] In this embodiment, the commodity graph structure data is taken as an example, the commodity graph structure data comprises 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 generating a target projection matrix and a target curvature adaptive to the to-be-processed commodity node pair using the first commodity node feature and the second commodity node feature in the to-be-processed commodity node pair, the target projection matrix and the target curvature are more targeted, so as to project the to-be-processed commodity node pair into a more adaptive target hyperbolic space, and then make the to-be-processed commodity node pair can be represented in a more accurate way in the target hyperbolic space, so as to better reflect its relationship in the graph structure data. Then the feature distance of the to-be-processed commodity node pair in the target hyperbolic space is calculated, the feature distance can more accurately measure the category relationship between the first commodity node and the second commodity node in the graph structure data, such as whether the first commodity node and the second commodity node belong to the same category, and then the commodity node classification is realized. In this way, each to-be-processed commodity node pair is mapped to a matching target hyperbolic space, and the relationship information between different commodity nodes in the graph structure data is described by adopting the feature distance measurement adaptive to the to-be-processed commodity node, and the identification accuracy of the commodity node category relationship is improved.

[0161] ​​The various steps of the above method can be referred to the relevant description of the foregoing embodiments, which will not be repeated here.

[0162] Referring to Figure 9 , 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 data processing application scenario of the e-commerce scenario shown in Figure 2 , so as to generate adaptive projection matrix and curvature in a data-driven manner, so that the representation and distance relationship of data at different levels in hyperbolic space are more accurate, and the user-goods relationship is more accurately described. In the embodiment, the terminal 220 is taken as an example of the execution end, compared with the foregoing embodiment, in the embodiment, the graph structure data formed by the user and the goods in the e-commerce scenario is taken as an example, and the method comprises the following steps:

[0163] Step 901: acquiring at least one to-be-processed node pair in the graph structure data, the to-be-processed node pair comprising user node features and commodity node features.

[0164] Step 902: for the to-be-processed node pair, generating a target projection matrix and a target curvature suitable for the to-be-processed node pair according to the user node features and the commodity node features, the target projection matrix and the target curvature being used to project the to-be-processed node pair to a target hyperbolic space.

[0165] Step 903: determining the preference relationship information of the user node pair and the commodity node in the graph structure data based on the feature distance of the to-be-processed node pair in the target hyperbolic space.

[0166] Step 904: determining the commodity recommendation information for the user according to the preference relationship information.

[0167] In the embodiment, the e-commerce scenario is taken as an example, for the node pair formed by the user node features and the commodity node in the graph structure data, the adaptive target projection matrix and the target curvature are generated in a data-driven manner, so that the representation and distance relationship of data at different levels in the hyperbolic space are more accurate, and the piecewise preference relationship between the user and the goods is more accurately described, thereby improving the accuracy of the recommendation information, improving the adaptability of the recommendation system to the change of user interest, and realizing more efficient and more accurate intelligent recommendation under the recommendation recall system.

[0168] The various steps of the above method can be referred to the relevant description of the foregoing embodiments, which will not be repeated here.

[0169] Referring to Figure 10 , which is a data processing device 1000 of an embodiment of the present application, the device can be applied to a terminal, and can be applied to Figure 2In the data processing application scenario shown in the figure, the relationship information between different nodes in the graph structure data is characterized by using a feature distance metric adaptive to the nodes to be processed, so as to improve the identification accuracy of the relationship between the nodes. The device comprises an acquisition module 1001, a generation module 1002 and a determination module 1003, and the functions of each module are as follows:

[0170] The acquisition module 1001 is configured to acquire at least one node pair to be processed, the node pair to be processed comprising a first node feature and a second node feature.

[0171] The generation module 1002 is configured to generate, for the node pair to be processed, a target projection matrix and a target curvature suitable for the node pair to be processed according to the first node feature and the second node feature, the target projection matrix and the target curvature being used to project the node pair to be processed into a target hyperbolic space.

[0172] The determination module 1003 is configured to determine relationship information of the first node and the second node based on a feature distance of the node pair to be processed in the target hyperbolic space.

[0173] In an embodiment, the generation module 1002 is configured to input the first node feature and the second node feature into a first fully connected layer to obtain a first matrix output by the first fully connected layer. The target projection matrix suitable for the node pair to be processed is determined according to the first matrix.

[0174] In an embodiment, the generation module 1002 is specifically configured to determine, after adding a unit matrix to the first matrix, the target projection matrix suitable for the node pair to be processed.

[0175] In an embodiment, the generation module 1002 is specifically configured to split the first matrix into a plurality of sub-matrices, the rank of the sub-matrices being less than the rank of the first matrix. After adding a unit matrix to the product of the plurality of sub-matrices, the target projection matrix suitable for the node pair to be processed is determined.

[0176] In an embodiment, the generation module 1002 is further configured to input the first node feature into a second fully connected layer to obtain a second matrix, and input the second node feature into a third fully connected layer to obtain a third matrix. The target curvature suitable for the node pair to be processed is determined according to the second matrix and the third matrix.

[0177] In an embodiment, the generation module 1002 is specifically further configured to calculate a Hadamard product of the second matrix and the third matrix to obtain a fourth matrix after calculation. The target curvature suitable for the node pair to be processed is obtained by performing a sum-pooling operation on the fourth matrix.

[0178] In an embodiment, the obtaining module 1001 is configured to obtain a plurality of to-be-tested node features in the to-be-processed graph structure data and a plurality of preset reference node features. The hyperbolic distance between each to-be-tested node feature and each reference node feature is calculated respectively. At least one target to-be-tested node is selected from the to-be-tested nodes, the difference between the hyperbolic distances of the target to-be-tested node and at least two different reference node features is less than a preset threshold, and the target to-be-tested node and the at least two different reference node features form a to-be-processed node pair respectively.

[0179] In an embodiment, the obtaining module 1001 is specifically configured to determine, for each to-be-tested node, a first reference node feature with the smallest hyperbolic distance to the to-be-tested node feature and a second reference node feature with the second smallest hyperbolic distance to the to-be-tested node feature. The first hyperbolic distance between the to-be-tested node feature and the first reference node feature is determined, and the second hyperbolic distance between the to-be-tested node feature and the second reference node feature is determined. If the ratio of the first hyperbolic distance to the second hyperbolic distance is within a preset ratio range, the to-be-tested node and the first reference node form a to-be-processed node pair, and / or the to-be-tested node and the second reference node form another to-be-processed node pair.

[0180] For details of the above data processing apparatus 1000, refer to the description of the related method steps in the above embodiments, which have similar implementation principles and technical effects, and will not be described here in detail.

[0181] Figure 11 A structural schematic diagram of a cloud device 110 is provided for an exemplary embodiment of the present application. The cloud device 110 can be used to run the method provided in any of the above embodiments. As shown in the figure, the cloud device 110 can include a memory 1104 and at least one processor 1105, Figure 11 The memory 1104 can be an object storage (Object Storage Service, OSS). Figure 11 For example, the processor can be taken as an example.

[0182] The memory 1104 is configured to store a computer program and can be configured to store other various data to support the operation on the cloud device 110. The memory 1104 can be an object storage (Object Storage Service, OSS).

[0183] The memory 1104 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.

[0184] The processor 1105 is coupled with the memory 1104 and configured to execute computer programs in the memory 1104 to implement the solutions provided by any of the above method embodiments, and the specific functions and technical effects that can be achieved are not repeated here.

[0185] Further, as Figure 11 The cloud device further includes a firewall 1101, a load balancer 1102, a communication component 1106, a power supply component 1103, and other components. Figure 11 Some components are only schematically shown in the figure, and it does not mean that the cloud device only includes Figure 11 the components shown in the figure.

[0186] In an embodiment, the communication component 1106 in the above Figure 11 is configured to facilitate wired or wireless communication between the device where the communication component 1106 is located and other devices. The device where the communication component 1106 is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, LTE (Long Term Evolution, LTE for short), 5G, or a combination thereof. In an example embodiment, the communication component 1106 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 1106 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.

[0187] In an embodiment, the power supply component 1103 in the above Figure 11 provides power for various components of the device where the power supply component 1103 is located. The power supply component 1103 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device where the power supply component is located.

[0188] The embodiments of the present application also provide a computer readable storage medium, which stores computer execution instructions, and when the processor executes the computer execution instructions, the method of any of the above embodiments is implemented.

[0189] The embodiment of the present application further provides a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the preceding embodiments.

[0190] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the embodiments of the device described above are merely schematic, and the division of the modules is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of modules or features can be combined or integrated into another system, or some features can be ignored or not executed.

[0191] The integrated module implemented in the form of a software functional module can be stored in a computer readable storage medium. The software functional module stored in the storage medium includes 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 perform some steps of the method of each embodiment of the present application.

[0192] It should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), or the like. 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 present 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.

[0193] The aforementioned storage medium can be realized by any type of volatile or nonvolatile storage devices 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. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0194] An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a part of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium can exist as discrete components in the electronic device or the host device.

[0195] It should be noted that, in the present document, the terms "comprising", "containing" or any other variant 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 in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0196] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0197] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art to make contributions can be in the form of a software product, the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), including a number of instructions to make a terminal device (may be a mobile phone, computer, server, air conditioner, or network equipment, etc.) executes the method of each embodiment of the present application.

[0198] In the technical solutions of the present application, the collection, storage, use, processing, transmission, provision and disclosure of the user data and other information involved in the processing comply with the relevant laws and regulations and do not violate public order and good customs.

[0199] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data processing method, characterized in that: include: Acquire at least one node pair to be processed, where the node pair to be processed includes a first node feature and a second node feature; For the node pair to be processed, generating a target projection matrix and a target curvature applicable to the node pair to be processed according to the first node feature and the second node feature, wherein the target projection matrix and the target curvature are used to project the node pair to be processed into a target hyperbolic space; Based on the characteristic distance of the pair of nodes to be processed in the target hyperbolic space, relationship information between the first node and the second node is determined.

2. The method according to claim 1, characterized in that Generating a target projection matrix suitable for the node pair to be processed according to the first node feature and the second node feature includes: Inputting the first node feature and the second node feature into a first fully connected layer to obtain a first matrix output by the first fully connected layer; The target projection matrix applicable to the node pair to be processed is determined according to the first matrix.

3. The method according to claim 2, characterized in that The determining, according to the first matrix, the target projection matrix applicable to the pair of nodes to be processed comprises: After adding the identity matrix to the first matrix, the target projection matrix suitable for the node pair to be processed is determined.

4. The method according to claim 2 or 3, characterized in that The determining, according to the first matrix, the target projection matrix applicable to the pair of nodes to be processed comprises: Splitting the first matrix into a plurality of sub-matrices, wherein the rank of the sub-matrices is smaller than the rank of the first matrix; The product of the multiple sub-matrices is added to the identity matrix to determine the target projection matrix suitable for the node pair to be processed.

5. The method according to claim 1, wherein Generating a target curvature applicable to the node pair to be processed according to the first node feature and the second node feature includes: Input the first node features into the second fully connected layer to obtain a second matrix, and input the second node features into the third fully connected layer to obtain a third matrix; A target curvature applicable to the node pair to be processed is determined according to the second matrix and the third matrix.

6. The method according to claim 5, characterized in that Determining a target curvature applicable to the node pair to be processed according to the second matrix and the third matrix includes: Calculating a Hadamard product of the second matrix and the third matrix to obtain a calculated fourth matrix; A summing and pooling operation is performed on the fourth matrix to obtain a target curvature applicable to the node pair to be processed.

7. The method according to claim 1, characterized in that The obtaining of at least one node pair to be processed includes: Acquire multiple node features to be measured and preset reference node features in the graph structure data to be processed; Calculating the hyperbolic distance between each of the node features to be measured and the reference node features respectively; At least one target node to be measured is selected from the nodes to be measured, and the difference in hyperbolic distance between the characteristics of the target node to be measured and at least two different reference nodes is less than a preset threshold. The target node to be measured and the at least two different reference nodes respectively form the node pair to be processed.

8. The method according to claim 7, characterized in that At least one target node to be measured is selected from the nodes to be measured, wherein the difference between the hyperbolic distances of the characteristics of the target node to be measured and at least two different reference nodes is less than a preset threshold, and the target node to be measured and the at least two different reference nodes respectively form the node pairs to be processed, including: For each node to be measured, respectively determining a first reference node feature having the smallest hyperbolic distance to the feature of the node to be measured and a second reference node feature having the second smallest hyperbolic distance to the feature of the node to be measured; Determining a first hyperbolic distance between the node feature to be measured and the first reference node feature, and determining a second hyperbolic distance between the node feature to be measured and the second reference node feature; If the ratio of the first hyperbolic distance to the second hyperbolic distance is within a preset ratio range, the node to be measured and the first reference point form a node pair to be processed, and / or the node to be measured and the second reference point form another node pair to be processed.

9. A node classification method, characterized in that: include: Acquire at least one to-be-processed commodity node pair in the commodity graph structure data, wherein the to-be-processed commodity node pair includes a first commodity node feature and a second commodity node feature; For the commodity node pair to be processed, generating a target projection matrix and a target curvature applicable to the commodity node pair to be processed according to the first commodity node feature and the second commodity node feature, wherein the target projection matrix and the target curvature are used to project the commodity node pair to be processed into a target hyperbolic space; Based on the characteristic distance of the pair of commodity nodes to be processed in the target hyperbolic space, a category relationship between the first commodity node and the second commodity node in the commodity graph structure data is determined.

10. An information recommendation method, characterized in that: include: Acquire at least one to-be-processed node pair in the graph structure data, wherein the to-be-processed node pair includes a user node feature and a product node feature; For the node pair to be processed, generating a target projection matrix and a target curvature applicable to the node pair to be processed according to the user node feature and the product node feature, wherein the target projection matrix and the target curvature are used to project the node pair to be processed into a target hyperbolic space; Determining preference relationship information of the user node to the product node in the graph structure data based on a characteristic distance of the pair of nodes to be processed in the target hyperbolic space; Determine product recommendation information for the user based on the preference relationship information.

11. 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 10.

12. 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 10 is implemented.

13. 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 10 when being executed by a processor.

Citation Information

Patent Citations

  • Recommendation method and device

    CN116561430A

  • Graph node classification model training method and device, storage medium and electronic equipment

    CN118606813A

  • Third-party library recommendation method and device based on hyperbolic space

    CN119128247A

  • Graph structure reconstruction method and device, storage medium and program product

    CN119761455A

  • Fraudulent user identification method and device, equipment, storage medium and program product

    CN119917912A