Sequence recommendation method and system combined with sequence correction

By employing a self-supervised learning-based sequence correction method, erroneously clicked items are removed and missing items are inserted, thus resolving the noise and missing item issues in user interaction sequences and improving the accuracy of sequence recommendations and platform revenue.

CN115619504BActive Publication Date: 2026-06-09SHANDONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2022-10-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing sequence recommendation methods fail to effectively handle accidental clicks and missing items in user interaction sequences, resulting in inaccurate recommendation results.

Method used

A self-supervised learning approach is adopted to train the corrector through deletion correction and insertion correction tasks, correcting user interaction sequences, including deleting misclicked items and inserting missing items, and using an encoder and a recommender for sequence correction and recommendation.

Benefits of technology

It improves the accuracy of sequence recommendation, increases user satisfaction and platform revenue, and reduces manual annotation work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115619504B_ABST
    Figure CN115619504B_ABST
Patent Text Reader

Abstract

The application provides a sequence recommendation method and system combined with sequence correction, relates to the technical field of sequence recommendation, and specifically comprises the following steps: using an encoder to perform one-hot encoding and position embedding on a given user interaction sequence to obtain an encoded matrix; using a trained corrector to predict the correction operation of each item in the encoded matrix, and correcting according to the correction operation to obtain a corrected sequence; based on the corrected sequence, using a trained recommender to predict the items to be recommended in the future; the application firstly uses the corrector to correct the user interaction sequence by deleting and inserting, so that the interaction sequence is improved; then the corrected sequence is used as the input of the recommender to predict the future interaction; in order to train the corrector, two self-supervised tasks, deletion correction and insertion correction, are proposed; firstly, items are randomly inserted into or deleted from the given interaction sequence, and then the corrector is required to restore the modified sequence, so that a large amount of manual labeling work is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sequence recommendation technology, and particularly relates to a sequence recommendation method and system that combines sequence correction. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Sequence recommendation is a system model that uses users' historical interaction behavior over a period of time to mine long-term or short-term preferences, thereby predicting and recommending items that users may be interested in at future moments. Since user interests change dynamically over time, and user interactions at different times are often highly correlated, sequence recommendation systems, which focus on modeling changes in user interests and the temporal relationships between items, have received significant attention in both academia and industry. Sequence recommendation systems are widely used in various online retail and service platforms such as Taobao, JD.com, Bilibili, NetEase Cloud Music, Meituan, Toutiao, and Douyin, not only helping users quickly find items they are interested in, but also greatly increasing the revenue of these platforms, making it one of the powerful engines driving the development of the Internet today.

[0004] Most current sequence recommendation methods assume that the given user interaction sequence is flawless and can accurately reflect changes in user interests and the migration relationship between items. However, in reality, on the one hand, users often "accidentally click" on items during their interactions, which may cause the user interaction sequence to be mixed with some noisy items that are irrelevant to the user's preferences. On the other hand, users can only interact with items that are exposed to them by the platform in real time. Users cannot interact with items that are not exposed, which may cause the user interaction sequence to be missing some unexposed items that are relevant to the user's preferences.

[0005] Due to the existence of two defects—accidental clicks and missing items—some user interaction sequences cannot accurately reflect changes in user preferences, which may lead to incorrect recommendation results. Most sequence recommendation methods ignore these defective examples. A few sequence recommendation methods consider the problem of noisy interactions, which can ensure that the model still performs relatively robustly on noisy sequences. However, existing sequence recommendation methods cannot directly modify the given sequence and do not consider the problem of missing items, resulting in poor sequence recommendation performance. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, this invention provides a sequence recommendation method and system that combines sequence correction. First, a corrector corrects the input user interaction sequence, including deleting items that may be accidentally clicked and inserting items that may be missing due to lack of exposure, thereby improving the given user interaction sequence. Then, the corrected sequence is used as input to a recommender to predict future interactions. To train the corrector, two self-supervised tasks are proposed, including deletion correction and insertion correction. First, items are randomly inserted or deleted into the given interaction sequence, and then the corrector is required to restore the modified sequence, thereby avoiding a large amount of manual annotation work.

[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0008] The first aspect of this invention provides a sequence recommendation method incorporating sequence correction;

[0009] A sequence recommendation method incorporating sequence correction includes:

[0010] The encoder is used to perform one-hot encoding and position embedding on a given user interaction sequence to obtain the encoded matrix.

