A method and device for recommending

By introducing the use of different aggregation weight sets in the PinSAGE model, sampling and aggregation of sub-maps to be aggregated for users and items, the problem of low accuracy of recommendation results in the prior art is solved, and higher recommendation accuracy and user experience are achieved.

CN113255712BActive Publication Date: 2025-03-04HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010094988.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-12
Publication Date
2025-03-04
Estimated Expiration
2040-02-12

AI Technical Summary

Technical Problem

When using the PinSAGE model, it is difficult to effectively deal with the differences between different types of nodes, resulting in low accuracy of recommendation results and affecting user experience.

Method used

A recommendation method is proposed, by obtaining binary maps, user IDs and item IDs, sampling the sub-maps to be aggregated for users and items, and using different sets of aggregate weights for aggregation, generating user vectors and item vectors, thereby improving the accuracy of recommendations.

Benefits of technology

By adopting different sets of aggregation weights for the sub-graphs to be aggregated for different types of nodes, the accuracy of the recommendation results is improved, the user experience is enhanced, and the problem of low recommendation accuracy caused by node differences is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113255712B_ABST
    Figure CN113255712B_ABST
Patent Text Reader

Abstract

The present application provides a recommendation method and device for improving the accuracy of recommending more relevant items to users, such as pictures, apps or commodities, and improving user experience. The recommendation method may include: obtaining a bipartite graph, an identifier of a first user and an identifier of at least one first item, the bipartite graph includes a first type of node and a second type of node, the first type of node represents a user, the second type of node represents an item, and the first type of node and the second type of node are connected; then, based on the identifier of the first user and the identifier of at least one first item, the bipartite graph is sampled respectively to obtain a subgraph to be converged of the first user and each first item; then, different convergence weight sets are used to converge the paths included in the subgraph to be converged of the first user and the subgraph to be converged of each first item respectively to obtain a first vector of the first user and a second vector of each first item; and based on the first vector and the second vector, an item in at least one first item is recommended to the first user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a recommendation method and device. Background Art

[0002] With the development of technology, neural networks are applied in various recommendation scenarios, for example, recommending applications (APP), pictures of interest, products, etc. to users.

[0003] For example, PinSAGE is used to recommend pictures to users, where the collection of pictures that may be of interest to users is called Pin, and the pictures that users are interested in are called Boards, forming a Pin-Boards bipartite graph. Each picture in the Pin-Boards bipartite graph represents a node, and each node in the Pin is connected to the associated node in the Board, while there is no edge between the nodes in the Pin and the Board. However, when using the PinSAGE model to implement recommendations, the accuracy of the final recommendation results may be too low due to the differences between different types of nodes, which reduces the user experience. Summary of the invention

[0004] The present application provides a recommendation method and device for accurately recommending more relevant items, such as pictures, apps, or products, to users, thereby improving user experience.

[0005] In a first aspect, the present application provides a recommendation method, comprising: obtaining a bipartite graph, an identifier of a first user, and an identifier of at least one first item, the bipartite graph comprising a first type of node and a second type of node, the first type of node comprising an identifier of at least one second user, the second type of node comprising an identifier of a second item associated with the at least one second user, and the first type of node and the second type of node being connected; sampling the bipartite graph based on the identifier of the first user and the identifier of the at least one first item, respectively, to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, the subgraph to be converged of the first user comprising an identifier of at least one second item connected to the identifier of the first user, and the at least one first item being connected to the identifier of the first user. The subgraph to be converged of each first item in the items includes the identification of at least one second user connected to each first item; different convergence weight sets are used to converge the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of at least one first item, respectively, to obtain a first vector of the first user and a second vector of each first item in the at least one first item, the convergence weight set including the weights of multiple paths in the subgraph to be converged that converge to a central node; an item in the at least one first item is recommended to the first user, wherein the item recommended to the first user is determined from the at least one first item based on the first vector and the second vector.

[0006] In the implementation manner of the present application, different aggregation weight sets are used to aggregate the subgraphs to be aggregated for different types of nodes, and different processing is performed on different types of nodes, thereby improving the accuracy of the items subsequently recommended to the first user and improving the user experience. The problem of too low recommendation results due to differences between different types of nodes is avoided.

[0007] In a possible implementation, the path included in the subgraph to be converged of the first user and / or the path included in the subgraph to be converged of each first item in at least one first item include: a chain path and a crossing path, the chain path includes a path where each node in the target subgraph to be converged converges to a central node in sequence based on adjacent nodes, and the crossing path includes a path where each node in the target subgraph to be converged directly converges to the central node, wherein the target subgraph to be converged is the subgraph to be converged of the first user or the subgraph to be converged of each first item, and the central node is the first user or each first item.

[0008] Therefore, in the implementation manner of the present application, the subgraph to be converged of the first user and / or each first item includes a chain path and a cross path, so that the data carried by each node in the subgraph to be converged can be converged to the central node, thereby improving the accuracy of the convergence result, further improving the accuracy of the items recommended to the first user later, and improving the user experience. It can reduce the data loss caused by the fusion of information carried by high-order neighbor nodes with low-order neighbor nodes, and improve the accuracy of the convergence result.

[0009] In a possible implementation, there is a connection between the first type of nodes, or there is a connection between the second type of nodes.

[0010] In the implementation manner of the present application, there is a connection between the first type of nodes, or there is a connection between the second type of nodes, that is, there is an association relationship between the users represented by the first type of nodes, or there is an association relationship between the items represented by the second type of nodes. Therefore, when sampling is performed based on the first type of nodes or the second type of nodes in the future, users associated with users, or items associated with items can be collected, so that the user's subgraph to be converged can include the identifier of the user associated with it, and the item's subgraph to be converged can include the identifier of the item associated with it. Through the connection between users and users, or the correlation between items and items, more highly correlated items are recommended to users to improve user experience.

[0011] In a possible implementation, sampling the bipartite graph based on the identifier of the first user and the identifier of at least one first item respectively may include: sampling the bipartite graph based on the identifier of the first user and the at least one first item to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, wherein the sampling method for obtaining the subgraph to be converged of the first user is different from the sampling method for obtaining the subgraph to be converged of the at least one first item.

[0012] In the implementation manner of the present application, different sampling methods can be used to sample the bipartite graph based on the identifier of the first user and the identifier of at least one first item, respectively, so that different types of sampling processing can be performed on different types of nodes, and a more appropriate sampling method for different types of nodes can be determined, so that the obtained sampling results are more highly correlated with the first user, and a recommendation result that better matches the first user is obtained.

[0013] In a possible implementation, the method may further include: counting the number of second users, the first number of second items, and the second number of second items associated with each second user in the user history data, wherein the bipartite graph is obtained according to the user history data; obtaining a first sampling width and a second sampling width according to the second number of second items associated with each second user; obtaining a first sampling depth and a second sampling depth according to the number of second users and the first number of second items, wherein when the number of second users is greater than the first number of second items, the first sampling depth is greater than the second sampling depth, and when the number of second users is less than the first number of second items, the first sampling depth is less than the second sampling depth; the above-mentioned sampling of the bipartite graph based on the identifier of the first user and the identifier of at least one first item, respectively, may include: sampling the bipartite graph according to the first sampling depth and the first sampling width based on the identifier of the first user to obtain a subgraph to be converged of the first user, and sampling the bipartite graph according to the second sampling depth and the second sampling depth based on the identifier of at least one first item to obtain a subgraph to be converged of at least one first item.

[0014] Therefore, in the implementation of the present application, the sampling depth can be determined based on the sampling width and the number of second users and the first number of second items according to the second number of second items associated with each second user. According to the historical records in the user history data, the given sampling depth and sampling width are determined to be more consistent with the distribution characteristics of the items associated with the user in the user history data, so that the obtained sampling results are more relevant to the user, thereby improving the accuracy of the subsequent recommended items.

[0015] In a possible implementation, different convergence weight sets include a first convergence weight set and a second convergence weight set, the first convergence weight set is used to converge the paths included in the subgraph to be converged of the first user, and the second convergence weight set is used to converge the paths included in the subgraph to be converged of at least one first item; before obtaining the identifier of the first user, the method further includes: constructing a bipartite graph based on user history data, the user history data including the identifier of at least one second user and the identifier of a second item associated with the at least one second user; obtaining the identifier of the at least one second user, the identifier of at least one associated item of each second user among the at least one second user, and the identifier of at least one unassociated item of each second user The identification of the item; based on the identification of each second user, the identification of at least one associated item and the identification of at least one unassociated item, the bipartite graph is sampled respectively to obtain at least one second user's subgraph to be converged, at least one associated item's subgraph to be converged and at least one unassociated item's subgraph to be converged; the third convergence weight set and the fourth convergence weight set are iteratively updated according to the at least one second user's subgraph to be converged, at least one associated item's subgraph to be converged and at least one unassociated item's subgraph to be converged to obtain a first convergence weight set and a second convergence weight set, the first convergence weight set is the converged third convergence weight set, and the second convergence weight set is the converged fourth convergence weight set.

[0016] In the implementation manner of the present application, the first aggregation weight set and the second aggregation weight set are obtained by training based on user historical data, that is, different aggregation weight sets can be determined for different types of nodes based on the historical association records of users and items, so that the obtained aggregation results are more accurate, further improving the accuracy of the recommendation results.

[0017] In a possible implementation, any update in the iterative update includes: calculating the third vector of each second user, the fourth vector of each associated item in at least one associated item, and the fifth vector of each unassociated item in at least one unassociated item according to the subgraph to be converged of at least one second user, the subgraph to be converged of at least one associated item, and the subgraph to be converged of at least one unassociated item; calculating the selection probability of each associated item according to the third vector, the fourth vector, and the fifth vector; calculating the value of the loss function according to the selection probability; and performing a gradient update according to the value of the loss function to obtain an updated third convergence weight set and a fourth convergence weight set.

[0018] In an implementation manner of the present application, the selection probability of an item associated with a user can be calculated based on the records in the user's historical data, and compared with the probability of the item associated with the user in the user's historical data being selected, and the convergence weight set is updated until a converged convergence weight set is obtained. A specific method for obtaining a first convergence weight set and a second convergence weight set through offline training is provided, so that the first convergence weight set and the second convergence weight set are consistent with the distribution characteristics of the items associated with the user in the user's historical data, so that the subsequent convergence results are more accurate.

