Graph-based index construction method, item recommendation method, computing device, computer-readable storage medium and computer program product

By constructing a graph-based index construction method, the initial index graph is obtained and the connection probability of item nodes is calculated, and the index graph is updated to reduce the output degree, which solves the problems of high search complexity and calculation consumption in the user-item two-part graph, and a more efficient recommendation system is realized.

WO2025181557A1PCT designated stage Publication Date: 2025-09-04CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/050054
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-26
Filing Date
2025-01-03
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

In the single-stage recommendation system of the user-item two-part diagram, the existing recommendation system has high search complexity and calculation consumption, making it difficult to effectively reduce resource consumption and improve recommendation efficiency.

Method used

By constructing a graph-based index construction method, the initial index map is obtained and the reference index map is generated, the connection probability between item nodes is calculated, and the index map is updated to reduce the number of output degrees, reduce the connection relationship, and improve scalability.

Benefits of technology

On the premise of ensuring greater connectivity between item nodes in the index graph, the size of the index graph is reduced, the accuracy and efficiency of finding item nodes are improved, and the accuracy and efficiency of indexes are balanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050054_04092025_PF_FP_ABST
    Figure IB2025050054_04092025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure is a graph-based index construction method. The graph-based index construction method comprises: acquiring an initial index graph comprising user nodes and item nodes; on the basis of connection relationships between the user nodes and the item nodes in the initial index graph, generating a reference index graph comprising the item nodes, wherein the reference index graph comprises the probability of connection between the item nodes; and on the basis of the probability of connection between the item nodes, updating the reference index graph to obtain a target index graph that corresponds to the reference index graph. By means of the method, the number of connection relationships can be reduced while ensuring a relatively high connectivity between item nodes in an index graph, thereby reducing the index size (memory usage) and improving the scalability. The balance between the accuracy and efficiency of searching for item nodes is thus reached.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] TECHNICAL FIELD The present disclosure relates to the field of computer technology, and more particularly to a graph-based index construction method, an item recommendation method, a computing device, a computer-readable storage medium, and a computer program product. Background: With the advancement of computer technology, the rapid growth of available information has posed a significant challenge to modern recommendation systems. Current recommendation systems typically employ a multi-stage funnel-like architecture, including a recall stage and a ranking stage. The recall stage typically employs vector retrieval to quickly retrieve items from a large corpus. The ranking stage ranks the retrieved items based on user preferences and features. However, this approach, based on vector retrieval, consumes significant resources. Furthermore, if there is a loss of precision in the recall stage, errors will be amplified in the subsequent ranking stage, impacting the ultimate recommendation performance. Based on this, researchers have proposed a single-stage recommendation system based on bipartite graph retrieval. This system, implemented using a neural network model and index structure, constructs a user-item bipartite graph. This bipartite graph is then used for retrieval and recommendation, enabling the direct creation of a top-k list from a large corpus. However, in actual online searches, this bipartite graph still presents high search complexity and computational overhead. Further reducing this complexity and computational overhead in a single-stage recommendation system based on a user-item bipartite graph has become an urgent challenge for researchers. In light of this, the present disclosure provides a graph-based index construction method. One or more embodiments of the present disclosure also relate to an item recommendation method, a computing device, a computer-readable storage medium, and a computer program to address the technical deficiencies of the prior art. According to a first aspect of the present disclosure, a graph-based index construction method is provided, comprising: obtaining an initial index graph including user nodes and item nodes; generating a reference index graph including item nodes based on the connection relationships between each user node and each item node in the initial index graph, wherein the reference index graph includes connection probabilities between item nodes; and updating the reference index graph based on the connection probabilities between each item node to obtain a target index graph corresponding to the reference index graph.According to a second aspect of the present disclosure, a method for recommending items is provided, comprising: obtaining reference item information corresponding to a target user; determining an initial item node and at least one to-be-recommended item node corresponding to the initial item node in a target index graph based on the reference item information, wherein the target index graph is constructed using the graph-based index construction method described above; and determining at least one target recommended item in each to-be-recommended item node based on a connection probability between the initial item node and each to-be-recommended item node. According to a third aspect of the present disclosure, a computing device is provided, comprising: a memory and a processor; the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the steps of the graph-based index construction method or item recommendation method described above. According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, storing computer-executable instructions, wherein the instructions, when executed by the processor, implement the steps of the graph-based index construction method or item recommendation method described above. According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program / instructions, wherein the computer program / instructions, when executed by the processor, implement the steps of the graph-based index construction method or item recommendation method described above. The graph-based index construction method provided in this disclosure extracts the connection relationships and connection probabilities between item nodes from a heterogeneous bipartite graph structure consisting of user nodes and item nodes. By repeatedly updating the connection probabilities between item nodes and updating the reference index graph based on the connection probabilities, the out-degree of each item node in the index graph is reduced, thereby reducing the average out-degree of the graph overall. While maintaining high connectivity between item nodes in the index graph, the number of connection relationships can be reduced, thereby reducing index size (memory usage) and improving scalability. This method achieves a balance between accuracy and efficiency in searching for item nodes. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flowchart of a graph-based index construction method provided by an embodiment of the present disclosure; Figure 2 is a schematic diagram of an initial index graph provided by an embodiment of the present disclosure; Figure 3 is a schematic diagram of the connection relationship between each item node provided by an embodiment of the present disclosure; Figure 4 is a schematic diagram of a target index graph provided by an embodiment of the present disclosure; Figure 5 is a flowchart of an item recommendation method provided by an embodiment of the present disclosure; Figure 6 is a structural schematic diagram of a graph-based index construction device provided by an embodiment of the present disclosure; Figure 7 is a structural schematic diagram of an item recommendation device provided by an embodiment of the present disclosure; Figure 8 is an architectural diagram of an item recommendation system provided by an embodiment of the present disclosure; Figure 9 is a structural block diagram of a computing device provided by an embodiment of the present disclosure.DETAILED DESCRIPTION The following description sets forth numerous specific details to provide a thorough understanding of the present disclosure. However, the present disclosure can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without departing from the scope of the present disclosure. Therefore, the present disclosure is not limited to the specific implementations disclosed below. The terminology used in one or more embodiments of the present disclosure is for the purpose of describing specific embodiments only and is not intended to limit the present disclosure. As used in one or more embodiments of the present disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present disclosure refers to and encompasses any and all possible combinations of one or more of the associated listed items. It should be understood that while the terms "first," "second," and so on may be used to describe various information in one or more embodiments of the present disclosure, such information should not be limited to these terms. These terms are used solely to distinguish information of the same type from one another. For example, "first" could be referred to as "second," and similarly, "second" could be referred to as "first," without departing from the scope of one or more embodiments of the present disclosure. Depending on the context, the term "if" as used herein can be interpreted as meaning "upon," "when," or "in response to determining." Furthermore, 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 configured for analysis, storage, and display) involved in one or more embodiments of this disclosure are all authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant region, and corresponding operation portals are provided for users to choose to authorize or deny. First, the terminology used in one or more embodiments of this disclosure is explained. Personalized Recommendation System: A personalized recommendation system is an advanced business intelligence platform based on massive data mining, which helps e-commerce websites provide fully personalized decision support and information services to their customers. Recall Layer: The recall layer is primarily designed to narrow the scope of product calculations, selecting products of interest to users from millions of products. Using simple models and algorithms, this number is reduced to hundreds or even tens. This allows users to receive rapid product feedback with millisecond latency. Ranking Layer: The ranking layer aims to obtain accurate ranking results. It is the key to the effectiveness of the recommendation system and the core of applications such as deep learning.Hundreds of items recalled from the recall layer are accurately ranked, assigning each item a score based on a set of rules, and sorting them from high to low. Due to the required accuracy, the ranking layer model is generally complex and requires more features. Bipartite graphs: Bipartite graphs, also known as bipartite graphs, are a special type of model in graph theory. Let G = (V, E) be an undirected graph. If the vertex V can be partitioned into two mutually disjoint subsets (A, B), and each edge (i, j) in the graph connects two vertices i and j belonging to these two different vertex sets (i in A, j in B), then the graph G is called a bipartite graph. Vector search: Vector search involves searching for K vectors close to the query vector in a given vector dataset using a certain metric (K-Nearest Neighbor, KNN). However, due to the computational complexity of KNN, we typically focus on the approximate nearest neighbor (ANN) problem. Graph retrieval: Based on the characteristics of the graph structure, it walks and searches on the graph, and retrieves the K nodes most relevant to the query node according to the distance or correlation between the nodes.