[0011] Using the trained corrector, the correction operation for each item in the encoded matrix is ​​predicted, and the correction is performed according to the correction operation to obtain the corrected sequence;

[0012] Based on the corrected sequence, a trained recommender is used to predict the items to be recommended in the future.

[0013] Furthermore, the correction operation for each item in the predicted and encoded matrix is ​​to input the corrector to calculate the probability distribution of each correction operation, and take the correction operation with the highest probability as the final correction operation.

[0014] Furthermore, the correction operation includes retention operation, insertion operation, and deletion operation;

[0015] The delete operation is used to prevent accidental clicking on items;

[0016] The insertion operation is used for missing items.

[0017] Furthermore, the insertion operation generates an insertion sequence using a trained reverse generator. Based on the calculated probability distribution of the inserted items, the item with the highest probability is inserted. The reverse generator stops generating when a terminator is generated or the specified maximum insertion sequence length is reached.

[0018] Furthermore, the corrector is trained using unlabeled data through two self-supervised tasks: a deletion correction task and an insertion correction task.

[0019] Furthermore, the unlabeled data training corrector specifically comprises:

[0020] (1) For each item in the original sequence, retain, insert, or delete it with a certain probability to obtain a random modification sequence and the corresponding correction operation sequence and insertion sequence, and construct the training data for the corrector;

[0021] (2) Input the encoded random modification sequence into the corrector to predict the correction operation sequence to be performed and the sequence to be inserted, so that the corrector can restore the original sequence.

[0022] A second aspect of the present invention provides a sequence recommendation system that incorporates sequence correction.

[0023] A sequence recommendation system incorporating sequence correction includes a sequence encoding module, a sequence correction module, and a sequence recommendation module.

[0024] The sequence encoding module is configured to use an encoder to perform one-hot encoding and position embedding on a given user interaction sequence to obtain an encoded matrix.

[0025] The sequence correction module is configured to: use a trained corrector to predict the correction operation for each item in the encoded matrix, and perform correction based on the correction operation to obtain the corrected sequence;

[0026] The sequence recommendation module is configured to predict items to be recommended in the future based on the corrected sequence and a trained recommender.

[0027] A third aspect of the invention provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of a sequence recommendation method incorporating sequence correction as described in the second aspect of the invention.

[0028] A fourth aspect of the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of a sequence recommendation method incorporating sequence correction as described in a second aspect of the present invention.

[0029] The above one or more technical solutions have the following beneficial effects:

[0030] This invention considers the two common scenarios in real-world user interaction sequences: accidental clicks and missing items. It designs a sequence recommendation method incorporating sequence correction. Compared to existing sequence recommendation methods, STEAM includes a corrector that can adjust the input user interaction sequence, including deleting potentially accidental clicks and inserting potentially missing items. This allows the interaction sequence to more accurately reflect user preferences and item transfer relationships, further improving the accuracy of sequence recommendation. To avoid additional manual annotation work, this invention also provides two self-supervised tasks: a deletion correction task and an insertion correction task, to fully utilize unlabeled data to train the corrector. This helps improve user satisfaction with sequence recommendation systems on various online retail and service platforms, and also increases the revenue of these platforms.

[0031] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0032] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0033] Figure 1 This is a system structure diagram of the first embodiment.

[0034] Figure 2 This is a schematic diagram of the training of the corrector in the first embodiment.

[0035] Figure 3 This is a schematic diagram illustrating the training of the recommender in the first embodiment.

[0036] Figure 4 This is a flowchart of the method in the second embodiment. Detailed Implementation

[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0038] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the invention; unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0039] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention; as used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise; furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0040] This invention proposes a sequence recommendation method that combines sequence correction, called Self-Correcting Sequential Recommender (hereinafter referred to as STEAM). First, a corrector is used to correct a given user interaction sequence, and then a recommender is used to predict the next interactive item. Two self-supervised tasks, namely deletion correction and insertion correction, are used to train the corrector.

[0041] First, a sequence corrector was designed, which can perform two modification operations on the input interaction sequence: deletion and insertion. For items that are accidentally clicked, the corrector can delete them; for missing items, the corrector can insert them, so that the corrected interaction sequence can be better used for prediction.