[0019] In a possible implementation, calculating the probability of selecting the associated item according to the third vector, the fourth vector, and the fifth vector may include: calculating the probability of selecting the associated item according to the third vector, the fourth vector, the fifth vector, and a preset formula, wherein the preset formula includes: P positive is the probability of selection, is the third vector, Including the fourth and fifth vectors, Including the fourth vector, C includes the vector of the fourth vector and the vector of the fifth vector. Therefore, in the implementation manner of the present application, a specific method for calculating the selection probability is provided, which can obtain an accurate selection probability.

[0020] In one possible implementation, the value of the loss function is -log(P positive In the implementation mode of the present application, a specific loss function is provided, so that it is possible to accurately determine whether the aggregation weight set converges, so that the first aggregation weight set and the second aggregation weight set obtained conform to the distribution characteristics of the items associated with the user in the user's historical data, so that the subsequent aggregation results are more accurate.

[0021] In a possible implementation, the identifier of the first user is included in the first type of node. In the implementation of the present application, the identifier of the first user can be included in the first type of node, that is, when sampling the bipartite graph based on the identifier of the first user, the sampling is actually performed with the first type of node in the bipartite graph as the center, so that an accurate sampling result can be obtained.

[0022] In a possible implementation, at least one identifier of the first item is included in the second type of node. In the implementation of the present application, the identifier of the first item can be included in the second type of node, that is, when sampling the bipartite graph based on the identifier of the first item, the sampling is actually performed with the second type of node in the bipartite graph as the center, so that an accurate sampling result can be obtained.

[0023] In a possible implementation, recommending an item from at least one first item to a first user may include: determining a recommendation probability of each first item from the at least one first item based on the first vector and the second vector; and recommending an item from the at least one first item to the first user based on the recommendation probability. It can be understood that the first vector may represent the features of the first user, and the second vector may represent the features of the first item, so that the item determined from at least one first item based on the features of the first user and the features of the at least one first item has a higher correlation with the first user, is more matched with the features of the first user, and obtains a more appropriate item recommended to the first user.

[0024] In a possible implementation, recommending an item in the at least one first item to the first user according to the recommendation probability may include: recommending an item in the at least one first item to the first user in descending order according to the recommendation probability of each first item.

[0025] In the implementation manner of the present application, the first item with a high recommendation probability can be selected in descending order as the item recommended to the first user, so that the item recommended to the first user is more matched with the user's characteristics, thereby improving the user experience.

[0026] In a second aspect, the present application provides a recommendation device, which has the function of implementing the recommendation method of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0027] In a third aspect, the present application provides a recommendation device, comprising: a processor and a memory; wherein the processor and the memory are interconnected via a line, and the processor calls the program code in the memory to execute the processing-related functions in the recommendation method shown in any one of the first aspects above.

[0028] In a fourth aspect, an embodiment of the present application provides a digital processing chip, the chip including a processor and a memory, the memory and the processor are interconnected by lines, instructions are stored in the memory, and the processor is used to execute functions related to processing as described in the first aspect or any optional implementation of the first aspect.

[0029] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to execute the method in the above-mentioned first aspect or any optional implementation manner of the first aspect.

[0030] In a sixth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method in the above-mentioned first aspect or any optional implementation manner of the first aspect.

[0031] In a seventh aspect, the present application provides a recommendation device, which can be applied to a device such as a terminal or a server, and is coupled to a memory, and is used to read and execute instructions stored in the memory, so that the recommendation device implements the steps of the method provided in any embodiment of the first aspect of the present application. In one possible design, the recommendation device is a chip or a system on a chip.

[0032] In an eighth aspect, the present application provides a chip system, which includes a processor for supporting a server or terminal to implement the functions involved in any of the embodiments of the first aspect of the present application, for example, processing the data and / or information involved in the above method. In one possible design, the chip system also includes a memory, which is used to store necessary program instructions and data for devices such as servers or terminals. The chip system can be composed of chips, or it can include chips and other discrete devices.

[0033] Among them, the processor mentioned in any of the above places can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the recommended method in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of an application scenario of the recommended method provided for this application;

[0035] Figure 2 A schematic diagram of a bipartite graph used in the present application;

[0036] Figure 3 Another schematic diagram of a bipartite graph used in the present application;

[0037] Figure 4 A schematic diagram of a process flow of a recommended method provided for this application;

[0038] Figure 5A A schematic diagram of the sampling method in the recommended method provided in this application;

[0039] Figure 5B A schematic diagram of a subgraph to be converged provided by this application;

[0040] Fig. 6A Another schematic diagram of the sampling method in the recommended method provided for this application;

[0041] Figure 6B Another schematic diagram of the subgraph to be converged provided by this application;

[0042] Figure 7 Another schematic diagram of the subgraph to be converged in the recommended method provided by this application;

[0043] Figure 8 Another schematic diagram of the recommended method provided for this application;

[0044] Fig. 9 A schematic diagram of an application scenario of offline training in the recommended method provided in this application;

[0045] Fig.10 A schematic diagram of an application scenario of online reasoning in the recommendation method provided in this application;

[0046] Fig.11 A schematic diagram of a structure of a recommended device provided for this application;

[0047] Fig.12 Another schematic diagram of the structure of the recommended device provided in this application. DETAILED DESCRIPTION

[0048] The present application provides a recommendation method and device for accurately recommending more relevant items, such as pictures, apps, or products, to users, thereby improving user experience.

[0049] The recommendation method provided in the present application can be applied to recommendation scenarios in which various terminals or servers recommend items to users. For example, it can be applied to scenarios in which a terminal or server recommends pictures, products or APPs to users.

[0050] The terminal may include, but is not limited to: a smart mobile phone, a television, a tablet computer, a bracelet, a head mounted display device (Head Mount Display, HMD), an augmented reality (augmented reality, AR) device, a mixed reality (mixed reality, MR) device, a cellular phone, a smart phone, a personal digital assistant (personal digital assistant, PDA), a tablet computer, a vehicle terminal, a laptop computer or a personal computer (personal computer, PC), etc. Of course, in the following embodiments, there is no restriction on the specific form of the terminal. The server may be a distributed server or a centralized server, which may be adjusted according to the actual application scenario.

[0051] For example, Figure 1As shown, the server can be connected to one or more terminals, and the server can collect information of one or more terminals connected thereto to obtain user history data within a preset time period. The preset time period can be adjusted according to the actual application scenario. For example, the preset time period can be within 7 days, 15 days or one month, etc. The user history data includes information of the one or more terminals, information of items and association relationships, etc. The information of the one or more terminals may include information such as the identification or geographic location of the terminal, such as the ID of the terminal, the user name or the city identification of the terminal; the information of the item may include information such as the identification, classification or developer of the item, for example, if the item is an APP, the information of the item may include the name, ID, download address, primary classification or secondary classification of the APP, etc.; the association relationship includes the association relationship between the user and the item, for example, the association relationship can be used to indicate that the user has clicked or downloaded an APP, clicked or downloaded a picture, or clicked or purchased a certain item within 7 days.

[0052] The user mentioned in the following embodiments of the present application may be the aforementioned terminal, or an account established based on the aforementioned terminal, etc. For example, the user may be a mobile phone, a tablet computer, or a head-mounted display device, etc., or an account based on a mobile phone, a tablet computer, or a personal computer, etc.

[0053] The recommended method provided by this application is introduced in detail below.

[0054] First, to facilitate understanding, some terms provided in this application are explained.

[0055] Bipartite graph: includes first-type nodes and second-type nodes, and the first-type nodes and the second-type nodes are connected. The first-type nodes include the identifier of the second user, and the second-type nodes include the identifier of the item, and the first-type nodes and the second-type nodes are connected. Exemplarily, the bipartite graph can be as follows: Figure 2 As shown, the nodes in the first type of nodes are connected to the nodes in the second type of nodes, and the nodes connected to each other have an association relationship.

[0056] Neighbor nodes: nodes that are connected to each other in a bipartite graph. For example, a bipartite graph can be Figure 3 As shown, the first type of nodes includes A, B, C and D, and the second type of nodes includes H, L, J and K. Node A is connected to nodes L and J, node B is connected to nodes H and K, node C is connected to nodes L, J and K, and node D is connected to nodes H and L. Taking node A as an example, nodes L and J can be called first-order neighbors of node A, while node L is connected to nodes C and D, and node J is connected to node C. Therefore, node C and node D are called second-order neighbors of node A. There will be third-order neighbors, fourth-order neighbors, and so on in the future.

[0057] Items: used by users or providing services to users, such as pictures, products or apps.

[0058] Sampling: refers to taking a certain node as the central node from the bipartite graph, collecting the neighbor nodes associated with the central node according to the sampling depth and sampling width to obtain the subgraph to be converged.

[0059] Sampling width: the number of nodes collected in the same order neighbor nodes. For example, if the sampling width is 2, the number of neighbor nodes collected in the same order neighbor is 2.

[0060] Sampling depth: used to determine the highest-order neighbor node to be sampled. For example, if the sampling depth is 2, the highest order neighbor node to be sampled is the second-order neighbor.

[0061] Subgraph to be converged: includes the central node and neighbor nodes connected to the central node. Among them, the nodes directly connected to the central node are called first-order nodes, and the nodes connected to the central node through N intermediate nodes are the N-1-order neighbor nodes of the central node.

[0062] Path: refers to the connection between neighbor nodes in the subgraph to be converged and the central node, which is composed of the nodes that each node in the subgraph to be converged passes through when converging to the central node. For example, if a subgraph to be converged includes nodes A, B, and C, node A is the central node, and node B is the intermediate node connecting nodes A and C. Nodes C, B, and A form a path.

[0063] Convergence: refers to the process in which one or more nodes transmit the information they carry to the central node. For example, if a subgraph to be converged includes nodes A, B and C, node A is the central node, and node B is the intermediate node connecting nodes A and C. Nodes C, B and A form a path. In this path, node C transmits its own information to node B, and node B fuses the information of node C with its own information to obtain fused information; then node B transmits the fused information to node A. The process in which the data of node C is transmitted to node A via the process of node B is called convergence.

