An object recommendation method, apparatus, device, and medium
By generating a baseline incremental graph in personalized recommendations and using dynamic programming algorithms and embedded vector optimization graph calculations, the problem of excessively long recommendation time in existing technologies is solved, achieving fast and accurate recommendation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIONPAY
- Filing Date
- 2023-11-17
- Publication Date
- 2026-06-26
Smart Images

Figure CN117573974B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an object recommendation method, apparatus, device and medium. Background Technology
[0002] In personalized recommendation scenarios, providing users with a real-time recommendation list that is as accurate as possible and best suited to their needs can effectively improve the user experience. However, in related technologies, determining the recommendation list (objects) suitable for a user is usually based on large-scale graph retrieval and graph computation using a stock graph containing all the information. This computation is time-consuming and fails to meet the aforementioned requirements for recommendation timeliness, resulting in a lower user experience.
[0003] Therefore, how to ensure the speed of recommendations while maintaining their accuracy is a pressing technical challenge that needs to be addressed. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for recommending objects, which ensures both the accuracy and speed of the recommendations.
[0005] Firstly, this application provides an object recommendation method, the method comprising:
[0006] For the currently received transaction information, identify each latest transaction entity node carried in the transaction information;
[0007] For each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node is obtained from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph;
[0008] Based on the dynamic programming algorithm, the obtained first-optimal node sequences are aggregated to obtain the target node sequence;
[0009] A baseline incremental graph is obtained by fusing the target node sequence with each latest transaction entity node;
[0010] Based on the aforementioned baseline incremental map, object recommendations are made.
[0011] In one possible implementation, the step of aggregating the obtained first preferred node sequences based on a dynamic programming algorithm to obtain a target node sequence includes:
[0012] For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence.
[0013] The target node sequence is obtained based on the retained second preferred node sequences.
[0014] In one possible implementation, obtaining a baseline incremental graph by fusing the target node sequence with each latest transaction entity node includes:
[0015] If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0016] In one possible implementation, the process of obtaining the correspondence between each entity node and the preferred node sequence based on the stock graph includes:
[0017] For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
[0018] In one possible implementation, after counting the candidate sequences to which the entity node belongs, and before calculating the longest common subsequence among the candidate sequences, the method further includes:
[0019] For each candidate sequence, identify the weight value carried by each edge in the candidate sequence, and remove edges whose weight values are less than a set weight threshold.
[0020] In one possible implementation, saving the correspondence between the entity node and the preferred node sequence includes:
[0021] Save the correspondence between the obtained embedding vector of the entity node and the preferred node sequence.
[0022] In one possible implementation, the object recommendation based on the baseline incremental map includes:
[0023] If a recommendation instruction is received, identify the target user carried in the recommendation instruction;
[0024] Based on the association relationships of each transaction entity node contained in the baseline incremental graph, each candidate entity node that is associated with the transaction entity node corresponding to the target user is obtained.
[0025] At least one target entity node is selected from the candidate entity nodes, and object recommendations are made to the target user based on the target entity node.
[0026] In one possible implementation, selecting at least one target entity node from the candidate entity nodes includes:
[0027] All candidate entity nodes are determined as the target entity node; or...
[0028] Candidate entity nodes whose corresponding edge weight values are higher than the set weight threshold are identified as the target entity nodes.
[0029] Secondly, this application provides an object recommendation device, the device comprising:
[0030] The identification module is used to identify each latest transaction entity node carried in the currently received transaction information.
[0031] The acquisition module is used to obtain, for each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph;
[0032] The aggregation module is used to aggregate the obtained first-optimal node sequences based on the dynamic programming algorithm to obtain the target node sequence.
[0033] The fusion module is used to obtain a baseline incremental graph by fusing the target node sequence with each latest transaction entity node;
[0034] The recommendation module is used to recommend objects based on the baseline incremental map.
[0035] In one possible implementation, the aggregation module is specifically used for:
[0036] For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence.
[0037] The target node sequence is obtained based on the retained second preferred node sequences.
[0038] In one possible implementation, the fusion module is specifically used for:
[0039] If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0040] In one possible implementation, the obtaining module is specifically used for:
[0041] For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
[0042] In one possible implementation, the obtaining module is further configured to:
[0043] For each candidate sequence, identify the weight value carried by each edge in the candidate sequence, and remove edges whose weight values are less than a set weight threshold.
[0044] In one possible implementation, the obtaining module is specifically used for:
[0045] Save the correspondence between the obtained embedding vector of the entity node and the preferred node sequence.
[0046] In one possible implementation, the recommendation module is specifically used for:
[0047] If a recommendation instruction is received, identify the target user carried in the recommendation instruction;
[0048] Based on the association relationships of each transaction entity node contained in the baseline incremental graph, each candidate entity node that is associated with the transaction entity node corresponding to the target user is obtained.
[0049] At least one target entity node is selected from the candidate entity nodes, and object recommendations are made to the target user based on the target entity node.
[0050] In one possible implementation, the recommendation module is specifically used for:
[0051] All candidate entity nodes are determined as the target entity node; or...
[0052] Candidate entity nodes whose corresponding edge weight values are higher than the set weight threshold are identified as the target entity nodes.
[0053] Thirdly, this application provides an electronic device that includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the steps of the method as described in any of the first aspects.
[0054] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in any of the first aspects.
[0055] In this embodiment, for the currently received transaction information, each latest transaction entity node carried in the transaction information can be identified; for each latest transaction entity node, a first preferred node sequence corresponding to the latest transaction entity node can be obtained from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; based on a dynamic programming algorithm, the obtained first preferred node sequences are aggregated to obtain a target node sequence; by fusing the target node sequence with each latest transaction entity node, a benchmark incremental graph is obtained; based on the benchmark incremental graph, object recommendation is performed. Since the benchmark incremental graph in this application is generated based on the latest transaction entity node contained in the currently received real-time transaction information and the first preferred node sequence corresponding to the latest transaction entity node obtained in advance based on the stock graph, compared with object recommendation based on the stock graph, object recommendation based on the benchmark incremental graph can not only maximize the accuracy of the recommendation, but also ensure the speed (real-time) of the recommendation. Attached Figure Description
[0056] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0057] Figure 1 A schematic diagram of a first object recommendation process provided by some embodiments is shown;
[0058] Figure 2 The diagram illustrates one method for obtaining candidate sequences according to some embodiments;
[0059] Figure 3 This diagram illustrates one method for obtaining an embedding vector, based on some embodiments.
[0060] Figure 4A A schematic diagram of a preferred node sequence determination process provided by some embodiments is shown;
[0061] Figure 4B A schematic diagram of a target node sequence provided by some embodiments is shown;
[0062] Figure 4C A schematic diagram of a determination of a baseline increment map is shown in some embodiments;
[0063] Figure 5 A schematic diagram of a second object recommendation process provided by some embodiments is shown;
[0064] Figure 6A A schematic diagram of a second sub-reference increment map provided in some embodiments is shown;
[0065] Figure 6B A schematic diagram of a baseline increment map determination process provided by some embodiments is shown;
[0066] Figure 6C This diagram illustrates another baseline increment map determination process provided by some embodiments;
[0067] Figure 6D A schematic diagram of a baseline increment plot is shown, provided in some embodiments;
[0068] Figure 7 The diagram illustrates a third object recommendation process provided in some embodiments;
[0069] Figure 8 The diagram illustrates a fourth object recommendation process provided in some embodiments;
[0070] Figure 9 The diagram illustrates a fifth object recommendation process provided in some embodiments;
[0071] Figure 10 A schematic diagram of a sixth object recommendation process provided in some embodiments is shown;
[0072] Figure 11 A schematic diagram of an object recommendation device provided in some embodiments is shown;
[0073] Figure 12 A schematic diagram of an electronic device structure provided by some embodiments is shown. Detailed Implementation
[0074] To make the objectives, technical solutions, and advantages of this application clearer, a further detailed description of this application will be provided below with reference to the accompanying drawings. Obviously, the embodiments described in this application are merely some embodiments, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0075] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0076] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0077] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0078] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0080] To ensure both the accuracy and speed of recommendations, this application provides a method, apparatus, device, and medium for object recommendation.
[0081] All embodiments of this application comply with the relevant provisions of national laws and regulations regarding the acquisition, storage, use, and processing of data.
[0082] Example 1:
[0083] Figure 1 A schematic diagram of a first-type object recommendation process provided by some embodiments is shown. For example... Figure 1 As shown, the process includes the following steps:
[0084] S101: For the currently received transaction information, identify each latest transaction entity node carried in the transaction information.
[0085] The object recommendation method provided in this application is applied to electronic devices, which may be devices such as PCs, mobile terminals, or servers.
[0086] In one possible implementation, to ensure both the accuracy and speed of recommendations (real-time recommendations), each transaction entity node carried in any currently received transaction information can be identified (for ease of description, the transaction entity node carried in the currently received transaction information is referred to as the latest transaction entity node). For example, if the transaction information is that user A purchased goods from merchant B, then the latest transaction entity node carried in that transaction information could be user A, merchant B, etc., and this application does not specifically limit this.
[0087] S102: For each latest transaction entity node, obtain the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph.
[0088] In one possible implementation, to maximize the accuracy and speed of recommendations, for each latest transaction entity node, the first preferred node sequence corresponding to that latest transaction entity node can be obtained from the pre-obtained correspondence between entity nodes and preferred node sequences based on the stock graph. The process of obtaining the correspondence between entity nodes and preferred node sequences based on the stock graph will be described below.
[0089] Optional, see below Figure 2 , Figure 2 The diagram illustrates a method for obtaining candidate sequences according to some embodiments. For each entity node in the existing graph, such as entity nodes A, B, C, D, E, F, etc. in the figure, a graph walk algorithm such as Node2Vec can be used to count the candidate sequences set(i) to which each entity node belongs. For example, taking entity node A as an example, a graph walk algorithm can be used to identify sequences that all contain entity node A (the least common node), as follows: Sequences such as these can all be considered as candidate sequences to which entity node A belongs.
[0090] Optionally, for each entity node, the longest common subsequence among the candidate sequences to which that entity node belongs can be calculated. Taking entity node A as an example again, assume that the candidate sequence to which entity node A belongs is... The longest common subsequence among these candidate sequences can be The process of identifying the candidate sequence to which the entity node belongs and the process of determining the longest common subsequence can be carried out using existing technologies, and will not be elaborated here.
[0091] Optionally, for each entity node, the longest common subsequence among all candidate sequences to which that entity node belongs can be determined as the preferred node sequence (also known as the core node sequence, core node sequence path, or local core node walk sequence) corresponding to that entity node. In other words, for entity node A, the preferred node sequence corresponding to entity node A can be... It can save entity node A and the preferred node sequence. The correspondence.
[0092] In one possible implementation, to maximize the speed (real-time) of recommendations and improve efficiency, during the preprocessing of the stock graph, in addition to obtaining the preferred node sequence for each entity node, the embedding vector of each entity node can also be obtained through skip-gram models, etc. For each entity node, the correspondence between the entity node's embedding vector and the corresponding preferred node sequence is saved. See [reference needed]. Figure 3 , Figure 3The diagram illustrates one method for obtaining embedding vectors, based on several embodiments. For each entity node, its embedding vector can be obtained using a vector extraction model such as skip-gram. For example, for each entity node input into the vector extraction model, an embedding vector (Code) of each entity node's attribute information can be output through processes such as encoding and decoding. Optionally, embedding can be used to generate the embedding vector representation of the entity node. For example, entity node Xi can be represented as vector Xembedding.
[0093] Optionally, after obtaining the correspondence between each entity node and the preferred node sequence based on the existing graph, when making real-time recommendations, the incremental graph can be generated simply by obtaining (querying) the preferred node sequence corresponding to the latest transaction entity node (for ease of description, the preferred node sequence corresponding to the latest transaction entity node is referred to as the first preferred node sequence) from these pre-obtained correspondences. This avoids large-scale real-time graph computation on the existing graph and can improve efficiency.
[0094] In one possible implementation, after obtaining the candidate sequences to which each entity node belongs, before calculating the longest common subsequence among the candidate sequences to which the entity node belongs, the weight value carried by each edge in each candidate sequence can be identified, and edges with weight values less than a set weight threshold (θ) can be removed. That is, edges with weight values less than the set weight threshold (θ) can be disconnected (pruned), thereby removing edges and nodes with low recommendation value and improving the accuracy and speed of recommendation. See also... Figure 2 Entity nodes can represent users and merchants, and these nodes can be connected by "edges." An edge represents a transaction between a user and a merchant, and its weight represents the number of times a user has transacted with that merchant. (In sequence...) (Not shown in the figure) For example, assuming If the weight of an edge between nodes is less than a preset weight threshold, the edge can be removed (disconnected) for pruning. Correspondingly, the entity nodes connected by that edge will be removed. The corresponding sequences were also removed, resulting in the pruned sequence.
[0095] In one possible implementation, to improve the accuracy and speed of recommendations, when determining the candidate sequence to which any entity node belongs, the number of entity nodes in each candidate sequence may not exceed a set node count threshold. For example, taking a sequence... For example, assuming a threshold of 5 nodes is set, and the sequence contains 6 entity nodes, then the last node F and its corresponding edge can be removed, changing the candidate sequence to... Optionally, the threshold for the number of nodes can be flexibly set according to requirements, and this application does not impose specific limitations on it.
[0096] S103: Based on the dynamic programming algorithm, the obtained first-optimal node sequences are aggregated to obtain the target node sequence.
[0097] In one possible implementation, after obtaining the first preferred node sequence corresponding to each latest transaction entity node, the obtained first preferred node sequences can be aggregated based on a dynamic programming algorithm to obtain the target node sequence.
[0098] Optionally, based on the dynamic programming algorithm, the process of aggregating the obtained first-optimal node sequences to obtain the target node sequence can be as follows:
[0099] For each first preferred node sequence, each entity node in the first preferred node sequence, excluding the corresponding latest transaction entity node, can be identified. For each entity node, the corresponding second preferred node sequence (for ease of description, the preferred node sequence corresponding to this entity node is referred to as the second preferred node sequence) can be obtained from the pre-obtained correspondence between entity nodes and preferred node sequences based on the stock graph. Then, the second preferred node sequence is input into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of the latest transaction entity nodes. For example, the first sub-benchmark incremental graph composed of the latest transaction entity nodes can correspond to a modularity (such as the first modularity). The graph formed after adding (merging) the second preferred node sequence to the first sub-benchmark incremental graph corresponds to a modularity (the second modularity). The increase in the second modularity compared to the first modularity can be determined as the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of the latest transaction entity nodes.
[0100] Optionally, for any second preferred node sequence, if the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of the latest transaction entity nodes is greater than a set gain threshold, the second preferred node sequence can be retained. Conversely, if the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph is not greater than (less than or equal to) the set gain threshold, it can be considered that the second preferred node sequence does not bring modularity gain, and the second preferred node sequence can no longer be retained and can be removed.
[0101] Optionally, the training process of the above-mentioned gain determination model can be trained using the method of maximizing modularity from related techniques. For example, when the difference in gain brought by different second-optimal node sequences to the first sub-benchmark increment map is not significant, the modularity can be considered to be optimal, and the model can be considered to have reached a convergent state. For the second-optimal node sequences that have not yet been input into the gain determination model, the process of inputting the second-optimal node sequences into the gain determination model can be skipped, and the second-optimal node sequences can be deleted and not retained. This will not be elaborated further here.
[0102] In one possible implementation, the target node sequence can be obtained based on the retained second-preferred node sequences. For example, the retained second-preferred node sequences can be merged to obtain the target node sequence. See, for example, [reference needed]. Figure 4A and Figure 4B , Figure 4A The diagram illustrates a first preferred node sequence determination process provided by some embodiments. Figure 4B The diagram illustrates a target node sequence provided by some embodiments. Assume the latest transaction entity nodes are nodes 7, 1, and 5, where the first preferred node sequence corresponding to node 1 is 2-1-4-6, and the first preferred node sequence corresponding to node 2 is 2-5. Taking node 1 as an example, in the first preferred node sequence 2-1-4-6 corresponding to node 1, each entity node other than node 1 is 2, 4, or 6. Entity nodes (referred to as nodes for convenience) 2 and 4 are adjacent to node 1, and can be called the one-hop nodes of node 1. Node 6 is adjacent to the node adjacent to node 1, and can be called the two-hop node of node 1. Similarly, the one-hop nodes, two-hop nodes, three-hop nodes, ..., k-hop nodes of each node can be obtained.
[0103] For each node, such as nodes 2, 4, and 6, the second preferred node sequence can be obtained from the pre-obtained correspondence between entity nodes and preferred node sequences based on the stock graph. For example, the second preferred node sequences corresponding to nodes 2 and 4 can be called the sequence of one-hop nodes, and the second preferred node sequence corresponding to node 6 can be called the sequence of two-hop nodes. Similarly, the sequence of one-hop nodes can be obtained (which can be represented as: s(v1)). 1 , s(v2) 1 , ..., s(v n ) 1 The sequence of two-hop nodes (can be represented as: s(v1)) 2 , s(v2) 2 , ..., s(v m ) 2The sequence of three-hop nodes, ..., the sequence of the k-th hop node (which can be represented as: s(v1)). k , s(v2) k , ..., s(v m ) k The second preferred node sequence is s(v), where s(v) identifies the nodes included in the sequence, such as s(v1). 1 The first node in the sequence that identifies a one-hop node, s(v1). 1 The second node in the sequence of one-hop nodes is identified, and so on, s(v1). k The first node in the sequence that identifies the k-th hop node will not be described further here.
[0104] Optionally, for each second preferred node sequence, the second preferred node sequence can be input into a gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark increment graph composed of the latest trading entity nodes. If the gain brought by the second preferred node sequence to the first sub-benchmark increment graph composed of the latest trading entity nodes is greater than a set gain threshold, the second preferred node sequence can be retained. Conversely, if the gain brought by the second preferred node sequence to the first sub-benchmark increment graph is not greater than (less than or equal to) the set gain threshold, the second preferred node sequence can be removed (deleted).
[0105] Please refer to it again. Figure 4B Assuming the final remaining second-preferred node sequences are 2-1 and 2-5, the remaining second-preferred node sequences can be merged to obtain the target node sequence 5-2-1.
[0106] S104: By fusing the target node sequence with each latest transaction entity node, a baseline incremental graph is obtained.
[0107] After obtaining the target node sequence, it can be fused with each latest transaction entity node to obtain a baseline incremental graph. Object recommendations can then be performed based on this baseline incremental graph. Specifically, when fusion of the target node sequence with each latest transaction entity node, information such as the embedding vectors of entity nodes in the corresponding existing graph and the weight values carried by the edges between entity nodes can be incorporated into the baseline incremental graph. For example, see [link to relevant documentation]. Figure 4C , Figure 4CThe diagram illustrates a method for determining a baseline increment graph based on some embodiments. Assuming the latest transaction entity nodes are 7, 1, and 2, and the target node sequence is 5-2-1, the baseline increment graph obtained by merging the target node sequence with each latest transaction entity node is the graph composed of the edges shown by the thick lines and the corresponding entity nodes. The entity nodes included in the baseline increment graph are: 7, 1, 2, and 5.
[0108] S105: Based on the aforementioned baseline incremental map, make object recommendations.
[0109] In one possible implementation, object recommendation can be performed based on the generated baseline incremental graph. This can be achieved by employing the process of object recommendation based on stock graphs in related technologies, and this application does not specifically limit this approach. Optionally, when performing object recommendation based on the baseline incremental graph, upon receiving a recommendation instruction, the target user carried in the instruction can be identified. Then, based on the association relationships among the transaction entity nodes contained in the baseline incremental graph, candidate entity nodes associated with the transaction entity nodes corresponding to the target user can be obtained. At least one target entity node can be selected from these candidate entity nodes, and this target entity node can be designated as the object to be recommended to the target user. This can be achieved by recognizing that a recommendation instruction has been received when the target user is logged into a website or browsing products, and identifying the logged-in account identifier as the target user's identifier. These settings can be flexibly configured according to requirements, and this application does not specifically limit this approach.
[0110] See Figure 5 , Figure 5 The illustration shows a second object recommendation process provided by some embodiments. For example, when recommending a target user U based on a baseline incremental graph, each candidate entity node associated with the target user U, such as entity nodes A, M, C, G, F, etc., can be identified as a target entity node. A recommendation list is then generated based on the target entity nodes for object recommendation. Alternatively, several target entity nodes can be selected from candidate entity nodes A, M, C, G, F, etc. For example, several candidate entity nodes whose corresponding edge weight values are higher than a set weight threshold can be identified as target entity nodes. A recommendation list is then generated based on the selected target entity nodes for object recommendation. This application does not specifically limit the process of generating a recommendation list based on the selected target entity nodes.
[0111] In this embodiment, for the currently received transaction information, each latest transaction entity node carried in the transaction information can be identified; for each latest transaction entity node, a first preferred node sequence corresponding to the latest transaction entity node can be obtained from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; based on a dynamic programming algorithm, the obtained first preferred node sequences are aggregated to obtain a target node sequence; by fusing the target node sequence with each latest transaction entity node, a benchmark incremental graph is obtained; based on the benchmark incremental graph, object recommendation is performed. Since the benchmark incremental graph in this application is generated based on the latest transaction entity node contained in the currently received real-time transaction information and the first preferred node sequence corresponding to the latest transaction entity node obtained in advance based on the stock graph, compared with object recommendation based on the stock graph, object recommendation based on the benchmark incremental graph can not only maximize the accuracy of the recommendation, but also ensure the speed (real-time) of the recommendation.
[0112] Example 2:
[0113] To maximize the accuracy and speed of recommendations, based on the above embodiments, in this embodiment, the step of fusing the target node sequence with each latest transaction entity node to obtain a baseline incremental graph includes:
[0114] If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0115] In one possible implementation, to maximize the accuracy and speed of recommendations, an incremental graph can be constructed based on transaction information received within a fixed time period (statistical period), and object recommendations can be made based on this incremental graph. This application does not specifically limit the statistical period and can flexibly set it according to needs. For example, assuming the incremental graph is constructed using transaction information received between 1:00 and 3:00, and the current time is 2:00, see [reference needed]. Figure 6A , Figure 6A The diagram illustrates a second sub-baseline increment graph (hereinafter referred to as the second sub-baseline increment graph) provided by some embodiments. It is assumed that a baseline increment graph (referred to as the second sub-baseline increment graph for ease of description) previously constructed based on transaction information received between 1:00 and 2:00 is as follows: Figure 6A As shown, the construction Figure 6AThe process of constructing the second sub-benchmark incremental graph is the same as the process of constructing the benchmark incremental graph provided in the above embodiment, and will not be repeated here. Assume that the entity nodes included in the second sub-benchmark incremental graph constructed based on the transaction information received between 1:00 and 2:00 include nodes A, B, D, C, E, and F, etc., and assume that the target node sequence used to construct this second sub-benchmark incremental graph includes: Etc. Assuming a new transaction is received at 2:00 AM where user U purchases goods from merchant M, then user U and merchant M can be designated as the latest transaction entity nodes. Nodes U and M can be added to the existing second sub-baseline incremental graph constructed within the current time window (current statistical period). Optionally, refer to... Figure 6B , Figure 6B The diagram illustrates a baseline increment graph determination process according to some embodiments. When the latest transaction entity node is not associated with any node in the current second sub-baseline increment graph, nodes U and M can be added to the second sub-baseline increment graph as isolated points. If either the latest transaction entity node already has a transaction with a node in the current second sub-baseline increment graph, or if the latest transaction entity node already exists in the current second sub-baseline increment graph, the latest transaction entity node can be merged into the second sub-baseline increment graph, and the weight values (identifying purchase counts, etc.) of the corresponding edges can be updated. For example, assuming nodes U and M already exist in the current second baseline increment graph, the weight values (purchase counts) of the edges between nodes U and M in the second sub-baseline increment graph can be updated (not shown in the diagram). See also Figure 6C , Figure 6C The diagram illustrates another baseline increment map determination process provided by some embodiments. Assuming that node M is node D in the second sub-baseline increment map, node M and node D can be merged into one node, thereby adding (merging) node U and node M into the second sub-baseline increment map.
[0116] Optionally, the first preferred node sequences corresponding to the latest transaction entity nodes U and M can be obtained from the pre-obtained correspondence between entity nodes and preferred node sequences based on the existing graph. Then, for each first preferred node sequence, each entity node in the first preferred node sequence, excluding the corresponding latest transaction entity node, is identified. For each entity node, a second preferred node sequence is obtained from the pre-obtained correspondence between entity nodes and preferred node sequences based on the existing graph. This second preferred node sequence is input into a gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of the latest transaction entity nodes. If the gain is greater than a set gain threshold, the second preferred node sequence is retained; if the gain is not greater than the set gain threshold, the second preferred node sequence is deleted. Based on the retained second preferred node sequences, a target node sequence is obtained. Then, the target node sequence is fused with each latest transaction entity node and the second sub-benchmark incremental graph to obtain a benchmark incremental graph. (See also...) Figure 6D , Figure 6D The illustration shows a baseline increment graph provided by some embodiments. For example, assuming that the baseline increment graph obtained by fusing the target node sequence, each latest transaction entity node (first sub-baseline increment graph), and the second sub-baseline increment graph is different from that obtained by fusing only the latest transaction entity node and the second sub-baseline increment graph, the baseline increment graph obtained is (…). Figure 6B The system adds entity nodes G and corresponding edges to obtain a baseline incremental graph, which can be used to make recommendations to target users.
[0117] Optionally, the target node sequence is obtained based on information in the stock graph, and the entity nodes in the target node sequence can be used... This means that the process of integrating the target node sequence into the baseline incremental graph can be called the process of enhancing the incremental graph using the stock graph. When making recommendations based on this baseline incremental graph, the efficiency of recommendations can be improved while ensuring the accuracy of recommendations to the greatest extent, and the real-time (fast) nature of recommendations can be guaranteed.
[0118] Optionally, when merging the target node sequence obtained from the existing graph into the incremental graph, the vector representation of the latest transaction entity node and other nodes in the incremental graph can be updated to the vector representation of the corresponding node in the existing graph, thereby reducing computational complexity and improving the efficiency of real-time graph computation.
[0119] Optionally, a recommendation system can be installed in the electronic device to perform object recommendations. This recommendation system can include an offline module and an online module. The offline module can update the full dataset for day T+1 (e.g., updating yesterday's full dataset today), generating a stock graph. Based on this graph, the correspondence between entity nodes and preferred node sequences can be obtained. The online module can perform real-time calculations and recommendations based on the object recommendation method provided in the above embodiments, using the correspondence between entity nodes and preferred node sequences stored in the offline module. Utilizing a graph approach to mine rich user-merchant preference relationships through the associations between entity nodes can significantly reduce the complexity of graph calculations, save computational resources, and improve computational efficiency while ensuring recommendation accuracy.
[0120] To facilitate understanding, the object recommendation process provided in this application will be explained and illustrated below through a specific embodiment. (See reference...) Figure 7 , Figure 7 The diagram illustrates a third object recommendation process provided in some embodiments, which includes the following steps:
[0121] S701: For the currently received transaction information, identify each latest transaction entity node carried in the transaction information.
[0122] S702: For each latest transaction entity node, obtain the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph.
[0123] S703: Based on the dynamic programming algorithm, the obtained first-optimal node sequences are aggregated to obtain the target node sequence.
[0124] S704: If a second sub-benchmark increment map has been generated in the current statistical period, a benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0125] S705: Based on the baseline incremental map, perform object recommendation.
[0126] To facilitate understanding, the object recommendation process provided in this application will be explained and illustrated below through a specific embodiment. (See reference...) Figure 8 , Figure 8 The diagram illustrates a fourth object recommendation process provided in some embodiments, which includes the following steps:
[0127] S801: For the currently received transaction information, identify each latest transaction entity node carried in the transaction information.
[0128] S802: For each latest transaction entity node, obtain the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph.
[0129] S803: For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to that entity node from the pre-obtained correspondence between entity nodes and preferred node sequences based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence. Based on the retained second preferred node sequences, obtain the target node sequence.
[0130] S804: If a second sub-benchmark increment map has been generated in the current statistical period, a benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0131] S805: Based on the baseline incremental map, perform object recommendation.
[0132] To facilitate understanding, the object recommendation process provided in this application will be explained and illustrated below through a specific embodiment. (See reference...) Figure 9 , Figure 9 The diagram illustrates a fifth object recommendation process provided in some embodiments, which includes the following steps:
[0133] S901: For each entity node contained in the existing graph, obtain the embedding vector of the entity node, and based on the graph walk algorithm, count the candidate sequences to which the entity node belongs; calculate the longest common subsequence in each candidate sequence, determine the longest common subsequence as the preferred node sequence corresponding to the entity node, and save the correspondence between the embedding vector of the entity node and the preferred node sequence.
[0134] S902: For the currently received transaction information, identify each latest transaction entity node carried in the transaction information.
[0135] S903: For each latest transaction entity node, obtain the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph.
[0136] S904: For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to that entity node from the pre-obtained correspondence between entity nodes and preferred node sequences based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence. Based on the retained second preferred node sequences, obtain the target node sequence.
[0137] S905: If a second sub-benchmark increment map has been generated in the current statistical period, a benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0138] S906: Based on the baseline incremental map, perform object recommendation.
[0139] To facilitate understanding, the object recommendation process provided in this application will be explained and illustrated below through a specific embodiment. (See reference...) Figure 10 , Figure 10 The diagram illustrates a sixth object recommendation process provided in some embodiments, which includes the following steps:
[0140] S1001: For each entity node contained in the existing graph, obtain the embedding vector of the entity node, and based on the graph walk algorithm, count the candidate sequences to which the entity node belongs; calculate the longest common subsequence in each candidate sequence, determine the longest common subsequence as the preferred node sequence corresponding to the entity node, and save the correspondence between the embedding vector of the entity node and the preferred node sequence.
[0141] S1002: For the currently received transaction information, identify each latest transaction entity node carried in the transaction information.
[0142] S1003: For each latest transaction entity node, obtain the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph.
[0143] S1004: For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to that entity node from the pre-obtained correspondence between entity nodes and preferred node sequences based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence. Based on the retained second preferred node sequences, obtain the target node sequence.
[0144] S1005: If a second sub-benchmark increment map has been generated in the current statistical period, a benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0145] S1006: If a recommendation instruction is received, identify the target user carried in the recommendation instruction; based on the association relationship of each transaction entity node contained in the baseline incremental graph, obtain each candidate entity node that is associated with the transaction entity node corresponding to the target user; select at least one target entity node from each candidate entity node, and make object recommendations to the target user based on the target entity node.
[0146] This application enhances real-time incremental graphs based on existing graphs, avoiding large-scale real-time graph retrieval and computation. This not only ensures recommendation accuracy but also rapidly calculates the graph topological patterns (sequence patterns) of local nodes and edges in real-time recommendation scenarios, supporting rapid graph detection and mining capabilities, improving real-time graph computation efficiency, and generating incremental graphs with strong interpretability and visualization capabilities. The object recommendation method provided in this application is also universal and can be applied to many fields.
[0147] Example 3:
[0148] Based on the same technical concept, this application provides an object recommendation device, see reference. Figure 11 , Figure 11 The diagram illustrates an object recommendation apparatus according to some embodiments, the apparatus comprising:
[0149] The identification module 1101 is used to identify each latest transaction entity node carried in the currently received transaction information;
[0150] The obtaining module 1102 is used to obtain, for each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph.
[0151] The aggregation module 1103 is used to aggregate the obtained first preferred node sequences based on the dynamic programming algorithm to obtain the target node sequence;
[0152] The fusion module 1104 is used to obtain a baseline incremental map by fusing the target node sequence with each latest transaction entity node;
[0153] The recommendation module 1105 is used to recommend objects based on the baseline incremental map.
[0154] In one possible implementation, the aggregation module 1103 is specifically used for:
[0155] For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence.
[0156] The target node sequence is obtained based on the retained second preferred node sequences.
[0157] In one possible implementation, the fusion module 1104 is specifically used for:
[0158] If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0159] In one possible implementation, the obtaining module 1102 is specifically used for:
[0160] For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
[0161] In one possible implementation, the obtaining module 1102 is further configured to:
[0162] For each candidate sequence, identify the weight value carried by each edge in the candidate sequence, and remove edges whose weight values are less than a set weight threshold.
[0163] In one possible implementation, the obtaining module 1102 is specifically used for:
[0164] Save the correspondence between the obtained embedding vector of the entity node and the preferred node sequence.
[0165] In one possible implementation, the recommendation module 1105 is specifically used for:
[0166] If a recommendation instruction is received, identify the target user carried in the recommendation instruction;
[0167] Based on the association relationships of each transaction entity node contained in the baseline incremental graph, each candidate entity node that is associated with the transaction entity node corresponding to the target user is obtained.
[0168] At least one target entity node is selected from the candidate entity nodes, and object recommendations are made to the target user based on the target entity node.
[0169] In one possible implementation, the recommendation module 1105 is specifically used for:
[0170] All candidate entity nodes are determined as the target entity node; or...
[0171] Candidate entity nodes whose corresponding edge weight values are higher than the set weight threshold are identified as the target entity nodes.
[0172] Example 4:
[0173] Based on the same technical concept, this application also provides an electronic device. Figure 12 The diagram illustrates a schematic representation of an electronic device structure provided in some embodiments, such as... Figure 12As shown, the electronic device includes: a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204, wherein the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.
[0174] The memory 1203 stores a computer program. When the program is executed by the processor 1201, the processor 1201 performs the following steps:
[0175] For the currently received transaction information, identify each latest transaction entity node carried in the transaction information;
[0176] For each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node is obtained from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph;
[0177] Based on the dynamic programming algorithm, the obtained first-optimal node sequences are aggregated to obtain the target node sequence;
[0178] A baseline incremental graph is obtained by fusing the target node sequence with each latest transaction entity node;
[0179] Based on the aforementioned baseline incremental map, object recommendations are made.
[0180] In one possible implementation, the processor 1201 is specifically used for:
[0181] For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence.
[0182] The target node sequence is obtained based on the retained second preferred node sequences.
[0183] In one possible implementation, the processor 1201 is specifically used for:
[0184] If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0185] In one possible implementation, the processor 1201 is specifically used for:
[0186] For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
[0187] In one possible implementation, the processor 1201 is further configured to:
[0188] For each candidate sequence, identify the weight value carried by each edge in the candidate sequence, and remove edges whose weight values are less than a set weight threshold.
[0189] In one possible implementation, the processor 1201 is specifically used for:
[0190] Save the correspondence between the obtained embedding vector of the entity node and the preferred node sequence.
[0191] In one possible implementation, the processor 1201 is specifically used for:
[0192] If a recommendation instruction is received, identify the target user carried in the recommendation instruction;
[0193] Based on the association relationships of each transaction entity node contained in the baseline incremental graph, each candidate entity node that is associated with the transaction entity node corresponding to the target user is obtained.
[0194] At least one target entity node is selected from the candidate entity nodes, and object recommendations are made to the target user based on the target entity node.
[0195] In one possible implementation, the processor 1201 is specifically used for:
[0196] All candidate entity nodes are determined as the target entity node; or...
[0197] Candidate entity nodes whose corresponding edge weight values are higher than the set weight threshold are identified as the target entity nodes.
[0198] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0199] The communication interface 1202 is used for communication between the above-mentioned electronic device and other devices.
[0200] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0201] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0202] Example 5:
[0203] Based on the same technical concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by an electronic device. When the program is run on the electronic device, the electronic device performs the following steps:
[0204] For the currently received transaction information, identify each latest transaction entity node carried in the transaction information;
[0205] For each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node is obtained from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph;
[0206] Based on the dynamic programming algorithm, the obtained first-optimal node sequences are aggregated to obtain the target node sequence;
[0207] A baseline incremental graph is obtained by fusing the target node sequence with each latest transaction entity node;
[0208] Based on the aforementioned baseline incremental map, object recommendations are made.
[0209] In one possible implementation, the step of aggregating the obtained first preferred node sequences based on a dynamic programming algorithm to obtain a target node sequence includes:
[0210] For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence.
[0211] The target node sequence is obtained based on the retained second preferred node sequences.
[0212] In one possible implementation, obtaining a baseline incremental graph by fusing the target node sequence with each latest transaction entity node includes:
[0213] If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
[0214] In one possible implementation, the process of obtaining the correspondence between each entity node and the preferred node sequence based on the stock graph includes:
[0215] For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
[0216] In one possible implementation, after counting the candidate sequences to which the entity node belongs, and before calculating the longest common subsequence among the candidate sequences, the method further includes:
[0217] For each candidate sequence, identify the weight value carried by each edge in the candidate sequence, and remove edges whose weight values are less than a set weight threshold.
[0218] In one possible implementation, saving the correspondence between the entity node and the preferred node sequence includes:
[0219] Save the correspondence between the obtained embedding vector of the entity node and the preferred node sequence.
[0220] In one possible implementation, the object recommendation based on the baseline incremental map includes:
[0221] If a recommendation instruction is received, identify the target user carried in the recommendation instruction;
[0222] Based on the association relationships of each transaction entity node contained in the baseline incremental graph, each candidate entity node that is associated with the transaction entity node corresponding to the target user is obtained.
[0223] At least one target entity node is selected from the candidate entity nodes, and object recommendations are made to the target user based on the target entity node.
[0224] In one possible implementation, selecting at least one target entity node from the candidate entity nodes includes:
[0225] All candidate entity nodes are determined as the target entity node; or...
[0226] Candidate entity nodes whose corresponding edge weight values are higher than the set weight threshold are identified as the target entity nodes.
[0227] The aforementioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in an electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.
[0228] Based on the same technical concept, this application provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to implement the method described in any of the above-described method embodiments applied to electronic devices.
[0229] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof, or in whole or in part, as a computer program product. The computer program product includes one or more computer instructions, which, when loaded and executed on a computer, generate, in whole or in part, the processes or functions described in the embodiments of this application.
[0230] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0231] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0232] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0233] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0234] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. An object recommendation method, characterized in that, The method includes: For the currently received transaction information, identify each latest transaction entity node carried in the transaction information; For each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node is obtained from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; Based on the dynamic programming algorithm, the obtained first-optimal node sequences are aggregated to obtain the target node sequence; A baseline incremental graph is obtained by fusing the target node sequence with each latest transaction entity node; Based on the aforementioned baseline incremental map, object recommendation is performed; The process of aggregating the obtained first-optimal node sequences based on the dynamic programming algorithm to obtain the target node sequence includes: For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence. Based on the retained second preferred node sequences, the target node sequence is obtained; The process of obtaining the correspondence between each entity node and the preferred node sequence based on the stock graph includes: For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
2. The method according to claim 1, characterized in that, The step of fusing the target node sequence with each latest transaction entity node to obtain a baseline incremental graph includes: If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
3. The method according to claim 1, characterized in that, The object recommendation based on the baseline incremental map includes: If a recommendation instruction is received, identify the target user carried in the recommendation instruction; Based on the association relationships of each transaction entity node contained in the baseline incremental graph, each candidate entity node that is associated with the transaction entity node corresponding to the target user is obtained. At least one target entity node is selected from the candidate entity nodes, and object recommendations are made to the target user based on the target entity node.
4. An object recommendation device, characterized in that, The device includes: The identification module is used to identify each latest transaction entity node carried in the currently received transaction information. The acquisition module is used to obtain, for each latest transaction entity node, the first preferred node sequence corresponding to the latest transaction entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; The aggregation module is used to aggregate the obtained first-optimal node sequences based on the dynamic programming algorithm to obtain the target node sequence. The fusion module is used to obtain a baseline incremental graph by fusing the target node sequence with each latest transaction entity node; The recommendation module is used to recommend objects based on the baseline incremental map; The aggregation module is specifically used for: For each first preferred node sequence, identify each entity node in the first preferred node sequence except for the corresponding latest transaction entity node; for each entity node, obtain the second preferred node sequence corresponding to the entity node from the correspondence between each entity node and the preferred node sequence obtained in advance based on the stock graph; input the second preferred node sequence into the gain determination model to obtain the gain brought by the second preferred node sequence to the first sub-benchmark incremental graph composed of each latest transaction entity node; if the gain is greater than a set gain threshold, retain the second preferred node sequence; if the gain is not greater than the set gain threshold, delete the second preferred node sequence. Based on the retained second preferred node sequences, the target node sequence is obtained; The process of obtaining the correspondence between each entity node and the preferred node sequence based on the stock graph includes: For each entity node contained in the existing graph, based on the graph walk algorithm, the candidate sequences to which the entity node belongs are counted; and the longest common subsequence among the candidate sequences is calculated. The longest common subsequence is determined as the preferred node sequence corresponding to the entity node, and the correspondence between the entity node and the preferred node sequence is saved.
5. The apparatus according to claim 4, characterized in that, The fusion module is specifically used for: If a second sub-benchmark increment map has been generated in the current statistical period, the benchmark increment map is obtained by fusing the target node sequence with each latest transaction entity node and the second sub-benchmark increment map; wherein, the second sub-benchmark increment map is generated based on the transaction entity nodes carried in each transaction information received in the current statistical period and the preferred node sequence corresponding to each transaction entity node.
6. An electronic device, characterized in that, The electronic device includes at least a processor and a memory, the processor being configured to implement the steps of the method as described in any one of claims 1-3 when executing a computer program stored in the memory.
7. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-3.