[0042] Then, to train the corrector, sufficient labeled data is needed to label misclicked items and missing items in the sequence. However, such data is difficult to obtain and requires a lot of additional human effort. Self-supervised learning is a learning method that mines supervision information from large-scale unlabeled data by designing appropriate auxiliary tasks to train the model. Since self-supervised learning does not rely on manual annotation and can automatically mine supervision signals from unlabeled data, it has become a very popular research field in recent years. This invention applies the idea of ​​self-supervised learning and proposes two self-supervised tasks: deletion correction and insertion correction. These tasks randomly insert or delete items into a given original sequence and require the corrector to restore the randomly modified sequence to train the corrector.

[0043] STEAM involves encoders, correctors, and recommenders:

[0044] An encoder is used to encode an input sequence, and its output is used as input to a corrector or recommender.

[0045] The corrector determines an operation for each item in the sequence, including retain, delete, and insert. In particular, for the insertion operation, the corrector also generates an insertion sequence through the reverse generator, which will be inserted before the target item.

[0046] The recommender is used to predict which items a user will interact with at each moment.

[0047] Example 1

[0048] This embodiment discloses a sequence recommendation method that combines sequence correction, such as... Figure 1 As shown, it includes:

[0049] Step S1: Use an encoder to perform one-hot encoding and position embedding on the given user interaction sequence to obtain the encoded matrix;

[0050] For a given original sequence, the encoder encodes it to obtain an encoded representation, i.e., the encoded matrix. The encoder is used to encode a given user interaction sequence, and the user interaction sequence input to the encoder is denoted as S = [i1,…,i...]. |S| ], where i t Let I be the item that the user interacts with at time t in the sequence, I be the set of items, |I| represent the number of items, and |S| represent the length of a sequence. The subsequences of S[i]... j ,…,i k ] is denoted as S j:k The specific encoding steps are as follows:

[0051] (1) For each item i in the input sequence S t Convert it into the corresponding item vector, as shown in formula (1):

[0052] e t =Ei t (1)

[0053] Where, E∈R e×|I| It is an item vector matrix, i t ∈R |I| It is the one-hot encoded vector corresponding to the item, e t ∈R e It's i t The corresponding item vector, where e is the size of the item vector.

[0054] (2) Give each e t Add the position vector at the corresponding position, as shown in formula (2):

[0055]

[0056] Where, p t ∈R e It is the position vector of the t-th position. is i t The initial encoding represents all positions in S. They will be stacked in order to form an encoding representation matrix, denoted as .

[0057] (3) Use an L e A bidirectional Transformer network with multiple layers (denoted as Trm)bi To update The association information between items before and after the embedded sequence is shown in formula (3):

[0058]

[0059] in, It is the encoding representation matrix of the l-th layer, and the final output is the L-th layer. e Layer It will serve as input to the corrector or recommender; for convenience, the superscript is ignored and represented by H. e This is used to represent the encoded matrix.

[0060] Step S2: Using the trained corrector, predict the correction operation for each item in the encoded matrix, and perform correction according to the correction operation to obtain the corrected sequence.

[0061] The encoded matrix is ​​input into the corrector to calculate the probability distribution of the correction operation. The correction operation with the highest probability is executed. If the operation to be performed is an insertion operation, the corrector needs to use the reverse generator to further generate the insertion sequence. Based on the calculated probability distribution of the inserted items, the item with the highest probability is the item to be inserted. The reverse generator will stop generating until the terminator [eos] is generated or the specified maximum insertion sequence length is reached. Finally, a mask symbol [mask] is added to the end of the corrected sequence, and the encoder is used to encode the corrected sequence. The specific operation is as follows:

[0062] Based on the input encoded matrix H e For each position of a given user interaction sequence S, item i t Calculate the probability distribution of the correction operation it is to perform, as shown in formula (4):

[0063]

[0064] in, Indicate i t The probability distribution of the correction operation to be performed. This indicates the correction operation for the prediction. W∈R 3×e It is a mapping matrix, h t ∈R e From the encoded matrix H e The i-th item retrieved from the index t The encoding representation.

[0065] If the predicted correction operation It's insertion, meaning it's going to insert into i. t When inserting some items, the corrector needs to generate the insertion sequence using a generator, denoted as:

[0066]

[0067] Here, [eos] is a special symbol indicating termination, because It is inserted in reverse order into i t The preceding, that is, inserting into i t The order of the preceding and following items is: Therefore, this generator is called a reverse generator.

[0068] Assume the inverse generator has already generated the following insertion sequence: First, the insertion sequence is determined using formula (1). Each item in the vector is converted into a corresponding item vector, resulting in [e1,…,e n-1 ]; then i t The encoding of h t and All item vectors are stacked together, plus the position vectors of the corresponding positions, as shown in formula (5):