[0064] See also Figure 4 , a flow chart of the recommended method provided in this application is as follows.

[0065] 401. Obtain a bipartite graph, an identifier of a first user, and an identifier of at least one first item.

[0066] The bipartite graph includes a first type of node and a second type of node, the first type of node includes an identifier of at least one second user, and the second type of node includes an identifier of a second item associated with the at least one second user. Each node in the first type of node is connected to a node in the second type of node associated with it.

[0067] The identification of the at least one second user may include a user ID, a user name, or a unique identification assigned to each second user, etc. The identification of the item may also include an ID or a name of the item, etc.

[0068] The at least one first item includes an item recommended to the first user. The at least one first item can be understood as an item library for the first user, and the item recommended to the first user can be determined from the item library.

[0069] The identification of the at least one first item may include identification information such as the ID and name of the at least one first item. In addition, information such as the item type, introduction information or download address included in the at least one first item may also be obtained to provide specific information of the recommended first item to the first user.

[0070] The identification of the first user may include identification information such as the ID or user name of the first user. In addition, the number of first users may be one or more. For ease of understanding, this application takes one first user as an example for illustrative description, and is not intended to be limiting.

[0071] Optionally, each node in the first category of nodes may also include user feature data of the second user. The user feature data may include the location information of the second user or the identifier of the item associated with the second user, etc. Each node in the second category of nodes may include item feature data, and the item feature data may include the identifier, introduction information or type of the second item, etc. For example, when the item is an APP, the user feature data may include the ID, user name, identifier of the city where the second user is located, identifier of the APP clicked by the second user, identifier of the APP downloaded by the second user, or identifier of the APP used by the second user, etc.; the item feature data may include: APP ID, name, application icon, download address, developer, primary classification or secondary classification, etc. For another example, when the item is a picture, the user feature data may include the ID, user name, identifier of the city where the second user is located, identifier of the picture clicked by the second user, or identifier of the picture downloaded by the second user, etc.; the item feature data may include: picture ID, name, download address, owner or picture classification, etc. For example, when the item is a commodity, the user characteristic data may include the second user's ID, user name, identifier of the city where the second user is located, identifier of the commodity clicked by the second user, identifier of the commodity added to the shopping cart by the second user, or identifier of the commodity purchased by the second user; the item characteristic data may include: the commodity's ID, name, product introduction, store where it is located, or commodity category, and other information.

[0072] Typically, the bipartite graph is obtained based on user history data. The user history data includes user feature data of at least one second user and item feature data of a second item associated with the at least one second user. The user feature data may include data such as the identifier, geographic location, or identifier of the associated item of the second user. The item feature data may include data such as the identifier, name, or type of the second item.

[0073] For example, the user history data may include user feature data of N users within the past 15 days and APP feature data of APPs clicked by the N users. The user feature data of the N users may include the user names, user IDs, and identifiers of APPs clicked, downloaded or used by the users. The APP feature data may include the identifier, primary classification, and secondary classification of the APP. The N users are the aforementioned at least one second user, and the APP feature data of the APPs clicked by the N users are the item feature data of the second item associated with the at least one second user. It can be understood that the user history data includes the click record of the user clicking on the APP, user features, and APP features. The user features may include the user's identifier, name, identifier of the APP clicked, or the type of APP with the most clicks, etc. The APP features may include the type of APP (such as game APP, tool APP, etc.), the number of users who clicked on the APP, and other information. Therefore, the user feature data may be included in the first type of node, and the item feature data may be included in the second type of node, so that when determining the recommendation node later, the user features and item features may be associated to obtain recommended items matching the user features, thereby improving the user experience.

[0074] Specifically, the bipartite graph is constructed based on the user's historical data. Specifically, it can be constructed during offline training, that is, the bipartite graph constructed during offline training can be reused, or it can be constructed after obtaining the identifier of the first user, which can be adjusted according to the actual application scenario. For example, first obtain the user's historical data, which can include the collected feature data of the APP clicked by the user in the previous 15 days, the information of the browsed goods, or the browsed picture information. Then, a user-APP bipartite graph, a user-goods bipartite graph, or a user-picture bipartite graph can be constructed based on the user's historical data.

[0075] For example, the structure of the user-APP bipartite graph can be as follows: Figure 2As shown. Among them, the first type of node includes user feature data of at least one second user, which may specifically include the ID, user name, city identifier, etc. representing the user. The second type of node includes APP feature data of the APP associated with at least one second user, which may specifically include the ID, name, primary classification or secondary classification, etc. of the APP that the user has clicked or downloaded. Among them, the user identifier in the first type of node is connected to the identifier of the APP that the user corresponding to the user identifier in the second type of node has clicked. For example, if the first type of node includes the identifier of user A, and the user A clicks on APP1 and APP2, the identifier of the user A is included in user node 1, the identifier of APP1 is included in APP node 1, and the identifier of APP2 is included in APP node 2, then user node 1 is connected to APP node 1 and APP node 2 respectively, which can be understood as the association between user A and APP1 and APP2.

[0076] In one possible implementation, there is a connection between the first type of nodes, and / or there is a connection between the second type of nodes. For example, the first type of nodes includes identifiers representing user A and user B. If user A and user B are associated, the node including the identifier of user A and the node including the identifier of user B are connected. For example, if user A and user B are from the same city, click on the same type of APP, buy the same item, or click on the same picture, the node including the identifier of user A and the node including the identifier of user B can be connected. Therefore, in the implementation of the present application, the nodes of the same classification in the bipartite graph are connected so that when the recommendation results are obtained later, more recommendation basis can be provided, the accuracy of the recommendation results is improved, and the user experience is improved.

[0077] Optionally, the identifier of the first user may be included in the first type of node, or may not be included in the first type of node. In other words, the identifier of the first user may be included in the first type of node, or may not be included in the identifier of the first user. It can be understood that in the scenario where the identifier of the first user is included in the first type of node, the first user may be a user with a historical record, that is, the identifier of the first user is included in the user's historical data; in the scenario where the first type of node does not include the identifier of the first user, the first user may be a new user with no historical record, or a user who has cleared the historical record, that is, the identifier of the first user is not included in the user's historical data. For example, if the present application is applied to a scenario of recommending an APP to a user, when the user opens the application market, it can be determined that the user is the first user; the first user may be a newly created account, there is no historical record, and the identifier of the first user is not included in the first type of node; the first user may also be an old user with a historical record, that is, the identifier of the first user is included in the first type of node.

[0078] Optionally, the identifier of at least one first item may be completely included in the second type of node, or may be partially included in the second type of node. When only part of the identifiers of the at least one first item are included in the second type of node or the identifier of the at least one first item is not included in the second type of node, an associated second user may be assigned to the first item that is not included in the second type of node. Among them, the method of assigning the associated user may include: assigning the associated user to the first item randomly or in a preset manner. The preset method may be to determine the type of the first item, determine the second type of node of the same type, and randomly select or select the M users with the largest number of associations from the users associated with the second type of node of the same type as the associated users of the first user, where M is a positive integer. For example, if the identifier of the first item A is not included in the bipartite graph, and the type of the first item is type A, then the node of type A may be determined from the second type of node, and the user associated with the node of type A may be determined. Then, M users are randomly selected from the users associated with the nodes of type A as users associated with the first item A; or M users with the largest number of associated type A nodes are selected as users associated with the first item A. For example, if user A is associated with 10 nodes of type A and user B is associated with 28 nodes of type A, user B will be assigned as the user associated with the first item.

[0079] 402. Sample the bipartite graph based on the identifier of the first user and the identifier of at least one first item to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item.

[0080] After determining the first user and at least one first item, the bipartite graph is sampled with the first item and each first item in the at least one first item as the center, respectively, to obtain the subgraph to be converged of the first user and the subgraph to be converged of each first item in the at least one first item. In addition, when sampling the bipartite graph, at least the first-order neighbors of the central node are collected. Therefore, the subgraph to be converged of the first user includes the identifier of at least one second user associated with the first user, and the subgraph to be converged of each first item includes the identifier of at least one second user associated with the first item.

[0081] In a possible implementation, if there is a connection between the first type of nodes in the bipartite graph, or if there is a connection between the second type of nodes, then the subgraph to be converged of the first user may include the identifier of the second user associated with the first user, or the subgraph to be converged of the first item may include the identifier of the second item associated with the first item. Therefore, subsequent convergence may be performed based on the information of the second user associated with the first user, and the obtained first vector may include the features of the second user associated with the first user, or, convergence may be performed based on the information of the second user associated with the first item, and the obtained second vector may include the features of the second item associated with the first item, so that the subsequent convergence result is more relevant to the first user, thereby improving the accuracy of the recommendation results and the user experience.

[0082] In a possible implementation, the sampling method for obtaining the subgraph to be converged of the first user is different from the sampling method for obtaining the subgraph to be converged of the at least one first item. Specifically, the different sampling methods may be different sampling widths, or different sampling widths, etc. Therefore, the embodiment of the present application adopts different sampling methods for different types of nodes, so that the collected subgraph to be converged is more matched with the distribution characteristics of the data in the user's historical data, and a more accurate recommendation result is obtained.

[0083] In a possible implementation, the method may further include: obtaining the number of second users, the first number of second items, and the second number of second items associated with each second user in the user history data; obtaining a first sampling width and a second sampling width according to the second number of second items associated with each second user; obtaining a first sampling depth and a second sampling depth according to the number of second users and the first number of second items, wherein when the number of second users is greater than the first number of second items, the first sampling depth is greater than the second sampling depth, and when the number of second users is less than the first number of second items, the first sampling depth is less than the second sampling depth. Step 402 may specifically include: based on the identifier of the first user, sampling the bipartite graph according to the first sampling depth and the first sampling width to obtain the subgraph to be converged of the first user, and based on at least one first item, sampling the bipartite graph according to the second sampling depth and the second sampling depth to obtain the subgraph to be converged of at least one first item.