[0002] NN-Distance: This extends traditional ANN search to a neural network model. Any neural network function can be designed as a ranking function. The scoring of the ranking function is used as a metric, known as neural network-based distance (NN-Distance). This disclosure provides a graph-based index construction method, which also includes an item recommendation method, a computing device, a computer-readable storage medium, and a computer program. Each of these methods is described in detail in the following embodiments. Referring to Figure 1 , a flowchart of a graph-based index construction method provided by one embodiment of this disclosure is shown. The method specifically includes the following steps: Step 102: Obtain an initial index graph comprising user nodes and item nodes. The initial index graph specifically refers to a directed index graph comprising user nodes and item nodes. This method is based on a single-shot recommendation system (SSR), which breaks the limitations of the multi-stage "funnel" structure of traditional recommendation systems. In an SSR recommendation system, the recommendation process includes a retrieval phase, which involves a scoring model configured to output association scores between users and items, and a graph-based index. The graph here refers to an initial index graph consisting of user and item nodes. The scoring model can better model the complex relationships between users and items. The graph-based index uses the association scores between users and items to measure the distance between them. In a single phase, a final list of top K recommended items can be retrieved from millions of items. This reduces the complexity of the recommendation system, saves significant computing resources and training costs, achieves higher search efficiency and recommendation accuracy, and ensures the effectiveness of the recommendation system. In one or more embodiments of the present disclosure, items include recommendation objects in various recommendation scenarios, including but not limited to various tangible or intangible items, such as commodities, advertisements, software products, information, data, etc. A user can be understood as any person, organization, enterprise, etc. who requires recommendation services. In this disclosure, users and items are not specifically defined, and actual applications will prevail.In a specific embodiment provided by the present disclosure, obtaining an initial index graph including user nodes and item nodes includes: randomly selecting a user node or an item node and inserting it into the graph; if a user node is selected, selecting a preset number of item nodes from a set of item nodes that have the highest correlation with the user node and inserting them into the graph; if an item node is selected, selecting a preset number of user nodes from a set of user nodes that have the highest correlation with the item node and inserting them into the graph; connecting the selected user node with some or all of the preset number of item nodes that have the highest correlation with the user node, and connecting the selected item node with some or all of the preset number of user nodes that have the highest correlation with the item nodes; and continuing until all user nodes and item nodes are inserted into the graph and linked, thereby obtaining an initial index graph including user nodes and item nodes. Furthermore, the method further includes: determining correlation scores between users and items based on a pre-trained scoring model; and determining, based on the correlation scores between users and items, a preset number of item nodes that have the highest correlation with the user node and a preset number of user nodes that have the highest correlation with the item node. In practical applications, an initial index graph can be pre-created and then retrieved. During the creation of the initial index graph, which includes user nodes and item nodes, multiple user nodes and multiple item nodes are first determined, and each user node and each item node are sequentially inserted into the initial index graph. A preset number of item nodes with the highest correlation with the user node and a preset number of user nodes with the highest correlation with the item node are determined based on the correlation scores between users and items output by a pre-trained scoring model. User nodes or item nodes are sequentially selected from the multiple user nodes and item nodes, and inserted into the initial index graph based on the correlation scores. This process is repeated until all user nodes and item nodes have been inserted into the initial index graph and connections have been established between each user node and item node. See FIG2 , which shows a schematic diagram of an initial index graph according to one embodiment of the present disclosure. As shown in FIG2 , nodes 0-6 are item nodes, and nodes A to D are user nodes. Step 104: Generate a reference index graph including item nodes based on the connection relationships between each user node and each item node in the initial index graph. The reference index graph includes connection probabilities between item nodes. After the initial index graph is determined, a reference index graph including only item nodes is generated based on the connection relationships between each user node and each item node.Specifically, in the method provided herein, user nodes are removed from the initial index graph, retaining only user nodes, thereby obtaining a reference index graph comprising only item nodes. The reference index graph includes connection probabilities for connection relationships between item nodes. Specifically, the reference index graph includes connection relationships between item nodes and connection probabilities corresponding to each connection relationship. The connection relationships between item nodes can be determined based on the initial index graph. Based on the connection relationships between each node, the connection probabilities corresponding to each connection relationship are calculated. Specifically, in one embodiment provided herein, based on the connection relationships between user nodes and item nodes in the initial index graph, generating a reference index graph comprising item nodes includes: randomly selecting a target item node, a reference user node corresponding to the target item node, and a reference item node corresponding to the reference user node from the initial index graph; connecting the target item node to each reference item node, and calculating connection probabilities between each item node based on the connection relationships between the target item node and each reference item node; and traversing each item node in the initial index graph until a connection relationship is established between the item nodes, thereby obtaining a reference index graph comprising item nodes. In this embodiment, a target item node is first randomly selected from the initial index graph. The target item node specifically refers to any item node. After the target item node is determined, the reference user node corresponding to the target item node and the reference item node corresponding to the reference user node can also be determined. The target item node and the reference item node are then connected. Referring to FIG3 , FIG3 shows a schematic diagram of the connection relationship between item nodes according to an embodiment of the present disclosure. The connection diagram shown in FIG3 is determined based on the schematic diagram of the initial index graph shown in FIG2 . For example, for item node 0, item node 0 is the target item node. It is connected to user A and user B, who are the reference user nodes. User A is connected to item node 1 and item node 2, and user B is connected to item node 3 and item node 4. Item node 1, item node 2, item node 3, and item node 4 are the reference item nodes. The target item node is connected to each reference item node, i.e., item node 0 is connected to item node 1, item node 2, item node 3, and item node 4. For item node 1, it is connected to user node A and user node C. User node A is connected to item node 2, and user node C is connected to item node 5 and item node 6. Therefore, item node 1 is connected to item node 2, item node 5, and item node 6.By analogy, the schematic diagram of the connection relationships between item nodes shown in FIG3 can be generated based on the schematic diagram of the initial index graph shown in FIG2 . FIG3 only includes the connection relationships between item nodes; the connection probabilities corresponding to each connection relationship have not yet been calculated. After establishing connections between the target item node and each reference item node, the connection probabilities between each item node are calculated based on the connection relationships between the target item node and each reference item node. After calculating the connection probabilities between each item node, a reference index graph is obtained. The reference index graph specifically refers to the transitional item index graph between the initial index graph and the final target index graph, and can be understood as an incompletely updated item index graph. In one embodiment provided herein, after obtaining the connection relationships between the target item and the reference item nodes, the connection relationships between the target item and each reference item node are further calculated. Specifically, calculating the connection probability between each item node based on the connection relationship between the target item node and each reference item node includes: determining a target item node and a target reference item node; determining whether the target item node has any neighboring item nodes; if not, determining the probability between the target item node and the target reference item node to be 1; if so, determining the connection probability between the target item node and the target reference item node based on the neighboring item nodes and the target reference item node. In practical applications, calculating the connection probability between the target item node and each reference item node requires first determining one of the target reference item nodes. Simultaneously, determining whether the target item node currently has any neighboring item nodes. In the method provided herein, a neighboring item node specifically refers to a reference item node that has a connection relationship with the target item node and a connection probability corresponding to the connection relationship has been determined. Referring to FIG. 3 , taking item node 0 as the target item node, its corresponding reference item nodes are item node 1, item node 2, item node 3, and item node 4. In this case, item node 0 only has a connection relationship with each reference item node, without determining the connection probability for each connection relationship. For ease of understanding, the following Table 1 represents that item node 0 has established connections with item node 1, item node 2, item node 3, and item node 4, and the connection probability has not yet been determined. Table 1. Determine item node 1 as the target reference item node. Determine whether item node 0 has an adjacent item node, as determined by Table 1. At this point, the connection probability between the reference item node and item node 0 has not yet been determined. Therefore, the connection probability between item node 1 and item node 0 can be determined to be 1. Table 1 can be updated to obtain the following Table 2. Item node 2 is again selected as the target reference item node. It is now determined whether item node 0 has any neighboring item nodes. Table 2 shows that item node 1 is now a neighboring item node. In this case, the connection probability between item node 2 and item node 0 cannot be directly determined to be 1. Instead, the connection probability between item node 0 and item node 2 must be further calculated based on item node 2 and item node 1. Furthermore, determining the connection probability between the target item node and the target reference item node based on the neighboring item nodes and the target reference item node includes: determining whether the target reference item node is a neighbor node of the neighboring item node; if not, determining the connection probability between the target item node and the target reference item node to be 1; if so, calculating the connection probability between the target item node and the target reference item node based on the connection probabilities between the neighboring item nodes and the target item node. In the methods provided herein, index graphs are all directed graphs. If node b is reachable from node a, node b is considered a neighbor node of node a. Furthermore, after determining the adjacent item nodes, it is necessary to determine whether the target reference item node is a neighbor node of the adjacent item node. The method provided herein reduces the number of connections between item nodes and strives to ensure that nodes that were originally reachable in one hop are reachable in two hops on the updated index graph. For example, for nodes 1, 2, and 3, node 1 is connected to node 2, node 1 is connected to node 3, and node 2 is connected to node 3. Node 1 can directly reach node 3, or node 1 can first reach node 2 and then node 3. This reduces the probability of node 1 reaching node 3 directly. Based on this, when determining the connection probability between the target item node and the target reference item node based on the adjacent item nodes and the target reference item node, it is necessary to first determine whether the target reference item node is a neighbor node of the adjacent item node. Specifically, it is determined whether there is a connection from the adjacent item node to the target reference item node. If the target reference item node is not a neighbor node of the adjacent item node, it means that the target reference item node cannot be reached from the target item node via the adjacent item nodes. Therefore, the probability between the target item node and the target reference item node can be determined as 10. If the target reference item node is a neighbor node of an adjacent item node, this means that the target reference item node can be reached from the target item node via the adjacent item node. In this case, the connection probability between the target item node and the target reference item node needs to be calculated based on the connection probabilities between the adjacent item nodes and the target item node.Furthermore, calculating the connection probability between the target item node and the target reference item node based on the connection probability between the neighboring item node and the target item node includes: obtaining an initial connection probability between the target item node and the target reference item node, a first connection probability between the neighboring item node and the target item node, and a second connection probability between the target reference item node and the neighboring item node; calculating a reference connection probability between the target item node and the target reference item node based on the first connection probability and the second connection probability; and determining the connection probability between the target item node and the target reference item node based on the initial connection probability and the reference connection probability. The initial connection probability between the target item node and the target reference item node specifically refers to a preset probability value between the two item nodes. If the two are directly connected, the initial connection probability between the two is 10. The first connection probability between the neighboring item node and the target item node specifically refers to the connection probability between the two item nodes already determined in the calculation steps above. The second connection probability between the target reference item node and the adjacent item node specifically refers to the connection probability between the two when the target reference item node is a neighbor node of the adjacent item node. In one specific embodiment provided herein, if the target reference item node is a neighbor node of the adjacent item node, the second connection probability between the two is 0.5. In practical applications, the second connection probability can be set based on actual conditions and ranges from 0 to 1. After obtaining the first connection probability and the second connection probability, the reference connection probability between the target item node and the target reference item node can be calculated. The connection probability between the target item node and the target reference item node is then selected from the initial connection probability and the reference connection probability between the two. In the method provided herein, the connection probability between the target item node and the target reference item node is calculated using the following formula 1. The right side of the equation represents the connection probability between the target item node i and the target reference item node j (i.e., the initial connection probability), represents the connection probability between the target item node i and the adjacent item node j-1 (i.e., the first connection probability), and represents the connection probability between the adjacent item node j-1 and the target reference item node j (i.e., the second connection probability). 3 is the connection probability between the target item node and the target reference item node j. It selects the minimum value between the initial connection probability and the reference connection probability. Referring to Figure 3 and Table 2 above, the explanation is given by taking item node 2 as the target reference item node. In this embodiment, the second connection probability is 0.5 as an example. Item node 1 is an adjacent item node, and item node 2 is directly connected to item node 0. The initial connection probability between the two is 1, and the connection probability between item node 0 and item node 1 (i.e., the first connection probability) is 10. Then, the reference connection probability between item node 0 and item node 2 can be calculated as 0.5 (calculated by 1-1*0.5) using Formula 1 above. Then, from the initial connection probability of 1 and the reference connection probability of 0.5, the smaller connection probability is selected, and the connection probability between item node 0 and item node 2 can be determined to be 0.5. Based on this, Table 2 above is updated to obtain the following Table 3. Table 3 Let's take item node 3 as an example for further explanation. Item node 3 is determined as the target reference item node. Item node 0 has both item node 1 and item node 2 as neighbors. Item node 1 is first used as the neighboring item node for calculation. Item node 3 is not a neighbor of item node 1. Item node 1 is then used as the neighboring item node for calculation, and the connection probability between item node 3 and item node 0 is 10. Item node 2 is then used as the neighboring item node for calculation, and item node 3 is a neighbor of item node 2. The connection probability between item node 0 and item node 2 (i.e., the first connection probability) is 0.5, and the connection probability between item node 3 and item node 2 (i.e., the second connection probability) is 0.5. Using Formula 1 above, we can calculate the reference connection probability between item node 0 and item node 3 to be 0.75 (calculated by subtracting 1 - 0.5 * 0.5). The connection probability calculated with item node 1 as the adjacent item node is 1, and the connection probability calculated with item node 2 as the adjacent item node is 0.75. The smallest connection probability 0.75 is selected as the connection probability between item node 0 and item node 3, thereby updating the above Table 3. Similarly, the connection probability between item node 4 and item node 0 is updated to obtain the following Table 4. Table 4 Based on the same calculation method, the connection probabilities between each item node in the reference index graph are calculated to obtain a final reference index graph. Step 106: Update the reference index graph based on the connection probabilities between each item node to obtain a target index graph corresponding to the reference index graph. In actual applications, using the above calculation method, calculating the connection probabilities between each item node may result in different connection probabilities due to differences in the order in which the item nodes are determined. To mitigate the imbalance in connection probability calculation caused by the order in which the target item nodes are determined, the method provided herein updates the reference index graph multiple times based on the connection probabilities between each item node to obtain a final target index graph. Furthermore, in another specific embodiment provided herein, the method further includes: determining a preset update round; and updating the reference index graph according to the preset update round to obtain a target index graph. In actual applications, the reference index graph is updated with a preset update round. Specifically, one update round is defined as updating the connection probabilities of all item nodes in the reference index graph as target item nodes. After the preset update rounds, the target index graph is obtained. Specifically, updating the reference index graph based on the connection probabilities between item nodes to obtain a target index graph corresponding to the reference index graph includes: determining at least one connection probability to be deleted from each connection probability in the reference index graph; determining a connected item node group corresponding to each connection probability to be deleted; and deleting the connection relationship corresponding to each connected item node group to obtain the target index graph. Referring to Figure 4, FIG4 shows a schematic diagram of a target index graph according to an embodiment of the present disclosure, obtained after updating the schematic diagram of connection relationships between item nodes shown in FIG3. The method provided in this disclosure aims to reduce the out-degree of the index graph, that is, to reduce the number of choices for each item node. Therefore, it is preferred to delete connection relationships whose connection probabilities are less than a preset threshold. After each update of the reference index graph, the connection probabilities with a connection probability less than a preset probability threshold are selected as the connection probabilities to be deleted. For example, if the preset probability threshold is 0.5, then after the reference index graph is updated, the connection probabilities less than 0.5 are determined as the connection probabilities to be deleted. The connected item node group corresponding to the connection probability to be deleted is then determined. Specifically, the connected item node group refers to the two item nodes corresponding to the connection probability. The connection relationship corresponding to the connected item node group is then deleted, thereby reducing the number of connection relationships in the reference index graph. While maintaining a high degree of connectivity between the item nodes in the index graph, the number of connection relationships can be reduced, thereby reducing the index size (memory usage) and improving scalability.Specifically, the process of obtaining a reference index graph from an initial index graph is the process of creating the reference index graph. After generating the reference index graph, the connection relationships in the reference index graph are not deleted. Instead, the reference index graph must be updated, and the connection relationships in the updated reference index graph are deleted. Furthermore, in practical applications, due to the large number of item nodes, the connection probabilities on the item nodes can be sorted based on the item nodes, and the top-k connection relationships with high connection probabilities can be retained, while connection relationships outside the top-k are deleted. The graph-based index construction method provided in this disclosure extracts the connection relationships and connection probabilities between item nodes in a heterogeneous bipartite graph structure comprising user nodes and item nodes. By repeatedly updating the connection probabilities between item nodes and updating the reference index graph based on the connection probabilities between item nodes, the number of out-degrees of each item node in the index graph is reduced, thereby reducing the average out-degree of the graph overall. While maintaining high connectivity between item nodes in the index graph, the number of connection relationships can be reduced, thereby reducing the index size (memory usage) and improving scalability. A balance is achieved between accuracy and efficiency in searching for item nodes. Referring to Figure 5, a flowchart of an item recommendation method provided in one embodiment of the present disclosure is shown, specifically including: Step 502: Obtaining reference item information corresponding to a target user. The target user specifically refers to the user for whom item recommendations are to be made, and can be a natural person, institution, or organization. The reference item information corresponding to the target user specifically refers to item information related to the target user. In practical applications, the reference item information can include information about items purchased or viewed by the target user, or information about items purchased or viewed by other users related to the target user. The specific content of the reference item information is not limited in the method provided herein and is subject to practical application. Step 504: Determining an initial item node and at least one to-be-recommended item node corresponding to the initial item node in a target index graph based on the reference item information. The target index graph is constructed using the graph-based index construction method described above. After determining the reference item information, the initial item node corresponding to the reference item information is determined in the target index graph. The target index graph is specifically constructed using the graph-based index construction method described in the above embodiment. An initial item node and the nodes to be recommended that can be connected to it are determined in the target index graph. In practical applications, a single initial item node may be connected to multiple nodes to be recommended. The connection probabilities between the initial item node and the nodes to be recommended vary.Step 506: Determine at least one target recommended item in each to-be-recommended item node based on the connection probabilities between the initial item node and each to-be-recommended item node. After determining the initial item node and the connection probabilities between the initial item node and each to-be-recommended item node, sort the to-be-recommended item nodes, select a preset number of recommended item nodes with high connection probabilities, and determine target recommended items for the target user. In another specific embodiment provided by the present disclosure, determining at least one target recommended item in each to-be-recommended item node based on the connection probabilities between the initial item node and each to-be-recommended item node includes: sorting the to-be-recommended item nodes based on the connection probabilities between the initial item node and each to-be-recommended item node; and selecting, based on the sorting results, recommended items corresponding to a preset number of to-be-recommended item nodes with high connection probabilities as target recommended items. In actual applications, the recommended item nodes are sorted based on the connection probabilities between each to-be-recommended item node and the initial item node, placing to-be-recommended item nodes with high connection probabilities at the front and to-be-recommended item nodes with low connection probabilities at the back. Based on the sorting results, items corresponding to the preset number of to-be-recommended item nodes with high connection probabilities are selected as target recommended items. The at least one determined target recommended item is recommended to the target user. The item recommendation method provided by the present disclosure includes obtaining reference item information corresponding to the target user; determining an initial item node and at least one to-be-recommended item node corresponding to the initial item node in a target index graph based on the reference item information, wherein the target index graph is constructed using the aforementioned graph-based index construction method; and determining at least one target recommended item in each to-be-recommended item node based on the connection probability between the initial item node and each to-be-recommended item node. This method can quickly determine recommended items within a target index graph with a reduced number of connections. Based on the target index graph, the relevance of recommended items to the target user's reference item information is ensured, while also ensuring efficient retrieval within the target index graph. Relevant target recommended items can be quickly recommended to the user based on their reference item information. Corresponding to the aforementioned graph-based index construction method embodiment, the present disclosure also provides an embodiment of a graph-based index construction apparatus. Figure 6 shows a schematic diagram of the structure of a graph-based index construction apparatus provided in one embodiment of the present disclosure.As shown in FIG6 , the apparatus includes: an acquisition module 602 configured to acquire an initial index graph including user nodes and item nodes; a generation module 604 configured to generate a reference index graph including item nodes based on the connection relationships between each user node and each item node in the initial index graph, wherein the reference index graph includes connection probabilities between item nodes; and an update module 606 configured to update the reference index graph based on the connection probabilities between each item node to obtain a target index graph corresponding to the reference index graph. Optionally, the generation module 604 is further configured to: randomly select a target item node, a reference user node corresponding to the target item node, and a reference item node corresponding to the reference user node from the initial index graph; connect the target item node with each reference item node, and calculate the connection probabilities between each item node based on the connection relationships between the target item node and each reference item node; and traverse each item node in the initial index graph until a connection relationship is established between each item node, thereby obtaining a reference index graph including item nodes. Optionally, the generation module 604 is further configured to: determine a target item node and a target reference item node; determine whether the target item node has a neighboring item node; if not, determine that the probability between the target item node and the target reference item node is 1; if so, determine a connection probability between the target item node and the target reference item node based on the neighboring item nodes and the target reference item node. Optionally, the generation module 604 is further configured to: determine whether the target reference item node is a neighboring node of the neighboring item node; if not, determine that the probability between the target item node and the target reference item node is 1; if so, calculate a connection probability between the target item node and the target reference item node based on the connection probability between the neighboring item nodes and the target item node. Optionally, the generation module 604 is further configured to: obtain an initial connection probability between the target item node and the target reference item node, a first connection probability between the adjacent item node and the target item node, and a second connection probability between the target reference item node and the adjacent item node; calculate a reference connection probability between the target item node and the target reference item node based on the first connection probability and the second connection probability; and determine a connection probability between the target item node and the target reference item node based on the initial connection probability and the reference connection probability.Optionally, the updating module 606 is further configured to: determine at least one connection probability to be deleted from each connection probability in the reference index graph; determine a connected item node group corresponding to each connection probability to be deleted; and delete the connection relationship corresponding to each connected item node group to obtain a target index graph. Optionally, the updating module 606 is further configured to: determine a preset update round; and update the reference index graph according to the preset update round to obtain a target index graph. Optionally, the acquisition module 602 is further configured to: randomly select a user node or an item node and insert it into the graph; if a user node is selected, select a preset number of item nodes from the item node set that have the highest correlation with the user node and insert them into the graph; if an item node is selected, select a preset number of user nodes from the user node set that have the highest correlation with the item node and insert them into the graph; connect the selected user node with some or all of the preset number of item nodes that have the highest correlation with the user node, and connect the selected item node with some or all of the preset number of user nodes that have the highest correlation with the item nodes; and continue this process until all user nodes and item nodes are inserted into the graph and linked, thereby obtaining an initial index graph including user nodes and item nodes. Optionally, the apparatus further includes a correlation score determination module configured to: determine a correlation score between a user and an item based on a pre-trained scoring model; and determine, based on the correlation score between the user and the item, a preset number of item nodes that have the highest correlation with the user node and a preset number of user nodes that have the highest correlation with the item node. The graph-based index construction device provided in this disclosure extracts the connection relationships and connection probabilities between item nodes from a heterogeneous bipartite graph structure consisting of user nodes and item nodes. By repeatedly updating the connection probabilities between item nodes and updating the reference index graph based on the connection probabilities, the out-degree of each item node in the index graph is reduced, thereby reducing the average out-degree of the graph overall. While maintaining high connectivity between item nodes in the index graph, the number of connection relationships can be reduced, thereby reducing the index size (memory usage) and improving scalability. This achieves a balance between accuracy and efficiency in searching for item nodes. The above is a schematic diagram of a graph-based index construction device in this embodiment. It should be noted that the technical solution of this graph-based index construction device and the technical solution of the graph-based index construction method described above share the same concept. For details not described in detail in the technical solution of the graph-based index construction device, reference can be made to the description of the technical solution of the graph-based index construction method described above.Corresponding to the above-mentioned item recommendation method embodiment, the present disclosure also provides an item recommendation device embodiment. FIG7 shows a schematic structural diagram of an item recommendation device provided by one embodiment of the present disclosure. As shown in FIG7 , the device includes: an acquisition module 702 configured to acquire reference item information corresponding to a target user; a node determination module 704 configured to determine, in a target index graph based on the reference item information, an initial item node and at least one to-be-recommended item node corresponding to the initial item node, wherein the target index graph is constructed using the above-mentioned graph-based index construction method; an item determination module 706 configured to determine, in each to-be-recommended item node, at least one target recommended item based on the connection probability between the initial item node and each to-be-recommended item node. Optionally, the item determination module 706 is further configured to sort the to-be-recommended item nodes based on the connection probability between the initial item node and each to-be-recommended item node; and, based on the sorting result, select recommended items corresponding to a preset number of to-be-recommended item nodes with high connection probabilities as target recommended items. Optionally, the device also includes a recommendation module configured to recommend the at least one target recommended item to the target user. This device can quickly identify recommended items within a target index graph with a reduced number of connections. Based on the target index graph, it ensures both the relevance of recommended items to the target user's reference item information and efficient retrieval within the target index graph. It can quickly recommend relevant target items to the user based on their reference item information. The above is a schematic diagram of an item recommendation device according to this embodiment. It should be noted that the technical solutions of this item recommendation device and the aforementioned item recommendation method share the same concept. For details not described in detail in the technical solution of the item recommendation device, please refer to the description of the technical solution of the aforementioned item recommendation method.Referring to FIG8 , FIG8 shows an architecture diagram of an item recommendation system provided by an embodiment of the present disclosure. The item recommendation system may include a client 100 and a server 200. The client 100 is configured to send reference item information corresponding to a target user to the server 200. The server 200 is configured to determine an initial item node and at least one to-be-recommended item node corresponding to the initial item node in a target index graph based on the reference item information. The target index graph is constructed using the graph-based index construction method described above. At least one target recommended item is determined in each to-be-recommended item node based on the connection probability between the initial item node and each to-be-recommended item node. The at least one target recommended item is sent to the client 100. The client 100 is further configured to receive the at least one target recommended item sent by the server 200. The item recommendation system may include multiple clients 100 and a server 200. The client 100 may be referred to as a device-side device, and the server 200 may be referred to as a cloud-side device. Multiple clients 100 can establish a communication connection through a server 200. In an item recommendation scenario, the server 200 is used to provide item recommendation services between multiple clients 100. Multiple clients 100 can act as senders or receivers, communicating through the server 200. Users can interact with the server 200 through the client 100 to receive data from other clients 100 or send data to other clients 100. In the item recommendation scenario, a user can publish a data stream to the server 200 through the client 100. The server 200 generates at least one target recommended item based on the data stream and pushes the at least one target recommended item to other clients with whom communication has been established. The connection between the client 100 and the server 200 is established via a network. The network provides the medium for the communication link between the client 100 and the server 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables.The data transmitted by the client 100 may need to undergo encoding, transcoding, compression, and other processing before being published to the server 200. The client 100 can be a browser, an application (APP), a web application such as an H5 (HyperText Markup Languages, version 5) application, a light application (also known as a mini-program, a lightweight application), or a cloud application. The client 100 can be developed based on a software development kit (SDK) for the corresponding service provided by the server 200, such as a real-time communication (RTC) SDK. The client 100 can be deployed in an electronic device and rely on the device or certain apps in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, or a personal computer. Electronic devices can also typically be configured with various other applications, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social platform software. The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers configured to provide background training to support models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers or as a single server. The server can also be a server in a distributed system or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), big data and artificial intelligence platforms, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology. It is worth noting that the item recommendation method provided in this disclosure is generally executed by a server. However, in other embodiments of this disclosure, a client may also have similar functionality to the server, thereby executing the item recommendation method provided in this disclosure. In other embodiments, the item recommendation method provided in this disclosure may also be jointly executed by a client and a server. Figure 9 shows a block diagram of a computing device 900 provided according to one embodiment of this disclosure.Components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930. A database 950 is configured to store data. The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of such networks include a combination of a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a communication network such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC). oIn one embodiment of the present disclosure, the aforementioned components of computing device 900, as well as other components not shown in FIG. 9 , may also be connected to one another, for example, via a bus. It should be understood that the computing device block diagram shown in FIG. 9 is for illustrative purposes only and does not limit the scope of the present disclosure. Those skilled in the art may add or replace other components as needed. Computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 900 may also be a mobile or stationary server. Processor 920 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the graph-based index construction method or item recommendation method described above. The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device shares the same concept as the technical solution of the graph-based index construction method or item recommendation method described above. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the graph-based index construction method or item recommendation method described above. One embodiment of the present disclosure also provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, these computer-executable instructions implement the steps of the graph-based index construction method or item recommendation method described above. The above is an exemplary embodiment of a computer-readable storage medium of this embodiment. It should be noted that the technical solution of this storage medium shares the same concept as the technical solution of the graph-based index construction method or item recommendation method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the graph-based index construction method or item recommendation method described above. One embodiment of the present disclosure also provides a computer program product, including a computer program / instructions. When executed by a processor, these computer program / instructions implement the steps of the graph-based index construction method or item recommendation method described above. The above is an exemplary embodiment of a computer program product of this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above-mentioned graph-based index construction method or item recommendation method belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the above-mentioned graph-based index construction method or item recommendation method.The above description describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are possible or may be advantageous. The computer instructions include computer program code, which may be in source code form, object code form, executable files, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, computer memory, read-only memory (ROM), random access memory (RAM), an electrical carrier signal, a telecommunications signal, and software distribution media. It should be noted that, for ease of description, the aforementioned method embodiments are presented as a series of actions. However, those skilled in the art should understand that the present disclosure is not limited by the order of the actions described, as certain steps may be performed in a different order or simultaneously, according to the present disclosure. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules described are not necessarily required for the present disclosure. In the above embodiments, the description of each embodiment has its own emphasis. For portions not described in detail in a particular embodiment, reference should be made to the relevant descriptions of other embodiments. The preferred embodiments disclosed above are merely provided to illustrate the present disclosure. The optional embodiments do not describe all details in detail, nor do they limit the present disclosure to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of the present disclosure. The present disclosure selects and describes these embodiments in detail to better explain the principles and practical applications of the present disclosure, thereby enabling those skilled in the art to better understand and utilize the present disclosure. The present disclosure is limited only by the claims and their full scope and equivalents.

