Item data processing method, device, computer equipment and storage medium
By acquiring and processing the interactive item sequence of the target item and the target object, determining the associated item sequence and inputting it into the target sequence model, the problem of poor item recommendation effect in the existing technology is solved, and more accurate and efficient item recommendation is achieved.
Patent Information
- Application Number
- CN202410591829.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-14
AI Technical Summary
It is difficult for the existing technology to accurately obtain the correlation between the target item and the interactive item sequence, resulting in poor item recommendation results.
By obtaining the interactive item sequence of the target item and the target object, determine the associated item sequence of the target item, obtain the joint item sequence based on the associated item sequence and the target item, and input the target sequence model to extract the item sequence features to reflect the relationship between the target item and the target object. degree of matching.
It improves the accuracy and effectiveness of item recommendation, reduces computational complexity, and extracts accurate embedding representations that reflect the target object's behavior pattern on the target item.
Smart Images

Figure CN118172146B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an item data processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] The emergence and popularization of the Internet has brought users a huge amount of information, satisfying their information needs in the information age. However, with the substantial increase in the amount of information, it is difficult for users to quickly obtain the content they want or are interested in from the massive amount of information. At this time, the recommendation function came into being.
[0003] For item recommendations, the target item and the target object's interactive item sequence are usually extracted respectively, and the two embedded representations are compared to determine whether to recommend the target item to the target object. However, the current embedding representation method is difficult to obtain the correlation between the target item and the interactive item sequence, and the accuracy is low, which will also affect the subsequent item recommendation effect. Summary of the invention
[0004] Based on this, it is necessary to provide an object data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of embedded representation in response to the above-mentioned technical problems.
[0005] The present application provides an item data processing method, comprising:
[0006] Obtain the target item and the interaction item sequence of the target object;
[0007] Determine a sequence of associated items of the target object from a sequence of interactive items of the target object;
[0008] Based on the associated item sequence and the target item, a joint item sequence is obtained, and the joint item sequence is input into a target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of a training object;
[0009] Through the target sequence model, in the preset item feature set, the preset item features corresponding to each item in the joint item sequence are queried, and feature interaction is performed on each queried preset item feature to output the item sequence features of the joint item sequence; the item sequence features are used to determine the matching degree between the target item and the target object.
[0010] The present application also provides an item data processing device, comprising:
[0011] A data acquisition module, used to acquire a target item and an interactive item sequence of a target object;
[0012] An associated item determination module, used to determine an associated item sequence of the target item from the interactive item sequence of the target object;
[0013] An item association module, used to obtain a joint item sequence based on the associated item sequence and the target item, and input the joint item sequence into a target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of a training object;
[0014] A sequence feature extraction module is used to query the preset item features corresponding to each item in the joint item sequence in the preset item feature set through the target sequence model, perform feature interaction on each of the queried preset item features, and output the item sequence features of the joint item sequence; the item sequence features are used to determine the matching degree between the target item and the target object.
[0015] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps described in the above-mentioned method for processing item data when executing the computer program.
[0016] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for processing item data are implemented.
[0017] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned article data processing method when executed by a processor.
[0018] The above-mentioned method, device, computer equipment, storage medium and computer program product for processing item data obtain the interactive item sequence of the target item and the target object; determine the associated item sequence of the target item from the interactive item sequence of the target object; obtain the joint item sequence based on the associated item sequence and the target item, and input the joint item sequence into the target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of the training object; through the target sequence model, the preset item features corresponding to each item in the joint item sequence are queried in the preset item feature set, and the features of each preset item feature queried are performed to output the item sequence features of the joint item sequence; the item sequence features are used to determine the matching degree between the target item and the target object. In this way, the interactive item sequence of the target object is screened for items to obtain the associated item sequence of the target item, which can avoid directly embedding the representation modeling of a longer sequence, effectively reduce the computational complexity, and improve the data processing efficiency. The target sequence model is obtained by training based on the interactive item sequence of the training object, and can accurately extract the embedding representation of the item sequence. Therefore, the joint item sequence obtained based on the associated item sequence and the target item is input into the target sequence model for embedding representation modeling, and accurate embedding representation can be extracted. The target sequence model uses the initial item features queried for the target item and the associated item sequence to perform joint embedding representation modeling for the target item and the associated item sequence. The item sequence features obtained through the embedding representation modeling can accurately reflect the behavior embedding representation of the target object on the target item. Subsequently, the matching degree between the target item and the target object can be determined based on the item sequence features, and items can be recommended to the target object based on the matching degree, which can effectively improve the accuracy and effectiveness of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A diagram showing an application environment of an item data processing method in an embodiment;
[0021] Figure 2 is a flow chart of an item data processing method in one embodiment;
[0022] Figure 3 A schematic diagram of a process for training a dimensionality reduction model in one embodiment;
[0023] Figure 4A schematic diagram of the structure of a dimensionality reduction model in one embodiment;
[0024] Figure 5 A schematic diagram of the structure of a dimensionality reduction model in another embodiment;
[0025] Figure 6 A schematic diagram of the structure of a large language model in one embodiment;
[0026] Figure 7 A schematic diagram of a process of training a sequence model in one embodiment;
[0027] Figure 8 A schematic diagram of the structure of a sequence model in one embodiment;
[0028] Fig. 9 is a schematic diagram of the structure of a sequence model in another embodiment;
[0029] Fig.10 is a schematic diagram of the structure of a sequence model in another embodiment;
[0030] Fig.11 A schematic diagram of a flow chart of an item recommendation method in one embodiment;
[0031] Fig.12 is a structural block diagram of an item data processing device in one embodiment;
[0032] Fig.13 is an internal structure diagram of a computer device in one embodiment;
[0033] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0035] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics and other technologies. Among them, the pre-trained model is also called a large model or a basic model. After fine-tuning, it can be widely used in downstream tasks in various major directions of artificial intelligence. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0036] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between people and computers using natural language. Natural language processing involves natural language, which is the language people use in daily life, and is closely related to linguistics research; it also involves computer science and mathematics. The pre-training model, an important technology for model training in the field of artificial intelligence, is developed from the large language model (Large Language Model) in the field of NLP. After fine-tuning, the large language model can be widely used in downstream tasks. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.
[0037] Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching. The pre-trained model is the latest development of deep learning, which integrates the above technologies.
[0038] The solution provided in the embodiments of the present application involves artificial intelligence machine learning, natural language processing and other technologies, which are specifically described by the following embodiments:
[0039] The object data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, can be integrated on the server 104, or can be placed on the cloud or other devices. The user can browse information on the terminal 102, and the server 104 can provide the terminal 102 with information to be displayed. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers or a cloud server.
[0040] The terminal and the server can be used alone to execute the method for processing item data provided in the embodiment of the present application. The terminal and the server can also be used together to execute the method for processing item data provided in the embodiment of the present application.
[0041] For example, the server obtains the interactive item sequence of the target item and the target object, determines the associated item sequence of the target item from the interactive item sequence of the target object, and obtains the joint item sequence based on the associated item sequence and the target item. The server inputs the joint item sequence into the target sequence model, queries the preset item features corresponding to each item in the joint item sequence in the preset item feature set through the target sequence model, performs feature interaction on each preset item feature queried, and outputs the item sequence features of the joint item sequence. Among them, the target sequence model includes the preset item feature set, and the target sequence model is trained based on the interactive item sequence of the training object. The item sequence features are used to determine the matching degree between the target item and the target object.
[0042] In some embodiments, Figure 2 As shown, a method for processing item data is provided, and the method is applied to a computer device as an example, and the computer device can be a terminal or a server. It can be understood that the method can be executed by the terminal or the server itself alone, or can be implemented through the interaction between the terminal and the server. Among them:
[0043] Step S202, obtaining a target item and an interactive item sequence of a target object.
[0044] Among them, items can be owned, used or traded. Items can be various types of media resources such as videos, images, texts, audios, etc. Items can also be commodities, products or services. Target items refer to items to be processed and analyzed.
[0045] The object refers to the user. The interactive item corresponding to the object refers to the item that has interactive information with the object, and refers to the item that has interacted with the object. For example, if the item represents a video, the interactive item corresponding to the object can be a video played by the user or a video collected by the user; if the item represents a commodity, the interactive item corresponding to the object can be a commodity consumed by the user. The target object refers to the object to be processed and analyzed. The interactive item sequence of the target object includes multiple interactive items corresponding to the target object.
[0046] In one embodiment, the interaction time corresponding to an item refers to the operation time of the object performing an interactive operation on the item. For example, if the interactive item corresponding to the object is a video played by the user, the interaction time corresponding to the interactive item is the playing time of the video. The interactive item sequence of the target object is obtained by sorting the multiple interactive items corresponding to the target object according to the interaction time. For example, if the interactive item is an article browsed by the object, the interactive item sequence of the target object can be obtained by sorting the article identifiers of the k articles browsed by the target object most recently from early to late according to the browsing time of the articles.
[0047] Specifically, the computer device can obtain the target item and the interactive item sequence of the target object, and perform joint embedding representation modeling on the target item and the interactive item sequence, so as to better understand the interests, habits and behavioral trends of the target object.
[0048] In one embodiment, the target item is determined from the candidate item set. The candidate item set is equivalent to an item pool. When it is necessary to recommend an item to the target object, the item recommended to the target object is determined from the item pool. The target item can be randomly selected from the candidate item set, or the item can be first recalled from the candidate item set to obtain an intermediate item set, and the item in the intermediate item set is used as the target item.
[0049] Step S204: determining a sequence of associated items of the target item from the interactive item sequence of the target object.
[0050] The target object's interactive item sequence includes multiple interactive items of the target object. The target item's associated item sequence includes multiple interactive items associated with the target item in the interactive item sequence. The association between the interactive item and the target item may be an association between the items in terms of content. For example, there are the same item attributes; there are similar item features; and so on.
[0051] Specifically, the target object's interactive item sequence is usually a long sequence. In order to reduce the subsequent modeling pressure, the computer device can select multiple interactive items associated with the target item from the target object's interactive item sequence to form the target item's associated item sequence. For example, extract the item features of each interactive item in the interactive item sequence, extract the item features of the target item, calculate the feature distances between the item features of the target item and the item features of each interactive item, and select multiple interactive items with smaller feature distances to form the target item's associated item sequence.
[0052] Step S206, based on the associated item sequence and the target item, a joint item sequence is obtained, and the joint item sequence is input into a target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of the training object.
[0053] The joint item sequence includes the target item and the associated item sequence of the target item. The joint item sequence is an item sequence related to the target object and the target item.
[0054] The sequence model is a machine learning model that can be used to extract the embedded representation (i.e., sequence features) of an item sequence. The sequence model includes a preset item feature set. The preset item feature set includes the preset item features of each item in the candidate item set. The preset item features of an item are embedded representations extracted in advance for the item, which are used to reflect the semantic information of the item. The preset item features of an item can be the content features of the item, and the content features are obtained by extracting features from the content of the item itself. For example, feature extraction can be performed on the item attribute set of the item to obtain the preset item features of the item. The item sequence is input into the sequence model, and the sequence model queries the preset item features corresponding to each item in the item sequence from the preset item feature set, and performs feature interaction on each of the queried preset item features to obtain the embedded representation of the item sequence.
[0055] The interactive item sequence of the training object is the training data of the sequence model. Based on the training data, the initial sequence model is self-supervised trained to obtain the target sequence model. During the training process, the model predicts the item at the target position in the sequence based on the item before the target position in the sequence. This training method encourages the model to learn the generation process of the item sequence and capture the dependencies in the sequence. When training the model, the interactive item sequence of the training object is input into the initial sequence model, and the preset item features of the items before the target position in the interactive item sequence are queried. The features of each preset item feature queried are interacted to obtain the embedded representation of the subsequence composed of the items before the target position. The item prediction is performed based on the embedded representation of the subsequence to obtain the predicted probability of the item at the target position in the interactive item sequence. The training goal is to improve the predicted probability of the item at the target position in the interactive item sequence by adjusting the model parameters.
[0056] It can be understood that the initial sequence model is a sequence model to be trained. The target sequence model is a sequence model that has completed training. The interactive item sequence of the training object includes multiple interactive items corresponding to the training object. For example, the interactive item sequence of the training object is obtained by sorting the multiple interactive items corresponding to the training object according to the interaction time. The relevant data of the training object is used for model training, and the relevant data of the target object is used for model application. Both the training object and the target object can be any user.
[0057] Specifically, the computer device can combine the associated item sequence and the target item to obtain a joint item sequence, input the joint item sequence into the target sequence model, perform embedding representation modeling on the joint item sequence through the target sequence model, and obtain item sequence features of the joint item sequence.
[0058] It can be understood that each item sequence in the present application can be an item identification sequence composed of item identifications. An item identification is an identification used to identify an item. For example, an item identification can be an item name, and an item identification can be an item serial number.
[0059] Step S208, through the target sequence model, in the preset item feature set, the preset item features corresponding to each item in the joint item sequence are queried, and the features of each preset item feature are interacted, and the item sequence features of the joint item sequence are output; the item sequence features are used to determine the matching degree between the target item and the target object.
[0060] Among them, feature interaction of multiple item features refers to feature fusion of multiple item features. Feature interaction of preset item features corresponding to each item in the joint item sequence can capture the association and interaction between the target item and the interactive items of the target object in the joint item sequence, so that the item sequence features obtained through feature interaction can reflect the connection between the target item and the target object. For example, feature interaction can be performed through a neural network; feature interaction can be performed through a Transformer layer; and so on.
[0061] The joint item sequence is input into the target sequence model, and the target sequence model outputs the item sequence features of the joint item sequence. The item sequence features are the embedded representations of the joint item sequence. The interactive item sequence of the target object can reflect the behavior pattern of the target object. The joint item sequence includes the target item and the interactive items related to the target item in the interactive item sequence of the target object. The item sequence features can reflect the embedded representation of the behavior of the target object on the target item. Therefore, the item sequence features of the joint item sequence can be used to determine the matching degree between the target item and the target object.
[0062] Specifically, the target sequence model includes a preset item feature set. The computer device inputs the joint item sequence into the target sequence model. The target sequence model queries the preset item feature set for the preset item features corresponding to each item in the joint item sequence, performs feature interaction on each of the queried preset item features, obtains the item sequence features of the joint item sequence, and outputs the item sequence features of the joint item sequence.
[0063] It can be understood that compared to separately embedding representation modeling of the target item and the target object's interactive item sequence, a joint item sequence is first obtained based on the target item and the target object's interactive item sequence. Embedding representation modeling of the joint item sequence is equivalent to jointly embedding representation modeling of the target item and the target object's interactive item sequence. The sequence features obtained through the joint embedding representation modeling can more accurately reflect the target object's interests, habits and behavioral trends.
[0064] Subsequently, the computer device may determine the degree of match between the target item and the target object based on the item sequence feature of the joint item sequence. Further, based on the degree of match between the target item and the target object, it may be determined whether to recommend the target item to the target object. For example, a target item whose degree of match exceeds a threshold value of match may be recommended to the target object.
[0065] In the above-mentioned method for processing item data, the interactive item sequence of the target object is screened to obtain the associated item sequence of the target item, which can avoid directly embedding the longer sequence into a representation model, effectively reduce the computational complexity, and improve the data processing efficiency. The target sequence model is obtained by training the interactive item sequence of the training object, and can accurately extract the embedding representation of the item sequence. Therefore, the joint item sequence obtained based on the associated item sequence and the target item is input into the target sequence model for embedding representation modeling, and an accurate embedding representation can be extracted. The target sequence model performs a joint embedding representation modeling of the target item and the associated item sequence by querying the initial item features of the target item and the associated item sequence. The item sequence features obtained by the embedding representation modeling can accurately reflect the behavior embedding representation of the target object on the target item. Subsequently, the matching degree between the target item and the target object can be determined based on the item sequence features, and items can be recommended to the target object based on the matching degree, which can effectively improve the accuracy and effectiveness of the recommendation.
[0066] In some embodiments, determining a sequence of associated items of a target item from a sequence of interactive items of a target object includes:
[0067] For the interactive items in the interactive item sequence between the target item and the target object, extract the target item features of the item; the target item features are obtained by performing dimensionality reduction processing on the initial item features of the item;
[0068] Based on the feature distance between the target item features of the target item and the interactive item, a related item sequence of the target item is determined from the interactive item sequence of the target object.
[0069] Among them, the initial item feature of the item is a high-dimensional embedding representation of the item. The target item feature of the item is a low-dimensional embedding representation of the item. The initial item feature of the item is subjected to dimensionality reduction processing to obtain the target item feature of the item. Both the initial item feature and the target item feature of the item can express the semantic information of the item, but the data volume of the target item feature is smaller than that of the initial item feature. Dimensionality reduction processing of features is used to reduce the data volume of features while retaining important information in the features as much as possible.
[0070] Specifically, in order to improve the speed of determining the associated item sequence of the target item from the interactive item sequence of the target object, a low-dimensional embedding representation of the item can be obtained, and the interactive items associated with the target item are selected from the interactive item sequence through the low-dimensional embedding representation of the item to form the associated item sequence of the target item.
[0071] The computer device obtains the target item feature of the target item, obtains the target item feature of each interactive item in the interactive item sequence of the target object, calculates the feature distance between the target item feature of the target item and the target item feature of each interactive item, and determines the interactive items associated with the target item from each interactive item based on the feature distance. For example, the interactive items whose feature distance is less than the distance threshold are taken as the interactive items associated with the target item; the interactive items are sorted from small to large according to the feature distance, and the top n interactive items are obtained as the interactive items associated with the target item; and so on. Finally, the computer device can use the interactive items selected from the interactive item sequence of the target object as the associated items of the target item to form the associated item sequence of the target item.
[0072] In one embodiment, the initial item features of an item can be extracted through a pre-trained model. The pre-trained model is a large model obtained through large-scale data training. According to the processed data modality, it can be divided into language models (ELMO, BERT, GPT), visual models (swin-transformer, ViT, V-MOE), speech models (VALL-E), multimodal models (ViBERT, CLIP, Flamingo, Gato), etc. For example, the text-type item attributes corresponding to the item can be input into the language model, and the language model outputs the initial item features of the item; the image-type item attributes corresponding to the item can be input into the visual model, and the visual model outputs the initial item features of the item; and so on. Among them, the multimodal model refers to a model that establishes two or more data modality feature representations.
[0073] In the above embodiment, based on the low-dimensional embedding representation of the object, the associated item sequence of the target object is determined from the interactive item sequence of the target object, which can reduce the computational complexity and increase the speed of determining the associated item sequence from the interactive item sequence.
[0074] In some embodiments, for a target item and an interactive item in an interactive item sequence of a target object, extracting a target item feature of the item includes:
[0075] generating a current item identification sequence based on the item identification of the current item, and inputting the current item identification sequence into a target dimensionality reduction model; the current item is a target item or an interactive item in an interactive item sequence of a target object, and the target dimensionality reduction model includes an initial item feature set;
[0076] Through the target dimension reduction model, the initial item features corresponding to the item identifier of the current item are queried in the initial item feature set, and the queried initial item features are enhanced and reduced in dimension to output the target item features of the current item.
[0077] The current item refers to the item currently undergoing dimensionality reduction processing. The current item is the target item or the interactive item in the interactive item sequence of the target object. The current item identification sequence includes the item identification of the current item and does not include the item identifications of other items. The current item identification sequence is input into the target dimensionality reduction model to obtain the target item feature of the current item.
[0078] The dimensionality reduction model is a machine learning model used to reduce the dimensionality of item features. The dimensionality reduction model includes an initial item feature set, which includes the initial item features of each item in the candidate item set. The initial item features are high-dimensional embedded representations of items. The target dimensionality reduction model is a trained dimensionality reduction model. When the model is applied, the input data of the target dimensionality reduction model is an item identification sequence of an item, and the output data is the target item features of the item.
[0079] Feature enhancement refers to enhancing the semantic information of features. For example, feature enhancement is performed through the Transformer layer; feature enhancement is performed through the convolution layer. Feature dimension reduction refers to reducing the amount of feature data. For example, feature dimension reduction is performed through feature mapping; feature dimension reduction is performed through feature selection.
[0080] Specifically, a machine learning model is used to perform dimensionality reduction processing on the initial item features of the item to obtain the target item features of the item.
[0081] The computer device can generate a current item identification sequence based on the item identification of the current item, and input the current item identification sequence into the target dimension reduction model. The target dimension reduction model searches for the initial item feature corresponding to the item identification of the current item in the initial item feature set, performs feature enhancement and feature dimension reduction on the searched initial item feature, obtains the target item feature of the current item, and outputs the target item feature of the current item.
[0082] It can be understood that the features of the initial item found can be enhanced to obtain the first intermediate item features, and then the first intermediate item features can be reduced in dimension to obtain the target item features. Alternatively, the features of the initial item found can be reduced in dimension to obtain the second intermediate item features, and then the second intermediate item features can be enhanced to obtain the target item features.
[0083] In some embodiments, the interactive item sequence of the training object is the training data of the dimensionality reduction model, and the initial dimensionality reduction model is self-supervised trained based on the training data to obtain the target dimensionality reduction model. During the training process, the model predicts the item at the target position in the sequence based on the item before the target position in the sequence. This training method encourages the model to learn the generation process of the item sequence and capture the dependencies in the sequence.
[0084] The interactive item sequence of the training object may be an item identification sequence, including item identifications of multiple interactive items corresponding to the training object. The current item identification sequence includes the item identification of the current item and a preset identification. The preset identification is a pre-set identification, which does not represent any item and is used to adjust the sequence length. The preset identification can be set according to actual needs, for example, the preset identification can be 0. The current item identification sequence corresponding to the current item has the same number of identifications as the interactive item sequence of the training object, that is, has the same sequence length.
[0085] For example, the interactive item sequence of the training object is represented by ABCDE. A, B, C, D, and E respectively represent the items that the training object has browsed in chronological order. The target item is represented by X, and the item identification sequence corresponding to the target item can be represented by X-0-0-0-0.
[0086] In the above embodiment, the target dimension reduction model includes an initial item feature set, the item identification of the current item is input into the target dimension reduction model, and the target dimension reduction model quickly queries the initial item features of the current item from the initial item feature set based on the item identification of the current item. The target dimension reduction model does not need to specifically extract the initial item features of the current item separately, and performs feature enhancement and feature dimension reduction on the queried initial item features to obtain the target item features of the current item, which can reduce the amount of calculation and improve the efficiency of the dimension reduction process. The accuracy of the dimension reduction process can also be guaranteed by performing dimension reduction processing through a machine learning model.
[0087] In some embodiments, Figure 3 As shown, the item data processing method also includes:
[0088] Step S302, obtaining a first item identification sequence, and inputting the first item identification sequence into an initial dimensionality reduction model; the first item identification sequence is obtained based on an interactive item sequence of a first training object, and the initial dimensionality reduction model includes an initial item feature set.
[0089] The first item identification sequence is a training item identification sequence used to train the dimensionality reduction model. The training item identification sequence includes item identifications of multiple interactive items corresponding to the training object. For example, if the interactive items are articles browsed by the object, the training item identification sequence can be obtained by sorting the article identifications of the k articles browsed by the training object most recently from early to late according to the browsing time of the articles.
[0090] The first item identification sequence is obtained based on the interactive item sequence of the first training object. The relevant data of the first training object is used to train the dimensionality reduction model. The initial dimensionality reduction model refers to the dimensionality reduction model to be trained. The initial dimensionality reduction model is trained to obtain the target dimensionality reduction model. The target dimensionality reduction model refers to the dimensionality reduction model that has completed training. During model training, the input data of the initial dimensionality reduction model is the first item identification sequence, and the output data is the first predicted probability corresponding to the item identification. The initial dimensionality reduction model includes an initial item feature set, and the initial item feature set includes initial item features corresponding to each item in the candidate item set.
[0091] Specifically, the computer device can obtain the first item identification sequence, and perform self-supervisory training on the initial dimension reduction model based on the first item identification sequence to obtain the target dimension reduction model. The training task of the dimension reduction model is to predict the item identification at the first position based on the item identification before the first position in the first item identification sequence. The better the performance of the model on the training task, the better the data processing capability of the model.
[0092] Step S304: using the initial dimension reduction model, in the initial item feature set, query the initial item features corresponding to each item identification before the first position in the first item identification sequence, perform feature enhancement and feature dimension reduction on each of the queried initial item features, obtain the predicted item feature corresponding to the first position, and obtain the first predicted probability corresponding to the item identification at the first position in the first item identification sequence based on the predicted item feature corresponding to the first position; the first position is determined from each item identification position of the first item identification sequence, and the first predicted probability represents the predicted correlation between the item corresponding to the first position and the forward item sequence corresponding to the first position.
[0093] The item identification position is used to characterize the position of the item identification in the item identification sequence. It can be understood that the item identification sequence includes a plurality of item identifications arranged in order, so there are a plurality of item identification positions in the item identification sequence. The first position is determined from each item identification position of the first item identification sequence. The first position can be selected as needed. For example, each item identification position of the first item identification sequence can be used as the first position; a plurality of item identification positions can be randomly obtained from each item identification position of the first item identification sequence as the first position.
[0094] During the training process, the next item is characterized based on the initial item features of the historical items. The predicted item features corresponding to the first position are obtained by performing feature enhancement and feature dimension reduction on the initial item features of each item identification before the first position in the first item identification sequence. For example, during model training, if the first position is the second item identification position, the initial item features of the first item identification in the first item identification sequence are enhanced and reduced in dimension, that is, based on the initial item features of the first item identification in the first item identification sequence, the item belonging to the second item identification is characterized, and the predicted item features corresponding to the second item identification position are obtained; if the first position is the third item identification position, the initial item features of the first item identification and the second item identification in the first item identification sequence are enhanced and reduced in dimension, that is, based on the initial item features of the first item identification and the second item identification in the first item identification sequence, the item belonging to the third item identification is characterized, and the predicted item features corresponding to the third item identification position are obtained. The predicted item features are used to characterize the feature representation obtained for the prediction of the next item.
[0095] The first predicted probability corresponding to the first position is obtained based on the predicted item feature corresponding to the first position. The first predicted probability corresponding to the first position represents the predicted correlation between the item to which the item identifier at the first position in the first item identifier sequence belongs and the forward item sequence corresponding to the first position. The forward item sequence corresponding to the first position includes items corresponding to each item identifier before the first position in the first item identifier sequence. That is, the first predicted probability corresponding to the first position can represent the predicted correlation between the item to which the item identifier at the first position in the first item identifier sequence belongs and the items corresponding to each item identifier before the first position. It can be understood that the predicted correlation represents the degree of correlation between the item and the forward item sequence, and the higher the predicted probability, the higher the predicted correlation and the higher the correlation. For example, if the first position is the second item identifier position, the predicted probability corresponding to the item to which the second item identifier position belongs is obtained based on the predicted item feature corresponding to the second item identifier position, and the predicted probability represents the predicted correlation between the item to which the second item identifier position belongs and the item to which the first item identifier position belongs, and represents the probability that the next item is predicted to be the item to which the second item identifier position belongs based on the initial item feature of the item to which the first item identifier position belongs.
[0096] Specifically, the computer device inputs the first item identification sequence into the initial dimension reduction model, and the initial dimension reduction model outputs the prediction probabilities corresponding to the item identifications at each first position in the first item identification sequence. In the initial dimension reduction model, the initial item features corresponding to each item identification before the first position in the first item identification sequence are queried from the initial item feature set, and the initial item features corresponding to each item identification before the first position in the first item identification sequence are subjected to feature enhancement and feature dimension reduction to obtain the predicted item features corresponding to the first position, and based on the predicted item features corresponding to the first position, the first prediction probability corresponding to the item identification at the first position in the first item identification sequence is obtained. It can be understood that if there are multiple first positions, the first prediction probabilities corresponding to the item identifications at each first position in the first item identification sequence are obtained respectively.
[0097] In one embodiment, an item distribution feature corresponding to the first position is obtained based on the predicted item feature corresponding to the first position, the item distribution feature corresponding to the first position includes first predicted probabilities corresponding to each item in a candidate item set, the candidate item set includes items to which each item identifier in a first item identifier sequence belongs, and the predicted probability corresponding to the item identifier at the first position in the first item identifier sequence is obtained from the item distribution feature corresponding to the first position.
[0098] For example, the candidate item set includes m items, and the first item identification sequence includes n item identifications arranged in order. If the first position is the t-th position in the first item identification sequence, feature enhancement and feature dimension reduction are performed on the initial item features corresponding to the 1st to t-1th item identifications in the sequence to obtain the predicted item features corresponding to the t-th position, and the item distribution features corresponding to the t-th position are obtained based on the predicted item features corresponding to the t-th position. The item distribution features corresponding to the t-th position include the first predicted probabilities corresponding to the m items in the candidate item set. If the item identification at the t-th position in the sequence is item A, the first predicted probability corresponding to item A is obtained from the item distribution features corresponding to the t-th position to obtain the first predicted probability corresponding to the item identification at the t-th position in the first item identification sequence.
[0099] Step S306: Obtain a first loss based on first predicted probabilities corresponding to the item identifiers at the first positions in the first item identifier sequence.
[0100] Specifically, after obtaining the first predicted probabilities corresponding to the item identifiers at the first positions in the first item identifier sequence, the computer device obtains the first loss based on the first predicted probabilities corresponding to the item identifiers at the first positions in the first item identifier sequence. For example, the first loss can be obtained based on the average value of the first predicted probabilities; the first loss can be obtained based on the weighted average value of the first predicted probabilities; the first loss can be obtained based on the median value of the first predicted probabilities; and so on. It can be understood that the training goal of the model is to make the first predicted probability corresponding to the item identifier at the first position in the first item identifier sequence as large as possible. The larger the first predicted probability corresponding to the item identifier at the first position, the greater the model is, and the model can accurately predict the item identifier at the first position after the initial item features of the item identifiers before the first position in the first item identifier sequence are processed by dimensionality reduction, which means that the model can accurately reduce the dimensionality of the features and has dimensionality reduction processing capabilities.
[0101] In one embodiment, the first item identification sequence includes n item identifications. It means that the calculation formula of the first loss is as follows:
[0102]
[0103] Among them, L1 represents the first loss. represents the item ID at the nth position in the first item ID sequence, Represents a sequence consisting of the item identifiers at positions 1 to t-1 in the first item identifier sequence. Indicated in Based on the prediction of the next item, the next item is That is, t represents the first position, represents the item identifiers before the first position in the first item identifier sequence, represents the first predicted probability corresponding to the item identifier at the first position in the first item identifier sequence, obtained based on the initial item features corresponding to each item identifier before the first position in the first item identifier sequence. It can be understood that the first loss L1 is related to the first predicted probability Negatively correlated, The larger it is, the smaller L1 is.
[0104] Step S308, adjusting the model parameters of the initial dimensionality reduction model based on the first loss until the first convergence condition is met, thereby obtaining a target dimensionality reduction model.
[0105] Specifically, the computer device can back-propagate the first loss to adjust the model parameters of the initial dimensionality reduction model, and obtain the target dimensionality reduction model through multiple model iteration training until the first convergence condition is met.
[0106] It is understandable that when adjusting the model parameters based on the first loss, it is not necessary to adjust the initial item feature set stored in the initial dimensionality reduction model, and other model parameters can be adjusted. The model parameters of the initial dimensionality reduction model can be adjusted based on the first loss by a gradient descent algorithm.
[0107] Among them, the first convergence condition is a condition for judging whether the dimensionality reduction model has reached convergence. The first convergence condition includes but is not limited to at least one of the first loss being less than a preset loss value, the number of model iterations being greater than a preset number of iterations, or the rate of change of the first loss being less than a preset rate of change.
[0108] In the above embodiment, it is not necessary to label the first item identification sequence with training labels. The initial dimension reduction model is self-supervised based on the first item identification sequence to obtain an accurate target dimension reduction model, which can effectively improve the model training efficiency. During the training process, the model performs dimension reduction processing on the relevant features of each item identification before the target position in the first item identification sequence, and then generates a first prediction probability corresponding to the item identification at the target position in the first item identification sequence, and generates a first model loss based on the first prediction probability corresponding to each item identification in the first item identification sequence. The model parameters are adjusted based on the first model loss, so that the dimension reduction model can improve the prediction probability corresponding to the item identification at the target position in the first item identification sequence, and can accurately predict the next item based on the sequentially associated interactive items, thereby improving the model's dimensionality reduction processing capability, because the model uses dimensionality reduction processing in the prediction process.
[0109] In some embodiments, obtaining a first predicted probability corresponding to the item identifier at the first position in the first item identifier sequence based on the predicted item feature corresponding to the first position includes:
[0110] Performing a linear transformation on the predicted item feature corresponding to the first position to obtain an initial item distribution feature corresponding to the first position; the initial item distribution feature includes feature values corresponding to each candidate item in the candidate item set;
[0111] Performing feature value compression on the initial item distribution feature to obtain a target item distribution feature corresponding to the first position; the target item distribution feature includes first prediction probabilities corresponding to each candidate item in the candidate item set, and the candidate item set includes items corresponding to each item identifier in the first item identifier sequence;
[0112] A first predicted probability corresponding to an item identifier at a first position in a first item identifier sequence is determined from the target item distribution feature.
[0113] Among them, the linear transformation is used to map the predicted item features to a vector space of a preset dimension. The predicted item features are linearly transformed to obtain the initial item distribution features, the dimension of the initial item distribution features is the preset dimension, and the dimension of the initial item distribution features is equal to the size of the candidate item set, and the size of the candidate item set reflects the number of items in the candidate item set.
[0114] Eigenvalue compression is used to compress the numerical value of the eigenvalue into a preset range. For example, the numerical value of the eigenvalue can be compressed into [0, 1] to obtain the predicted probability, and the eigenvalue compression can be performed through the Softmax function (normalized exponential function). The eigenvalue compression is performed on the initial item distribution feature corresponding to the first position to obtain the target item distribution feature corresponding to the first position.
[0115] Specifically, when obtaining the first predicted probability corresponding to the item identification at the first position in the first item identification sequence based on the predicted item feature corresponding to the first position, firstly obtain the first predicted probabilities corresponding to each item in the candidate item set based on the predicted item feature corresponding to the first position, the candidate item set includes the items corresponding to each item identification in the first item identification sequence, and then obtain the first predicted probability corresponding to the item identification at the first position in the first item identification sequence from the first predicted probabilities corresponding to each item in the candidate item set.
[0116] The computer device first performs a linear transformation on the predicted item feature corresponding to the first position to obtain the initial item distribution feature corresponding to the first position. The initial item distribution feature is a vector whose vector dimension is equal to the size of the candidate item set. The initial item distribution feature includes the feature values corresponding to each item in the candidate item set. Then, the initial item distribution feature is subjected to feature value compression to obtain the target item distribution feature corresponding to the first position. The target item distribution feature is a vector whose vector dimension is equal to the size of the candidate item set. The target item distribution feature includes the first predicted probability corresponding to each item in the candidate item set. Finally, the first predicted probability corresponding to the item to which the item identifier at the first position of the first item identifier sequence belongs is obtained from the target item distribution feature as the first predicted probability corresponding to the item identifier at the first position of the first item identifier sequence.
[0117] In the above embodiment, the predicted item features can be converted into the predicted probabilities corresponding to each item in the candidate item set through linear transformation and eigenvalue compression. The predicted correlation between each item in the candidate item set and the forward item sequence can be intuitively obtained through the predicted probability. The probability that each item in the candidate item set belongs to the next item can be intuitively obtained through the predicted probability.
[0118] In some embodiments, adjusting the model parameters of the initial dimensionality reduction model based on the first loss until a first convergence condition is satisfied to obtain a target dimensionality reduction model includes:
[0119] Based on the first loss, the model parameters of the projection layer, the correction layer and the output layer in the initial dimensionality reduction model are adjusted until the first convergence condition is met to obtain the target dimensionality reduction model.
[0120] The initial dimension reduction model includes an embedding layer, a projection layer, a correction layer and an output layer, and the embedding layer is used to query the initial item features. The embedding layer stores the initial item feature set. The first item identification sequence is input into the initial dimension reduction model. In the initial dimension reduction model, the first item identification sequence is first input into the embedding layer, and the embedding layer outputs the queried initial item features. The projection layer is used for feature dimension reduction, and the correction layer is used for feature enhancement. If feature dimension reduction is performed first and then feature enhancement is performed, the initial item features output by the embedding layer are input into the projection layer, the intermediate item features output by the projection layer are input into the correction layer, and the correction layer outputs the predicted item features. If feature enhancement is performed first and then feature dimension reduction is performed, the initial item features output by the embedding layer are input into the correction layer, the intermediate item features output by the correction layer are input into the projection layer, and the projection layer outputs the predicted item features. The output layer is used to output the first predicted probability. The predicted item features are input into the output layer, and the output layer outputs the first predicted probability.
[0121] Specifically, the initial dimensionality reduction model includes an embedding layer, a projection layer, a correction layer, and an output layer. The embedding layer is used to query the initial item features, and no parameters need to be adjusted. The projection layer is used for feature dimensionality reduction, the correction layer is used for feature enhancement, and the output layer is used to output the first prediction probability. The projection layer, the correction layer, and the output layer need to adjust parameters. Therefore, when the computer device adjusts the model parameters of the initial dimensionality reduction model based on the first loss, it mainly back-propagates the first loss to adjust the model parameters of the projection layer, the correction layer, and the output layer in the initial dimensionality reduction model.
[0122] It can be understood that the target dimension reduction model includes an embedding layer, a projection layer, a correction layer and an output layer. The current item identification sequence of the current item is input into the target dimension reduction model. If feature dimension reduction is performed first and then feature enhancement is performed, the correction layer of the target dimension reduction model outputs the target item feature of the current item. If feature enhancement is performed first and then feature dimension reduction is performed, the projection layer of the target dimension reduction model outputs the target item feature of the current item.
[0123] In the above embodiment, when adjusting the model parameters of the initial dimensionality reduction model, there is no need to adjust the embedding layer in the initial dimensionality reduction model. Only the projection layer, correction layer and output layer in the initial dimensionality reduction model need to be adjusted. The embedding layer includes an initial item feature set. The initial item feature set has a large amount of data. Through targeted adjustments, the model training speed can be effectively improved while ensuring the quality of model training.
[0124] In one embodiment, reference Figure 4, the initial dimensionality reduction model includes an input layer, an embedding layer, a projection layer, a correction layer and an output layer connected in sequence. The input layer is used to receive the input first item identification sequence and input the first item identification sequence into the embedding layer. It can be understood that the first item identification sequence generally needs to include k item identifications (i.e., item IDs). If the number of item identifications in the first item identification sequence is less than k, the subsequent unsatisfactory positions are filled with masks. The embedding layer pre-embeds the initial item feature set, and the embedding layer is used to query the corresponding initial item features from the initial item feature set.
[0125] The first item identification sequence is input into the initial dimension reduction model. The input layer inputs the first item identification sequence into the embedding layer. The embedding layer queries the initial item features corresponding to each item identification in the first item identification sequence, outputs each initial item feature, and inputs each initial item feature into the projection layer. The projection layer is used for feature dimensionality reduction. The projection layer can be a linear projection implemented by a fully connected layer to map the high-dimensional embedded representation to a low-dimensional embedded representation. For example, the original 4096-dimensional high-dimensional representation is mapped to a 32-dimensional low-dimensional representation through a fully connected layer.
[0126] The output of the projection layer is input to the correction layer, which is used for feature enhancement. The correction layer can be a Transformer layer, which is mainly a deeper decoder constructed by stacking N decoding blocks of Transformers with a mask mechanism to improve the performance and generalization ability of the model. Each decoding block contains three parts. The first part is the Masked Multi-Head Self-Attention mechanism with a mask mechanism, the second part is the Feedforward Neural Network, and the third part is the Residual Connection and Layer Normalization. The first part captures the dependency between different positions in the input sequence by performing multi-head self-attention calculations on the input sequence. The mask mechanism is used to avoid using future information in the self-attention mechanism. For example, if the first position is the third item identification position, the third item identification in the input sequence and the item features after it are shielded through the mask mechanism, so that the correction layer performs feature enhancement on the first two item features in the input sequence. The second part enhances the feature expression capability of each position by performing a fully connected layer calculation on the representation of each position. The third part accelerates the training of the model and improves the performance of the model by performing a residual connection between the output of the first two parts and the input sequence and performing layer normalization on the result after the residual connection. The correction layer can output the predicted item features corresponding to each first position.
[0127] The correction layer inputs the predicted item features into the output layer. The output layer maps the output of the correction layer to a vector space with a dimension equal to the size of the candidate item set, and then converts each element in this vector space into a probability value (indicating the first predicted probability of belonging to the next item) through the Softmax function to obtain the target item distribution features. The output layer can output the target item distribution features corresponding to each first position.
[0128] The first item identification sequence is input into the initial dimensionality reduction model to obtain first prediction probabilities corresponding to the item identifications at each first position in the first item identification sequence, and a first loss is obtained based on the first prediction probabilities corresponding to the item identifications at each first position in the first item identification sequence. Model parameters of the projection layer, the correction layer, and the output layer in the initial dimensionality reduction model are adjusted based on the first loss until a first convergence condition is met, thereby obtaining a target dimensionality reduction model.
[0129] In one embodiment, reference Figure 5 , the initial dimension reduction model includes an input layer, an embedding layer, a correction layer, a projection layer and an output layer connected in sequence. The input layer is used to receive the input first item identification sequence and input the first item identification sequence into the embedding layer. The first item identification sequence is input into the initial dimension reduction model, the input layer inputs the first item identification sequence into the embedding layer, the embedding layer queries the initial item features corresponding to each item identification in the first item identification sequence, outputs each initial item feature, and inputs each initial item feature into the correction layer. The correction layer is used for feature enhancement. The correction layer can be a Transformer layer, which is mainly a deeper decoder constructed by stacking N decoding blocks of Transformers with a mask mechanism to improve the performance and generalization ability of the model. The output of the correction layer is input into the projection layer, and the projection layer is used for feature dimension reduction. The projection layer can be a linear projection achieved through a fully connected layer to map the high-dimensional embedding representation to the low-dimensional embedding representation. The projection layer inputs the predicted item features into the output layer. The output layer maps the output of the projection layer to a vector space with a dimension equal to the size of the candidate item set, and then converts each element in this vector space into a probability value (indicating the first predicted probability of belonging to the next item) through the Softmax function to obtain the target item distribution features. The output layer can output the target item distribution features corresponding to each first position.
[0130] In some embodiments, the item data processing method further includes:
[0131] Obtain the item description text corresponding to each candidate item in the candidate item set;
[0132] Through the large language model, feature extraction is performed on the item description text to obtain the initial item features corresponding to each candidate item;
[0133] Based on the initial item features corresponding to each candidate item, an initial item feature set is obtained.
[0134] The item description text of an item refers to a text describing the item information. For example, the item description text may be an item introduction text. The large language model is a pre-trained model used to process text data.
[0135] Specifically, the computer device can obtain the item description text corresponding to each candidate item in the candidate item set, input the item description text corresponding to each candidate item into the large language model for feature extraction, obtain the initial item features corresponding to each candidate item, and form the initial item features corresponding to each candidate item into an initial item feature set.
[0136] In the above embodiment, the large language model has a strong text processing capability. By extracting features from the item description text of the item through the large language model, the initial item features of the item are obtained, thereby ensuring the accuracy of the initial item features.
[0137] In one embodiment, reference Figure 6 , the large language model includes an input layer, an embedding layer, a Transformer layer, and an output layer connected in sequence. The input layer is used to receive the input text sequence. The embedding layer is used to obtain the word features corresponding to each word in the text sequence. The Transformer layer is used for further feature processing. The Transformer layer is mainly a deeper decoder constructed by stacking N Transformer decoding blocks with a mask mechanism to improve the performance and generalization ability of the model. The output layer is used to obtain the output result of the large language model based on the features output by the Transformer layer.
[0138] In specific applications, various text descriptions of the object are obtained, such as titles, tags, introductions, etc., these text descriptions are spliced together and input into a large language model, and the initial item features of the item are obtained from the output of the last Transform decoding block of the Transformer layer in the large language model. The initial item features are high-dimensional semantic embedding representations.
[0139] In some embodiments, determining the associated item sequence of the target item from the interactive item sequence of the target object based on the feature distance between the target item features of the target item and the interactive item includes:
[0140] Based on the feature distance between the target item features of the target item and the interactive item, multiple associated items of the target item are determined from the interactive item sequence of the target object in ascending order of feature distance; each associated item is sorted according to the interaction time with the target object to obtain the associated item sequence of the target item.
[0141] Specifically, the computer device may calculate the characteristic distances between the target item characteristics of the target item and the target item characteristics of each interactive item of the target object, and determine multiple associated items of the target item from the interactive item sequence of the target object according to the characteristic distances from small to large. For example, n interactive items with smaller characteristic distances are obtained as associated items of the target item. Then, each associated item is sorted according to the interaction time with the target object to obtain the associated item sequence of the target item.
[0142] In the above embodiment, based on the feature distance between the target item features of the target item and the interactive item, the interactive item with the smaller feature distance is selected from the interactive item sequence of the target object as the associated item of the target item, and the target item and the associated item are relatively related items. Each associated item is sorted according to the interaction time with the target object to obtain the associated item sequence of the target item. The associated item sequence of the target item can reflect the relevant behavior of the target object with respect to the target item to a certain extent, which is helpful for the subsequent embedding representation.
[0143] In some embodiments, Figure 7 As shown, the item data processing method also includes:
[0144] Step S702, obtaining a second item identification sequence, and inputting the second item identification sequence into an initial sequence model; the second item identification sequence is obtained based on an interactive item sequence of a second training object, and the initial sequence model includes a preset item feature set.
[0145] The second item identification sequence is a training item identification sequence used for training the sequence model. The training item identification sequence is obtained by sorting the item identifications of multiple interactive items corresponding to the training object according to the interaction time.
[0146] The second item identification sequence is obtained based on the interactive item sequence of the second training object. The relevant data of the second training object is used to train the sequence model. The initial sequence model refers to the sequence model to be trained. The initial sequence model is trained to obtain the target sequence model. The target sequence model is the sequence model that has completed the training. During the model training, the input data of the initial sequence model is the second item identification sequence, and the output data is the second predicted probability corresponding to the item identification. The initial sequence model includes a preset item feature set, and the preset item feature set includes preset item features corresponding to each item in the candidate item set. It can be understood that the preset item feature set can be an initial item feature set, and the initial item feature set includes initial item features corresponding to each item in the candidate item set. The preset item feature set can be a target item feature set, and the target item feature set includes target item features corresponding to each item in the candidate item set.
[0147] Specifically, the computer device can obtain the second item identification sequence, and perform self-supervisory training on the initial sequence model based on the second item identification sequence to obtain the target sequence model. The training task of the sequence model is to predict the item identification at the second position based on the item identification before the second position in the second item identification sequence. The better the performance of the model on the training task, the better the data processing capability of the model.
[0148] Step S704: by using the initial sequence model, in the preset item feature set, the preset item features corresponding to the item identifiers before the second position in the second item identifier sequence are queried, feature interaction is performed on the queried preset item features, and a predicted item feature corresponding to the second position is obtained; based on the predicted item feature corresponding to the second position, a second predicted probability corresponding to the item identifier at the second position in the second item identifier sequence is obtained; the second position is determined from the item identifier positions of the second item identifier sequence, and the second predicted probability represents a predicted correlation between the item corresponding to the second position and the forward item sequence corresponding to the second position.
[0149] The second position is determined from each item identification position of the second item identification sequence. The second position can be selected as needed. For example, each item identification position of the second item identification sequence can be used as the second position; a number of item identification positions can be randomly obtained from each item identification position of the second item identification sequence as the second position.
[0150] During the training process, the next item is characterized based on the preset item features of the historical items. The predicted item features corresponding to the second position are obtained by performing feature interaction on the preset item features of each item identification before the second position in the second item identification sequence. For example, during model training, if the second position is the second item identification position, feature interaction is performed on the preset item features of the second item identification in the second item identification sequence, that is, based on the preset item features of the second item identification in the second item identification sequence, the item belonging to the second item identification is characterized, and the predicted item features corresponding to the second item identification position are obtained; if the second position is the third item identification position, feature interaction is performed on the preset item features of the second item identification and the second item identification in the second item identification sequence, that is, based on the preset item features of the second item identification and the second item identification in the second item identification sequence, the item belonging to the third item identification is characterized, and the predicted item features corresponding to the third item identification position are obtained. The predicted item features are used to characterize the feature representation obtained for the prediction of the next item.
[0151] The second predicted probability corresponding to the second position is obtained based on the predicted item feature corresponding to the second position. The second predicted probability corresponding to the second position represents the predicted correlation between the item to which the item identifier at the second position in the second item identification sequence belongs and the forward item sequence corresponding to the second position. The forward item sequence corresponding to the second position includes items corresponding to each item identifier before the second position in the second item identification sequence. That is, the second predicted probability corresponding to the second position can represent the predicted correlation between the item to which the item identifier at the second position in the second item identification sequence belongs and the items corresponding to each item identifier before the second position. It can be understood that the predicted correlation represents the degree of correlation between the item and the forward item sequence, and the higher the predicted probability, the higher the predicted correlation and the higher the correlation. For example, if the second position is the second item identification position, the predicted probability corresponding to the item to which the second item identification position belongs is obtained based on the predicted item feature corresponding to the second item identification position, and the predicted probability represents the predicted correlation between the item to which the second item identification position belongs and the item to which the second item identification position belongs, and represents the probability that the next item is the item to which the second item identification position belongs based on the preset item feature of the item to which the second item identification position belongs.
[0152] Specifically, the computer device inputs the second item identification sequence into the initial sequence model, and the initial sequence model outputs the second predicted probabilities corresponding to the item identifications at the second positions in the second item identification sequence. In the initial sequence model, the preset item features corresponding to the item identifications before the second position in the second item identification sequence are queried from the preset item feature set, and the preset item features corresponding to the item identifications before the second position in the second item identification sequence are subjected to feature interaction to obtain the predicted item features corresponding to the second position, and based on the predicted item features corresponding to the second position, the second predicted probability corresponding to the item identification at the second position in the second item identification sequence is obtained. It can be understood that if there are multiple second positions, the second predicted probabilities corresponding to the item identifications at the second positions in the second item identification sequence are obtained respectively.
[0153] In one embodiment, an item distribution feature corresponding to the second position is obtained based on the predicted item feature corresponding to the second position, the item distribution feature corresponding to the second position includes second predicted probabilities corresponding to each item in a candidate item set, the candidate item set includes items to which each item identifier in a second item identifier sequence belongs, and the predicted probability corresponding to the item identifier at the second position in the second item identifier sequence is obtained from the item distribution feature corresponding to the second position.
[0154] Step S706: Obtain a second loss based on the second predicted probabilities corresponding to the item identifiers at the second positions in the second item identifier sequence.
[0155] Specifically, after obtaining the second predicted probabilities corresponding to the item identifiers at each second position in the second item identifier sequence, the computer device obtains the second loss based on the second predicted probabilities corresponding to the item identifiers at each second position in the second item identifier sequence. For example, the second loss can be obtained based on the average value of each second predicted probability; the second loss can be obtained based on the weighted average value of each second predicted probability; the second loss can be obtained based on the median value of each second predicted probability; and so on. It can be understood that the training goal of the model is to make the second predicted probability corresponding to the item identifier at the second position in the second item identifier sequence as large as possible. The larger the second predicted probability corresponding to the item identifier at the second position, the greater the model can accurately predict the item identifier at the second position after feature processing of the initial item features of each item identifier before the second position in the second item identifier sequence, which means that the model can accurately model the embedded representation, thereby accurately predicting the next item.
[0156] In one embodiment, the second item identification sequence includes T item identifications. Indicates that the calculation formula of the second loss is as follows:
[0157]
[0158] Among them, L2 represents the second loss. represents the item ID at the tth position in the second item ID sequence, Represents a sequence consisting of the item identifiers at positions 1 to t-1 in the second item identifier sequence. Indicated in Based on the prediction of the next item, the next item is That is, t represents the second position, represents each item identifier before the second position in the second item identifier sequence, represents the second predicted probability corresponding to the item identifier at the second position in the second item identifier sequence, obtained based on the preset item features corresponding to each item identifier before the second position in the second item identifier sequence. It can be understood that the second loss L2 is related to the second predicted probability Negatively correlated, The larger it is, the smaller L2 is.
[0159] Step S708: adjust the model parameters of the initial sequence model based on the second loss until the second convergence condition is met to obtain the target sequence model.
[0160] Specifically, the computer device can back-propagate the second loss to adjust the model parameters of the initial sequence model, and obtain the target sequence model through multiple model iteration training until the second convergence condition is met.
[0161] It is understandable that when adjusting the model parameters based on the second loss, it is not necessary to adjust the preset item feature set stored in the initial sequence model, and other model parameters can be adjusted. The model parameters of the initial sequence model can be adjusted based on the second loss by a gradient descent algorithm.
[0162] Among them, the second convergence condition is a condition for judging whether the sequence model has reached convergence. The second convergence condition includes but is not limited to at least one of the second loss being less than a preset loss value, the number of model iterations being greater than a preset number of iterations, or the rate of change of the second loss being less than a preset rate of change.
[0163] In the above embodiment, it is not necessary to label the second item identification sequence with training labels. The initial sequence model can be trained by self-supervision based on the second item identification sequence to obtain an accurate target sequence model, which can effectively improve the model training efficiency. During the training process, the model performs feature interaction on the relevant features of each item identification before the target position in the second item identification sequence, and then generates a second prediction probability corresponding to the item identification at the target position in the second item identification sequence, generates a second model loss based on the second prediction probability corresponding to each item identification in the second item identification sequence, and adjusts the model parameters based on the second model loss, so that the sequence model can improve the prediction probability corresponding to the item identification at the target position in the second item identification sequence, and can accurately predict the next item based on the sequentially associated interactive items, thereby improving the model's embedded representation modeling ability and feature interaction ability, because the model uses feature interaction in the prediction process.
[0164] In some embodiments, adjusting the model parameters of the initial sequence model based on the second loss until the second convergence condition is met to obtain the target sequence model includes:
[0165] Based on the second loss, the model parameters of the interaction layer and the output layer in the initial sequence model are adjusted until the second convergence condition is met to obtain the target sequence model.
[0166] The initial sequence model includes an embedding layer, an interaction layer, and an output layer. The embedding layer is used to query preset item features. The embedding layer is used to query preset item features. The embedding layer stores a preset item feature set. The interaction layer is used for feature interaction. The output layer is used to output a second prediction probability. The second item identification sequence is input into the initial sequence model. In the initial sequence model, the second item identification sequence is first input into the embedding layer, the embedding layer outputs the queried preset item features, the preset item features output by the embedding layer are input into the interaction layer, the preset item features output by the interaction layer are input into the output layer, and the output layer outputs the second prediction probability.
[0167] Specifically, the initial sequence model includes an embedding layer, an interaction layer, and an output layer. The embedding layer is used to query the preset item features, and no parameters need to be adjusted. The interaction layer is used for feature interaction, and the output layer is used to output the second prediction probability. The interaction layer and the output layer need to adjust parameters. Therefore, when the computer device adjusts the model parameters of the initial sequence model based on the second loss, it mainly back-propagates the second loss to adjust the model parameters of the interaction layer and the output layer in the initial sequence model.
[0168] It can be understood that the target sequence model includes an embedding layer, an interaction layer and an output layer. The joint item features are input into the target sequence model, and the interaction layer of the target sequence model outputs the item sequence features of the joint item features.
[0169] In the above embodiment, when adjusting the model parameters of the initial sequence model, there is no need to adjust the embedding layer in the initial sequence model. Only the interaction layer and the output layer in the initial sequence model need to be adjusted. The embedding layer includes a preset item feature set. The preset item feature set has a large amount of data. Through targeted adjustment, the model training speed can be effectively improved while ensuring the quality of model training.
[0170] In one embodiment, reference Figure 8 , the initial sequence model includes an input layer, an embedding layer, an interaction layer and an output layer connected in sequence. The input layer is used to receive the input second item identification sequence and input the second item identification sequence into the embedding layer. The embedding layer is used to query the corresponding preset item features from the preset item feature set. The second item identification sequence is input into the initial sequence model, the input layer inputs the second item identification sequence into the embedding layer, the embedding layer queries the preset item features corresponding to each item identification in the second item identification sequence, outputs each preset item feature, and inputs each preset item feature into the interaction layer. The interaction layer is used for feature interaction. The interaction layer can be a Transformer layer, which is mainly a deeper decoder constructed by stacking N Transformer decoding blocks with a mask mechanism to improve the performance and generalization ability of the model. The interaction layer can output the predicted item features corresponding to each second position. The interaction layer inputs the predicted item features into the output layer, and the output layer maps the output of the interaction layer to a vector space with a dimension equal to the size of the candidate item set, and then converts each element in this vector space into a probability value (indicating the second predicted probability of belonging to the next item) through the Softmax function to obtain the target item distribution feature. The output layer can output the target item distribution characteristics corresponding to each second position.
[0171] The second item identification sequence is input into the initial sequence model to obtain second prediction probabilities corresponding to the item identifications at each second position in the second item identification sequence, and a second loss is obtained based on the second prediction probabilities corresponding to the item identifications at each second position in the second item identification sequence. Model parameters of the interaction layer and the output layer in the initial sequence model are adjusted based on the second loss until the second convergence condition is met, thereby obtaining a target sequence model.
[0172] In some embodiments, performing feature interaction on each of the preset item features found, and outputting an item sequence feature of a joint item sequence, includes:
[0173] According to the order of items in the joint item sequence, the queried preset item features are combined to obtain a preset item feature sequence;
[0174] Performing feature interaction on a preset item feature sequence to obtain an item interaction feature sequence; the item interaction feature sequence includes item interaction features that match the number of items in the joint item sequence;
[0175] From the item interaction feature sequence, the item interaction feature at the item position of the target item is obtained as the item sequence feature of the joint item sequence.
[0176] Specifically, the computer device splices the target item after the associated item sequence to obtain a joint item sequence, and inputs the joint item sequence into the target sequence model. In the target sequence model, the preset item features corresponding to each item in the joint item sequence are first queried, and the preset item features queried are combined according to the arrangement order of each item in the joint item sequence to obtain a preset item feature sequence. Then, feature interaction is performed on the preset item feature sequence to obtain an item interaction feature sequence, and the item interaction feature sequence includes item interaction features that match the number of items in the joint item sequence. For example, the joint item sequence includes 5 items, the preset item feature sequence includes the preset item features corresponding to the 5 items, and the item interaction feature sequence includes 5 item interaction features. In the item interaction feature sequence, the item interaction feature at a certain position can represent the feature interaction result between the item corresponding to the position and the item before the position. Finally, the item interaction feature at the item position of the target item is obtained from the item interaction feature sequence as the item sequence feature of the joint item sequence, that is, the last item interaction feature is obtained as the item sequence feature of the joint item sequence.
[0177] For example, the target item's associated item sequence With target item Splice together to get the joint item sequence .Will Input the target sequence model, and the Transformer layer of the target sequence model outputs a A vector list (i.e., item interaction feature sequence), where the k+1th position vector , that is The embedded representation of (i.e., item sequence features).
[0178] In the above embodiment, the joint item sequence is a related sequence of target items for the target object. When the target sequence model performs data processing on the joint item sequence, it combines the queried preset item features according to the item order of the joint item sequence to obtain a preset item feature sequence, performs feature interaction on the preset item feature sequence to obtain an item interaction feature sequence, and obtains the item interaction feature at the item position of the target item from the item interaction feature sequence as the item sequence feature of the joint item sequence. The feature interaction result between the preset item feature of the target item and the preset item features of other items can be used as the item sequence feature of the joint item sequence to ensure the accuracy of the item sequence feature.
[0179] In some embodiments, the preset item features in the preset item feature set are target item features of the item, and the target item features of the item are obtained by performing dimensionality reduction processing on the initial item features of the item.
[0180] Specifically, the initial item feature of the item is a high-dimensional embedding representation of the item, and the target item feature of the item is a low-dimensional embedding representation of the item. The target sequence model includes a preset item feature set, and the preset item feature in the preset item feature set is the target item feature of the item. The preset item feature is a low-dimensional embedding representation, which can effectively improve the data processing efficiency of the model on the basis of ensuring the accuracy of the model data processing.
[0181] In one embodiment, the sequence model includes an input layer, an embedding layer, an interaction layer, and an output layer connected in sequence. Fig. 9 , the embedding layer may include an initial item feature set, which includes initial item features corresponding to each candidate item in the candidate item set. Fig.10 , the embedding layer may also include a target item feature set, which includes the target item features corresponding to each candidate item in the candidate item set. It can be understood that the initial item features are high-dimensional embedding representations, and the target item features are low-dimensional embedding representations. If the sequence model uses high-dimensional embedding representations, the information expression ability of the item sequence features obtained by the sequence model will be stronger. If the sequence model uses low-dimensional embedding representations, the complexity of the item sequence features obtained by the sequence model will be lower, which helps to improve the efficiency of subsequent calculations.
[0182] In some embodiments, the item data processing method further includes:
[0183] Obtaining item features of the target item and object features of the target object;
[0184] The item sequence features, the item features of the target item, and the object features of the target object are input into the target matching model to obtain the matching degree between the target item and the target object.
[0185] The matching model is a machine learning model used to determine the degree of matching between an item and an object. The input data of the matching model include item features of the item to be matched, object features of the object to be matched, and fusion features between the item to be matched and the object to be matched. The output data of the matching model include the degree of matching between the item to be matched and the object to be matched. The item features of the item to be matched may be features obtained based on the item's own information, such as preset item features, initial item features, and target item features. The object features of the object to be matched may be features obtained based on the object's own information, for example, feature extraction is performed on the object's object attributes to obtain the object features, and the object features of the object to be matched may also be features obtained based on the object's interactive items, for example, feature extraction is performed on the object's interactive items to obtain the object features. The fusion features between the item to be matched and the object to be matched are obtained based on the interactive item sequence of the item to be matched and the object to be matched. For example, the item features of the item to be matched are obtained, the item features of each interactive item in the interactive item sequence of the object to be matched are obtained, and the item features of the item to be matched and the item features of each interactive item are fused to obtain the fusion features between the item to be matched and the object to be matched. For another example, the fusion feature between the item to be matched and the object to be matched may be a sequence feature corresponding to a joint item sequence determined based on an interactive item sequence between the item to be matched and the object to be matched. It can be understood that the process of obtaining the sequence feature corresponding to the joint item sequence determined based on the interactive item sequence between the item to be matched and the object to be matched can refer to the process of obtaining the sequence feature corresponding to the joint item sequence determined based on the interactive item sequence between the target item and the target object.
[0186] The target matching model is a matching model that has completed training. The target matching model is obtained by supervised training of the initial matching model based on training sample pairs with training labels. The initial matching model is the matching model to be trained. The training sample pairs include item features of the training items, object features of the training objects, and fusion features between the training items and the training objects. The training labels corresponding to the training sample pairs are used to indicate whether the training items and the training objects match. For example, if an item that the training object has interacted with is obtained as a training item, it is considered that the training item and the training object are matched with each other, and the training label is a positive label; if an item that the training object has not interacted with is obtained as a training item, it is considered that the training item and the training object are not matched, and the training label is a negative label.
[0187] Specifically, the computer device can obtain the item features of the target item, obtain the object features of the target object, input the item sequence features of the joint item sequence, the item features of the target item, and the object features of the target object into the target matching model, and after data processing by the target matching model, the target matching model outputs the matching degree between the target item and the target object. Based on the matching degree between the target item and the target object, it can be determined whether to recommend the target item to the target object. For example, if the matching degree between the target item and the target object is greater than the matching degree threshold, the target item will be recommended to the target object.
[0188] It can be understood that the matching model can also be called a sorting model. If there are multiple target items, the target matching model can be used to determine the matching degree between each target item and the target object, and then sort the target items from large to small according to the matching degree to obtain the recommended item sequence corresponding to the target object. Items can be recommended to the target object according to the recommended item sequence.
[0189] In the above embodiment, the item sequence feature obtained by the method of the present application is a more accurate fusion feature between the target item and the target object. The item sequence feature, the item feature of the target item, and the object feature of the target object are input into the target matching model, and the target matching model can output a more accurate matching degree. Based on the more accurate matching degree, more accurate and effective item recommendations can be made.
[0190] In a specific embodiment, the method of the present application can be applied to an item recommendation scenario. In the recommendation scenario, very long sequence modeling is of great significance. It can capture the long-term dependencies between items browsed by users, better understand the complex behaviors of users, and better understand the behavior patterns and interest preferences of users, thereby improving the accuracy of recommendations and providing more personalized recommendations. The present application proposes a method for jointly embedding and representing modeling of extremely long user behavior sequences and target items. Using the item sequence data browsed by users, based on the autoregressive pre-training method of a large language model, an embedding representation of a sequence constructed by an extremely long sequence of users and target items is extracted through a large language model.
[0191] refer to Fig.11 , extract the low-dimensional embedding representation of the items and the target items in the item sequence browsed by the user. Specifically, concatenate various text information of the items to form a text description of the item. Input the text description of the item into the large language model, and extract the high-dimensional embedding representation of this text description through the large language model. Input the high-dimensional embedding representation of the item into the dimensionality reduction model, and perform dimensionality reduction processing through the dimensionality reduction model to obtain the low-dimensional embedding representation of the item. In this way, the existing large language model is fully utilized to obtain high-quality embedding representation of the item, thereby serving the subsequent related sequence retrieval and behavior modeling.
[0192] Extract relevant subsequences of the target item from the user's super-long sequence (i.e., the sequence of items browsed by the user). Specifically, perform nearest neighbor retrieval based on the correlation between the target item and the items in the user's super-long sequence in the modal embedding representation space, so as to find the subsequence that is most relevant to the modal features of the target item. Calculate the distance between the target item and each item in the user's super-long sequence in the embedding space, find the subset of items closest to the target item, and sort them according to the user's browsing time to obtain the relevant subsequences of the target item. In this way, the retrieval of relevant subsequences can avoid directly modeling the entire user's super-long sequence, thereby greatly reducing the algorithmic time and space complexity of behavior modeling.
[0193] The sequence model is trained based on the sequence of items browsed by the user. Specifically, the low-dimensional embedding representation of the item is placed in the large language model structure to obtain the sequence model, and the sequence model is trained based on the sequence of items browsed by the user through autoregressive pre-training. The autoregressive pre-training method refers to predicting the item at the target position based on the items before the target position in the item sequence, and the training goal is to maximize the predicted probability of the item at the target position. During model training, the model predicts the probability that the tth item identifier in the sequence belongs to the tth position in the sequence based on the low-dimensional embedding representation of the 1st to t-1th item identifiers in the sequence. The training goal of the model is to maximize the probability that the tth item identifier in the sequence belongs to the tth position in the sequence. The sequence model is obtained through user behavior sequence training, and there is no need to specially construct complex training data.
[0194] After training the sequence model and extracting the relevant subsequences of the target item, the target item is spliced after the relevant subsequence to obtain the relevant behavior sequence of the user and the target item. The relevant behavior sequence of the user and the target item is input into the trained sequence model to obtain the sequence embedding representation of the behavior sequence related to the user and the target item. In this way, the autoregressive structure of the large language model is used to more naturally model the embedding representation of the sequence composed of the user's ultra-long sequence and the target item. By completing the training sequence model, the embedding representation of the user's behavior sequence related to the target item can be efficiently modeled, thereby better understanding the user's interests, habits and behavior trends.
[0195] Based on the sequence embedding representation, the matching score between the user and the target item can be calculated, and the item recommendation can be performed based on the matching score. Specifically, the embedding representation of the target item, the embedding representation of the user, and the sequence embedding representation are input into the matching model, and the matching model outputs the matching score between the user and the target item. The target item with a higher matching score is obtained as the recommended item, and each recommended item is recommended to the user in order from high to low according to the matching score.
[0196] It can be understood that item recommendation can be actively recommended to users, for example, after the user opens or logs into the application on the terminal, the application actively recommends items to the user. Item recommendation can also be passively recommended to users, for example, after the user opens or logs into the application on the terminal, the user enters search information in the search bar, and the application recommends items to the user based on the search information, that is, returns search results to the user based on the search information.
[0197] An application can refer to a client installed in a terminal. A client (also called an application client or APP client) refers to a program installed and running in a terminal. An application can also refer to an installation-free application, that is, an application that can be used without downloading and installing. This type of application can also be called a mini-program, which usually runs as a subprogram in a client. An application can also refer to a web application opened through a browser; and so on.
[0198] It can be understood that the method of the present application can be applied to item recommendations in various applications, for example, video recommendations in video applications, advertisement recommendations in social applications, content searches in search applications, and so on.
[0199] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0200] Based on the same inventive concept, the embodiment of the present application also provides an item data processing device for implementing the item data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more item data processing device embodiments provided below can refer to the limitations of the item data processing method above, and will not be repeated here.
[0201] In one embodiment, Fig.12 As shown, an item data processing device is provided, including: a data acquisition module 1202, a related item determination module 1204, an item combination module 1206 and a sequence feature extraction module 1208, wherein:
[0202] The data acquisition module 1202 is used to acquire the target item and the interactive item sequence of the target object.
[0203] The associated item determination module 1204 is used to determine the associated item sequence of the target item from the interactive item sequence of the target object.
[0204] The item association module 1206 is used to obtain a joint item sequence based on the associated item sequence and the target item, and input the joint item sequence into a target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of the training object.
[0205] The sequence feature extraction module 1208 is used to query the preset item features corresponding to each item in the joint item sequence in the preset item feature set through the target sequence model, perform feature interaction on each preset item feature found, and output the item sequence features of the joint item sequence; the item sequence features are used to determine the matching degree between the target item and the target object.
[0206] In one embodiment, the associated item determination module 1204 is further configured to:
[0207] For the interactive items in the interactive item sequence between the target item and the target object, extract the target item features of the item; the target item features are obtained by performing dimensionality reduction processing on the initial item features of the item;
[0208] Based on the feature distance between the target item features of the target item and the interactive item, a related item sequence of the target item is determined from the interactive item sequence of the target object.
[0209] In one embodiment, the associated item determination module 1204 is further configured to:
[0210] generating a current item identification sequence based on the item identification of the current item, and inputting the current item identification sequence into a target dimensionality reduction model; the current item is a target item or an interactive item in an interactive item sequence of a target object, and the target dimensionality reduction model includes an initial item feature set;
[0211] Through the target dimension reduction model, the initial item features corresponding to the item identifier of the current item are queried in the initial item feature set, and the queried initial item features are enhanced and reduced in dimension to output the target item features of the current item.
[0212] In one embodiment, the item data processing device is further configured to:
[0213] Acquire a first item identification sequence, and input the first item identification sequence into an initial dimensionality reduction model; the first item identification sequence is obtained based on an interactive item sequence of a first training object, and the initial dimensionality reduction model includes an initial item feature set;
[0214] By using the initial dimension reduction model, in the initial item feature set, initial item features corresponding to each item identification before the first position in the first item identification sequence are queried, and feature enhancement and feature dimension reduction are performed on each of the queried initial item features to obtain a predicted item feature corresponding to the first position, and based on the predicted item feature corresponding to the first position, a first predicted probability corresponding to the item identification at the first position in the first item identification sequence is obtained; the first position is determined from each item identification position of the first item identification sequence, and the first predicted probability represents a predicted correlation between the item corresponding to the first position and the forward item sequence corresponding to the first position;
[0215] Obtaining a first loss based on first predicted probabilities corresponding to the item identifiers at the first positions in the first item identifier sequence;
[0216] The model parameters of the initial dimensionality reduction model are adjusted based on the first loss until the first convergence condition is met, thereby obtaining the target dimensionality reduction model.
[0217] In one embodiment, the item data processing device is further configured to:
[0218] Performing a linear transformation on the predicted item feature corresponding to the first position to obtain an initial item distribution feature corresponding to the first position; the initial item distribution feature includes feature values corresponding to each candidate item in the candidate item set;
[0219] Performing feature value compression on the initial item distribution feature to obtain a target item distribution feature corresponding to the first position; the target item distribution feature includes first prediction probabilities corresponding to each candidate item in the candidate item set, and the candidate item set includes items corresponding to each item identifier in the first item identifier sequence;
[0220] A first predicted probability corresponding to an item identifier at a first position in a first item identifier sequence is determined from the target item distribution feature.
[0221] In one embodiment, the initial dimensionality reduction model includes an embedding layer, a projection layer, a correction layer and an output layer, the embedding layer is used to query the initial item features, the projection layer is used for feature dimensionality reduction, the correction layer is used for feature enhancement, and the output layer is used to output a first predicted probability.
[0222] In one embodiment, the item data processing device is further configured to:
[0223] Based on the first loss, the model parameters of the projection layer, the correction layer and the output layer in the initial dimensionality reduction model are adjusted until the first convergence condition is met to obtain the target dimensionality reduction model.
[0224] In one embodiment, the item data processing device is further configured to:
[0225] Obtain the item description text corresponding to each candidate item in the candidate item set;
[0226] Through the large language model, feature extraction is performed on the item description text to obtain the initial item features corresponding to each candidate item;
[0227] Based on the initial item features corresponding to each candidate item, an initial item feature set is obtained.
[0228] In one embodiment, the associated item determination module 1204 is further configured to:
[0229] Based on the feature distance between the target item features of the target item and the interactive item, multiple associated items of the target item are determined from the interactive item sequence of the target object in ascending order of the feature distance;
[0230] Sort each associated item according to the interaction time with the target object to obtain the associated item sequence of the target item.
[0231] In one embodiment, the item data processing device is further configured to:
[0232] Acquire a second item identification sequence, and input the second item identification sequence into an initial sequence model; the second item identification sequence is obtained based on an interactive item sequence of a second training object, and the initial sequence model includes a preset item feature set;
[0233] By using the initial sequence model, in the preset item feature set, the preset item features corresponding to each item identification before the second position in the second item identification sequence are queried, and feature interaction is performed on each of the queried preset item features to obtain a predicted item feature corresponding to the second position, and based on the predicted item feature corresponding to the second position, a second predicted probability corresponding to the item identification at the second position in the second item identification sequence is obtained; the second position is determined from each item identification position of the second item identification sequence, and the second predicted probability represents a predicted correlation between the item corresponding to the second position and the forward item sequence corresponding to the second position;
[0234] Obtaining a second loss based on second predicted probabilities corresponding to the item identifiers at the respective second positions in the second item identifier sequence;
[0235] The model parameters of the initial sequence model are adjusted based on the second loss until the second convergence condition is met, thereby obtaining the target sequence model.
[0236] In one embodiment, the initial sequence model includes an embedding layer, an interaction layer, and an output layer, wherein the embedding layer is used to query preset item features, the interaction layer is used for feature interaction, and the output layer is used to output the second prediction probability. The item data processing device is also used to:
[0237] Based on the second loss, the model parameters of the interaction layer and the output layer in the initial sequence model are adjusted until the second convergence condition is met to obtain the target sequence model.
[0238] In one embodiment, the sequence feature extraction module 1208 is further used to:
[0239] According to the order of items in the joint item sequence, the queried preset item features are combined to obtain a preset item feature sequence;
[0240] Performing feature interaction on a preset item feature sequence to obtain an item interaction feature sequence; the item interaction feature sequence includes item interaction features that match the number of items in the joint item sequence;
[0241] From the item interaction feature sequence, the item interaction feature at the item position of the target item is obtained as the item sequence feature of the joint item sequence.
[0242] In one embodiment, the preset item features in the preset item feature set are target item features of the item, and the target item features of the item are obtained by performing dimensionality reduction processing on the initial item features of the item.
[0243] In one embodiment, the item data processing device is further configured to:
[0244] Obtaining item features of the target item and object features of the target object;
[0245] The item sequence features, the item features of the target item, and the object features of the target object are input into the target matching model to obtain the matching degree between the target item and the target object.
[0246] The above-mentioned item data processing device screens items in the interactive item sequence of the target object to obtain the associated item sequence of the target item, which can avoid directly embedding representation modeling of a longer sequence, effectively reduce the computational complexity, and improve data processing efficiency. The target sequence model is obtained by training based on the interactive item sequence of the training object, and can accurately extract the embedding representation of the item sequence. Therefore, the joint item sequence obtained based on the associated item sequence and the target item is input into the target sequence model for embedding representation modeling, and an accurate embedding representation can be extracted. The target sequence model performs joint embedding representation modeling of the target item and the associated item sequence by querying the initial item features of the target item and the associated item sequence. The item sequence features obtained by embedding representation modeling can accurately reflect the behavior embedding representation of the target object on the target item. Subsequently, the matching degree between the target item and the target object can be determined based on the item sequence features, and items can be recommended to the target object based on the matching degree, which can effectively improve the accuracy and effectiveness of the recommendation.
[0247] Each module in the above-mentioned article data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0248] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as sequence models and dimensionality reduction models. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing item data is implemented.
[0249] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for processing item data is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0250] Those skilled in the art will understand that Fig.13 , Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0251] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0252] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0253] In one embodiment, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0254] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0255] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0256] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0257] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for processing item data, characterized in that: The method comprises: Obtain the target item and the interaction item sequence of the target object; Extracting target item features of the target item and the interactive item in the interactive item sequence of the target object; the target item features are obtained by performing dimensionality reduction processing on initial item features of the item; determining, based on a feature distance between respective target item features of the target item and the interactive item, a sequence of associated items of the target item from the interactive item sequence of the target object; Based on the associated item sequence and the target item, a joint item sequence is obtained, and the joint item sequence is input into a target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of a training object; Through the target sequence model, in the preset item feature set, the preset item features corresponding to each item in the joint item sequence are queried, and feature interaction is performed on each queried preset item feature to output the item sequence features of the joint item sequence; the item sequence features are used to determine the matching degree between the target item and the target object.
2. The method according to claim 1, characterized in that The step of extracting target item features of an interactive item in the interactive item sequence between the target item and the target object includes: generating a current item identification sequence based on the item identification of the current item, and inputting the current item identification sequence into a target dimensionality reduction model; the current item is the target item or an interactive item in the interactive item sequence of the target object, and the target dimensionality reduction model includes an initial item feature set; Through the target dimension reduction model, in the initial item feature set, the initial item feature corresponding to the item identifier of the current item is queried, feature enhancement and feature dimension reduction are performed on the queried initial item feature, and the target item feature of the current item is output.
3. The method according to claim 2, characterized in that The method further comprises: Acquire a first item identification sequence, and input the first item identification sequence into an initial dimensionality reduction model; the first item identification sequence is obtained based on an interactive item sequence of a first training object, and the initial dimensionality reduction model includes the initial item feature set; By using the initial dimension reduction model, in the initial item feature set, initial item features corresponding to each item identification before the first position in the first item identification sequence are queried, and feature enhancement and feature dimension reduction are performed on each queried initial item feature to obtain a predicted item feature corresponding to the first position, and based on the predicted item feature corresponding to the first position, a first predicted probability corresponding to the item identification at the first position in the first item identification sequence is obtained; the first position is determined from each item identification position of the first item identification sequence, and the first predicted probability represents a predicted correlation between the item corresponding to the first position and a forward item sequence corresponding to the first position; Obtaining a first loss based on first predicted probabilities corresponding to the item identifiers at the first positions in the first item identifier sequence; Based on the first loss, the model parameters of the initial dimensionality reduction model are adjusted until a first convergence condition is met, thereby obtaining the target dimensionality reduction model.
4. The method according to claim 3, characterized in that The obtaining, based on the predicted item feature corresponding to the first position, a first predicted probability corresponding to the item identifier at the first position in the first item identifier sequence includes: Performing a linear transformation on the predicted item feature corresponding to the first position to obtain an initial item distribution feature corresponding to the first position; the initial item distribution feature includes feature values corresponding to each candidate item in the candidate item set; Performing feature value compression on the initial item distribution feature to obtain a target item distribution feature corresponding to the first position; the target item distribution feature includes a first predicted probability corresponding to each candidate item in the candidate item set, and the candidate item set includes items corresponding to each item identifier in the first item identifier sequence; A first predicted probability corresponding to the item identifier at the first position in the first item identifier sequence is determined from the target item distribution feature.
5. The method according to claim 3, characterized in that: The initial dimension reduction model includes an embedding layer, a projection layer, a correction layer and an output layer, wherein the embedding layer is used to query initial item features, the projection layer is used for feature dimension reduction, the correction layer is used for feature enhancement, and the output layer is used to output a first prediction probability; The step of adjusting the model parameters of the initial dimensionality reduction model based on the first loss until a first convergence condition is satisfied to obtain the target dimensionality reduction model comprises: Based on the first loss, the model parameters of the projection layer, the correction layer and the output layer in the initial dimensionality reduction model are adjusted until a first convergence condition is met to obtain the target dimensionality reduction model.
6. The method according to claim 2, characterized in that The method further comprises: Obtain the item description text corresponding to each candidate item in the candidate item set; By using a large language model, feature extraction is performed on the item description text to obtain initial item features corresponding to each of the candidate items; The initial item feature set is obtained based on the initial item features corresponding to the candidate items.
7. The method according to claim 1, characterized in that The determining of the associated item sequence of the target item from the interactive item sequence of the target object based on the feature distance between the target item features of the target item and the interactive item respectively includes: Based on the feature distance between the target item features of the target item and the interactive item, determining a plurality of associated items of the target item from the interactive item sequence of the target object in ascending order of feature distance; The associated items are sorted according to the interaction time with the target object to obtain an associated item sequence of the target item.
8. The method according to claim 1, characterized in that The method further comprises: Acquire a second item identification sequence, and input the second item identification sequence into an initial sequence model; the second item identification sequence is obtained based on an interactive item sequence of a second training object, and the initial sequence model includes the preset item feature set; By using the initial sequence model, in the preset item feature set, the preset item features corresponding to each item identification before the second position in the second item identification sequence are queried, and feature interaction is performed on each of the queried preset item features to obtain a predicted item feature corresponding to the second position, and based on the predicted item feature corresponding to the second position, a second predicted probability corresponding to the item identification at the second position in the second item identification sequence is obtained; the second position is determined from each item identification position in the second item identification sequence, and the second predicted probability represents a predicted correlation between the item corresponding to the second position and a forward item sequence corresponding to the second position; Obtaining a second loss based on second predicted probabilities corresponding to the item identifiers at the second positions in the second item identifier sequence; The model parameters of the initial sequence model are adjusted based on the second loss until a second convergence condition is met, thereby obtaining the target sequence model.
9. The method according to claim 8, characterized in that The initial sequence model includes an embedding layer, an interaction layer and an output layer, wherein the embedding layer is used to query preset item features, the interaction layer is used for feature interaction, and the output layer is used to output a second prediction probability; The adjusting the model parameters of the initial sequence model based on the second loss until a second convergence condition is satisfied to obtain the target sequence model includes: Based on the second loss, model parameters of the interaction layer and the output layer in the initial sequence model are adjusted until a second convergence condition is met, thereby obtaining the target sequence model.
10. The method according to claim 1, characterized in that The step of performing feature interaction on each of the preset item features found out and outputting the item sequence features of the combined item sequence includes: Combining the queried preset item features according to the item order of the combined item sequence to obtain a preset item feature sequence; Performing feature interaction on the preset item feature sequence to obtain an item interaction feature sequence; the item interaction feature sequence includes item interaction features that match the number of items in the joint item sequence; From the item interaction feature sequence, an item interaction feature at the item position of the target item is obtained as an item sequence feature of the joint item sequence.
11. The method according to claim 1, characterized in that: The preset item features in the preset item feature set are target item features of the item, and the target item features of the item are obtained by performing dimensionality reduction processing on the initial item features of the item.
12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: Acquire item features of the target item and object features of the target object; The item sequence features, the item features of the target item, and the object features of the target object are input into a target matching model to obtain a matching degree between the target item and the target object.
13. The method according to claim 12, characterized in that The method further comprises: Acquire training samples with training labels; the training samples include item features of training items, object features of training objects, and fusion features obtained based on interactive item sequences of the training items and training objects; Based on the training samples and the training labels, supervised training is performed on the initial matching model to obtain the target matching model.
14. An item data processing device, characterized in that: The device comprises: A data acquisition module, used to acquire a target item and an interactive item sequence of a target object; an associated item determination module, for extracting target item features of an item from the target item and an interactive item in the interactive item sequence of the target object; the target item features are obtained by performing dimensionality reduction processing on the initial item features of the item; and determining an associated item sequence of the target item from the interactive item sequence of the target object based on a feature distance between the target item features of the target item and the interactive item; An item association module, used to obtain a joint item sequence based on the associated item sequence and the target item, and input the joint item sequence into a target sequence model; the target sequence model includes a preset item feature set, and the target sequence model is obtained by training based on the interactive item sequence of a training object; A sequence feature extraction module is used to query the preset item features corresponding to each item in the joint item sequence in the preset item feature set through the target sequence model, perform feature interaction on each of the queried preset item features, and output the item sequence features of the joint item sequence; the item sequence features are used to determine the matching degree between the target item and the target object.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Target recommendation method and device
CN115631012A
Sequence recommendation method and device
CN115687777A
Article data processing method and device, computer equipment and storage medium
CN116703531A
Article recommendation method and device, equipment and storage medium
CN116720919A
Serialized recommendation method and device based on long user behaviors and storage medium
CN117390074A