[0069]

[0070] in, It is the initial hidden state matrix of the inverse generator.

[0071] Then the reverse generator passes through an L c One-way Transformer network of layers (denoted as Trm) uni To update As shown in formula (6):

[0072]

[0073] in, This refers to the hidden state matrix of the l-th layer; for convenience, the L-th layer... c Layer Abbreviated as H c .

[0074] Finally, H c The vector h at the last position (i.e., the last row) n ∈R e The items removed are used to calculate the probability distribution of the next item to be inserted, as shown in formula (7):

[0075]

[0076] in, This is the probability distribution of the next item to be inserted, i n This represents the ideal insertion item. Represents the predicted item to be inserted, and E is the item vector matrix used by the encoder; specifically, when generating the first item to be inserted, the corresponding... Therefore, there is The corrected sequence is then input into the encoder for encoding until a terminator is generated or the specified maximum insertion sequence length is reached, resulting in the encoded matrix H. e .

[0077] The corrector is trained using unlabeled data through two self-supervised tasks: a deletion correction task and an insertion correction task. Figure 2 As shown, specifically:

[0078] (1) For each item in the original sequence, retain, insert, or delete it with a certain probability to obtain a random modification sequence and the corresponding correction operation sequence and insertion sequence, and construct the training data for the corrector;

[0079] Let S be an original training sequence. r Iterate through each item in it, using p k The probability of retaining it is p. i The probability of inserting an item in front of it or with p i The probability continues to insert items until a maximum number of insertions is reached or the insertion operation exits, with p. d The probability of deleting it is equal to the probability of obtaining a random modification sequence, denoted as S. m Specifically, the last item in the original sequence can only be retained or inserted, not deleted. Based on the actual modification process, a corrective operation sequence can be obtained. Among them o t ∈{Keep, Delete, Insert} records how to handle S m Perform operations on each item in the S to restore it to its original state. r And we can obtain a set of items for which insertion operations need to be performed, denoted as I. ins Let S be the insertion sequence of a certain item i. <i .

[0080] (2) Input the encoded random modification sequence into the corrector to predict the correction operation sequence to be performed and the sequence to be inserted, so that the corrector can restore the original sequence.

[0081] With random modification sequence S m As input to the encoder, S is obtained. m The encoded representation is input into the corrector to predict the correction operation to be performed and the sequence to be inserted, requiring the corrector to reconstruct S. rThis is the deletion correction task (i.e., deleting randomly inserted items) and the insertion correction task (i.e., inserting randomly deleted items), which specifically involves minimizing the following negative log-likelihood function, as shown in formula (8):

[0082]

[0083] Where L1 represents the loss function of the corrector.

[0084] Step S3: Based on the corrected sequence, use the trained recommender to predict the items to be recommended in the future.

[0085] The recommender predicts the items corresponding to the added [mask], thereby predicting the items to be recommended in the future; based on the calculated probability distribution of interactive items, the item with the highest probability or the k items are the items to be recommended in the end.

[0086] H based on the coded representation of the corrected sequence e Predict the items that the user will interact with at each moment, specifically:

[0087] remember As input to the recommender, use an L r To update the bidirectional Transformer network of the layers As shown in formula (9):

[0088]

[0089] in, That is, the hidden state matrix of the l-th layer; similarly, I will use the hidden state matrix of the last layer. Abbreviated as H r .

[0090] Use H r The vector h at each position t ∈R e To calculate the probability distribution of user-interacted items at the corresponding time, as shown in formula (10):

[0091]

[0092] in, Let i be the probability distribution of user-interacted items at time t. t Represents the actual interactive items. Represents the predicted interactive items, and E is the item vector matrix used by the encoder.

[0093] Recommender training, such as Figure 3 As shown, the original sequence is first corrected using a corrector to obtain the corrected sequence, denoted as S. c Then it will be pm The probability of randomly hiding S r and S c Some items in the game, specifically those whose IDs have been replaced with the masking symbol [mask], are denoted as follows: and The collection of concealed items is and and It will be used as input to the encoder to obtain an encoded representation, used and Construct a training set to train the recommender, enabling it to learn from the encoded representation. and Predict the hidden items and This is the task of predicting the hidden item (i.e., the item corresponding to [mask]), which specifically involves minimizing the following negative log-likelihood function, as shown in Equation (11):

[0094]

[0095] Here, L2 represents the loss of the recommender.