[0084] For ease of understanding, the first sampling width and the first sampling depth are collectively referred to as first sampling information, and the second sampling width and the second sampling depth are collectively referred to as second sampling information, which will not be described in detail below.

[0085] The sampling width is the number of samples of neighbor nodes of the same order when sampling a bipartite graph. The sampling depth is used for the highest-order neighbor nodes when sampling a bipartite graph. For example, if the sampling depth is 2, the highest-order neighbor nodes sampled are determined to be second-order neighbor nodes.

[0086] More specifically, the first sampling width, the first sampling depth, the second sampling width, and the second sampling depth may be obtained during offline training. Figure 4 The recommended method shown can reuse the first sampling information and the second sampling information obtained by offline training. The specific steps of offline training can be referred to as follows Figure 8 The introduction in will not be repeated here.

[0087] Typically, the first sampling width may be the median or mean of the distribution of the number of second items associated with the second user in the user history data. Similarly, the second sampling width may be the median or mean of the distribution of the number of second users associated with the first item in the user history data. For example, if the median of the distribution of the number of second items associated with each second user is 5, the first sampling width may be 5; if the average number of second users associated with each second item is 6, the second sampling width may be 6. Of course, in addition to the median or average, other values ​​calculated in other ways may also be used, such as the variance or the most distributed value, etc., which may be adjusted according to the actual application scenario. This is merely an illustrative description and is not intended to be limiting.

[0088] The first sampling depth and the second sampling depth can be determined according to historical sampling information, for example, according to the user's experience value. The first sampling depth and the second sampling depth can also be determined according to the number of users and the number of items, and can be adjusted according to the actual application scenario. Generally, when the number of users is greater than the number of items, the second sampling depth is greater than the first sampling depth, that is, the sampling depth of the items can be greater than the sampling depth of the users; when the number of users is less than the number of items, the first sampling depth is greater than the second sampling depth, that is, the sampling depth of the users can be greater than the sampling depth of the items; when the number of users is the same as the number of items, the first sampling depth can be the same as the second sampling depth. The specific calculation formula is, for example, when log(Nu)-log(Ni)=0, D1=D2=A; when log(Nu)-log(Ni)>0, D1+1; when log(Nu)-log(Ni)<0, D2+1; where Nu is the number of users, Ni is the number of items, D1 is the first sampling depth, D2 is the second sampling depth, and A is a positive integer, for example, A can be 1 or 2, etc.

[0089] Therefore, in the implementation manner of the present application, corresponding sampling methods can be determined for different types of nodes, namely users and items, and the bipartite graph can be sampled according to the corresponding sampling methods, so that the obtained subgraph to be converged is more in line with the data distribution characteristics in the user's historical data.

[0090] The sampling method in step 402 is exemplarily introduced below using a specific scenario.

[0091] For sampling centered on the first user, please refer to Figure 5A . The center of the circle is the node including the identifier of the first user, the first sampling depth is 1, and the first sampling width is 3. That is, the highest-order neighbors collected are first-order neighbors, and the number of first-order neighbors collected is 3. The subgraph to be converged of the first user finally obtained is referred to Figure 5B .

[0092] Similarly, sampling centered on the first item can be seen in Fig. 6A . The center of the circle is the node that includes the identifier of the first item. The first sampling depth is 2, that is, the second-order neighbors of the first item are collected at most. The sampling width of the first-order neighbors is 3, that is, 3 first-order neighbors are collected, and the sampling width of the second-order neighbors is 2, that is, 2 second-order neighbors of each first-order neighbor are collected. Then the subgraph to be converged of the first user is obtained, such as Figure 6B shown.

[0093] Therefore, for different sampling depths, sampling widths and sampling depths, the number of nodes included in the obtained subgraph to be converged is also different. Therefore, the implementation method of the present application can determine the subgraph to be converged that meets the data distribution characteristics for different types of scenarios, so as to make the subsequent recommendation results more accurate.

[0094] 403. Use different convergence weight sets to converge the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of at least one first item, respectively, to obtain a first vector of the first user and a second vector of each first item in the at least one first item.

[0095] After obtaining the subgraph to be converged of the first user and the subgraph to be converged of at least one first item corresponding to at least one first item, the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of each first item in the at least one first item are converged according to different convergence weight sets to obtain the first vector of the first user and the second vector of each first item in the at least one first item. The convergence weight set includes the weights of multiple paths in the subgraph to be converged that converge to the central node.

[0096] In a possible implementation, the different convergence weight sets in step 403 include a first convergence weight set and a second convergence weight set, the first convergence weight set is used to converge the paths included in the subgraph to be converged of the first user, and the second convergence weight set is used to converge the paths included in the subgraph to be converged of at least one first item. That is, step 403 may include: converging the paths included in the subgraph to be converged of the first user according to the weights included in the first convergence weight set to obtain the first vector of the first user; converging the paths included in the subgraph to be converged of each first item according to the weights included in the second convergence weight set to obtain the second vector of each first item. The first convergence weight set and the second convergence weight set are obtained by training based on user historical data, and the first convergence weight set and the second convergence weight set are different. It can be understood that the first vector represents the characteristics of the first user, and the second vector represents the characteristics of the corresponding first item. Therefore, based on the characteristics of the first user and the characteristics of the first item, more matching recommended items can be determined for the first user to improve the user experience.

[0097] Specifically, the method of performing offline training to obtain the first converged weight set and the second converged weight set can refer to the following Figure 8 The relevant introduction in will not be repeated here.

[0098] In a possible implementation, the paths included in the subgraph to be converged of the aforementioned first user and the subgraph to be converged of each first item may include: a chain path and a spanning path. The chain path is a path where each node in the target subgraph to be converged converges to the central node based on adjacent nodes in sequence, and the spanning path is a path where each node in the target subgraph to be converged directly converges to the central node. In each chain path, the upstream node transmits the information it carries to the downstream node. If the downstream node is not the central node, the downstream node fuses the data transmitted by one or more connected upstream nodes, and transmits the fused data to the downstream node or the central node connected to it; the upstream node in each spanning path directly transmits its own data to the central node. So that the central node fuses the data transmitted by all the received nodes to obtain the first vector of the first user or the second vector of the first item. In this case, when the target subgraph to be converged is the subgraph to be converged of the first user, the central node is the first user; when the target subgraph to be converged is the subgraph to be converged of the first item, the central node is the first item.

[0099] It can be understood that the first convergence weight set includes the weights of the chain paths and the weights of the cross paths included in the subgraph to be converged of the first user, and the second convergence weight set includes the weights of the chain paths and the weights of the cross paths included in each first item. Step 403 may specifically include: based on the weights of each path included in the first convergence weight set, the chain paths and the cross paths included in the subgraph to be converged of the first user are converged to obtain the first vector of the first user; that is, the chain paths and the cross paths included in the subgraph to be converged of each first item are converged with the weights included in the second convergence weight set to obtain the second vector of each first item.

[0100] For example, a subgraph to be converged of a first user is used as an example for description. Figure 7 As shown, the chain path includes (L+G)->D->A, (H+K)->C->A and (E+F)->C->A, and the spanning path includes L->A, G->A, H->A, K->A, E->A, and F->A. Correspondingly, the convergence weight set includes the chain path (L+G)->D->A, (H+K)->C->A and (E+F)->C->A, and the weights of each path in the spanning paths L->A, G->A, H->A, K->A, E->A and F->A. Taking the chain path (L+G)->D->A as an example, the information of node L and node H is transmitted to node D, and node D merges its own information and the information of node L and node H, and then node D aggregates the merged information to node A. Taking the spanning path L->A as an example, node A directly receives the information aggregated by node L. Finally, node A can receive the information converged by nodes B, C, D, E, F, L, G, H and K, and the first weight set includes the weight of each path from nodes B, C, D, E, F, L, G, H and K to node A. Usually, the sum of the weight values ​​included in the first convergence weight set and the second convergence weight set is 1. According to the first convergence weight set and the information from nodes B, C, D, E, F, L, G, H and K to node A, the first vector of the first user can be obtained. For example, for ease of understanding, taking the information from nodes B, C, D to node A as an example, the weights of the paths from nodes B, C, D to node A are 0.4, 0.3 and 0.4 respectively, the information from node B is data 1, the information from node C is data 2, and the information from node D is data 3, then the first vector finally calculated is data 1*0.4+data 2*0.3+data 3*0.4. The calculation method of the second vector of the first item is similar to the calculation method of the first vector, which will not be repeated here.

[0101] Therefore, in the implementation manner of the present application, when aggregating the data included in the subgraph to be converged of the first user and the subgraph to be converged of at least one first item, different aggregation weight sets are used for different types of central nodes, and the first vector and the second vector that are more consistent with the data distribution in the user's historical data can be obtained according to different types of central nodes, thereby improving the accuracy of subsequent recommendation results. In addition, when aggregating the data included in the subgraph to be converged of the first user and the subgraph to be converged of at least one first item, the present application considers the chain path and the cross path, that is, adds the cross path, so that the information of the high-order neighbor nodes can be directly converged to the central node, avoiding the loss of information in the fusion process from high-order neighbors to low-order neighbors in the chain path, and improving the accuracy of the subsequent recommendation results.

[0102] 404. Recommend at least one item in the first items to the first user.

[0103] After obtaining the first vector of the first user and the second vector of each first item, an item recommended to the first user is determined from at least one first item according to the first vector and the second vector, and recommended to the user. That is, the item recommended to the first user is determined from at least one first item according to the first vector and the second vector.

[0104] In a specific implementation, step 404 may specifically include: determining a recommendation probability of each first item in the at least one first item according to the first vector and the second vector, and determining an item recommended to the first user from the at least one first item according to the recommendation probability.

[0105] Optionally, determining an item recommended to the first user from at least one first item based on the recommendation probability may specifically include: determining K first items with the highest recommendation probability from at least one first item in descending order based on the recommendation probability of each first item, as the items recommended to the first user, where K is a positive integer and the value of K may be adjusted according to the actual application scenario. For example, K may be 4, 5, or a larger or smaller value.

[0106] Exemplarily, a specific algorithm for calculating the recommendation probability may include:

