A data enhancement method and related device
By mining potential information in the session, expanding the user's historical behavior sequence into a directed graph and performing weighted traversal, the problem of low accuracy of historical behavior sequences in existing technologies is solved, and more accurate sequence recall is achieved.
Patent Information
- Application Number
- CN202510155249.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The accuracy of historical behavior sequences used for sequence recall in existing technologies is low and fails to effectively reflect the potential information in the conversation.
By mining the potential information in the conversation, the sequence to be enhanced is expanded into a directed graph. The directed graph is traversed using the weights carried by weighted directed edges to obtain the target enhancement sequence, which reflects the potential selection probability of the user in the conversation.
It improves the accuracy of upstream data for recommendation tasks, enables more accurate prediction of objects of interest to users, and enhances the accuracy of sequence recall.
Smart Images

Figure CN119622110B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data enhancement method and related devices. Background Art
[0002] With the rapid development of e-commerce platforms, social media, and streaming services, the amount of interactive data generated by users every day has exploded. These platforms have accumulated a large amount of user behavior data, such as clicks, purchases, and browsing history. By analyzing user interests and preferences, they provide users with high-probability-of-interest content, such as short videos and products, thereby improving user experience, increasing user stickiness, and boosting conversion rates.
[0003] In related technologies, objects of interest to users are predicted through sequential recall. Sequential recall refers to the process of predicting objects of interest to users from a large set of candidate objects by analyzing the user's historical behavior sequences in recommendation tasks.
[0004] However, the accuracy of historical behavior sequences used for sequence recall in related technologies is low. Summary of the Invention
[0005] In response to the above problems, the present application provides a data enhancement method and related devices for improving the accuracy of historical behavior sequences.
[0006] Based on this, this application discloses the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a data enhancement method, the method comprising:
[0008] Acquire a sequence to be enhanced, the sequence to be enhanced comprising a plurality of object nodes and directed edges for connecting the object nodes, the sequence to be enhanced being used to indicate the order in which the user selects objects in a session;
[0009] Determining, based on the potential object nodes corresponding to the respective object nodes, a directed graph including a plurality of weighted directed edges, wherein the weighted directed edges are used to point from the object nodes to the potential object nodes corresponding to the object nodes, and the weights carried by the weighted directed edges are used to indicate the probability that the user will select the potential object corresponding to the target object after selecting the target object;
[0010] The directed graph is traversed according to the weights carried by the weighted directed edges to obtain a target enhancement sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge.
[0011] Optionally, determining a plurality of weighted directed edges according to the potential object nodes corresponding to the respective object nodes to obtain a directed graph includes:
[0012] Determine a directed edge to be assigned a weight corresponding to each of the object nodes, wherein the directed edge to be assigned a weight is used to point from the object node to a potential object node corresponding to the object node;
[0013] Obtaining a correspondence between the degree of association and the weight, wherein the higher the degree of association, the greater the weight;
[0014] Acquire multiple association degrees between each of the potential object nodes and the corresponding object nodes;
[0015] The weights corresponding to the directed edges to be weighted are determined according to the corresponding relationships, and a directed graph including a plurality of the weighted directed edges is obtained.
[0016] Optionally, the method further includes:
[0017] Determine the basic weights corresponding to the directed edges to be weighted according to the corresponding relationship;
[0018] Acquire a collaborative filtering model, wherein the collaborative filtering model is used to determine the similarity between two objects, wherein the similarity is used to indicate the frequency of simultaneous occurrence of the two objects corresponding to the directed edge to be weighted, wherein the higher the frequency, the higher the similarity;
[0019] Determine the similarities corresponding to the directed edges to be weighted according to the collaborative filtering model;
[0020] The basic weight is adjusted according to the similarities corresponding to the directed edges to be weighted, so as to obtain the weights corresponding to the directed edges to be weighted.
[0021] Optionally, the degree of association between the potential object node and the corresponding object node is determined by the distance between the window where the potential object node is located and the window where the corresponding object node is located. The smaller the distance, the higher the degree of association. The potential object nodes corresponding to each of the object nodes are determined by:
[0022] Obtaining a preset window range, where the preset window range is used to indicate the object distribution range determined by the current recommendation algorithm;
[0023] For a target object node among the multiple object nodes, determining a potential object distribution range of the target object node according to a position of the target object node and a preset window range;
[0024] Determine an object node located in the potential object distribution range among the multiple object nodes as a potential object node of the target object node;
[0025] Each of the object nodes is used as the target object node, and potential object nodes corresponding to each of the object nodes are obtained.
[0026] Optionally, determining a directed graph including a plurality of weighted directed edges according to the potential object nodes corresponding to the respective object nodes includes:
[0027] Determining an initial directed graph including a plurality of weighted directed edges according to the potential object nodes respectively corresponding to the object nodes;
[0028] According to the behavior data of the user selecting the object, a discard operation is performed on the initial directed graph to obtain the directed graph, wherein the discard operation is used to discard the object nodes or weighted directed edges included in the initial directed graph.
[0029] Optionally, performing a discard operation on the initial directed graph according to the user's behavior data of selecting an object to obtain the directed graph includes:
[0030] Obtaining an interval time threshold and an interval time between pairs of object nodes connected by the weighted directed edges;
[0031] If the interval time between the object node pairs exceeds the interval time threshold, determining a first probability of the discard operation according to a timeout degree of the interval time exceeding the interval time threshold, wherein a higher the timeout degree, a higher the first probability;
[0032] The discard operation is performed on the weighted directed edges connecting the object node pairs in the initial directed graph according to the first probability.
[0033] Optionally, performing a discard operation on the initial directed graph according to the user's behavior data of selecting an object to obtain a directed graph includes:
[0034] Obtaining a probability prediction model, wherein the probability prediction model is used to predict the probability that the user will terminate the interaction after selecting the object;
[0035] According to the characteristic data of the user and the characteristic data corresponding to each of the object nodes, prediction is performed using the probability prediction model to obtain a second probability corresponding to each of the object nodes;
[0036] For each of the object nodes in the initial directed graph, the discard operation is performed on the object node corresponding to the second probability according to the second probability.
[0037] Optionally, if the sequence to be enhanced includes a first sequence to be enhanced and a second sequence to be enhanced, the directed graph includes a first directed graph and a second directed graph, wherein the first directed graph is obtained according to the first sequence to be enhanced, and the second directed graph is obtained according to the second sequence to be enhanced, then traversing the directed graph according to the weights carried by the weighted directed edges to obtain a target enhanced sequence corresponding to the sequence to be enhanced includes:
[0038] Traversing the first directed graph according to the weights carried by the weighted directed edges in the first sequence to be enhanced to obtain a first enhanced sequence;
[0039] Traversing the second directed graph according to the weights carried by the weighted directed edges in the second sequence to be enhanced to obtain a second enhanced sequence;
[0040] A first identifier is assigned to the first enhanced sequence, and a second identifier is assigned to the second enhanced sequence to obtain a first target enhanced sequence corresponding to the first sequence to be enhanced and a second target enhanced sequence corresponding to the second sequence to be enhanced, wherein the first identifier and the second identifier are used to characterize the sequence of sessions corresponding to the first sequence to be enhanced and the second sequence to be enhanced.
[0041] In a second aspect, an embodiment of the present application provides a data enhancement device, the device comprising: an acquisition unit, a composition unit, and a traversal unit;
[0042] The acquisition unit is configured to acquire a sequence to be enhanced, the sequence to be enhanced comprising a plurality of object nodes and directed edges connecting the object nodes, the sequence to be enhanced being used to indicate the order in which the user selects objects in a session;
[0043] The graph forming unit is configured to determine, based on the potential object nodes corresponding to the respective object nodes, a directed graph including a plurality of weighted directed edges, wherein the weighted directed edges are configured to point from the object nodes to the potential object nodes corresponding to the object nodes, and the weights carried by the weighted directed edges are configured to indicate the probability that the user will select the potential object corresponding to the target object after selecting the target object;
[0044] The traversal unit is configured to traverse the directed graph according to the weights carried by the weighted directed edges to obtain a target enhancement sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge.
[0045] In a third aspect, an embodiment of the present application provides a computer device, the computer device including a processor and a memory:
[0046] The memory is used to store a computer program and transmit the computer program to the processor;
[0047] The processor is configured to execute the method described in the first aspect above according to the computer program.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the first aspect above.
[0049] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program, which, when executed on a computer device, enables the computer device to execute the method described in the first aspect above.
[0050] It can be seen from the above technical solutions that this application has at least the following beneficial effects:
[0051] A conversation is a series of interactive behaviors of a user within a preset time period. This application performs data enhancement on the sequence to be enhanced by mining the potential information in the conversation, thereby improving the accuracy of the upstream data of the recommendation task. A sequence to be enhanced is obtained, and the sequence to be enhanced includes multiple object nodes and directed edges for connecting the object nodes. The sequence to be enhanced is used to indicate the order in which the user selects objects in the conversation. According to the potential object nodes corresponding to each object node, a directed graph including multiple weighted directed edges is determined. The weighted directed edges are used to point from the object node to the potential object node corresponding to the object node. The weights carried by the weighted directed edges are used to indicate the probability that the user selects the potential object corresponding to the target object after selecting the target object. In this way, the association relationship between the object node and the potential object node corresponding to the object node in the conversation can be established through the weighted directed edges, and the sequence to be enhanced is expanded into a directed graph that better reflects the user's interactive behavior. The directed graph is traversed according to the weights carried by the weighted directed edges to obtain the target enhancement sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge. Therefore, according to the weights that can characterize the probability of the user selecting an object, the directed graph obtained by mining the potential information of the session is traversed to obtain a target enhancement sequence with higher accuracy, so that when the target enhancement sequence is used for sequence recall, the objects related to the user can be predicted more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0053] Figure 1 A flowchart of a data enhancement method provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of a process for determining weighted directed edges provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of a process for discarding weighted directed edges provided in an embodiment of the present application;
[0056] Figure 4 A schematic diagram of a process for discarding an object node provided in an embodiment of the present application;
[0057] Figure 5 A flowchart of a scenario of an application data enhancement method provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of the structure of a data enhancement device provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.
[0061] In related technologies, objects of interest to users are predicted through sequence recall. Current sequence recall models typically use existing user historical behavior sequences for prediction. This approach implies the assumption that user historical behavior sequences are "strictly ordered," meaning that each user's choice of an object is made in accordance with their subjective will without being influenced by objective factors. The order of the user historical behavior sequences generated in a session is the order of the user's subjective choices.
[0062] However, using only existing historical user behavior sequences for prediction fails to consider the underlying information within the session. For example, when a user is scrolling through a waterfall of short videos, they may be equally interested in the videos within a preset window, but are limited by the order in which they are displayed within the window and can only select the short videos that were displayed first. Existing historical user behavior sequences are unable to reflect the underlying information within the session, resulting in low accuracy.
[0063] Although there are some existing methods for data augmentation of existing user historical behavior sequences, such as self-supervised graph learning (SGL), most of them are based on random masking, cropping, and replacement of existing sequences, lack reliable evidence, and are also difficult to reflect the potential information in the conversation.
[0064] Based on this, embodiments of the present application provide a data augmentation method and related apparatus. By mining latent information in conversations, the sequence to be augmented is expanded into a directed graph that better reflects user interaction behavior. By traversing the directed graph obtained by mining latent information in the conversations, weights representing the probability of user selection of objects are used to obtain a more accurate target augmentation sequence. This allows for more accurate prediction of user-related objects when the target augmentation sequence is used for sequence recall.
[0065] The data enhancement method provided in this application can be applied to computer devices with data enhancement capabilities, such as terminal devices and servers. Specifically, the terminal device can be a desktop computer, laptop computer, mobile phone, tablet computer, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0066] See also Figure 1 , which is a flow chart of the data enhancement method provided in the embodiment of the present application. For the convenience of description, the following embodiment is introduced by taking the execution subject of the data enhancement method as the server as an example. Figure 1 As shown, the data enhancement method includes S101-S103.
[0067] S101: Acquire a sequence to be enhanced.
[0068] A session is a series of user interactions within a preset duration. Interactions are the process of users selecting objects within the preset duration. Objects are entities or content that can interact with users. For example, objects can be short videos, products, other users' homepages, etc. Corresponding interactions are clicking on products, viewing short videos, clicking on user homepages, etc. Each session generates a corresponding sequence of user historical behaviors.
[0069] In related technologies, data enhancement operations such as node dropout, edge dropout, and random walk are usually only performed on the original user historical behavior sequence. For example, SGL performs the above data enhancement operations on the existing user-item bipartite graph (including the user historical behavior sequences generated by all sessions), but fails to perform data enhancement on the user's interactive behavior in each session. The embodiment of the present application provides a data enhancement method for expanding the user historical behavior sequence based on the potential information corresponding to the interactive behavior in the session to enhance the accuracy of the user historical behavior sequence, which is described in detail below.
[0070] The sequence to be augmented is at least one historical user behavior sequence that has not yet undergone data augmentation. It indicates the order in which users select objects in a session. The sequence to be augmented includes multiple object nodes and directed edges connecting the object nodes. Object nodes are nodes that refer to objects in a graph structure. Directed edges run from the previous object node to the next object node in the order in which users select objects.
[0071] For example, in a session, a user clicked on items A, C, B, and D. A->C->B->D is a user behavior history sequence (sequence to be enhanced). A, C, B, and D are the object nodes corresponding to the four items, and arrows represent directed edges connecting adjacent object nodes.
[0072] In one possible implementation, the existing user historical behavior sequences can be preprocessed to obtain more representative sequences to be enhanced. The following uses three preprocessing methods as examples to illustrate:
[0073] (1) Filter out repeated object nodes in the user's historical behavior sequence, that is, for multiple repeated object nodes, only one object node is retained. This method is usually used in scenarios where users can view multiple selections of objects as one interactive behavior, such as browsing short videos.
[0074] (2) Filter out “unpopular” object nodes, that is, among multiple object nodes, delete the object nodes whose appearance frequency is less than the frequency threshold. The object nodes whose appearance frequency is less than the frequency threshold are used to reflect the objects with a low probability of user interest. By filtering these nodes, the data noise in the user’s historical behavior sequence can be reduced.
[0075] (3) Filter out short sequences, that is, remove user historical behavior sequences whose length is less than a preset length threshold, so that when user historical behavior sequences are used for downstream tasks such as predicting objects of interest to users, they can provide richer contextual information and improve prediction accuracy.
[0076] After data preprocessing of the existing user historical behavior sequence, the data is divided into a training set, a validation set, and a test set. The training set can be determined as the sequence to be enhanced for subsequent data enhancement steps.
[0077] All data collected by this application (such as user historical behavior sequences and sequences to be enhanced) are collected with the consent and authorization of the object to which the data belongs (such as users, institutions or enterprises), and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0078] The following describes the steps of data enhancement using a sequence to be enhanced as an example.
[0079] S102: Determine a directed graph including a plurality of weighted directed edges according to the potential object nodes corresponding to each object node.
[0080] In a session, a user selects object A and then object B. Besides the object B that the user actually selected, there may be multiple potential objects for object A. These are objects that the user hasn't actually selected as the next object, but that are likely to be of interest to the user. Potential object nodes are nodes in the graph structure that represent potential objects.
[0081] The embodiments of the present application do not specifically limit how to determine the potential object nodes corresponding to each object node. For example, in the sequence to be enhanced A->C->B->D, the user selects A in the current window of the terminal (the window currently displayed to the user) and actually selects C. D is within the preset window range based on A. Based on the current recommendation algorithm, D and A are associated. Then, a directed edge to be weighted can be added from A to D. The directed edge to be weighted is a weighted directed edge that has not yet been weighted. This process will be described in detail in A3-A4 later and will not be repeated here. Still taking the sequence to be enhanced A->C->B->D as an example, if the feature information of B is highly associated with the feature information of A, such as repeated keywords, the same labels, etc., then a directed edge to be weighted can be added from A to C.
[0082] It should be noted that the aforementioned addition of weighted directed edges is an additional operation performed on top of the existing directed edges in the sequence to be enhanced. This operation expands the selection paths in the existing sequence to be enhanced, reflecting the user's potential interaction behavior. In addition to expanding the directed edges, it is also necessary to assign weights to each directed edge. This involves assigning weights to both the existing directed edges and the newly added weighted directed edges, thus converting each directed edge into a weighted directed edge.
[0083] A weighted directed edge is used to point from an object node to the corresponding potential object node. The weight carried by the weighted directed edge indicates the probability that the user will select the corresponding potential object after selecting the target object. The target object is one of the multiple objects corresponding to the sequence to be enhanced. For example, if the user has a high probability of selecting the potential object F corresponding to target object E after selecting the target object, the weight carried by the weighted directed edge connecting nodes E and F is larger.
[0084] Thus, by expanding directed edges and performing weighting operations, a directed graph including a plurality of weighted directed edges is obtained. The directed graph is a graph obtained by expanding the sequence to be enhanced according to the potential information of the session.
[0085] S103: Traverse the directed graph according to the weights carried by the weighted directed edges to obtain a target enhanced sequence corresponding to the sequence to be enhanced.
[0086] Among them, the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge, and the target enhancement sequence is the user historical behavior sequence after data enhancement.
[0087] By traversing the directed graph, one or more enhancement sequences can be obtained. The enhancement sequences are candidate sequences for the target enhancement sequence. If an enhancement sequence is obtained, a traversal node can be determined from multiple object nodes, and then traversal can be started from this convenient node according to the weights of the weighted directed edges.
[0088] If multiple enhancement sequences are obtained, a traversal starting node set can be constructed for the n object nodes included in the directed graph, and then each traversal starting node in the traversal starting node set is traversed according to the weight of the weighted directed edge to obtain multiple enhancement sequences, and one of the multiple enhancement sequences is determined as the target enhancement sequence. As an implementation method, an enhancement sequence can be randomly selected from the multiple enhancement sequences to be determined as the target enhancement sequence to enhance robustness. As another implementation method, the enhancement sequence with the largest number of object nodes in the multiple enhancement sequences can be determined as the target enhancement sequence to improve the ability of the target enhancement data to reflect contextual information. As an implementation method, n can be the window size.
[0089] Specifically, starting from traversing the object nodes, each object node corresponds to one or more weighted directed edges pointing to one or more object nodes. The enhanced sequence can be obtained by traversing the directed graph according to the following rules:
[0090] (1) Do not traverse nodes repeatedly
[0091] (2) If there is a weighted directed edge from node x to node y, the probability of jumping from node x to node y is: ,in is the weight carried by the weighted directed edge between the x node and the y node, It is the sum of the weights carried by multiple weighted directed edges corresponding to node x.
[0092] (3) If there is no next object node to traverse, the traversal is terminated.
[0093] Therefore, by traversing the directed graph according to the weights carried by the weighted directed edges, it is possible to determine the potential information in the session corresponding to the sequence to be enhanced. This potential information includes the potential objects selected by the user and the probability of the user selecting the next object, thereby obtaining a target enhancement sequence that can more fully reflect the user's interactive behavior, thereby improving the accuracy of the user's historical behavior sequence.
[0094] By inputting the target enhancement sequence into the sequential recall model and executing the downstream tasks corresponding to the sequential recall model, the user's preferred objects can be predicted more accurately, thereby improving the user experience when recommending the user's preferred objects to the user.
[0095] It can be seen from the above technical solution that the present application performs data enhancement on the sequence to be enhanced by mining the potential information in the conversation, thereby improving the accuracy of the upstream data of the recommendation task. Obtain the sequence to be enhanced, which includes multiple object nodes and directed edges for connecting the object nodes. The sequence to be enhanced is used to indicate the order in which the user selects objects in the conversation. According to the potential object nodes corresponding to each object node, a directed graph including multiple weighted directed edges is determined. The weighted directed edges are used to point from the object node to the potential object node corresponding to the object node. The weights carried by the weighted directed edges are used to indicate the probability that the user selects the potential object corresponding to the target object after selecting the target object. In this way, the association relationship between the object node and the potential object node corresponding to the object node in the conversation can be established through the weighted directed edges, and the sequence to be enhanced is expanded into a directed graph that can better reflect the user's interactive behavior. The directed graph is traversed according to the weights carried by the weighted directed edges to obtain the target enhancement sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge. Therefore, according to the weights that can characterize the probability of the user selecting an object, the directed graph obtained by mining the potential information of the session is traversed to obtain a target enhancement sequence with higher accuracy, so that when the target enhancement sequence is used for sequence recall, the objects related to the user can be predicted more accurately.
[0096] The present embodiment does not specifically limit how to determine weighted directed edges. The following uses one method as an example for explanation, see A1-A4:
[0097] A1: Determine the directed edges to be weighted corresponding to each object node.
[0098] The weighted directed edge is used to point from the object node to the potential object node corresponding to the object node. The potential object node having an association relationship with the object node is determined, and the weighted directed edge is added from the object node to the potential object node corresponding to the object node.
[0099] A2: Obtain the corresponding relationship between the degree of association and the weight.
[0100] In this correspondence, the higher the degree of association, the greater the weight. As previously mentioned, the weight indicates the probability that a user will select the corresponding potential object after selecting the target object. In other words, the higher the degree of association between the target object (target object node) and the potential object (potential object node), the higher the probability that a user will select the corresponding potential object after selecting the target object.
[0101] A3: Obtain multiple association degrees between each potential object node and the corresponding object node. This application does not specifically limit the method of obtaining the association degree. The following two methods are used as examples for explanation:
[0102] Acquisition method 1: In the current recommendation algorithm, the object that the user is interested in will be displayed in the current window or a window close to the current window. Based on this, the object nodes within the preset window range in the sequence to be enhanced can be determined as potential object nodes.
[0103] Specifically, a preset window range is obtained, and the preset window range is used to indicate the object distribution range determined by the current recommendation algorithm, that is, the preset window range is the object distribution range recommended by the current recommendation algorithm. Taking the target object node among multiple object nodes as an example, the potential object distribution range of the target object node is determined according to the position of the target object node and the preset window range. For example, if the preset window range is 2, then the window adjacent to the current window and the current window, centered on the current window, constitute the potential object distribution range. The object nodes located in the potential object distribution range among the multiple object nodes are determined as the potential object nodes of the target object node. Then, each object node is taken as the target object node, and the above steps are executed to obtain the potential object nodes corresponding to each object node.
[0104] Therefore, by utilizing the recommended object distribution characteristics of the current recommendation algorithm, potential objects are determined according to the distance between the window where each object node is located and the current window, and the potential object nodes corresponding to each object node are determined more accurately with low technical implementation complexity.
[0105] The degree of association between a potential object node and its corresponding object node is determined by the distance between the window containing the potential object node and the window containing the corresponding object node. The smaller the distance, the higher the degree of association. For example, if the object node and its corresponding potential object node are both located in the current window, the degree of association is high. If the object node is in the current window and its corresponding potential object node is located in an adjacent window, the degree of association is lower than if they are in the same window.
[0106] Method 2: If each object node is pre-labeled with a label that reflects the object's category or characteristics, the degree of association between the object node and its corresponding potential object node can be determined based on the co-occurrence of these labels. For example, the number of labels shared by the object node and its corresponding potential object node can be counted. The greater the number of shared labels, the higher the degree of association.
[0107] A4: Determine the weights corresponding to the directed edges to be weighted according to the corresponding relationships, and obtain a directed graph including multiple weighted directed edges.
[0108] According to the correspondence between the degree of association and the weight, the multiple degrees of association between each potential object node and the corresponding object node are transformed to obtain the weight of each directed edge to be weighted connecting the potential object node and the object node, thereby achieving the weighting of each directed edge to be weighted and obtaining a directed graph including multiple weighted directed edges.
[0109] Taking the scenario of acquisition method 1 in A3 as an example, if the preset window range is 2, for node x, with node x as the center, the weight carried by the weighted directed edge between node x and node y can be determined by the following formula:
[0110]
[0111] in, is the weight of the weighted directed edge between node x and node y. k indicates that the window containing node y is within a k-fold window range centered on node x. For example, if node x and node y are in the same window, k is 1. If node y is in an adjacent window to node x, k is 2.
[0112] Therefore, by determining the weight that can reflect the user's potential selection tendency according to the degree of association between object nodes, a directed graph including multiple weighted directed edges that can reflect the user's potential selection tendency in the session is obtained, thereby improving the accuracy of the target enhancement sequence.
[0113] Furthermore, since users may not have the same preferences for objects in the same window, based on the above-mentioned determination of weights based on the window positions of object nodes, the present embodiment provides a specific implementation method for adjusting weights based on similarity, see B1-B4:
[0114] B1: Determine the basic weights corresponding to each directed edge to be weighted based on the corresponding relationship.
[0115] The basic weight is the weight that has not been adjusted yet. By executing the weight confirmation steps A1-A4, the basic weight corresponding to each directed edge to be weighted is determined.
[0116] B2: Obtain collaborative filtering model.
[0117] The collaborative filtering model is used to determine the similarity between two objects. The similarity is used to indicate the frequency of simultaneous occurrence of two objects corresponding to the directed edge to be weighted. The higher the frequency, the higher the similarity.
[0118] B3: Determine the similarity corresponding to each directed edge to be weighted based on the collaborative filtering model.
[0119] The similarity corresponding to a directed edge to be weighted is the similarity between the two object nodes corresponding to the directed edge to be weighted. Specifically, the collaborative filtering model can obtain an offline-maintained similarity matrix by counting the frequency of simultaneous occurrence of each object node pair within each object node in the sequence to be enhanced or other user historical behavior sequence, and sorting the frequencies. An object node pair consists of two object nodes, and the similarity matrix is used to characterize the similarity between different object node pairs. The higher the frequency of occurrence of an object node pair, the higher the similarity of the object node pair. Based on the similarity of the object node pair, the similarity of the directed edge to be weighted corresponding to the object node pair is determined.
[0120] By taking values of the object node pairs corresponding to the x node and the y node in the offline maintained similarity matrix, the similarity between the x node and the y node can be determined.
[0121] As an implementation method, the collaborative filtering model normalizes the similarities included in the similarity matrix to a range of 0-1.
[0122] B4: Adjust the basic weight according to the similarity corresponding to each directed edge to be weighted, and obtain the weight corresponding to each directed edge to be weighted.
[0123] The basic weight can be adjusted by the following formula:
[0124]
[0125] in, is the weight of the directed edge to be weighted corresponding to the x node and the y node, is the basic weight of the directed edge to be weighted corresponding to the x node and the y node, is the similarity between node x and node y.
[0126] Therefore, by adjusting the basic weight of the weighted directed edge based on similarity, the weight can reflect not only the association relationship between objects, but also the degree of similarity between objects. For objects with strong association and high similarity, users will have a stronger tendency to choose them. By adjusting the basic weight, potential information in the conversation can be mined from more dimensions, thereby improving the accuracy of the directed graph.
[0127] The following example illustrates the process of determining weighted directed edges. Figure 2 , Figure 2 A flowchart of determining weighted directed edges provided by an embodiment of the present application is provided. First, the window size is set to 2 according to the display situation of the actual scene. The window size is used to indicate the range of the window that can display the object. The preset window range is 2. The target object node is the center. According to the window size, it is determined that the window where each object node is located is within the k-window range centered on the target object node. Then, the formula is used. The basic weight of the directed edge to be weighted corresponding to the 1x window range is calculated as 1, and the basic weight of the directed edge to be weighted corresponding to the 2x window range is 1 / 2. Then, based on the similarity matrix Sim obtained from the collaborative filtering model of items (a kind of object), the similarity corresponding to each directed edge to be weighted is determined, and the formula is used to calculate the similarity matrix Sim. The weights are adjusted to obtain the weights corresponding to the directed edges to be weighted. Thus, the weighted directed edges are determined.
[0128] As can be seen from the above, the sequence to be enhanced is expanded through S101-S102 to obtain a directed graph. In order to make the directed graph more accurately reflect the user interaction behavior, the embodiment of the present application provides an implementation method for reprocessing the directed graph:
[0129] Based on the potential object nodes corresponding to each object node, an initial directed graph including multiple weighted directed edges is determined. Specifically, the initial directed graph is obtained through steps S102-S103. The initial directed graph is a directed graph that has not undergone a discard operation. Based on the user's object selection behavior data, a discard operation is performed on the initial directed graph to obtain a directed graph. The discard operation is used to discard object nodes or weighted directed edges included in the initial directed graph.
[0130] By analyzing the behavioral data of users' object selection, we can determine which object nodes or weighted directed edges in the initial directed graph are difficult to represent the user's preferred objects, and then discard the object nodes or weighted directed edges that are difficult to represent the user's preferred objects. This can obtain a directed graph that can more accurately reflect the user's tendency to select objects, thereby improving the accuracy of the target enhancement sequence.
[0131] The following uses two discarding methods as examples to illustrate.
[0132] For discarding method 1, refer to C1-C3:
[0133] C1: Obtain the interval time threshold and the interval time of each pair of object nodes connected by weighted directed edges.
[0134] The interval time threshold reflects the upper limit of the interval between consecutive object selections by a user in a session. This embodiment does not specifically limit the value of the interval time threshold; those skilled in the art can set it based on actual needs. An object node pair consists of two object nodes, and the interval time between the two consecutive objects selected by the user is the interval time between the two objects selected by the user.
[0135] C2: If the interval time between the object node pair exceeds the interval time threshold, a first probability of a discard operation is determined according to the timeout degree of the interval time exceeding the interval time threshold.
[0136] The higher the timeout degree, the higher the first probability. The timeout degree is the degree to which the interval time exceeds the interval time threshold, and the first probability is the probability of performing a discard operation on the weighted directed edge.
[0137] As can be seen above, weighted directed edges are used to connect object nodes to their corresponding potential object nodes. The weights carried by these weighted directed edges indicate the probability that a user will select the corresponding potential object after selecting the target object. In other words, weighted directed edges can reflect the connection between two objects selected by a user. If the interval between the object nodes connected by a weighted directed edge exceeds the interval threshold, it indicates that the interval between the user's selections of the two corresponding objects was long, and the connection is weak. The first probability of a discard operation can then be determined based on the timeout level.
[0138] For example, the first probability can be determined by the following formula:
[0139]
[0140] Where P1 is the first probability, T is the interval time between object node pairs, is the interval time threshold, Used to indicate rounding x down.
[0141] C3: performing a discard operation on the weighted directed edges connecting the object node pairs in the initial directed graph according to the first probability.
[0142] It should be noted that not only can the discard operation be performed on the weighted directed edge by executing C1-C3, but the above-mentioned steps of determining the discard probability based on the interval time corresponding to the directed edge and performing the discard operation according to the discard probability can also be performed on the original directed edge. The embodiments of the present application do not limit this.
[0143] See also Figure 3 , Figure 3 A flowchart of discarding weighted directed edges provided in an embodiment of the present application, for T greater than or equal to The object node pair is discarded and its corresponding directed edge is discarded.
[0144] Therefore, by performing a discard operation on the directed edges for connecting object node pairs with a longer interval time according to the first probability, the directed edges corresponding to object node pairs with smaller correlations can be filtered out, and directed edges that more accurately reflect the directionality of user selection can be obtained, thereby improving the accuracy of the target enhancement sequence.
[0145] For discarding method 2, see D1-D3:
[0146] D1: Obtain a probability prediction model.
[0147] Considering that users will terminate the interaction after selecting certain objects (such as vulgar short videos, etc.), the second discarding method improves the accuracy of the target enhancement sequence by discarding object nodes that may cause users to terminate the interaction.
[0148] The probability prediction model is used to predict the probability that the user will terminate the interaction after selecting an object. The probability prediction model is trained through the user's feature data and the feature data of the object node that causes the user to terminate the interaction.
[0149] D2: Based on the user's feature data and the feature data corresponding to each object node, a probability prediction model is used to perform predictions to obtain a second probability corresponding to each object node.
[0150] By combining the feature data of each object node with the user's feature data to generate multiple sample pairs, each sample pair is input into the probability prediction model to obtain a second probability for each object node. The second probability corresponding to an object node is the predicted probability that the user will terminate the interaction after selecting the object corresponding to that object node.
[0151] D3: For each object node in the initial directed graph, a discard operation is performed on the object node corresponding to the second probability according to the second probability.
[0152] Taking the initial directed graph as a linear sequence of user historical behaviors as an example, the discard operation for the i-th object node includes at least two cases:
[0153] Case 1 is skipping the i-th object node. That is, in the initial directed graph, the original direction is from the i-1th object node to the i-th node, and from the i-th object node to the i+1th object node. Skipping the i-th object node directly means going from the i-1th object node to the i+1th object node, where i is a positive integer.
[0154] Case 2 is to directly delete the i-th object node and the corresponding directed edge. This results in the first and second subsequences. The first subsequence ends at the i-1-th object node, while the second subsequence starts at the i+1-th object node.
[0155] See also Figure 4 , Figure 4 This is a flowchart for discarding an object node, provided in an embodiment of the present application. Using a termination probability estimate (a probabilistic prediction model), the second probability P of a user terminating interaction with an object is estimated, and the object node is deactivated (discarded) based on the probability P.
[0156] Therefore, the probability prediction model obtained through pre-training predicts the second probability of each object causing the user to terminate the interaction, and discards each object node according to the second probability, so that the object nodes with a higher probability of causing the user to terminate the interaction are more likely to be discarded. Such object nodes are difficult to provide information about the user's preference for selecting objects. By discarding such object nodes, the target enhancement sequence can provide more accurate information that can reflect the user's preference for selecting objects when used for sequence recall, thereby improving the accuracy of sequence recall.
[0157] It should be noted that the aforementioned discard operation performed on the initial directed graph can also be used to traverse the enhanced sequence obtained by traversing the directed graph. After performing the discard operation on the enhanced sequence, the target enhanced sequence is obtained. This embodiment of the present application does not limit this. The discard operation can be performed by performing discard method 1, performing discard method 2, performing discard method 1 and discard method 2 in sequence, or performing discard method 2 and discard method 1 in sequence. This embodiment of the present application does not limit this.
[0158] The above embodiment uses data augmentation to obtain a target augmented sequence based on the sequence to be augmented corresponding to one session. However, the user historical behavior sequence used for sequence recall usually includes target augmented sequences corresponding to multiple sessions. Based on this, the embodiment of the present application provides a method for assigning session identifiers:
[0159] If the sequence to be enhanced includes a first sequence to be enhanced and a second sequence to be enhanced, the first sequence to be enhanced is expanded to obtain a first directed graph, and the second sequence to be enhanced is expanded to obtain a second directed graph. Then, the first directed graph is traversed according to the weights carried by the weighted directed edges in the first sequence to be enhanced to obtain the first enhanced sequence. The second directed graph is traversed according to the weights carried by the weighted directed edges in the second sequence to be enhanced to obtain the second enhanced sequence. In other words, the first sequence to be enhanced and the second sequence to be enhanced from two different sessions can be data enhanced according to the above data enhancement steps to obtain the first enhanced sequence and the second enhanced sequence.
[0160] Then, a first identifier is assigned to the first enhanced sequence, and a second identifier is assigned to the second enhanced sequence, resulting in a first target enhanced sequence corresponding to the first sequence to be enhanced and a second target enhanced sequence corresponding to the second sequence to be enhanced. The first identifier and the second identifier are used to represent the order of the conversations corresponding to the first sequence to be enhanced and the second sequence to be enhanced. For example, if the conversation corresponding to the first sequence to be enhanced occurs later and the conversation corresponding to the second sequence to be enhanced occurs earlier, the first identifier is 1 and the second identifier is 2, indicating that the conversation corresponding to the first sequence to be enhanced occurs earlier than the conversation corresponding to the second sequence to be enhanced.
[0161] Therefore, by assigning identifiers to the enhancement sequences corresponding to the user's successive sessions, the data set for sequence recall composed of multiple target enhancement sequences can characterize the temporal correlation between different sessions, thereby enriching the data feature level used for sequence recall and improving the accuracy of sequence recall.
[0162] See Table 1, which is an example of a system that applies the above-mentioned data enhancement method. The system includes a data preparation module, an integrated composition module, a session enhancement module, a sequence generation module, an embedding identification module and a model training module.
[0163]
[0164] Figure 5 A flowchart of a data enhancement method scenario provided in an embodiment of the present application. Figure 5 Further explain the data enhancement process of this system.
[0165] (1) The data preparation module obtains user sequence (user historical behavior sequence) 1 and user sequence (user historical behavior sequence) 2, and performs data preprocessing to obtain the sequences to be enhanced corresponding to multiple sessions.
[0166] (2) The integrated graph composition module includes a jump operator, a deactivation operator, and a jump-out operator. The jump operator is used to establish weighted directed edges between each object node and its corresponding potential object node based on a preset window range. The weight is obtained by adjusting the basic weight, which is determined according to the window position corresponding to the object node. Then, the similarity of each object node pair is obtained based on the similarity matrix maintained by the collaborative filtering model of the item, and the basic weight is adjusted. The deactivation operator is used to discard directed edges whose time interval exceeds the time interval threshold in a longer session according to the first probability. The jump-out operator is used to predict the second probability of the user terminating consumption (an interactive behavior) after selecting each object node based on the termination consumption probability estimation model (a probability prediction model), and discard each object node according to the second probability. Thus, based on the three operators and the offline trained model, multiple directed graphs including weighted directed edges are obtained for the augmented sequence expansion.
[0167] (3) The session enhancement module traverses each directed graph to obtain multiple enhancement sequences corresponding to the session, and randomly selects one enhancement sequence as the enhancement result of the session.
[0168] (4) The sequence generation module concatenates multiple enhancement results to obtain a target enhancement sequence, which includes the enhancement results of multiple sessions.
[0169] (5) The embedding identification module assigns session identifiers according to the order of the sessions. The later enhanced sequence is assigned a session id of 1, and the earlier enhanced sequence is assigned a session id of 2. Thus, the data set after data enhancement is obtained.
[0170] (6) The model training module uses the data augmented dataset, selects the sequence recall model, and introduces session embedding in the embedding layer for modeling.
[0171] See also Figure 2 , Figure 2 A data enhancement device provided in an embodiment of the present application includes a device 600 including an acquisition unit 601, a composition unit 602, and a traversal unit 603;
[0172] The acquisition unit 601 is configured to acquire a sequence to be enhanced, the sequence to be enhanced comprising a plurality of object nodes and directed edges connecting the object nodes, the sequence to be enhanced being used to indicate the order in which the user selects objects in a session;
[0173] The graph forming unit 602 is configured to determine a directed graph including a plurality of weighted directed edges based on the potential object nodes corresponding to the respective object nodes, wherein the weighted directed edges are configured to point from the object nodes to the potential object nodes corresponding to the object nodes, and the weights carried by the weighted directed edges are configured to indicate the probability that the user will select the potential object corresponding to the target object after selecting the target object;
[0174] The traversal unit 603 is configured to traverse the directed graph according to the weights carried by the weighted directed edges to obtain a target enhanced sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge.
[0175] It can be seen from the above technical solution that a conversation is a series of interactive behaviors of users within a preset time length. This application performs data enhancement on the sequence to be enhanced by mining the potential information in the conversation, thereby improving the accuracy of the upstream data of the recommendation task. The data enhancement device provided in the embodiment of the present application includes an acquisition unit, a composition unit and a traversal unit. The sequence to be enhanced is acquired by the acquisition unit, and the sequence to be enhanced includes multiple object nodes and directed edges for connecting the object nodes. The sequence to be enhanced is used to indicate the order in which the user selects objects in the conversation. The composition unit determines a directed graph including multiple weighted directed edges based on the potential object nodes corresponding to each object node. The weighted directed edges are used to point from the object node to the potential object node corresponding to the object node. The weights carried by the weighted directed edges are used to indicate the probability of the user selecting the potential object corresponding to the target object after selecting the target object. In this way, the association relationship between the object node and the potential object node corresponding to the object node in the conversation can be established through the weighted directed edges, and the sequence to be enhanced is expanded into a directed graph that can better reflect the user's interactive behavior. The traversal unit traverses the directed graph according to the weights carried by weighted directed edges to obtain a target enhancement sequence corresponding to the sequence to be enhanced. The greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge. Thus, by traversing the directed graph obtained by mining the latent information of the conversation according to the weights that represent the probability of the user selecting an object, a more accurate target enhancement sequence is obtained. When the target enhancement sequence is used for sequence recall, it can more accurately predict the objects related to the user.
[0176] As a possible implementation manner, the composition unit is specifically configured to:
[0177] Determine a directed edge to be assigned a weight corresponding to each of the object nodes, wherein the directed edge to be assigned a weight is used to point from the object node to a potential object node corresponding to the object node;
[0178] Obtaining a correspondence between the degree of association and the weight, wherein the higher the degree of association, the greater the weight;
[0179] Acquire multiple association degrees between each of the potential object nodes and the corresponding object nodes;
[0180] The weights corresponding to the directed edges to be weighted are determined according to the corresponding relationships, and a directed graph including a plurality of the weighted directed edges is obtained.
[0181] As a possible implementation manner, the apparatus further includes a weight adjustment unit, configured to:
[0182] Determine the basic weights corresponding to the directed edges to be weighted according to the corresponding relationship;
[0183] Acquire a collaborative filtering model, wherein the collaborative filtering model is used to determine the similarity between two objects, wherein the similarity is used to indicate the frequency of simultaneous occurrence of the two objects corresponding to the directed edge to be weighted, wherein the higher the frequency, the higher the similarity;
[0184] Determine the similarities corresponding to the directed edges to be weighted according to the collaborative filtering model;
[0185] The basic weight is adjusted according to the similarities corresponding to the directed edges to be weighted, so as to obtain the weights corresponding to the directed edges to be weighted.
[0186] As a possible implementation, the degree of association between the potential object node and the corresponding object node is determined by the distance between the window where the potential object node is located and the window where the corresponding object node is located. The smaller the distance, the higher the degree of association. The potential object nodes corresponding to each of the object nodes are determined by:
[0187] Obtaining a preset window range, where the preset window range is used to indicate the object distribution range determined by the current recommendation algorithm;
[0188] For a target object node among the multiple object nodes, determining a potential object distribution range of the target object node according to a position of the target object node and a preset window range;
[0189] Determine an object node located in the potential object distribution range among the multiple object nodes as a potential object node of the target object node;
[0190] Each of the object nodes is used as the target object node, and potential object nodes corresponding to each of the object nodes are obtained.
[0191] As a possible implementation manner, the composition unit is specifically configured to:
[0192] Determining an initial directed graph including a plurality of weighted directed edges according to the potential object nodes respectively corresponding to the object nodes;
[0193] According to the behavior data of the user selecting the object, a discard operation is performed on the initial directed graph to obtain the directed graph, wherein the discard operation is used to discard the object nodes or weighted directed edges included in the initial directed graph.
[0194] As a possible implementation manner, the composition unit is specifically configured to:
[0195] Obtaining an interval time threshold and an interval time between pairs of object nodes connected by the weighted directed edges;
[0196] If the interval time between the object node pairs exceeds the interval time threshold, determining a first probability of the discard operation according to a timeout degree of the interval time exceeding the interval time threshold, wherein a higher the timeout degree, a higher the first probability;
[0197] The discard operation is performed on the weighted directed edges connecting the object node pairs in the initial directed graph according to the first probability.
[0198] As a possible implementation manner, the composition unit is specifically configured to:
[0199] Obtaining a probability prediction model, wherein the probability prediction model is used to predict the probability that the user will terminate the interaction after selecting the object;
[0200] According to the characteristic data of the user and the characteristic data corresponding to each of the object nodes, prediction is performed using the probability prediction model to obtain a second probability corresponding to each of the object nodes;
[0201] For each of the object nodes in the initial directed graph, the discard operation is performed on the object node corresponding to the second probability according to the second probability.
[0202] As a possible implementation, if the sequence to be enhanced includes a first sequence to be enhanced and a second sequence to be enhanced, the directed graph includes a first directed graph and a second directed graph, wherein the first directed graph is obtained according to the first sequence to be enhanced, and the second directed graph is obtained according to the second sequence to be enhanced, then the traversal unit is specifically configured to:
[0203] Traversing the first directed graph according to the weights carried by the weighted directed edges in the first sequence to be enhanced to obtain a first enhanced sequence;
[0204] Traversing the second directed graph according to the weights carried by the weighted directed edges in the second sequence to be enhanced to obtain a second enhanced sequence;
[0205] A first identifier is assigned to the first enhanced sequence, and a second identifier is assigned to the second enhanced sequence to obtain a first target enhanced sequence corresponding to the first sequence to be enhanced and a second target enhanced sequence corresponding to the second sequence to be enhanced, wherein the first identifier and the second identifier are used to characterize the sequence of sessions corresponding to the first sequence to be enhanced and the second sequence to be enhanced.
[0206] See also Figure 7 , an embodiment of the present application further provides a computer device, the computer device comprising a memory 701 and a processor 702:
[0207] The memory is used to store a computer program and transmit the computer program to the processor;
[0208] The processor is configured to execute the method of the above method embodiment according to the computer program.
[0209] An embodiment of the present application further provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method of the above method embodiment.
[0210] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the method of the above method embodiment.
[0211] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0212] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0213] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or plural.
[0214] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0215] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0216] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data enhancement method, characterized in that: The method comprises: Acquire a sequence to be enhanced, the sequence to be enhanced comprising a plurality of object nodes and directed edges for connecting the object nodes, the sequence to be enhanced being used to indicate the order in which the user selects objects in a session; Determining, based on the potential object nodes corresponding to each of the object nodes, a directed graph including a plurality of weighted directed edges, wherein the weighted directed edges are used to point from the object nodes to the potential object nodes corresponding to the object nodes, and the weights carried by the weighted directed edges are used to indicate the probability of the user selecting the potential object corresponding to the target object after selecting the target object, wherein the directed graph is a graph obtained by expanding the sequence to be augmented based on the potential information of the session, the potential information including the potential object selected by the user and the probability of the user selecting the next object; Traversing the directed graph according to the weights carried by the weighted directed edges to obtain a target enhancement sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the object node pointed to by the weighted directed edge; Inputting the target enhanced sequence into a sequence recall model and executing a downstream task corresponding to the sequence recall model; The step of determining a plurality of weighted directed edges based on the potential object nodes corresponding to the respective object nodes to obtain a directed graph includes: Determine a directed edge to be assigned a weight corresponding to each of the object nodes, wherein the directed edge to be assigned a weight is used to point from the object node to a potential object node corresponding to the object node; Obtaining a correspondence between the degree of association and the weight, wherein the higher the degree of association, the greater the weight; Acquire multiple association degrees between each of the potential object nodes and the corresponding object nodes, where the association degree between the potential object node and the corresponding object node is determined by the distance between the window where the potential object node is located and the window where the corresponding object node is located, and the smaller the distance, the higher the association degree; The weights corresponding to the directed edges to be weighted are determined according to the corresponding relationships, and a directed graph including a plurality of the weighted directed edges is obtained.
2. The method according to claim 1, characterized in that The method further comprises: Determine the basic weights corresponding to the directed edges to be weighted according to the corresponding relationship; Acquire a collaborative filtering model, wherein the collaborative filtering model is used to determine the similarity between two objects, wherein the similarity is used to indicate the frequency of simultaneous occurrence of the two objects corresponding to the directed edge to be weighted, wherein the higher the frequency, the higher the similarity; Determine the similarities corresponding to the directed edges to be weighted according to the collaborative filtering model; The basic weight is adjusted according to the similarities corresponding to the directed edges to be weighted, so as to obtain the weights corresponding to the directed edges to be weighted.
3. The method according to claim 1, characterized in that The potential object nodes corresponding to each of the object nodes are determined in the following manner: Obtaining a preset window range, where the preset window range is used to indicate the object distribution range determined by the current recommendation algorithm; For a target object node among the multiple object nodes, determining a potential object distribution range of the target object node according to a position of the target object node and a preset window range; Determine an object node located in the potential object distribution range among the multiple object nodes as a potential object node of the target object node; Each of the object nodes is used as the target object node, and potential object nodes corresponding to each of the object nodes are obtained.
4. The method according to claim 1, wherein The determining of a directed graph including a plurality of weighted directed edges according to the potential object nodes corresponding to the respective object nodes comprises: Determining an initial directed graph including a plurality of weighted directed edges according to the potential object nodes respectively corresponding to the object nodes; According to the behavior data of the user selecting the object, a discard operation is performed on the initial directed graph to obtain the directed graph, wherein the discard operation is used to discard the object nodes or weighted directed edges included in the initial directed graph.
5. The method according to claim 4, characterized in that The step of performing a discard operation on the initial directed graph according to the behavior data of the user selecting the object to obtain the directed graph includes: Obtaining an interval time threshold and an interval time of each pair of object nodes connected by the weighted directed edge; If the interval time between the object node pairs exceeds the interval time threshold, determining a first probability of the discard operation according to a timeout degree of the interval time exceeding the interval time threshold, wherein a higher the timeout degree, a higher the first probability; The discard operation is performed on the weighted directed edges connecting the object node pairs in the initial directed graph according to the first probability.
6. The method according to claim 4, characterized in that The step of performing a discard operation on the initial directed graph according to the behavior data of the user selecting the object to obtain the directed graph includes: Obtaining a probability prediction model, wherein the probability prediction model is used to predict the probability that the user will terminate the interaction after selecting the object; According to the characteristic data of the user and the characteristic data corresponding to each of the object nodes, prediction is performed using the probability prediction model to obtain a second probability corresponding to each of the object nodes; For each of the object nodes in the initial directed graph, the discard operation is performed on the object node corresponding to the second probability according to the second probability.
7. The method according to claim 1, characterized in that If the sequence to be enhanced includes a first sequence to be enhanced and a second sequence to be enhanced, and the directed graph includes a first directed graph and a second directed graph, wherein the first directed graph is obtained according to the first sequence to be enhanced, and the second directed graph is obtained according to the second sequence to be enhanced, then traversing the directed graph according to the weights carried by the weighted directed edges to obtain a target enhanced sequence corresponding to the sequence to be enhanced includes: Traversing the first directed graph according to the weights carried by the weighted directed edges in the first sequence to be enhanced to obtain a first enhanced sequence; Traversing the second directed graph according to the weights carried by the weighted directed edges in the second sequence to be enhanced to obtain a second enhanced sequence; A first identifier is assigned to the first enhanced sequence, and a second identifier is assigned to the second enhanced sequence to obtain a first target enhanced sequence corresponding to the first sequence to be enhanced and a second target enhanced sequence corresponding to the second sequence to be enhanced, wherein the first identifier and the second identifier are used to characterize the sequence of sessions corresponding to the first sequence to be enhanced and the second sequence to be enhanced.
8. A data enhancement device, characterized in that: The device comprises: an acquisition unit, a composition unit and a traversal unit; The acquisition unit is configured to acquire a sequence to be enhanced, the sequence to be enhanced comprising a plurality of object nodes and directed edges connecting the object nodes, the sequence to be enhanced being used to indicate the order in which the user selects objects in a session; The graph forming unit is configured to determine, based on the potential object nodes corresponding to the respective object nodes, a directed graph including a plurality of weighted directed edges, wherein the weighted directed edges are configured to point from the object nodes to the potential object nodes corresponding to the object nodes, and the weights carried by the weighted directed edges are configured to indicate the probability that the user will select the potential object corresponding to the target object after selecting the target object; The composition unit is specifically used for: Determine a directed edge to be assigned a weight corresponding to each of the object nodes, wherein the directed edge to be assigned a weight is used to point from the object node to a potential object node corresponding to the object node; Obtaining a correspondence between the degree of association and the weight, wherein the higher the degree of association, the greater the weight; Acquire multiple association degrees between each of the potential object nodes and the corresponding object nodes, where the association degree between the potential object node and the corresponding object node is determined by the distance between the window where the potential object node is located and the window where the corresponding object node is located, and the smaller the distance, the higher the association degree; Determining the weights corresponding to the directed edges to be weighted according to the corresponding relationships, and obtaining a directed graph including a plurality of the weighted directed edges; The traversal unit is configured to traverse the directed graph according to the weights carried by the weighted directed edges to obtain a target enhanced sequence corresponding to the sequence to be enhanced, wherein the greater the weight carried by the weighted directed edge, the higher the probability of traversing to the target node pointed to by the weighted directed edge; The target enhanced sequence is input into the sequence recall model, and the downstream task corresponding to the sequence recall model is performed.
9. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 7 according to the computer program.
Citation Information
Patent Citations
Network graph page rendering method, apparatus and device
CN107038176A
Session recommendation method, device and equipment
CN112148975A
Recommendation method and device, storage medium and electronic equipment
CN116992115A