[0096] The loss function for the entire STEAM is shown in equation (12):

[0097] L = L1 + L2 (12)

[0098] STEAM trains the learnable parameters in the model by minimizing the loss L using the standard backpropagation algorithm. These learnable parameters include the item vector matrix E and the vectors of all locations p. t The mapping matrix W and the parameters in the Transformer network are initially randomly initialized; other hyperparameters include the size e of the item vector and the number of layers L in the Transformer network. e L c and L r retention probability p k Insertion probability p i Deletion probability p d And the concealment probability p m Hyperparameters such as these need to be manually tuned based on different datasets.

[0099] Example 2

[0100] This embodiment discloses a sequence recommendation system that incorporates sequence correction;

[0101] like Figure 4As shown, a sequence recommendation system incorporating sequence correction includes a sequence encoding module, a sequence correction module, and a sequence recommendation module:

[0102] The sequence encoding module is configured to use an encoder to perform one-hot encoding and position embedding on a given user interaction sequence to obtain an encoded matrix.

[0103] The sequence correction module is configured to: use a trained corrector to predict the correction operation for each item in the encoded matrix, and perform correction based on the correction operation to obtain the corrected sequence;

[0104] The sequence recommendation module is configured to predict items to be recommended in the future based on the corrected sequence and a trained recommender.

[0105] Example 3

[0106] The purpose of this embodiment is to provide a computer-readable storage medium.

[0107] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of a sequence recommendation method incorporating sequence correction as described in Embodiment 2 of this disclosure.

[0108] Example 4

[0109] The purpose of this embodiment is to provide an electronic device.

[0110] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a sequence recommendation method incorporating sequence correction as described in Embodiment 2 of this disclosure.

[0111] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A sequence recommendation method incorporating sequence correction, characterized in that, The encoder is used to perform one-hot encoding and position embedding on a given user interaction sequence to obtain the encoded matrix. Using the trained corrector, the correction operation for each item in the encoded matrix is ​​predicted, and the correction is performed according to the correction operation to obtain the corrected sequence; Based on the corrected sequence, a trained recommender is used to predict the items to be recommended in the future; The correction operations include retention, insertion, and deletion operations; The delete operation is used to prevent accidental clicking on items; The insertion operation is used for missing items; The corrector is trained using unlabeled data, specifically: (1) For each item in the original sequence, retain, insert, or delete it with a certain probability to obtain a random modification sequence and the corresponding correction operation sequence and insertion sequence, and construct the training data for the corrector; (2) Input the encoded random modification sequence into the corrector to predict the correction operation sequence to be performed and the sequence to be inserted, so that the corrector can restore the original sequence.

2. The sequence recommendation method combined with sequence correction as described in claim 1, characterized in that, The correction operation for each item in the predicted and encoded matrix is ​​calculated by inputting it into the corrector to calculate the probability distribution of each correction operation, and then taking the correction operation with the highest probability as the final correction operation.

3. The sequence recommendation method combined with sequence correction as described in claim 1, characterized in that, The insertion operation generates an insertion sequence using a trained reverse generator. Based on the calculated probability distribution of the inserted items, the item with the highest probability is selected for insertion. The reverse generator stops generating when a terminator is generated or the specified maximum insertion sequence length is reached.

4. The sequence recommendation method combined with sequence correction as described in claim 1, characterized in that, The corrector is trained using unlabeled data through two self-supervised tasks: deletion correction task and insertion correction task.

5. The sequence recommendation method combined with sequence correction as described in claim 1, characterized in that, The prediction of items to be recommended in the future is based on the calculated probability distribution of items, and the one or more items with the highest probability are the items to be recommended in the end.

6. A sequence recommendation system incorporating sequence correction, characterized in that, The sequence recommendation method combined with sequence correction as described in any one of claims 1-5 includes a sequence encoding module, a sequence correction module, and a sequence recommendation module. The sequence encoding module is configured to use an encoder to perform one-hot encoding and position embedding on a given user interaction sequence to obtain an encoded matrix. The sequence correction module is configured to: use a trained corrector to predict the correction operation for each item in the encoded matrix, and perform correction based on the correction operation to obtain the corrected sequence; The sequence recommendation module is configured to predict items to be recommended in the future based on the corrected sequence and a trained recommender.

7. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by a processor, the program implements the steps of a sequence recommendation method incorporating sequence correction as described in any one of claims 1-5.

8. An electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the sequence recommendation method combined with sequence correction as described in any one of claims 1-5.