[0107] Among them, P positive is the recommendation probability, is the first vector, includes a second vector, and C is a vector including said second vector.

[0108] In a possible implementation, after determining the recommended items to the first user, the determined recommended items to the user can be further matched to determine the items that are more compatible with the first user, and the items that are more compatible are sorted in a preset order and recommended to the user. For example, according to the recommendation method provided by the present application, a library of thousands and hundreds of items can be obtained from a full library of millions of items; then, recommended items below the hundredth level that are more compatible with the first user can be further determined from the library of thousands and hundreds of items, and sorted from large to small according to relevance, recommendation probability, etc., and the sorted recommendation results can be recommended to the user.

[0109] Therefore, in the implementation manner of the present application, for the subgraphs to be converged of different types of central nodes, different sets of convergence weights obtained by training with user historical data are used, so that the obtained first vector and second vector are consistent with the data distribution characteristics in the user historical data, thereby improving the accuracy of the items recommended to the first user subsequently. In addition, when the present application converges the subgraphs to be converged of the first user or the subgraphs to be converged of the first item, the chain path and the crossing path are converged to avoid data loss when high-order neighbors converge to low-order neighbors, further improving the accuracy of the items recommended to the first user subsequently. In addition, when the present application samples the bipartite graph, based on different types of nodes, the specific sampling information is determined in combination with the user historical data, so that when the bipartite graph is sampled based on different types of nodes, different sampling methods can be used to sample the bipartite graph based on different types of nodes, further improving the accuracy of the recommended items for the first user subsequently obtained, and improving the user experience.

[0110] For example, in existing solutions, deep structured semantic models (DSSM) can be applied to recommendation scenarios. By using the massive query statements (Query) and web page title (Title) click exposure logs in the search engine, the query statements and web page titles are expressed as low-dimensional semantic vectors through a deep learning model, and the distance between the two semantic vectors is calculated by using the cosine distance, so that the associated semantic vectors are as close as possible, and finally a semantic similarity model is trained. However, the deep structured semantic model extracts the user-item selection data as positive sample pairs for training, which loses the unstructured information brought by the user-item selection data. The training is targeted at positive sample pairs, and there is no perception of other selected items of the same user. The model is prone to jagged phenomenon when converging, which affects the convergence speed; and the similarity between users and items is not taken into account during training, which affects the accuracy.

[0111] For another example, in the existing scheme, the PinSAGE model can also be applied to recommendation scenarios, which can be specifically divided into negative sample sampling, neighbor sampling, information aggregation, and weight update steps. A Pin-Board bipartite graph is established, and users recommend pictures that may be of interest. Pictures are called Pins, and users form a set of pictures that they are interested in, called Boards. When sampling, Pins and Boards are not distinguished, and they are uniformly treated as nodes. The sampling strategy used is the same. For example, second-order neighbors are used, 15 first-order neighbors are sampled, and 5 second-order neighbors are sampled. The problem of inconsistent data distribution between Pins and Boards is not considered; and Pins and Boards are not distinguished when aggregating, and the same weight is used for each layer, without considering the heterogeneity of Pins and Boards. In addition, the information of high-order neighbors can only be aggregated to the target node in a chain from high to low, that is, the information of high-order neighbors needs to be merged with the information of low-order neighbors before it can be transmitted to the central node, which is easy to be lost during the transmission process.

[0112] In the recommendation method provided by the present application, the information advantage brought by unstructured data is fully utilized by bipartite graph sampling, and different sampling depths and sampling widths are configured respectively when sampling the bipartite graph with users and items as the central nodes according to the different properties of users and items, so as to realize different sampling processing of different types of nodes. The present application also uses different aggregation weight sets to aggregate the subgraphs to be aggregated of different types of central nodes according to the different properties of users and items, so that the final recommendation results are more matched with the data distribution in the user's historical data, and more matching items are recommended to users. In addition, without changing the original chain path from high-order neighbors to low-order neighbors, the information carried by a certain order neighbor is directly aggregated to the central node through an additional weight. The information of the chain path and one or more spanning paths is fused after the aggregation weight set to update the information of the target node. It can be understood that compared with the deep structure semantic model, the present application fully utilizes the information advantage brought by unstructured data by constructing a bipartite graph and then sampling neighbors on the graph, and can obtain more accurate civil engineering results. Compared with the PinSAGE model, this application distinguishes different types of nodes during sampling, configures different sampling widths and depths, makes sampling more adaptable to the data distribution of different nodes, and can better capture network structure information. In addition, this application effectively avoids the problem of high-order neighbor information being lost during the convergence process by adding a method of directly converging high-order neighbors to the target node across the convergence path, and through the convergence weight set that can be trained offline, the information carried by the high-order neighbors is directly converged to the central node, avoiding data loss. And the importance of high-order neighbors to the results can be judged by the convergence weight set of the science department, which is conducive to adjusting the model structure.

[0113] The recommendation method provided by the present application is described in detail above. In addition, before obtaining the identification of the first user in the aforementioned step 401, offline training is required to obtain the first converged weight set and the second converged weight set. Figure 2-7 As well as the offline training process, the recommended method provided in this application is introduced in more detail.

[0114] For example, see Figure 8 , another flow chart of the recommended method provided in this application is as described below.

[0115] 801. Construct a bipartite graph based on user historical data.

[0116] The user history data may include the collected identification of at least one second user and the identification of the second item associated with the at least one second user. After acquiring the user history data, a bipartite graph is constructed according to the identification of at least one second user and the identification of the second item associated with the at least one second user included in the user history data.

[0117] Specifically, the user history data may include user feature data of the second user, item feature data, and association data between the user and the item. The user feature data may include the identification (such as ID, name, etc.) of the second user, location information, or identification of the associated item, etc.; the item feature data may include information such as the identification (such as ID, name, etc.), type, or developer of the second item. The association data between the user and the item may include the identification of the second user and the identification of the second item associated with the user.

[0118] Exemplarily, take the item as an APP. User feature data may include the user's identifier (such as ID, name, etc.), the identifier of the city where the user is located, the identifier of the APP that has been clicked, the identifier of the APP that has been downloaded, or the identifier of the APP that has been used. Item feature data may include the primary classification, secondary classification, or developer information of the APP, and the secondary classification may be understood as a subclass under the primary classification. For example, the primary classification of an APP may be a game, and the secondary classification may be a shooting, chess, or other classification. The association data between the user and the item may include the user's identifier, and the identifier of the APP that the user has clicked, downloaded, or used.

[0119] In a possible implementation, step 801 may specifically include: obtaining user feature data of at least one second user included in the user history data, and obtaining item feature data of the second item associated with each second user, using the user feature data of the at least one second user as the first type of node, and using the item feature data of the second item as the second type of node. A bipartite graph can be obtained by connecting the first type of node and the nodes that have an association relationship with the second type of node. For example, if the first type of node includes an identifier representing the user, and the second type of node includes an identifier representing the APP that the user has clicked, then the node including the user identifier and the node including the identifier of the APP that the user has clicked can be connected to obtain a user-APP bipartite graph.

[0120] 802. Obtain an identifier of at least one second user, an identifier of at least one associated item of each second user, and an identifier of at least one unassociated item of each second user.

[0121] Among them, the identification of at least one second user, the identification of at least one associated item of each second user among the at least one second user, and the identification of at least one unassociated item of each second user can be obtained from the user history data. The at least one unassociated item of each second user is an item unassociated with the second user. Obtaining the identification of at least one unassociated item of each second user may include: determining the identification of all items unassociated with a certain user from the user history data, and then randomly collecting or collecting the identification of at least one item from all the items unassociated with the certain user in a preset manner to obtain the identification of at least one unassociated item of the user.

[0122] For example, taking the item as an APP, one or more user identifiers may be obtained from the historical user data, that is, the identifier of at least one second user, the identifier of the APP clicked by each user, that is, at least one associated item of each second user, and the identifier of at least one APP that each second user has not clicked.

[0123] Of course, after obtaining the identification of at least one second user, the identification of at least one associated item of each second user and the identification of at least one unassociated item of each second user may also be directly collected from the bipartite graph.

[0124] For ease of understanding, the identifier of the second user and at least one associated item of each second user can be understood as a positive sample pair, at least one associated item of each second user can be understood as a positive sample, and at least one unassociated item of each second user can be understood as a negative sample.

[0125] It should be noted that when obtaining the identifier of at least one second user, at least one associated item of each second user, and at least one unassociated item of each second user from the user history data, the present application does not limit the execution order of step 801 and step 802. Step 801 can be executed first, or step 802 can be executed first. The specific order can be adjusted according to the actual application scenario.

[0126] 803. Based on the identifier of each second user, at least one associated item, and at least one unassociated item, sample the bipartite graph respectively to obtain a subgraph to be converged of at least one second user, a subgraph to be converged of at least one associated item, and a subgraph to be converged of at least one unassociated item.

[0127] Among them, the bipartite graph is sampled with the identifier of each second user, at least one related item and at least one unrelated item as the central node, so as to obtain at least one subgraph to be converged corresponding to at least one second user, at least one subgraph to be converged corresponding to at least one related item, and at least one subgraph to be converged corresponding to at least one unrelated item.

[0128] Among them, the process of determining the specific sampling method is similar to the aforementioned step 402, and the similar parts will not be repeated here. It should be noted that the aforementioned first sampling information can be understood as the sampling information corresponding to the user, and the aforementioned second sampling information can be understood as the sampling information corresponding to the item. Therefore, in step 803, the identifier of each second user can be used as the central node, and the bipartite graph can be sampled according to the first sampling information. At least one related item or at least one unrelated item can be used as the central node, and the bipartite graph can be sampled according to the second sampling information, respectively, to obtain at least one subgraph to be converged corresponding to at least one related item, and at least one subgraph to be converged corresponding to at least one unrelated item.

[0129] 804. Iteratively update the third convergence weight set and the fourth convergence weight set according to at least one subgraph to be converged of the second user, at least one subgraph to be converged of the associated item, and at least one subgraph to be converged of the unassociated item to obtain the first convergence weight set and the second convergence weight set.