Claims

Claims 1. A graph-based index construction method, comprising: Obtain an initial index graph including user nodes and item nodes; Based on the connection relationships between each user node and each item node in the initial index graph, a reference index graph including item nodes is generated, wherein the reference index graph includes connection probabilities between item nodes; and the reference index graph is updated according to the connection probabilities between item nodes to obtain a target index graph corresponding to the reference index graph.

2. The method of claim 1, generating a reference index graph including item nodes based on the connection relationship between each user node and each item node in the initial index graph, comprising: A target item node, a reference user node corresponding to the target item node, and a reference item node corresponding to the reference user node are randomly selected from the initial index graph; the target item node and each reference item node are connected, and a connection probability between each item node is calculated based on the connection relationship between the target item node and each reference item node; and each item node in the initial index graph is traversed until a connection relationship is established between each item node, thereby obtaining a reference index graph including the item nodes.

3. The method of claim 2, wherein calculating the connection probability between each item node based on the connection relationship between the target item node and each reference item node comprises: Determine a target item node and a target reference item node; determine whether the target item node has any adjacent item nodes; if not, determine a probability of connection between the target item node and the target reference item node to be 1; if so, determine a connection probability between the target item node and the target reference item node based on the adjacent item nodes and the target reference item node.

4. The method of claim 3, wherein determining a connection probability between a target item node and the target reference item node based on the adjacent item nodes and the target reference item node comprises: Determining whether the target reference item node is a neighbor node of the adjacent item node; If not, determine that the probability between the target item node and the target reference item node is 1; if so, calculate the connection probability between the target item node and the target reference item node based on the connection probability between the adjacent item nodes and the target item node.

