Recommendation model training, recommendation methods, devices, electronic equipment and storage media
By processing the multi-attribute semantic embeddings of the recommended object and the current object, a comprehensive semantic embedding feature matrix is generated and a recommendation model is trained. This solves the problem of insufficient surprise and comprehensiveness of recommendation results in existing technologies, and achieves more accurate and comprehensive recommendation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 达观数据(苏州)有限公司
- Filing Date
- 2022-12-14
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies in intelligent recommendation suffer from poor surprise factor in recommendation results, unreliability in recommendations for new users, and failure to effectively handle sparse data and complex attributes, while ignoring the multi-dimensional features of the recommended objects.
By acquiring multi-attribute information of the object to be recommended and the current object, semantic embedding processing is performed to generate a comprehensive semantic embedding feature matrix, which is then input into the recommendation model for training. The similarity is calculated using the comprehensive semantic embedding features to determine the target recommendation object.
It improves the accuracy of the recommendation model and the comprehensiveness of the recommendation results, solves the problems of single text features and text length differences, and enhances the recommendation effect.
Smart Images

Figure CN115982425B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of recommendation technology, and in particular to a recommendation model training, recommendation method, apparatus, electronic device and storage medium. Background Technology
[0002] With the rapid development of information technology and the rise of mobile internet, we have entered an era of massive data. Faced with a dazzling array of products, movies, songs, videos, news, and other services every day, it can be difficult to quickly find information of interest. Intelligent recommendation technology, through algorithmic models, can recommend similar or related content based on the user's current browsing activity.
[0003] Currently, when making intelligent recommendations, technicians typically use recommendation methods based on text content matching, methods based on text vector similarity calculation, and matching methods based on text feature relevance calculation.
[0004] In the process of developing this invention, the inventors discovered the following problems with existing technologies: While text content matching-based recommendation methods can guarantee high relevance of recommended content, the high degree of matching leads to poor surprise in the recommendation results, and they cannot provide reliable recommendations for new users. Furthermore, their recommendation results are not ideal for handling sparse data and complex attributes. Methods for calculating similarity based on text vectors typically generate text vectors using methods such as topic models, and are often implemented using a single vector generation model. However, the text lengths in the attribute fields of recommended objects vary; generally, the body text length is greater than the title length, which is greater than the tag length. This necessitates differentiated generation methods to achieve better recommendation results. Matching methods for calculating relevance based on text features only consider the text features of the recommended objects, ignoring other related features. Summary of the Invention
[0005] This invention provides a recommendation model training, recommendation method, apparatus, electronic device, and storage medium, which improves the accuracy of the recommendation model, ensures the comprehensiveness of the relevant recommendation results, and also improves the overall effect of the recommendation results.
[0006] According to one aspect of the present invention, a method for training a recommendation model is provided, comprising:
[0007] Obtain sample data of the objects to be recommended, including multi-attribute information of the objects to be recommended, and current object data of the current object;
[0008] Semantic embedding processing is performed on the sample data of the object to be recommended and the data of the current object to obtain a comprehensive semantic embedding feature; wherein, the comprehensive semantic embedding feature is composed of multiple single-attribute basic attribute semantic embedding features and attribute cross semantic embedding features;
[0009] A semantic embedding feature matrix of sample data is generated based on the comprehensive semantic embedding features, wherein the sample data is composed of the sample data of the object to be recommended and the sample data of the current object;
[0010] The semantic embedding features are used as training data and input into the recommendation model for training.
[0011] According to another aspect of the present invention, a recommendation method is provided, comprising:
[0012] Retrieve the associated data of the current object and the associated data of the candidate recommended objects;
[0013] The current object association data of the current object and the candidate object association data of the candidate recommended objects are input into the recommendation model to obtain the similarity between each candidate recommended object and the current object.
[0014] Based on the similarity between each of the candidate recommendation objects and the current object, a target recommendation object matching the current object is determined;
[0015] The recommendation model is trained using the recommendation model training method described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a recommendation model training apparatus is provided, comprising:
[0017] The module for acquiring sample data of objects to be recommended is used to acquire sample data of objects to be recommended, including multi-attribute dimension information of the objects to be recommended, and current object data of the current object.
[0018] The semantic embedding processing module is used to perform semantic embedding processing on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features; wherein, the comprehensive semantic embedding features are composed of multiple single-attribute basic attribute semantic embedding features and attribute cross semantic embedding features;
[0019] The semantic embedding feature matrix generation module generates a semantic embedding feature matrix of sample data based on the comprehensive semantic embedding features, wherein the sample data is composed of the sample data of the object to be recommended and the sample data of the current object;
[0020] The recommendation model training module is used to input the semantic embedding features as training data into the recommendation model for training.
[0021] According to another aspect of the present invention, a recommendation device is provided, comprising:
[0022] The object association data acquisition module is used to acquire the current object association data of the current object and the candidate object association data of the candidate recommended objects;
[0023] The similarity acquisition module is used to input the current object association data of the current object and the candidate object association data of the candidate recommended objects into the recommendation model to obtain the similarity between each candidate recommended object and the current object.
[0024] The target recommendation object determination module is used to determine the target recommendation object that matches the current object based on the similarity between each of the candidate recommendation objects and the current object;
[0025] The recommendation model is trained using the recommendation model training method described in any embodiment of the present invention.
[0026] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0027] At least one processor; and
[0028] A memory communicatively connected to the at least one processor; wherein,
[0029] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the recommendation model training method or recommendation method described in any embodiment of the present invention.
[0030] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the recommendation model training method or recommendation method described in the embodiments of the present invention.
[0031] The technical solution of this invention first acquires sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, and current object data of the current object. Then, semantic embedding processing is performed on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features. A semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, and the semantic embedding features are used as training data input into the recommendation model for training. Correspondingly, after the recommendation model training is completed, current object association data of the current object and candidate object association data of the candidate recommended objects are acquired. These are input into the recommendation model to obtain the similarity between each candidate recommended object and the current object. Finally, the target recommended object matching the current object is determined based on the similarity between each candidate recommended object and the current object. This technical solution, by performing comprehensive semantic embedding learning representation on the sample data of the object to be recommended and the current object data of the current object, greatly expands the expressive power of features, solves the problems of single text features and failure to consider text length differences in existing technologies, improves the accuracy of the recommendation model, ensures the comprehensiveness of relevant recommendation results, and also improves the overall effect of the recommendation results.
[0032] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart of a recommendation model training method provided in Embodiment 1 of the present invention;
[0035] Figure 2 This is a flowchart of another recommendation model training method provided in Embodiment 2 of the present invention;
[0036] Figure 3 This is a flowchart of a recommended method provided in Embodiment 3 of the present invention;
[0037] Figure 4 This is an overall schematic diagram of a recommended method provided in Embodiment 3 of the present invention;
[0038] Figure 5 This is a schematic diagram of a recommendation module provided in Embodiment 3 of the present invention;
[0039] Figure 6 This is a schematic diagram of the structure of a recommendation model training device provided in Embodiment 4 of the present invention;
[0040] Figure 7 This is a schematic diagram of the structure of a recommended device provided in Embodiment 5 of the present invention;
[0041] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of the present invention. Detailed Implementation
[0042] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0044] Example 1
[0045] Figure 1 This is a flowchart of a recommendation model training method provided by an embodiment of the present invention. This embodiment is applicable to situations where recommendation models are trained using recommendation object attribute data in the form of semantic embedding. The method can be executed by a recommendation model training device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. This electronic device can be a terminal device or a server device; the present invention does not limit the specific type of electronic device. Accordingly, as... Figure 1 As shown, the method includes the following operations:
[0046] S110. Obtain sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, and current object data of the current object.
[0047] The sample data for the objects to be recommended can be relevant data containing multi-attribute information, enabling resource recommendation and display. For example, audio and video content, images, songs, movies, products, and news updates on internet web pages can all serve as objects to be recommended, and corresponding data related to these objects can be used as sample data. The current object data can also contain multi-attribute information, enabling resource recommendation and display. For example, audio and video content, images, songs, movies, products, and news updates that a user is currently browsing on an internet web page can all serve as the current object.
[0048] For example, the sample data for the objects to be recommended can be product sample data from an e-commerce platform. Specifically, during the product display process on an e-commerce platform, product information including tags, titles, body text, images, and videos, which are described with multiple attributes, can serve as sample data for the objects to be recommended. The current object data can be the sample data of products that the user is currently browsing on the e-commerce platform. Specifically, during the user's browsing process on the e-commerce platform, product information including tags, titles, body text, images, and videos, which are described with multiple attributes, can serve as the current object data.
[0049] For example, the sample data for the objects to be recommended can be sample data of news flashes on web pages. Specifically, news flashes displayed on internet web pages, including descriptions of multiple attributes such as titles, keywords, and body text, can serve as sample data for the objects to be recommended. The current object data can also be sample data of news flashes on web pages. Specifically, news flashes that users are currently browsing on internet news pages, including descriptions of multiple attributes such as tags, titles, body text, images, and videos, can serve as current object data.
[0050] For example, the sample data for the objects to be recommended can be audio sample data from music software. Specifically, during the display of song charts in music software, audio information containing multiple attributes such as song title, artist name, and lyrics can be used as sample data for the objects to be recommended. The current object data can also be audio sample data from music software. Specifically, the audio information of a song that the user is currently playing in the music software, including multiple attributes such as song title, artist name, and lyrics, can be used as the current object data.
[0051] S120. Perform semantic embedding processing on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features; wherein, the comprehensive semantic embedding features are composed of multiple single-attribute basic attribute semantic embedding features and attribute cross semantic embedding features.
[0052] Among them, the comprehensive semantic embedding feature can be a semantic embedding representation generated by feature processing of the sample data of the object to be recommended. The basic attribute semantic embedding feature can be a feature of the basic attributes of the sample data of the object to be recommended, generated through training. This can include, but is not limited to, title attribute semantic embedding features, tag attribute semantic embedding features, body text attribute semantic embedding features, image attribute semantic embedding features, video attribute semantic embedding features, and other attribute semantic embedding features. The attribute cross semantic embedding feature can be an attribute cross feature between two object sample data, generated through training. This can include, but is not limited to, the similarity between the titles and the similarity between the tags of the two objects.
[0053] In this embodiment of the invention, the sample data of the object to be recommended is used as input data and fed into a semantic embedding learning network for training and learning. This yields basic attribute semantic embedding features and attribute cross-semantic embedding features of multiple single attributes of the sample data of the object to be recommended. Then, the comprehensive semantic embedding features of the sample data of the object to be recommended are obtained from the basic attribute semantic embedding features and attribute cross-semantic embedding features of multiple single attributes of the sample data of the object to be recommended. Similarly, the current object data is used as input data and fed into a semantic embedding learning network for training and learning. This yields basic attribute semantic embedding features and attribute cross-semantic embedding features of multiple single attributes of the current object data. Then, the comprehensive semantic embedding features of the current object data are obtained from the basic attribute semantic embedding features and attribute cross-semantic embedding features of multiple single attributes of the current object data.
[0054] S130. Generate a semantic embedding feature matrix of the sample data based on the comprehensive semantic embedding features, wherein the sample data is composed of the sample data of the object to be recommended and the sample data of the current object.
[0055] The semantic embedding feature matrix can be composed of comprehensive semantic embedding features.
[0056] In this embodiment of the invention, assuming that the dimensions of the combined semantic embedding features of the current object and the object to be recommended are both M-dimensional, then each sample can obtain a semantic embedding feature matrix S of dimension 2M by concatenating the semantic embedding features.
[0057] S140. Input the semantic embedding features as training data into the recommendation model for training.
[0058] The recommendation model can be a model used for object recommendation. Optional recommendation models can be text content matching-based recommendation methods, which draw on techniques from the information retrieval field, such as the relevance feedback methods of the KNN (k-Nearest Neighbor) algorithm and the Rocchio algorithm, to match text content and generate recommendation results.
[0059] Optionally, the recommendation model can also be based on the method of calculating similarity based on text vectors. This is usually done by generating text vectors based on methods such as topic models, calculating the similarity of the text vectors, and then generating recommendation results.
[0060] Alternatively, the recommendation model can also be a method based on text features to calculate relevance, which generates recommendation results by evaluating the relevance of text features.
[0061] In this embodiment of the invention, the semantic embedding feature S is used as the input data of the recommendation model and fed into the recommendation model for training and learning, thereby generating recommendation results.
[0062] The technical solution of this invention first acquires sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, and current object data of the current object. Then, semantic embedding processing is performed on the sample data of the object to be recommended and the current object data of the current object to obtain comprehensive semantic embedding features. A semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, and the semantic embedding features are used as training data input into the recommendation model for training. This technical solution, by performing comprehensive semantic embedding learning on the sample data of the object to be recommended and the current object data of the current object, greatly expands the expressive power of features, solves the problems of single text features and failure to consider text length differences in existing technologies, improves the accuracy of the recommendation model, ensures the comprehensiveness of relevant recommendation results, and also improves the overall effect of the recommendation results.
[0063] Example 2
[0064] Figure 2 This is a flowchart of another recommendation model training method provided by an embodiment of the present invention. The embodiment of the present invention is based on the above embodiment and is further specified. In this embodiment, specific optional implementation methods are given for semantic embedding processing of the sample data of the object to be recommended and the current object data of the current object, which acquire multi-attribute dimension information of the object to be recommended, and the current object data of the current object, to obtain comprehensive semantic embedding features. Correspondingly, as... Figure 2 As shown, the method in this embodiment may include:
[0065] S210. Use the recommendation log data, user click behavior data, and basic attribute data of the object to be recommended as the original sample data.
[0066] The objects to be recommended can be movie resources, news flashes, music resources, items, or any other recommendable resources. When the object to be recommended is a movie resource, the recommendation log data can record when and what type of movie data was recommended to the user. When the object to be recommended is a music resource, the recommendation log data can record when and what style of music data was recommended to the user. User click behavior data can record when and in what context the user clicked on which recommended items. The basic attribute data of the object to be recommended can record basic information identifying the fields of the object to be recommended; this will vary depending on the recommendation scenario.
[0067] In this embodiment of the invention, the recommendation log data may include fields such as the unique identifier ID of the recommended user (rec_userid), the unique identifier ID of the current object (cur_itemid), the unique identifier ID of the recommended object (rec_itemid), the recommendation date (rec_date), and the recommendation identifier ID (recid), and is sharded by day and stored row by row, in the following format:<rec_userid,src_itemid,rec_itemid,recid,rec_date> For example, assuming the object to be recommended is an item, the unique identifier ID of the current object can be the unique identifier ID of the currently displayed item, and the unique identifier ID of the recommended object can be the unique identifier ID of the recommended item.
[0068] In this embodiment of the invention, user click behavior data may include fields such as user unique identifier ID (click_userid), unique identifier ID of the clicked recommended object (click_itemid), source recommendation log identifier ID of the clicked object (src_recid), and the date of the behavior (click_date), and is sharded by day and stored row by row, in the following format:<click_userid,click_itemid,src_recid,click_date> For example, assuming the object to be recommended is an item, the unique identifier ID of the clicked recommended object can be the unique identifier ID of the recommended item, and the source recommendation log identifier ID of the clicked object can be the source recommendation log identifier ID of the clicked item.
[0069] In this embodiment of the invention, the basic attribute data of the object to be recommended may include the unique identifier ID (itemid), title, tag, category, content, image information, video information, etc., where there may be multiple tags, images, etc. For example, assuming the object to be recommended is an item, the unique identifier ID of the object to be recommended may be the unique identifier ID of the item to be recommended.
[0070] S220. Perform data preprocessing on the original sample data to obtain preprocessed original sample data.
[0071] Among them, the preprocessed raw sample data can be the data obtained by cleaning, reviewing and verifying the raw sample data.
[0072] In this embodiment of the invention, the original sample data is cleaned, reviewed and verified to find and correct identifiable errors in the data, and erroneous or conflicting data is removed according to certain rules. At the same time, the data consistency is checked, invalid values and missing values are processed, and finally preprocessed original sample data is obtained.
[0073] S230. Extract key sample data from the preprocessed raw sample data to obtain the sample data of the object to be recommended.
[0074] Among them, key sample data can be data composed of key fields in the original sample data.
[0075] In this embodiment of the invention, taking items as an example, the recommendation log data and user click behavior data are jointly queried using the query conditions "rec_userid = click_userid, rec_itemid = click_itemid, rec_date = click_date, and recid = src_recid". If the item is found in the user click behavior data, the label is set to 1; otherwise, it is set to 0. The data is then sharded and stored row-by-row according to rec_date, yielding key sample data including the unique identifier ID of the user to be recommended (rec_userid), the unique identifier ID of the current item (cur_itemid), the unique identifier ID of the recommended item (rec_itemid), the recommendation date (rec_date), and the click label (1 for clicks, 0 for no clicks). Data from the previous N days is selected as training samples, and data from the N+1th day is selected as test samples, ultimately obtaining the sample data of the item to be recommended.
[0076] S240. Perform semantic embedding processing on the single-attribute object sample data of each attribute dimension of the object to be recommended to obtain the basic attribute semantic embedding features of multiple single attributes of the object to be recommended.
[0077] Among them, single-attribute object sample data can represent sample data of objects to be recommended that have a single attribute.
[0078] In this embodiment of the invention, the single-attribute object sample data can be the title attribute object sample data of the object to be recommended. Specifically, firstly, the title text of the object to be recommended is preprocessed by removing punctuation marks and stop words. Then, the length of the item title text is calculated. If the length of the title text is less than L1, padding is used. If it exceeds L1, tokens exceeding L1 are deleted to ensure that the title text length remains at L1. Then, the title text data of length L1 is used as input data for the BERT (Bidirectional Encoder Representation from Transformers) model for training, resulting in a title attribute semantic embedding feature E of dimension K. title1 In the training process of the BERT model, the mask is usually handled by randomly removing some tokens to train the model. In the actual business scenario of item recommendation, the mask processing focuses more on removing tokens with noun parts of speech.
[0079] In this embodiment of the invention, the single-attribute object sample data can also be the tag attribute object sample data of the object to be recommended. The tag text data of the object to be recommended is a list of words summarizing the semantic information of the items extracted by business personnel based on material data. In this embodiment of the invention, the semantic embedding features of the tag attributes are obtained using the Word2Vec (Word to Vector) model. Specifically, the tag attribute object sample data is used as the input data of the Word2Vec model and fed into the Word2Vec model for training and learning to obtain the vectorized representation of the tag attributes. Because the setting of the tag dimension depends on the number of tags, in order to balance dimensionality reduction and semantic representation capabilities, when the number of tags is N1, the output vector dimension of the tag is determined to be... Practice has shown that the importance of labels themselves varies. Therefore, the vectorized representation of the obtained label attributes is used as input data for a self-attention network. This network is then trained to learn the weights of different label vectors, ultimately yielding a K-dimensional semantic embedding feature of the label attributes, denoted as E. tag1 .
[0080] In this embodiment of the invention, the single-attribute object sample data can also be the body text attribute object sample data of the object to be recommended. The body text data package of the object to be recommended contains rich and detailed semantic content. Compared with the title text and tag text data, the body text is generally longer, ranging from hundreds to thousands of words. Considering the text length, in this embodiment of the invention, the LDA (Latent Dirichlet Allocation, document topic generation model) model is used to obtain the body text attribute semantic embedding features. Specifically, the body text attribute object sample data is used as the input data of the LDA model and fed into the LDA model for training and learning to obtain the body text attribute semantic embedding features of dimension K, denoted as E. co ent1 .
[0081] In this embodiment of the invention, the single-attribute object sample data can also be the image attribute object sample data of the object to be recommended. The image text data of the object to be recommended contains a large amount of valuable feature information, and making full use of the image text data of the object to be recommended helps to improve the recommendation effect. Specifically, firstly, the existing images of the object to be recommended (including the cover and the detailed display image of the object to be recommended) are augmented (including rotation, cropping and highlighting operations) to obtain K1 images as input data of the ResNet (Residual Neural Network) network. These images are then fed into the ResNet network for training and learning to obtain the vector representation of each image. The vectorized representation of the images is then used as input data of the self-attention network for training and learning the weights of different image vectors. Finally, an image attribute semantic embedding feature of dimension K1 is generated, represented as E. picture1 .
[0082] In this embodiment of the invention, the single-attribute object sample data can also be the video attribute object sample data of the object to be recommended. Specifically, the first frame of the video is taken as the first image, and the last frame is taken as the second image. Assuming the total duration of the video is T1 (in seconds), and the maximum number of images that the machine can process is k1 (k>2), if... Then, by segmenting frames into T images per second (the smallest unit), the remaining KT-2 images are filled using data augmentation. Then according to The video is segmented into k1 images at integer seconds. After frame extraction, the resulting images are then subjected to embedding generation learning according to the method described in the above embodiment, ultimately generating video attribute semantic embedding features of dimension K, denoted as E. video1 .
[0083] In this embodiment of the invention, the single-attribute object sample data can also be the associated attribute object sample data of the object to be recommended. In addition to the aforementioned attribute features such as title, tag, body text, image, and video, the object to be recommended also has a unique ID, and may also have attributes such as publisher and category. These attributes characterize the object to be recommended from other dimensions. This attribute information is generally processed first using one-hot or multi-hot encoding. Specifically, when the item attribute has a unique value and a one-to-one relationship (e.g., publisher, where one recommended object has only one publisher, and vice versa, where one publisher can publish to multiple recommended objects), one-hot encoding is used; if the item attribute has a multi-value relationship (e.g., category, where one recommended object can belong to multiple categories), multi-hot encoding is used. Each type of data, according to the mapping relationship between materials and attributes, can be processed using one-hot or multi-hot encoding to obtain a vector representation of the associated attribute information. This vector representation of the associated attribute information is then input into the embedding layer for processing, ultimately generating a semantic embedding feature of dimension K for associated attributes, represented as E. other1 .
[0084] S250. Perform semantic embedding processing on the single-attribute object data of each attribute dimension of the current object data to obtain the basic attribute semantic embedding features of multiple single attributes of the current object.
[0085] In this embodiment of the invention, the single-attribute object sample data can be the title attribute object sample data of the current object. Specifically, the title text of the current object is first preprocessed by removing punctuation marks and stop words. Then, the length of the title text is calculated. If the length of the title text is less than L2, padding is used. If it exceeds L2, tokens exceeding L2 are deleted to ensure that the title text length remains at L2. The title text data of length L is then used as the input data for the BERT (Bidirectional Encoder Representation from Transformers) model for training, resulting in a title attribute semantic embedding feature E of dimension K. title2 .
[0086] In this embodiment of the invention, the single-attribute object sample data can also be the tag attribute object sample data of the current object. The tag text data of the current object is a vocabulary list of highly summarized semantic information of the items extracted by business personnel based on material data. In this embodiment of the invention, the semantic embedding features of the tag attributes are obtained using the Word2Vec (Word to Vector) model. Specifically, the tag attribute object sample data is used as the input data of the Word2Vec model and fed into the Word2Vec model for training and learning to obtain the vectorized representation of the tag attributes. Because the setting of the tag dimension depends on the number of tags, in order to balance dimensionality reduction and semantic representation capabilities, when the number of tags is N2, the output vector dimension of the tag is determined to be... Practice has shown that the importance of labels themselves varies. Therefore, the vectorized representation of the obtained label attributes is used as input data for a self-attention network. This network is then trained to learn the weights of different label vectors, ultimately yielding a K-dimensional semantic embedding feature of the label attributes, denoted as E. tag2 .
[0087] In this embodiment of the invention, the single-attribute object sample data can also be the body text attribute object sample data of the current object. The body text data package of the current object contains richer and more detailed semantic content. Compared with the title text and tag text data, the body text is generally longer, ranging from hundreds to thousands of words. Considering the text length, in this embodiment of the invention, the LDA model is used to obtain the semantic embedding features of the body attributes. Specifically, the body attribute object sample data is used as the input data of the LDA model and fed into the LDA model for training and learning to obtain the semantic embedding features of the body attributes with dimension K2, denoted as E. content2 .
[0088] In this embodiment of the invention, the single-attribute object sample data can also be the image attribute object sample data of the current object. The image text data of the current object contains a large amount of valuable feature information, and making full use of the image text data of the current object helps to improve the recommendation effect. Specifically, firstly, the existing images of the current object (including the cover and the detailed display image of the object sample to be recommended) are augmented (including rotation, cropping and highlighting operations) to obtain k2 images as input data of the ResNet network. These images are then fed into the ResNet network for training and learning to obtain the vector representation of each image. The vectorized representation of the images is then used as input data of the self-attention network and fed into the self-attention network for training and learning the weights of different image vectors. Finally, a K-dimensional image attribute semantic embedding feature is generated, represented as E. picture2 .
[0089] In this embodiment of the invention, the single-attribute object sample data can also be the video attribute object sample data of the current object. Specifically, the first frame of the video is taken as the first image, and the last frame is taken as the second image. Assuming the total duration of the video is T2 (in seconds), and the maximum number of images that the machine can process is k (k>2), if... Then, by segmenting frames into T2 images per second (the smallest unit), the remaining KT-2 images are filled using data augmentation. Then according to The video is segmented into k images at integer seconds. After frame extraction, the resulting images are then subjected to embedding generation learning according to the method described in the above embodiment, ultimately generating video attribute semantic embedding features of dimension K, denoted as E. video2 .
[0090] In this embodiment of the invention, the single-attribute object sample data can also be other attribute object sample data of the current object. Besides the aforementioned attribute features such as title, tag, body text, image, and video, the current object also has a unique ID, and may also have attributes such as publisher and category. These attributes characterize the current object from other dimensions. This attribute information is generally processed using one-hot or multi-hot encoding. Specifically, when the item attribute has a unique value and a one-to-one relationship (e.g., publisher, where a current object has only one publisher, and vice versa, where one publisher can publish to multiple current objects), one-hot encoding is used. If the item attribute has a multi-value relationship (e.g., category, where a current object can belong to multiple categories), multi-hot encoding is used. Each type of data, according to the mapping relationship between materials and attributes, can be processed using one-hot or multi-hot encoding to obtain a vector representation of other attribute information. This vector representation of other attribute information is then input into the embedding layer for processing, ultimately generating semantic embedding features of other attributes with dimension K, represented as E. other2 .
[0091] S260. Calculate the attribute cross-semantic embedding features of the object to be recommended based on the semantic embedding features of each of the basic attributes of the object to be recommended and the semantic embedding features of each of the basic attributes of the current object.
[0092] In this embodiment of the invention, the m basic attribute semantic embedding features of the object to be recommended and the m basic attribute semantic embedding features of the current object are used as input data to the activation network for training and learning, ultimately generating m K-dimensional attribute cross-semantic embedding features, denoted as E. cross .
[0093] S270. Input the attribute cross-semantic embedding features and the basic attribute semantic embedding features of the current object into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the current object.
[0094] The self-attention network can be a model used to learn the weights of each attribute.
[0095] In this embodiment of the invention, the semantic embedding features of each basic attribute and the semantic embedding features of the attribute cross-assumptions of the current object are used as input data to the self-attention network for weight learning, and finally the comprehensive semantic embedding feature E of the current object is obtained. total1 .
[0096] S280. Input the attribute cross-semantic embedding features and the basic attribute semantic embedding features of the object to be recommended into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the object to be recommended.
[0097] The basic attribute semantic embedding features include at least one of the following: title attribute semantic embedding features, tag attribute semantic embedding features, body text attribute semantic embedding features, image attribute semantic embedding features, video attribute semantic embedding features, and related attribute semantic embedding features.
[0098] In this embodiment of the invention, the semantic embedding features of each basic attribute and the semantic embedding features of the attribute cross-semantic features of the object to be recommended are used as input data to the self-attention network for weight learning, and finally the comprehensive semantic embedding features E of the object to be recommended are obtained. total2 .
[0099] S290. Generate the semantic embedding feature matrix of the sample data of the object to be recommended based on the comprehensive semantic embedding features.
[0100] S2100. Input the semantic embedding features as training data into the recommendation model for training.
[0101] In this embodiment of the invention, the current object and the object to be recommended in a sample dataset are trained using a semantic embedding learning method to obtain the comprehensive semantic embedding feature E of the current object. total1 E, the comprehensive semantic embedding features of the object to be recommended total2 Assume the comprehensive semantic embedding features E of the current object total1 E, the comprehensive semantic embedding features of the object to be recommended total2 Since all dimensions are M, N samples can be concatenated to obtain a semantic embedding feature of dimension 2M, resulting in an N×2M semantic embedding feature matrix S. The semantic embedding feature matrix S is then used as the input data for the input layer of the deep neural network, as follows:
[0102] h0=(S)
[0103] Here, h0 represents the input data of the deep neural network.
[0104] Furthermore, the data is input into subsequent hidden layers, and the item relevance calculation function is learned through p hidden layers. Each hidden layer is represented as h1, h2, ..., h... p Its definition is as follows:
[0105] h l =δ l (W l T h l-1 +b l ), l=1,2,…,p
[0106] Among them, W l and b l Let δ represent the weight matrix and bias vector of the l-th perceptron, respectively. l This represents the activation function of the l-th layer.
[0107] Finally, the similarity between the two is calculated as follows:
[0108]
[0109] Where σ is the activation function sigmoid, with an output value of (0, 1), which serves as a similarity measure between the two, and W represents the weight matrix.
[0110] Meanwhile, during the model training phase, the following parameters need to be continuously adjusted for model optimization:
[0111] 1) l1_regularizer, L1 regularization, default 0.001;
[0112] 2) l2_regularizer, L2 regularization, default 0.001;
[0113] 3) hidden_layers, the number of neurons in the hidden layers of the network, separated by commas, default 64, 32;
[0114] 4) learning_rate, learning rate, default 0.01;
[0115] 5) embedding_size, dimension size, default 32;
[0116] 6) activation, activation function, with possible values elu, gelu, hard_sigmoid, linear, relu, selu, sigmoid, softmax, softplus, softsign, swish, default is relu;
[0117] 7) epochs, the number of training iterations, default 12;
[0118] 8) loss, loss function, values include BinaryCrossentropy, CategoricalCrossentropy, CategoricalHinge, CosineSimilarity, Hinge, Huber, KLDivergence, LogCosh, MeanAbsoluteError, MeanAb solutePercentageError, MeanSquaredError, MeanSquaredLogarithmicError, Poisson, Reduction, SparseCategoricalCrossentropy, SquaredHinge, default BinaryCrossentropy;
[0119] 9) optimizer, with possible values AdadeltaAdagrad, Adam, Adamax, FTRL, NAdam, and SGD, and the default is Adam;
[0120] 10) batch_size, the number of samples to be processed in a batch, the default is 64.
[0121] This invention first uses recommendation log data, user click behavior data, and basic attribute data of the object to be recommended as raw sample data. The raw sample data is preprocessed to obtain preprocessed raw sample data. Key sample data is extracted from the preprocessed raw sample data to obtain the sample data of the object to be recommended. Then, semantic embedding processing is performed on the single-attribute object sample data of each attribute dimension of the sample data of the object to be recommended, resulting in basic attribute semantic embedding features of multiple single attributes of the object to be recommended. Semantic embedding processing is also performed on the single-attribute object data of each attribute dimension of the current object data, resulting in basic attribute semantic embedding features of multiple single attributes of the current object. Attribute cross-semantic embedding features are calculated based on the semantic embedding features of each basic attribute of the object to be recommended and the semantic embedding features of each basic attribute of the current object. The attribute cross-semantic embedding features and the basic attribute semantic embedding features of the current object are input into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the current object. The attribute cross-semantic embedding features and the basic attribute semantic embedding features of the object to be recommended are then input into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the object to be recommended. Finally, a semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, and the semantic embedding features are used as training data to train the recommendation model. By performing semantic embedding processing on the current object and the object to be recommended using single and cross attributes, the accuracy of the recommendation model is improved, the comprehensiveness of the relevant recommendation results is ensured, and the overall effect of the recommendation results is also improved.
[0122] Example 3
[0123] Figure 3 This is a flowchart of a recommendation method provided in Embodiment 3 of the present invention. This embodiment can be used for recommendation based on the recommendation model trained in the above embodiments. The method can be executed by a recommendation device, which can be implemented by software and / or hardware, and is generally integrated into an electronic device. The electronic device can be a terminal device or a server device. The embodiments of the present invention do not limit the specific type of electronic device. Accordingly, as... Figure 3 As shown, the method in this embodiment may include:
[0124] S310. Obtain the current object association data of the current object and the candidate object association data of the candidate recommended object.
[0125] S320. Input the current object association data of the current object and the candidate object association data of the candidate recommended objects into the recommendation model to obtain the similarity between each candidate recommended object and the current object.
[0126] Here, the current object can be any object the user is currently browsing. Alternative recommended objects can be any available objects used to recommend to the user. The associated data for the current object can be related data about the objects the user is currently browsing, including but not limited to recommendation log data, user click behavior data, and basic attribute data of the current object. The associated data for alternative objects can be related data about the recommended objects, including but not limited to recommendation log data, user click behavior data, and basic attribute data of the alternative recommended objects. Similarity can be used to represent the degree of association between the alternative recommended objects and the current object.
[0127] S330. Determine the target recommended object that matches the current object based on the similarity between each of the candidate recommended objects and the current object.
[0128] The recommendation model is trained using the recommendation model training method described in any embodiment of the present invention.
[0129] In this embodiment of the invention, determining the target recommended object matching the current object based on the similarity between each of the candidate recommended objects and the current object may further include: sorting each of the candidate recommended objects in descending order of similarity between each of the candidate recommended objects and the current object; and selecting a set number of candidate recommended objects as the target recommended object based on the sorting results of each of the candidate recommended objects.
[0130] The target recommendation object can be an object that is highly similar to the current object.
[0131] Specifically, the similarity between the candidate recommended objects and the current object is calculated, and then the candidate recommended objects are sorted in descending order of similarity between each candidate recommended object and the current object. Based on the sorting results, the Top M candidate recommended objects are selected as the target recommended objects.
[0132] In a specific embodiment, item recommendation is used as an application scenario for illustration. First, by comprehensively considering the multi-dimensional and multi-modal attribute data of items, a suitable embedding generation model is selected to obtain low-dimensional, dense semantic embedding representations, improving the expressive power of features. Deep neural networks are chosen for model training and prediction, enhancing the generalization ability of the prediction model and enabling the recommendation method to be widely applied in more recommendation scenarios. Second, for the differences in importance among multiple labels, images, and features, a self-attention mechanism is introduced to learn importance weights, which are then optimized in conjunction with the model objective to automatically learn the optimal combination of each importance weight. Furthermore, semantic understanding and embedding generation are performed on the multi-modal attributes of items separately. For text features, BERT, LDA, and Word2Vec are selected for differentiated processing based on length differences. Compared to a single model processing all text data, this approach provides a more comprehensive and effective relevance calculation. The inclusion of image and video information not only improves the performance but also expands the application scenarios of this recommendation method. Finally, in terms of feature processing, considering the improvement effect of the cross-combination of multiple features on the model performance, a separate activation network is introduced to learn multiple cross-features and generate semantic embedding representations, which are then input into the deep neural network. This not only further improves the model's feature learning ability, but also enhances the comprehensiveness of the relevant recommendation results calculation.
[0133] Figure 4 This is an overall schematic diagram of a recommended method provided in Embodiment 3 of the present invention, as shown below. Figure 4 As shown, firstly, the current item and the item to be recommended are embedded through an embedding layer to learn basic attribute embeddings, obtaining associated title attribute embeddings, tag attribute embeddings, text attribute embeddings, image attribute embeddings, video attribute embeddings, and related attribute embeddings. Then, cross-attribute embeddings are learned on the basic attributes to obtain cross-attribute embeddings. The title attribute embeddings, tag attribute embeddings, text attribute embeddings, image attribute embeddings, video attribute embeddings, and related attribute embeddings of the current item, and the title attribute embeddings, tag attribute embeddings, text attribute embeddings, image attribute embeddings, video attribute embeddings, related attribute embeddings, and cross-attribute embeddings of the item to be recommended are fed into a self-attention network for training to learn the importance weights of multiple features, and finally obtain the similarity between the current item and the item to be recommended.
[0134] Figure 5 This is a schematic diagram of a recommendation module provided in Embodiment 3 of the present invention, as shown below. Figure 5As shown, firstly, relevant recommendation log data, user click behavior data, and basic item attribute data are sent to the data preprocessing module to perform preprocessing operations on the raw data; then, they are sent to the semantic embedding generation module to generate semantic embedding features in the data; then, they are sent to the model training and prediction module to train the recommendation model; finally, they are sent to the association recommendation result generation module to complete the similarity calculation between two items.
[0135] The technical solution of this invention first acquires sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, and current object data of the current object. Then, semantic embedding processing is performed on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features. A semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, and the semantic embedding features are used as training data input into the recommendation model for training. Correspondingly, after the recommendation model training is completed, current object association data of the current object and candidate object association data of the candidate recommended objects are acquired. These are input into the recommendation model to obtain the similarity between each candidate recommended object and the current object. Finally, the target recommended object matching the current object is determined based on the similarity between each candidate recommended object and the current object. This technical solution, by performing comprehensive semantic embedding learning representation on the sample data of the object to be recommended and the current object data of the current object, greatly expands the expressive power of features, solves the problems of single text features and failure to consider text length differences in existing technologies, improves the accuracy of the recommendation model, ensures the comprehensiveness of relevant recommendation results, and also improves the overall effect of the recommendation results.
[0136] Example 4
[0137] Figure 6 This is a schematic diagram of the structure of a recommendation model training device provided in Embodiment 4 of the present invention, as shown below. Figure 6 As shown, the device includes: a sample data acquisition module 410 for objects to be recommended, a semantic embedding processing module 420, a semantic embedding feature matrix generation module 430, and a recommendation model training module 440, wherein:
[0138] The module 410 for acquiring sample data of objects to be recommended is used to acquire sample data of objects to be recommended, including multi-attribute dimension information of the objects to be recommended, and current object data of the current object.
[0139] The semantic embedding processing module 420 is used to perform semantic embedding processing on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features; wherein, the comprehensive semantic embedding features are composed of multiple single-attribute basic attribute semantic embedding features and attribute cross semantic embedding features.
[0140] The semantic embedding feature matrix generation module 430 is used to generate a semantic embedding feature matrix of the sample data based on the comprehensive semantic embedding features.
[0141] The recommendation model training module 440 is used to input the semantic embedding features as training data into the recommendation model for training.
[0142] The technical solution of this invention first acquires sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, and current object data of the current object. Then, semantic embedding processing is performed on the sample data of the object to be recommended and the current object data of the current object to obtain comprehensive semantic embedding features. A semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, and the semantic embedding features are used as training data input into the recommendation model for training. This technical solution, by performing comprehensive semantic embedding learning on the sample data of the object to be recommended and the current object data of the current object, greatly expands the expressive power of features, solves the problems of single text features and failure to consider text length differences in existing technologies, improves the accuracy of the recommendation model, ensures the comprehensiveness of relevant recommendation results, and also improves the overall effect of the recommendation results.
[0143] Optionally, the sample data acquisition module 410 for the object to be recommended is specifically used to: use the recommendation log data, user click behavior data, and basic attribute data of the object to be recommended as raw sample data; perform data preprocessing on the raw sample data to obtain preprocessed raw sample data; and extract key sample data based on the preprocessed raw sample data to obtain the sample data of the object to be recommended.
[0144] Optionally, the semantic embedding processing module 420 is specifically used for: performing semantic embedding processing on the single-attribute object sample data of each attribute dimension of the object to be recommended sample data to obtain the basic attribute semantic embedding features of multiple single attributes of the object to be recommended; performing semantic embedding processing on the single-attribute object data of each attribute dimension of the current object data to obtain the basic attribute semantic embedding features of multiple single attributes of the current object; calculating the attribute cross semantic embedding features of the object to be recommended based on the basic attribute semantic embedding features of the object to be recommended and the basic attribute semantic embedding features of the current object; inputting the attribute cross semantic embedding features and the basic attribute semantic embedding features of the current object into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the current object; inputting the attribute cross semantic embedding features and the basic attribute semantic embedding features of the object to be recommended into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the object to be recommended; wherein, the basic attribute semantic embedding features include at least one of title attribute semantic embedding features, tag attribute semantic embedding features, body text attribute semantic embedding features, image attribute semantic embedding features, video attribute semantic embedding features, and association attribute semantic embedding features.
[0145] Optionally, the objects to be recommended include items to be recommended.
[0146] The aforementioned recommendation model training device can execute the recommendation model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment can be found in the recommendation model training method provided in any embodiment of the present invention.
[0147] Example 5
[0148] Figure 7 This is a schematic diagram of the structure of a recommended device provided in Embodiment 5 of the present invention, as shown below. Figure 7 As shown, the device includes: an object association data acquisition module 510, a similarity acquisition module 520, and a target recommendation object determination module 530, wherein:
[0149] The object association data acquisition module 510 is used to: acquire the current object association data of the current object and the candidate object association data of the candidate recommended objects;
[0150] The similarity acquisition module 520 is used to: input the current object association data of the current object and the candidate object association data of the candidate recommended objects into the recommendation model to obtain the similarity between each candidate recommended object and the current object;
[0151] The target recommendation object determination module 530 is used to: determine the target recommendation object that matches the current object based on the similarity between each of the candidate recommendation objects and the current object; wherein the recommendation model is trained by the recommendation model training method described in the embodiments of the present invention.
[0152] Optionally, the target recommendation object determination module 530 is specifically used to: sort the candidate recommendation objects in descending order of similarity between each candidate recommendation object and the current object; and select a set number of candidate recommendation objects as the target recommendation objects based on the sorting results of the candidate recommendation objects.
[0153] The technical solution of this invention first acquires sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, and current object data of the current object. Then, semantic embedding processing is performed on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features. A semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, and the semantic embedding features are used as training data input into the recommendation model for training. Correspondingly, after the recommendation model training is completed, current object association data of the current object and candidate object association data of the candidate recommended objects are acquired. These are input into the recommendation model to obtain the similarity between each candidate recommended object and the current object. Finally, the target recommended object matching the current object is determined based on the similarity between each candidate recommended object and the current object. This technical solution, by performing comprehensive semantic embedding learning representation on the sample data of the object to be recommended and the current object data of the current object, greatly expands the expressive power of features, solves the problems of single text features and failure to consider text length differences in existing technologies, improves the accuracy of the recommendation model, ensures the comprehensiveness of relevant recommendation results, and also improves the overall effect of the recommendation results.
[0154] The above-described recommended apparatus can execute the recommended methods provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the methods. Technical details not described in detail in this embodiment can be found in the recommended methods provided in any embodiment of the present invention.
[0155] Example 6
[0156] Figure 8A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0157] like Figure 8 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0158] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0159] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as recommendation model training methods or recommendation methods.
[0160] In some embodiments, the recommendation model training method or recommendation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the recommendation model training method or recommendation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the recommendation model training method or recommendation method by any other suitable means (e.g., by means of firmware).
[0161] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0162] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0163] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0165] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0166] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
Claims
1. A method for training a recommendation model, characterized in that, include: Obtain sample data of the objects to be recommended, including multi-attribute information of the objects to be recommended, and current object data of the current object; Semantic embedding processing is performed on the sample data of the object to be recommended and the data of the current object to obtain a comprehensive semantic embedding feature; wherein, the comprehensive semantic embedding feature is composed of multiple single-attribute basic attribute semantic embedding features and attribute cross semantic embedding features; A semantic embedding feature matrix of the sample data is generated based on the comprehensive semantic embedding features, wherein the sample data is composed of the sample data of the object to be recommended and the sample data of the current object; The semantic embedding features are used as training data and input into the recommendation model for training. The step of performing semantic embedding processing on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features includes: Semantic embedding processing is performed on the single-attribute object sample data of each attribute dimension of the object to be recommended to obtain the basic attribute semantic embedding features of multiple single attributes of the object to be recommended. Semantic embedding processing is performed on the single-attribute object data of each attribute dimension of the current object data to obtain the basic attribute semantic embedding features of multiple single attributes of the current object; Calculate the attribute cross semantic embedding features based on the semantic embedding features of each basic attribute of the object to be recommended and the semantic embedding features of each basic attribute of the current object; The attribute cross semantic embedding features and the basic attribute semantic embedding features of the current object are input into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the current object. The attribute cross semantic embedding features and the basic attribute semantic embedding features of the object to be recommended are input into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the object to be recommended. The basic attribute semantic embedding features include at least one of the following: title attribute semantic embedding features, tag attribute semantic embedding features, body text attribute semantic embedding features, image attribute semantic embedding features, video attribute semantic embedding features, and related attribute semantic embedding features.
2. The method of claim 1, wherein, The step of obtaining sample data of the object to be recommended, including multi-attribute dimension information of the object to be recommended, includes: The recommendation log data, user click behavior data, and basic attribute data of the objects to be recommended are used as the original sample data. The original sample data is preprocessed to obtain preprocessed original sample data; Key sample data are extracted from the preprocessed raw sample data to obtain the sample data of the object to be recommended.
3. The method according to any of claims 1-2, characterized by, The objects to be recommended include items to be recommended.
4. A recommendation method characterized by comprising: include: Retrieve the associated data of the current object and the associated data of the candidate recommended objects; The current object association data of the current object and the candidate object association data of the candidate recommended objects are input into the recommendation model to obtain the similarity between each candidate recommended object and the current object. Based on the similarity between each of the candidate recommendation objects and the current object, a target recommendation object matching the current object is determined; The recommendation model is trained using any one of the recommendation model training methods described in claims 1-3.
5. The method of claim 4, wherein, The step of determining the target recommended object matching the current object based on the similarity between each of the candidate recommended objects and the current object includes: The candidate recommended objects are sorted in descending order of similarity to the current object; Based on the ranking results of the candidate recommended objects, a set number of candidate recommended objects are selected as the target recommended objects. 6.A device for training a recommendation model, characterized in that, include: The module for acquiring sample data of objects to be recommended is used to acquire sample data of objects to be recommended, including multi-attribute dimension information of the objects to be recommended, and current object data of the current object. The semantic embedding processing module is used to perform semantic embedding processing on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features; wherein, the comprehensive semantic embedding features are composed of multiple single-attribute basic attribute semantic embedding features and attribute cross semantic embedding features; The semantic embedding feature matrix generation module is used to generate a semantic embedding feature matrix of the sample data of the object to be recommended based on the comprehensive semantic embedding features. The recommendation model training module is used to input the semantic embedding features as training data into the recommendation model for training. The step of performing semantic embedding processing on the sample data of the object to be recommended and the current object data to obtain comprehensive semantic embedding features includes: Semantic embedding processing is performed on the single-attribute object sample data of each attribute dimension of the object to be recommended to obtain the basic attribute semantic embedding features of multiple single attributes of the object to be recommended. Semantic embedding processing is performed on the single-attribute object data of each attribute dimension of the current object data to obtain the basic attribute semantic embedding features of multiple single attributes of the current object; Calculate the attribute cross semantic embedding features based on the semantic embedding features of each basic attribute of the object to be recommended and the semantic embedding features of each basic attribute of the current object; The attribute cross semantic embedding features and the basic attribute semantic embedding features of the current object are input into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the current object. The attribute cross semantic embedding features and the basic attribute semantic embedding features of the object to be recommended are input into a self-attention network for weight learning to obtain the comprehensive semantic embedding features of the object to be recommended. The basic attribute semantic embedding features include at least one of the following: title attribute semantic embedding features, tag attribute semantic embedding features, body text attribute semantic embedding features, image attribute semantic embedding features, video attribute semantic embedding features, and related attribute semantic embedding features.
7. A recommendation device characterized by comprising: include: The object association data acquisition module is used to acquire the current object association data of the current object and the candidate object association data of the candidate recommended objects; The similarity acquisition module is used to input the current object association data of the current object and the candidate object association data of the candidate recommended objects into the recommendation model to obtain the similarity between each candidate recommended object and the current object. The target recommendation object determination module is used to determine the target recommendation object that matches the current object based on the similarity between each of the candidate recommendation objects and the current object; The recommendation model is trained using any one of the recommendation model training methods described in claims 1-3.
8. An electronic device, comprising: The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the recommendation model training method of any one of claims 1-3, or to implement the recommendation method of any one of claims 4-5.
9. A computer storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute and implement the recommendation model training method of any one of claims 1-3, or the recommendation method of any one of claims 4-5.