[0130] After obtaining at least one subgraph to be converged of a second user, at least one subgraph to be converged of an associated item, and at least one subgraph to be converged of an unassociated item, the third convergence weight set and the fourth convergence weight set are iteratively updated according to the subgraph to be converged of the at least one second user, the subgraph to be converged of the at least one associated item, and the subgraph to be converged of the at least one unassociated item, to obtain a first convergence weight set and a second convergence weight set. The first convergence weight set is the converged third convergence weight set, and the second convergence weight set is the converged fourth convergence weight set.

[0131] Specifically, any update of the iterative update of the third convergence weight set and the fourth convergence weight set may include: according to the first convergence weight set obtained in the last iterative update, the chain path and the cross path included in the subgraph to be converged of the at least one second user are converged to obtain the third vector of each second user; according to the second convergence weight set obtained in the last iterative update, the chain path and the cross path included in the subgraph to be converged of at least one associated item and the subgraph to be converged of at least one unassociated item are converged to obtain the fourth vector of each associated item in the at least one associated item and the fifth vector of each unassociated item in the at least one unassociated item. The method of converging the subgraph to be converged to obtain the third vector is similar to the method of obtaining the first vector mentioned above, and the method of obtaining the fourth vector and the fifth vector is similar to the method of obtaining the second vector mentioned above. For details, please refer to the relevant description in the above step 403, which will not be repeated here.

[0132] After obtaining the third vector, the fourth vector and the fifth vector, the selection probability of each associated item is calculated according to the third vector, the fourth vector and the fifth vector, and then the value of the loss function is calculated according to the selection probability. Subsequently, the loss function value is derived, and the gradient is updated according to the value obtained after the derivation and the preset learning rate to obtain the updated first convergence weight set and the second convergence weight set. Until the converged first convergence weight set and the second convergence weight set are obtained.

[0133] Calculating the selection probability of each associated item according to the third vector, the fourth vector, and the fifth vector may specifically include: calculating the selection probability of the associated item according to the third vector, the fourth vector, the fifth vector, and a preset formula, and the preset formula may include: ( including the fourth vector or the fifth vector), Among them, P positive is the probability of selection, is the third vector, Including the fourth and fifth vectors, Includes a fourth vector, C includes a vector of the fourth vector and a vector of the fifth vector.

[0134] In the calculation of P positive Afterwards, according to the P positive Calculate the value of the loss function. Optionally, the value of the loss function is -log(P positive ).

[0135] When the calculated P positive When it is equal to or infinitely close to the set target value, the first convergence weight set and the second convergence weight set obtained by the last iteration update can be used as the first convergence weight set and the second convergence weight set after convergence. For example, if the target value is set to 0.90, then when P positive When it is 0.90 or infinitely close to 0.90, it can be determined that the first convergence weight set and the second convergence weight set converge.

[0136] Among them, steps 801-804 can be understood as the process of offline updating, and the following steps 805-809 can be understood as the process of online reasoning using the results of offline updating after offline updating.

[0137] 805. Obtain a bipartite graph, an identifier of a first user, and an identifier of at least one first item.

[0138] 806. Sample the bipartite graph based on the identifier of the first user and the identifier of the at least one first item to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item.

[0139] 807. Use different convergence weight sets to converge the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of at least one first item, respectively, to obtain a first vector of the first user and a second vector of each first item in the at least one first item.

[0140] 808. Recommend at least one item in the first items to the first user.

[0141] Among them, steps 805 to 808 are similar to the aforementioned steps 401 to 404 and will not be repeated here.

[0142] Therefore, in the implementation mode of the present application, during offline training, the first converged weight set and the second converged weight set including the weights of the chain path and the weights of the cross-path can be iteratively updated, so that in the subsequent online reasoning process, the recommended nodes of the first user obtained according to the first converged weight set and the second converged weight set are more accurate and more matched with the first user, thereby improving the user experience. It can be understood that the present application can quickly and accurately find a high-quality small-scale candidate item set from a large number of items based on the user's interests, item features, etc., so as to provide users with better and faster recommendations.

[0143] The foregoing describes in detail the recommendation method provided by the present application. For ease of understanding, the following is an exemplary description taking a specific application scenario of recommending APPs to users as an example.

[0144] First, the offline training process can be found in Fig. 9 .

[0145] Among them, the user history data may include the association between the user and the APP clicked within a preset time period, such as 15 days, one or more user characteristics and one or more APP characteristics.

[0146] Subsequently, a user-APP bipartite graph is constructed based on the user historical data, in which each node in the first type of nodes includes user feature information of a user, and each node in the second type of nodes includes APP feature information of an APP.

[0147] A plurality of target nodes are screened out from the user history data. The target nodes include: identifiers of J users, identifiers of K apps associated with each of the J users, and identifiers of F apps not associated with each user, where J, K, and F are positive integers.

[0148] Subsequently, based on the identifier of each user in the J users, the identifier of each APP in the K APPs, and the identifier of each APP in the F APPs, the user-APP bipartite graph is sampled to obtain the subgraphs to be converged of J users, the subgraphs to be converged of K related APPs, and the subgraphs to be converged of F unrelated APPs. Among them, sampling can be divided into user-based sampling and APP-based sampling. The methods of user-based sampling and APP-based sampling may be different, for example, the sampling depth or sampling width may be different.

[0149] Then, each of the subgraphs to be converged, including the subgraphs to be converged of J users, the subgraphs to be converged of K related apps, and the subgraphs to be converged of F unrelated apps, is path-decomposed to obtain the spanning paths and chain paths included in each subgraph to be converged.

[0150] Then, the weights of the spanning paths and chain paths included in each subgraph to be converged are configured to obtain the weight corresponding to each path, and the convergence is performed according to the weight of each path and the information included in each node in each path to obtain the convergence result corresponding to each subgraph to be converged. The convergence result includes the third vector of J users, the fourth vector of K related APPs, and the fifth vector of F unrelated APPs.

[0151] Then, according to the convergence result, the selection probabilities of the K associated apps are calculated, and the loss function is calculated according to the selection probabilities of the K associated apps. The weights are iteratively updated according to the value of the loss function, that is, the first convergence weight set and the second convergence weight set, until convergence, to obtain the converged first convergence weight set and the second convergence weight set.

[0152] After offline training is completed, the results of offline training can be used for online reasoning.

[0153] The process of online reasoning can be as follows Fig.10 shown.

[0154] First, it is necessary to obtain the identifier of the first user and the identifier of at least one APP. The at least one first item includes items recommended to the user. The bipartite graph can be the aforementioned Fig. 9 The bipartite graph constructed during the offline training process in .

[0155] Then, sampling is performed based on the identifier of the first user and the identifier of at least one first item respectively to obtain the subgraph to be converged of the first user and the subgraph to be converged of at least one first item corresponding to the at least one first item.

[0156] Then, path decomposition is performed on each of the subgraphs to be converged in the subgraphs to be converged of the first user and the subgraphs to be converged of at least one first item to obtain a spanning path and a chain path in each subgraph to be converged.

[0157] Then, according to the first convergence weight set and the second convergence weight set obtained by offline training, the span paths and chain paths in each subgraph to be converged are converged to obtain a convergence result. Among them, the span paths and chain paths included in the subgraph to be converged of the first user are converged according to the first convergence weight set, and the span paths and chain paths included in the subgraph to be converged of at least one first item are converged according to the second convergence weight set. The convergence result may include the first vector of the first user and the second vector of each APP.

[0158] Then, P APPs with the highest recommendation probability among at least one APP are calculated according to the first vector and the second vector, and used as APPs recommended to the first user, where P is a positive integer.

[0159] Then, the P APPs are recommended to the first user. For example, if the first user is a terminal with a display screen, the names, application icons or download addresses of the P APPs can be displayed in the application market of the terminal, so that the first user can obtain the download address, developer or resource size of the APP by clicking on the icon of any APP on the terminal.

[0160] Therefore, in the implementation manner of the present application, firstly, the convergence can be performed based on the spanning path and the chain path to obtain the convergence result, thereby avoiding the data loss caused by the fusion of the data of the high-order neighbors and the data of the low-order neighbors. Secondly, for the subgraphs to be converged corresponding to different types of nodes, different sets of convergence weights are used for convergence, so that the obtained convergence results are more matched with the user characteristics and APP characteristics in the user's historical data, so that the obtained recommendation results are more accurate, more in line with the user's usage habits, and improve the user experience. In addition, different sampling methods are also used for sampling of different types of nodes, so as to extract more accurate information corresponding to the user, avoid sampled data redundancy, further improve the accuracy of the recommendation results, and improve the user experience.

[0161] The above-mentioned recommended method provided by this application is described in detail. Figure 2-10 The corresponding embodiments introduce the device provided by the present application.

[0162] First, see Fig.11 , a schematic structural diagram of a recommended device provided in this application.

[0163] The recommended devices may include:

[0164] An acquisition unit 1101 is used to acquire a bipartite graph, an identifier of a first user, and an identifier of at least one first item, wherein the bipartite graph includes a first type of node and a second type of node, the first type of node includes an identifier of at least one second user, the second type of node includes an identifier of a second item associated with the at least one second user, and the first type of node and the second type of node are connected;

[0165] The sampling unit 1102 is configured to sample the bipartite graph based on the identifier of the first user and the identifier of the at least one first item, respectively, to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, wherein the subgraph to be converged of the first user includes the identifier of the at least one second item connected to the identifier of the first user, and the subgraph to be converged of each first item in the at least one first item includes the identifier of the at least one second user connected to each first item;

[0166] A convergence unit 1103 is used to converge the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of at least one first item using different convergence weight sets to obtain a first vector of the first user and a second vector of each first item in the at least one first item, wherein the convergence weight set includes weights of multiple paths in the subgraph to be converged that converge to the central node;

[0167] The recommendation unit 1104 is configured to recommend an item from the at least one first item to the first user, wherein the item recommended to the first user is determined from the at least one first item based on the first vector and the second vector.

[0168] In a possible implementation, the path included in the subgraph to be converged of the first user and / or the path included in the subgraph to be converged of each first item in at least one first item include: a chain path and a crossing path, the chain path includes a path where each node in the target subgraph to be converged converges to a central node in sequence based on adjacent nodes, and the crossing path includes a path where each node in the target subgraph to be converged directly converges to the central node, wherein the target subgraph to be converged is the subgraph to be converged of the first user or the subgraph to be converged of each first item, and the central node is the first user or each first item.