5. The method of claim 4, wherein the method further comprises calculating the connection probability between the target item node and the target reference item node based on the connection probability between the adjacent item nodes and the target item node, comprising: Obtain an initial connection probability between the target item node and the target reference item node, a first connection probability between the adjacent item node and the target item node, and a second connection probability between the target reference item node and the adjacent item node; calculate the probability of the target item node and the target reference item node based on the first connection probability and the second connection probability. a reference connection probability between nodes; and determining a connection probability between the target item node and the target reference item node based on the initial connection probability and the reference connection probability.

6. The method of claim 1, wherein updating the reference index graph based on the connection probability between each item node to obtain a target index graph corresponding to the reference index graph comprises: Determining at least one connection probability to be deleted from each connection probability of the reference index map; Determine the connected item node group corresponding to each connection probability to be deleted; Delete the connection relationship corresponding to each connected item node group to obtain the target index graph.

7. The method according to claim 6, further comprising: Determine the preset update rounds; The reference index map is updated according to the preset update round to obtain a target index map.

8. The method of claim 1, wherein obtaining an initial index graph including user nodes and item nodes comprises: Randomly select user nodes or item nodes and insert them into the graph; If a user node is selected, a preset number of item nodes with the highest correlation with the user node are selected from the item node set and inserted into the graph; If an item node is selected, a preset number of user nodes with the highest correlation with the item node are selected from the user node set and inserted into the graph; The selected user node is connected to some or all of a preset number of item nodes with the highest correlation with the user node, and the selected item node is connected to some or all of a preset number of user nodes with the highest correlation with the item node; until all user nodes and item nodes are inserted into the graph and linked, an initial index graph including user nodes and item nodes is obtained.