[0169] In a possible implementation, there is a connection between the first type of nodes, or there is a connection between the second type of nodes.

[0170] In a possible implementation, the sampling unit 1102 is specifically used to perform sampling on a bipartite graph based on an identifier of the first user and at least one first item to obtain a subgraph to be converged of the first user and a subgraph to be converged of at least one first item, wherein a sampling method for obtaining the subgraph to be converged of the first user is different from a sampling method for obtaining the subgraph to be converged of at least one first item.

[0171] In a possible implementation, the sampling unit 1102 is further used to: count the number of second users, the first number of second items, and the second number of second items associated with each second user in the user history data, wherein the bipartite graph is obtained according to the user history data; obtain a first sampling width and a second sampling width according to the second number of second items associated with each second user; obtain a first sampling depth and a second sampling depth according to the number of second users and the first number of second items, wherein when the number of second users is greater than the first number of second items, the first sampling depth is greater than the second sampling depth, and when the number of second users is less than the first number of second items, the first sampling depth is less than the second sampling depth;

[0172] The sampling unit 1102 is specifically used to sample the bipartite graph according to a first sampling depth and a first sampling width based on the identifier of the first user to obtain a subgraph to be converged of the first user, and to sample the bipartite graph according to a second sampling depth and a second sampling width based on the identifier of at least one first object to obtain a subgraph to be converged of at least one first object.

[0173] In a possible implementation, the different convergence weight sets include a first convergence weight set and a second convergence weight set, the first convergence weight set is used to converge the paths included in the subgraph to be converged of the first user, and the second convergence weight set is used to converge the paths included in the subgraph to be converged of at least one first item;

[0174] The recommendation device also includes: an offline training unit 1105, which is used to construct a bipartite graph according to user history data before the acquisition unit 1101 acquires the identifier of the first user, the user history data includes the identifier of at least one second user and the identifier of a second item associated with the at least one second user; acquire the identifier of the at least one second user, the identifier of at least one associated item of each second user among the at least one second user, and the identifier of at least one unassociated item of each second user; based on the identifier of each second user, the identifier of at least one associated item, and the identifier of at least one unassociated item, respectively sample the bipartite graph to obtain a subgraph to be converged of the at least one second user, a subgraph to be converged of at least one associated item, and a subgraph to be converged of at least one unassociated item; iteratively update the third convergence weight set and the fourth convergence weight set according to the subgraph to be converged of the at least one second user, the subgraph to be converged of at least one associated item, and the subgraph to be converged of at least one unassociated item, to obtain a first convergence weight set and a second convergence weight set, the first convergence weight set being the converged third convergence weight set, and the second convergence weight set being the converged fourth convergence weight set.

[0175] In a possible implementation, any update in the iterative update includes: calculating the third vector of each second user, the fourth vector of each associated item in at least one associated item, and the fifth vector of each unassociated item in at least one unassociated item according to the subgraph to be converged of at least one second user, the subgraph to be converged of at least one associated item, and the subgraph to be converged of at least one unassociated item; calculating the selection probability of each associated item according to the third vector, the fourth vector, and the fifth vector; calculating the value of the loss function according to the selection probability; and performing a gradient update according to the value of the loss function to obtain an updated third convergence weight set and a fourth convergence weight set.

[0176] In a possible implementation, the offline training unit 1105 is specifically configured to calculate the selection probability of the associated item according to the third vector, the fourth vector, and the fifth vector and a preset formula, wherein the preset formula includes: P positive is the probability of selection, is the third vector, Including the fourth and fifth vectors, Including the fourth vector, C includes the vector of the fourth vector and the vector of the fifth vector.

[0177] In one possible implementation, the value of the loss function is -log(P positive ).

[0178] In a possible implementation manner, the identifier of the first user is included in the first type of node.

[0179] In a possible implementation, the identifier of at least one first item is included in the second type of node.

[0180] In a possible implementation, the recommendation unit 1104 is specifically configured to: determine a recommendation probability of each first item in the at least one first item according to the first vector and the second vector; and recommend an item in the at least one first item to the first user according to the recommendation probability.

[0181] In a possible implementation, the recommendation unit 1104 is specifically configured to recommend an item in the at least one first item to the first user in a descending order according to the recommendation probability of each first item.

[0182] Fig.12 1 is another schematic diagram of the structure of a recommendation device provided by an embodiment of the present application. The recommendation device 1200 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1222 (for example, one or more processors) and a memory 1232, and one or more storage media 1230 (for example, one or more mass storage devices) storing application programs 1242 or data 1244. Among them, the memory 1232 and the storage medium 1230 may be temporary storage or permanent storage. The program stored in the storage medium 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the recommendation device. Furthermore, the central processing unit 1222 may be configured to communicate with the storage medium 1230 to execute a series of instruction operations in the storage medium 1230 on the recommendation device 1200.

[0183] The recommendation device 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input and output interfaces 1258, and / or, one or more operating systems 1241, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0184] Above Figure 4-10 The steps in the recommended method in the corresponding embodiment can be based on the Fig.12 The recommended device structure shown is implemented.

[0185] The present application also provides a chip system, which includes a processor for supporting the recommendation device to implement the functions involved in the above aspects, such as sending or processing the data and / or information involved in the above methods. In a possible design, the chip system also includes a memory, which is used to store necessary program instructions and data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0186] In another possible design, when the chip system is a chip in a recommended device, the chip includes: a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit. The processing unit may execute the computer execution instructions stored in the storage unit to enable the chip in the recommended device to execute the above Figure 4-10 The steps of the method performed by the recommended device in any of the embodiments. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the recommended device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0187] The embodiment of the present application further provides a processor, which is coupled to a memory and is used to execute the method and function related to the recommendation device in any of the above embodiments.

[0188] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer executes the computer program, the computer implements the method flow related to the recommendation device in any of the above method embodiments. Correspondingly, the computer may be the above recommendation device.

[0189] It should be understood that the processor mentioned in the recommended device in the above embodiments of the present application, or the processor provided in the above embodiments of the present application, may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0190] It should also be understood that the number of processors in the recommended device in the above embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited. The number of memories in the embodiments of the present application can be one or more, and can be adjusted according to the actual application scenario. This is only an exemplary description and is not limited.

[0191] It should also be understood that the memory or readable storage medium mentioned in the recommended device, chip system, etc. in the above embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).

[0192] It should also be noted that when the recommended device includes a processor (or processing unit) and a memory, the processor in this application can be integrated with the memory, or the processor and the memory can be connected through an interface, which can be adjusted according to the actual application scenario and is not limited.

[0193] The present application also provides a computer program or a computer program product including the computer program, which, when executed on a computer, enables the computer to implement the method flow of the recommendation device in any of the above method embodiments. Correspondingly, the computer may be the above recommendation device.

[0194] In the above Figure 4-10 In various embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0195] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0196] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0197] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0198] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0199] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0200] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0201] The names of the messages / frames / information, modules or units, etc. provided in the embodiments of the present application are only examples, and other names may be used as long as the functions of the messages / frames / information, modules or units, etc. are the same.

[0202] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms of "a", "said" and "the" used in the embodiments of the present application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0203] As used herein, the words “if” or “if” may be interpreted as “at the time of” or “when” or “in response to determining” or “in response to detecting”, depending on the context. Similarly, the phrases “if it is determined” or “if (stated condition or event) is detected” may be interpreted as “when it is determined” or “in response to determining” or “when detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0204] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A recommendation method, characterized in that: include: Acquire a bipartite graph, an identifier of a first user, and an identifier of at least one first item, the bipartite graph comprising a first type of node and a second type of node, the first type of node comprising an identifier of at least one second user, the second type of node comprising an identifier of a second item associated with the at least one second user, the first type of node and the second type of node being connected; The bipartite graph is sampled based on the identifier of the first user and the identifier of the at least one first item, respectively, to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, wherein the subgraph to be converged of the first user includes the identifier of at least one second item connected to the identifier of the first user, and the subgraph to be converged of each first item in the at least one first item includes the identifier of at least one second user connected to each first item; Using different convergence weight sets to converge the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of the at least one first item, respectively, to obtain a first vector of the first user and a second vector of each first item in the at least one first item, wherein the convergence weight set includes weights of multiple paths in the subgraph to be converged that converge to a central node; recommending an item from the at least one first item to the first user, wherein the item recommended to the first user is determined from the at least one first item based on the first vector and the second vector; Counting the number of second users, the first number of second items, and the second number of second items associated with each second user in the user history data, wherein the bipartite graph is obtained according to the user history data; Obtaining a first sampling width and a second sampling width according to a second quantity of second items associated with each second user; A first sampling depth and a second sampling depth are obtained according to the number of the second users and the first number of the second items, wherein when the number of the second users is greater than the first number of the second items, the first sampling depth is greater than the second sampling depth, and when the number of the second users is less than the first number of the second items, the first sampling depth is less than the second sampling depth; The sampling of the bipartite graph based on the identifier of the first user and the identifier of the at least one first object respectively includes: based on the identifier of the first user, sampling the bipartite graph according to the first sampling depth and the first sampling width to obtain a subgraph to be converged of the first user, and based on the identifier of the at least one first object, sampling the bipartite graph according to the second sampling depth and the second sampling width to obtain a subgraph to be converged of the at least one first object.

2. The method according to claim 1, characterized in that The paths included in the subgraph to be converged of the first user and / or the paths included in the subgraph to be converged of each first item in the at least one first item include: a chain path and a crossing path, wherein the chain path includes a path where each node in the target subgraph to be converged converges to a central node in sequence based on adjacent nodes, and the crossing path includes a path where each node in the target subgraph to be converged directly converges to the central node, wherein the target subgraph to be converged is the subgraph to be converged of the first user or the subgraph to be converged of each first item, and the central node is the first user or each first item.

3. The method according to claim 1, characterized in that There is a connection between the first type of nodes, or there is a connection between the second type of nodes.