9. The method according to claim 8, further comprising: Determine the relevance score between users and items based on a pre-trained scoring model; A preset number of item nodes with the highest correlation with the user node and a preset number of user nodes with the highest correlation with the item node are determined according to the correlation scores between the user and the item.

10. An item recommendation method, comprising: Obtaining reference item information corresponding to a target user; determining an initial item node and at least one to-be-recommended item node corresponding to the initial item node in a target index graph based on the reference item information, wherein the target index graph is constructed using the method of any one of claims 1-8; and determining at least one target recommended item in each to-be-recommended item node based on a connection probability between the initial item node and each to-be-recommended item node.

11. The method of claim 10, further comprising: determining at least one target recommended item in each to-be-recommended item node based on a connection probability between the initial item node and each to-be-recommended item node; sorting the item nodes to be recommended according to the connection probability between the initial item node and the item nodes to be recommended; According to the sorting results, recommended items corresponding to a preset number of to-be-recommended item nodes with high connection probabilities are selected as target recommended items.

12. The method of claim 10, further comprising: Recommending the at least one target recommended item to the target user.

13. A computing device comprising: memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 12 are implemented.

14. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12.

15. A computer program product comprising a computer program / instructions, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Recommendation method and device

    CN113255712A

  • Information pushing method and device based on relational graph, electronic equipment and storage medium

    CN116362890A

  • Graph-based index establishing method, graph-based indexing method and device and graph-based recommendation method and device

    CN116467490A