4. The method according to any one of claims 1 to 3, characterized in that The sampling of the bipartite graph based on the identifier of the first user and the identifier of the at least one first item respectively includes: Based on the identifier of the first user and the identifier of the at least one first item, the bipartite graph is sampled respectively to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, wherein the sampling method for obtaining the subgraph to be converged of the first user is different from the sampling method for obtaining the subgraph to be converged of the at least one first item.

5. The method according to any one of claims 1 to 3, characterized in that: The different convergence weight sets include a first convergence weight set and a second convergence weight set, the first convergence weight set is used to converge the paths included in the subgraph to be converged of the first user, and the second convergence weight set is used to converge the paths included in the subgraph to be converged of the at least one first item; Before obtaining the identifier of the first user, the method further includes: constructing the bipartite graph according to user history data, wherein the user history data includes an identifier of at least one second user and an identifier of a second item associated with the at least one second user; Acquire the identifier of the at least one second user, the identifier of at least one associated item of each of the at least one second user, and the identifier of at least one unassociated item of each of the second users; Based on the identifier of each second user, the identifier of the at least one associated item, and the identifier of the at least one unassociated item, the bipartite graph is sampled respectively to obtain a subgraph to be converged of the at least one second user, a subgraph to be converged of the at least one associated item, and a subgraph to be converged of the at least one unassociated item; The third convergence weight set and the fourth convergence weight set are iteratively updated according to the subgraph to be converged of the at least one second user, the subgraph to be converged of the at least one associated item, and the subgraph to be converged of the at least one unassociated item to be converged to obtain the first convergence weight set and the second convergence weight set, the first convergence weight set being the third convergence weight set after convergence, and the second convergence weight set being the fourth convergence weight set after convergence.

6. The method according to claim 5, characterized in that Any update in the iterative update includes: Calculate, according to the subgraph to be converged of the at least one second user, the subgraph to be converged of the at least one associated item, and the subgraph to be converged of the at least one unassociated item, the third vector of each second user, the fourth vector of each associated item in the at least one associated item, and the fifth vector of each unassociated item in the at least one unassociated item; Calculating the selection probability of each associated item according to the third vector, the fourth vector and the fifth vector; Calculate the value of the loss function according to the selected probability; Gradient update is performed according to the value of the loss function to obtain the updated third aggregation weight set and the fourth aggregation weight set.

7. The method according to claim 6, characterized in that The calculating the selection probability of the associated item according to the third vector, the fourth vector and the fifth vector includes: The selection probability of the associated item is calculated according to the third vector, the fourth vector, the fifth vector and a preset formula, wherein the preset formula includes: The P positive is the selected probability, is the third vector, the Including the fourth vector and the fifth vector, the Including the fourth vector, C includes a vector of the fourth vector and a vector of the fifth vector.

8. The method according to claim 7, characterized in that The value of the loss function is -log(P positive ).

9. The method according to any one of claims 1 to 3, characterized in that: The identifier of the first user is included in the first type of node.

10. The method according to any one of claims 1 to 3, characterized in that: The identifier of the at least one first item is included in the second type of node.

11. The method according to any one of claims 1 to 3, characterized in that: The recommending an item in the at least one first item to the first user comprises: Determining a recommendation probability of each first item in the at least one first item according to the first vector and the second vector; An item in the at least one first item is recommended to the first user according to the recommendation probability.

12. The method according to claim 11, characterized in that The recommending an item in the at least one first item to the first user according to the recommendation probability includes: According to the recommendation probability of each first item, items in the at least one first item are recommended to the first user in descending order.

13. A recommendation device, characterized in that: include: an acquisition unit, configured to acquire a bipartite graph, an identifier of a first user, and an identifier of at least one first item, wherein the bipartite graph includes a first type of node and a second type of node, wherein the first type of node includes an identifier of at least one second user, and the second type of node includes an identifier of a second item associated with the at least one second user, and the first type of node is connected to the second type of node; a sampling unit, configured to sample the bipartite graph based on the identifier of the first user and the identifier of the at least one first item, respectively, to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, wherein the subgraph to be converged of the first user includes the identifier of at least one second item connected to the identifier of the first user, and the subgraph to be converged of each first item in the at least one first item includes the identifier of at least one second user connected to each first item; a convergence unit, configured to converge the paths included in the subgraph to be converged of the first user and the paths included in the subgraph to be converged of the at least one first item using different convergence weight sets, respectively, to obtain a first vector of the first user and a second vector of each first item in the at least one first item, wherein the convergence weight set includes weights of multiple paths in the subgraph to be converged that converge to a central node; a recommendation unit, configured to recommend an item from the at least one first item to the first user, wherein the item recommended to the first user is determined from the at least one first item based on the first vector and the second vector; The sampling unit is further used for: Counting the number of second users, the first number of second items, and the second number of second items associated with each second user in the user history data, wherein the bipartite graph is obtained according to the user history data; Obtaining a first sampling width and a second sampling width according to a second quantity of second items associated with each second user; A first sampling depth and a second sampling depth are obtained according to the number of the second users and the first number of the second items, wherein when the number of the second users is greater than the first number of the second items, the first sampling depth is greater than the second sampling depth, and when the number of the second users is less than the first number of the second items, the first sampling depth is less than the second sampling depth; The sampling unit is specifically used to sample the bipartite graph according to the first sampling depth and the first sampling width based on the identifier of the first user to obtain the subgraph to be converged of the first user, and to sample the bipartite graph according to the second sampling depth and the second sampling width based on the identifier of the at least one first object to obtain the subgraph to be converged of the at least one first object.

14. The device according to claim 13, characterized in that The paths included in the subgraph to be converged of the first user and / or the paths included in the subgraph to be converged of each first item in the at least one first item include: a chain path and a crossing path, wherein the chain path includes a path where each node in the target subgraph to be converged converges to a central node in sequence based on adjacent nodes, and the crossing path includes a path where each node in the target subgraph to be converged directly converges to the central node, wherein the target subgraph to be converged is the subgraph to be converged of the first user or the subgraph to be converged of each first item, and the central node is the first user or each first item.

15. The device according to claim 13, characterized in that There is a connection between the first type of nodes, or there is a connection between the second type of nodes.

16. The device according to any one of claims 13 to 15, characterized in that The sampling unit is specifically used to sample the bipartite graph based on the identifier of the first user and the at least one first item to obtain a subgraph to be converged of the first user and a subgraph to be converged of the at least one first item, wherein a sampling method for obtaining the subgraph to be converged of the first user is different from a sampling method for obtaining the subgraph to be converged of the at least one first item.

17. The device according to any one of claims 13 to 15, characterized in that The different convergence weight sets include a first convergence weight set and a second convergence weight set, the first convergence weight set is used to converge the paths included in the subgraph to be converged of the first user, and the second convergence weight set is used to converge the paths included in the subgraph to be converged of the at least one first item; The recommendation device further includes: an offline training unit, which is used for, before the obtaining unit obtains the identification of the first user, constructing the bipartite graph according to user history data, wherein the user history data includes an identifier of at least one second user and an identifier of a second item associated with the at least one second user; Acquire the identifier of the at least one second user, the identifier of at least one associated item of each of the at least one second user, and the identifier of at least one unassociated item of each of the second users; Based on the identifier of each second user, the identifier of the at least one associated item, and the identifier of the at least one unassociated item, the bipartite graph is sampled respectively to obtain a subgraph to be converged of the at least one second user, a subgraph to be converged of the at least one associated item, and a subgraph to be converged of the at least one unassociated item; The third convergence weight set and the fourth convergence weight set are iteratively updated according to the subgraph to be converged of the at least one second user, the subgraph to be converged of the at least one associated item, and the subgraph to be converged of the at least one unassociated item to be converged to obtain the first convergence weight set and the second convergence weight set, the first convergence weight set being the third convergence weight set after convergence, and the second convergence weight set being the fourth convergence weight set after convergence.

18. The device according to claim 17, characterized in that Any update in the iterative update includes: Calculate, according to the subgraph to be converged of the at least one second user, the subgraph to be converged of the at least one associated item, and the subgraph to be converged of the at least one unassociated item, the third vector of each second user, the fourth vector of each associated item in the at least one associated item, and the fifth vector of each unassociated item in the at least one unassociated item; Calculating the selection probability of each associated item according to the third vector, the fourth vector and the fifth vector; Calculate the value of the loss function according to the selected probability; Gradient update is performed according to the value of the loss function to obtain the updated third aggregation weight set and the fourth aggregation weight set.

19. The device according to claim 17, characterized in that The offline training unit is specifically used for: The selection probability of the associated item is calculated according to the third vector, the fourth vector, the fifth vector and a preset formula, wherein the preset formula includes: The P positive is the selected probability, is the third vector, the Including the fourth vector and the fifth vector, the Including the fourth vector, C includes a vector of the fourth vector and a vector of the fifth vector.

20. The device according to claim 19, characterized in that The value of the loss function is -log(P positive ).

21. The device according to any one of claims 13 to 15, characterized in that The identifier of the first user is included in the first type of node.

22. The device according to any one of claims 13 to 15, characterized in that The identifier of the at least one first item is included in the second type of node.

23. The device according to any one of claims 13 to 15, characterized in that The recommendation unit is specifically used for: Determining a recommendation probability of each first item in the at least one first item according to the first vector and the second vector; An item in the at least one first item is recommended to the first user according to the recommendation probability.

24. The device according to claim 23, characterized in that The recommendation unit is specifically used for: According to the recommendation probability of each first item, items in the at least one first item are recommended to the first user in descending order.

25. An electronic device, characterized in that: include: Processor and memory; The memory stores program code; When the processor calls the program code in the memory, the steps of the method according to any one of claims 1 to 12 are executed.

26. A computer program product comprising instructions, characterized in that When the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 12.

27. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 12.

28. A chip comprising a processor and a memory, characterized in that: The processor is coupled to the memory, and is used to read and execute instructions stored in the memory to implement the steps of any one of claims 1-12.

29. A system on chip, comprising a processor and a memory, characterized in that: The processor is coupled to the memory, and is used to read and execute instructions stored in the memory to implement the steps of any one of claims 1-12.