Model training method and device, article recommendation method and device, server and storage medium
Patent Information
- Application Number
- CN202411495232.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-14
AI Technical Summary
The traditional multimodal recommendation model has the problem of inaccurate recommendation results in item recommendation.
By obtaining training samples, including sample users and corresponding sample items, the discrete feature vector is obtained based on the modal features of the sample items, and combining the sample users' representation vectors and target models, the target representations of sample users and items are obtained, thereby training the target model To improve recommendation accuracy.
Through the combination of discrete feature vectors and target representation, the accuracy of item recommendations is improved, the storage space is occupied, and the efficiency of model training is improved.
Smart Images

Figure CN119441606A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a model training method, an item recommendation method, a device, a server and a storage medium. Background Art
[0002] As users use applications to view or purchase items, quickly recommending items that meet their preferences, such as recommending notes that meet their preferences, has become an urgent problem to be solved.
[0003] In traditional technology, when using a multimodal recommendation model to recommend items that meet the user's preferences, the multimodal recommendation model mainly relies on the representation vectors of each item in the database to recommend items that the user likes. However, this traditional item recommendation method has the problem of inaccurate recommendation results. Summary of the invention
[0004] Based on this, it is necessary to provide a model training method, item recommendation method, device, server and storage medium that can improve the accuracy of recommendation results in response to the above technical problems.
[0005] In a first aspect, the present application provides a model training method, which is used to train a target model, and the model training method includes:
[0006] Acquire training samples; the training samples include sample users and corresponding sample items;
[0007] Based on the modal features of the sample item, a discretized feature vector of the sample item is obtained; the modal features include a plurality of feature unit segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments;
[0008] Obtaining a target representation of the sample user and a target representation of the sample object at least according to the representation vector of the sample user, the discretized feature vector and the target model;
[0009] The target model is trained using the target representation of the sample user and the target representation of the sample object.
[0010] In one embodiment, the modal feature includes a first number of feature segments corresponding to a first number of feature units, each feature unit corresponds to a second number of cluster centers; and obtaining a discretized feature vector of the sample item based on the modal feature of the sample item includes:
[0011] For each feature segment, determining a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment;
[0012] Based on the unit vector of the target cluster center corresponding to each feature segment, a discretized feature vector of the sample object is obtained.
[0013] In one embodiment, obtaining the discretized feature vector of the sample object based on the unit vector of the target cluster center corresponding to each feature unit includes:
[0014] Determine a first number of discretized values based on the target cluster center corresponding to each feature segment;
[0015] A first number of unit vectors corresponding to the first number of discretized values are determined as discretized feature vectors of the sample items.
[0016] In one embodiment, the target model includes a cross network and a recommendation network; obtaining the target representation of the sample user and the target representation of the sample item at least based on the representation vector of the sample user, the discretized feature vector and the target model includes:
[0017] The discretized feature vector is input into the cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing;
[0018] At least the representation vector of the sample user and the discretized representation vector are input into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
[0019] In one embodiment, the weighting process includes at least one of the following processes:
[0020] Performing a first weighted processing on a plurality of unit vectors of the discretized feature vector to obtain a first-order crossover result;
[0021] Performing a second weighted processing on every third arbitrary number of unit vectors of the discretized feature vector to obtain a second-order crossover result;
[0022] A third linear process is performed on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
[0023] In one embodiment, the modal feature includes a modal feature under at least one predetermined modality, the discretized feature vector includes multiple unit vectors corresponding to each predetermined modality, and the weighted processing includes weighted processing using the learning weight corresponding to the unit vector and / or the modal weight of the unit vector corresponding to the predetermined modality.
[0024] In one embodiment, performing a first weighted processing on the multiple unit vectors of the discretized feature vector to obtain a first-order crossover result includes: obtaining a first product value of each unit vector of the discretized feature vector and a weight corresponding to each unit vector; the weight corresponding to each unit vector includes a learning weight corresponding to each unit vector and / or a modal weight of each unit vector; and summing the first product values corresponding to each unit vector to obtain the first-order crossover result;
[0025] The step of performing a second weighted processing on every arbitrary third number of unit vectors of the discretized feature vector to obtain a second-order crossover result includes: obtaining a second product value of any two unit vectors of the discretized feature vector and the weights corresponding to the arbitrary two unit vectors; the weights corresponding to the arbitrary two unit vectors include the learning weights corresponding to the arbitrary two unit vectors and / or the modal weights corresponding to the arbitrary two unit vectors; and adding the second product values corresponding to the arbitrary two unit vectors to obtain the second-order crossover result;
[0026] The performing third linear processing on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result includes: performing splicing processing on multiple unit vectors of the discretized feature vector to obtain a spliced vector; and performing multi-layer linear processing on the spliced vector to obtain the high-order crossover result.
[0027] In one embodiment, the method further comprises:
[0028] During the training process of the target model, a plurality of unit vectors corresponding to the plurality of feature segments are updated.
[0029] In a second aspect, the present application provides an item recommendation method, the method comprising:
[0030] Based on the modal features of the candidate items, a discretized feature vector of the candidate items is obtained; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; the unit vectors are obtained by training based on a model training method;
[0031] Obtaining a target representation of the target user and a target representation of the candidate item at least according to the representation vector of the target user, the discretized feature vector of the candidate item, and a target model;
[0032] According to the target representation of the target user and the target representation of the candidate items, a target item recommended to the target user is determined from the candidate items.
[0033] In one of the embodiments, the candidate items include a first item and / or a second item; the interaction amount of the first item is greater than a preset interaction amount threshold; and the interaction amount of the second item is not greater than the interaction amount threshold.
[0034] In a third aspect, the present application also provides a model training device, the device comprising:
[0035] A first acquisition module is used to acquire training samples; the training samples include sample users and corresponding sample items;
[0036] A second acquisition module is used to acquire a discretized feature vector of the sample item based on the modal feature of the sample item; the modal feature includes a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments;
[0037] The third acquisition module is used to obtain the target representation of the sample user and the target representation of the sample object based on at least the representation vector of the sample user, the discretized feature vector and the target model.
[0038] A training module is used to train the target model by using the target representation of the sample user and the target representation of the sample object.
[0039] In a fourth aspect, the present application further provides an item recommendation device, the device comprising:
[0040] A first acquisition module is used to acquire a discretized feature vector of the candidate item based on a modal feature of the candidate item; the modal feature includes a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; the unit vector is obtained by training based on a model training method;
[0041] A second acquisition module, configured to obtain a target representation of the target user and a target representation of the candidate item based at least on a representation vector of the target user, a discretized feature vector of the candidate item, and a target model;
[0042] A determination module is used to determine a target item recommended to the target user from the candidate items according to the target representation of the target user and the target representation of the candidate items.
[0043] In a fifth aspect, the present application further provides a server, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect or the second aspect when executing the computer program.
[0044] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect and the second aspect are implemented.
[0045] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect and the second aspect.
[0046] The above-mentioned model training method, item recommendation method, device, server and storage medium can obtain a discretized feature vector of the sample item based on the modal features of the sample item by obtaining training samples including sample users and corresponding sample items, wherein the modal features of the sample item include multiple feature segments, and the discretized feature vector of the sample item includes multiple unit vectors corresponding to the multiple feature segments. Since the multiple unit vectors corresponding to the multiple feature segments of the sample item have lower spatial complexity than the representation vector of the sample item, the occupied storage space is reduced. Furthermore, according to the representation vector of the sample user, the discretized feature vector of the sample item and the target model, the target representation of the sample user and the target representation of the sample item can be obtained, so that the target representation of the sample user and the target representation of the sample item can be used to train the target model, so that the trained target model can more accurately obtain the target representation of the target user and the target representation of the candidate item, thereby improving the accuracy of the target item recommended to the target user based on the target representation of the target user and the target representation of the candidate item. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A diagram of an application environment of an item recommendation method in an embodiment;
[0049] Figure 2 A schematic diagram of a flow chart of a model training method in one embodiment;
[0050] Figure 3 A schematic diagram of a flow chart of a model training method in another embodiment;
[0051] Figure 4 A schematic diagram of a flow chart of a model training method in another embodiment;
[0052] Figure 5A schematic diagram of discretized values corresponding to feature units of a shared item in one embodiment;
[0053] Figure 6 A schematic diagram of a flow chart of a model training method in another embodiment;
[0054] Figure 7 A schematic diagram of a flow chart of an item recommendation method in one embodiment;
[0055] Figure 8 Schematic diagram of the training process of a target model in one embodiment;
[0056] Fig. 9 A schematic diagram of the overall structure of the item recommendation method provided in an embodiment of the present application;
[0057] Fig.10 Schematic diagram of the overall structure of the item recommendation method provided by the prior art
[0058] Fig.11 is a structural block diagram of a model training device in one embodiment;
[0059] Fig.12 is a structural block diagram of a model training device in another embodiment;
[0060] Fig.13 is a structural block diagram of a model training device in another embodiment;
[0061] Fig.14 is a structural block diagram of a model training device in another embodiment;
[0062] Fig.15 is a structural block diagram of an item recommendation device in one embodiment;
[0063] Fig.16 FIG. 4 is a diagram showing the internal structure of a server in one embodiment. DETAILED DESCRIPTION
[0064] 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.
[0065] The item recommendation method provided in the embodiment of the present application can be applied to Figure 1In 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 integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can send an item recommendation request including a characterization vector of the target user to the server 104, requesting the server to determine the target item recommended to the target user from the candidate items. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart TVs, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, etc. The server 104 can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud computing services.
[0066] In an exemplary embodiment, Figure 2 As shown, a model training method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0067] S201, obtaining training samples; the training samples include sample users and corresponding sample items.
[0068] The sample user may be a user who uses an application to view, browse, edit, search or publish items, and the sample items corresponding to the sample user may be items viewed, edited, searched, published by the sample user, or items similar to those viewed by the sample user in the past, or related items determined based on the hobbies and behaviors of the sample user, etc. Exemplarily, the sample items corresponding to the sample user may be notes, videos, audios, pictures, commodities, etc.
[0069] Optionally, the sample items corresponding to the sample users can be determined based on the interaction between the sample users and the items. For example, the training samples include positive samples and negative samples, where the sample users and the items have interactions, and the sample users and the items do not have interactions, and the negative samples. The interaction can include any interactive behavior of the user on the item, such as viewing, clicking, liking, or commenting.
[0070] Optionally, in this embodiment, the characterization vector of the sample user and the corresponding sample item can be obtained based on the sample user's historical usage information of the application. For example, the characterization vector of the sample user and the corresponding sample item can be obtained based on the sample user's historical footprint information, access information or publication information of the sample user's historical usage of the application.
[0071] S202, based on the modal features of the sample items, obtain a discretized feature vector of the sample items; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments.
[0072] Among them, the modal features of the sample items may include modal features under at least one predetermined modality, for example, the modal features of the sample items may be single-modal features, or may be multi-modal features. Exemplarily, the predetermined modality may include one or more of any modalities such as image, text, video, audio, environment, temperature, time, location, etc., and the modal features of the sample items may be at least one of the features of the sample items such as image features, text features, video features, and audio features. Accordingly, the discretized feature vector of the sample item may include multiple unit vectors corresponding to each predetermined modality.
[0073] Optionally, in this embodiment, the modal features of the sample item may include a first number of feature segments corresponding to a first number of feature units, wherein the feature unit represents a low-dimensional subspace (d_v / M dimensions) obtained by decomposing a high-dimensional vector space (d_v dimensions) corresponding to the modal features of the sample item. For example, the high-dimensional vector space corresponding to the modal features of the sample item is 128 dimensions, and the high-dimensional vector space can be decomposed into 16 low-dimensional subspaces of 8 dimensions.
[0074] In this embodiment, each feature unit of the modal feature of the sample item can be divided into multiple segments to obtain multiple feature segments of the modal feature of the sample item. Further, for each feature segment in the modal feature, the unit vector corresponding to each feature segment can be determined, and the unit vectors corresponding to the multiple feature segments in the modal feature of the sample item are determined as the discretized feature vector of the sample item. For example, for the image feature of the sample item, assuming that the image feature is originally d_v-dimensional, the d_v-dimensional vector space of the image feature can be decomposed into M d_v / M-dimensional subspaces, that is, M feature units, so that the image feature can be obtained. M feature segments corresponding to the M feature units, each feature segment of the image feature can be d_v / M-dimensional. It can be understood that if the modal features of the sample items are multimodal features, that is, modal features under multiple predetermined modes, the modal features of each mode of the sample items can be decomposed according to multiple feature units to obtain multiple feature segments corresponding to the modal features of each mode, and then, for the multiple feature segments corresponding to the modal features of each mode, the unit vector corresponding to each feature segment of the modal features of each mode is determined to obtain the discretized feature vector of the sample items. Exemplarily, assuming that the sample items include features of two modes, text features and image features, the text features can be decomposed into M feature segments corresponding to M feature units to obtain M feature segments corresponding to the text features, and the image features can be decomposed in the same way to obtain M feature segments corresponding to the image features of the M feature units, and further, the unit vectors corresponding to the M feature segments of the text features and the unit vectors corresponding to the M feature segments of the image features are determined, so that the unit vectors corresponding to the M feature segments of the text features and the unit vectors corresponding to the M feature segments of the image features can be determined as the discretized feature vector of the sample items, that is, the discretized feature vector of the sample items obtained in this scenario can include 2*M unit vectors.
[0075] In this embodiment, a general discretization method can be used to obtain a discretized feature vector of a sample item. The above method is not the only implementation method for obtaining a discretized feature vector of a sample item. This embodiment does not limit the specific implementation method for obtaining a discretized feature vector of a sample item. As an example, the following takes the modal feature of the sample item as a single modal feature, that is, a modal feature under a predetermined mode as an example to explain another implementation method for obtaining a discretized feature vector of a sample item. As an optional implementation, in this embodiment, a feature value range of each feature unit of the modal feature of the sample item can be determined, and the feature value range of each feature unit can be divided into a fixed number of intervals or intervals to obtain multiple feature segments, and the center value of each feature segment can be mapped to a fixed discretized value, and the vector corresponding to the discretized value of each feature segment can be determined as a unit vector corresponding to each feature segment, and the unit vectors corresponding to multiple feature segments in the modal feature of the sample item can be determined as the discretized feature vector of the sample item. As another optional implementation, in this embodiment, each feature unit of the modal features of the sample item can be binarized by a threshold (usually 0) to generate a binary code, wherein similar features have the same or similar binary codes, and the feature units with the same or similar binary codes are divided into a unit vector to achieve discretization of the modal features of the sample item and obtain a discrete feature vector of the sample item.
[0076] S203, obtaining a target representation of the sample user and a target representation of the sample item at least according to the representation vector of the sample user, the discretized feature vector and the target model.
[0077] The representation vector of the sample user can be used to represent the characteristics of the sample user, such as item preferences, areas of interest to the sample user, and item recommendation frequency that the sample user expects. It can be understood that the representation vector of the sample user can be an embedding vector (e.g., ID embedding) obtained using any vector representation technology. Furthermore, the sample user's preference for the sample item can be determined based on the product value of the sample user's target representation and the target representation of the sample item. For example, if the sample user's target representation is h μ , the target representation of the sample item is h i , then the degree of preference of sample user μ for sample item i can be determined by calculating the dot product of the two.
[0078] Optionally, in this embodiment, the characterization vector of the sample user and the discretized feature vector of the sample item can be input into the target model, so that the target model combines the characterization vector of the sample user and / or the discretized feature vector of the sample item to obtain the target characterization of the sample user and the target characterization of the sample item. As an optional implementation, in order to ensure a more accurate target characterization of the sample user and the target characterization of the sample item, in addition to inputting the characterization vector of the sample user and the discretized feature vector of the sample item into the target model, the modal features of the sample item can also be input into the target model, that is, the characterization vector of the sample user, the discretized feature vector of the sample item and the modal features of the sample item can be input into the target model to obtain the target characterization of the sample user and the target characterization of the sample item.
[0079] S204, training a target model using the target representations of the sample users and the target representations of the sample items.
[0080] Optionally, in this embodiment, the sample user's preference for the sample item can be determined by calculating the dot product of the sample user's target representation and the sample item's target representation, and then the value of the target model's loss function is obtained based on the determined sample user's preference for the sample item and the sample user's actual preference for the sample item. The target model is trained by adjusting the trainable parameters in the target model through the gradient feedback of the value of the target model's loss function. Optionally, in this embodiment, since the multiple unit vectors corresponding to the multiple feature units of the sample item are pre-randomly initialized and generated, the multiple unit vectors corresponding to the multiple feature units of the sample item can be updated during the training of the target model based on the value of the target model's loss function when performing the gradient feedback. As an optional implementation, the multiple unit vectors corresponding to the multiple feature segments can be updated by updating the trainable parameters of the multiple unit vectors corresponding to the multiple feature segments when performing the gradient feedback based on the value of the target model's loss function.
[0081] In the above-mentioned model training method, by obtaining training samples including sample users and corresponding sample items, it is possible to obtain a discretized feature vector of the sample item based on the modal features of the sample item, wherein the modal features of the sample item include multiple feature segments, and the discretized feature vector of the sample item includes multiple unit vectors corresponding to the multiple feature segments. Since the unit vectors corresponding to the multiple feature units of the sample item have lower spatial complexity than the representation vector of the sample item, the occupied storage space is reduced. Furthermore, according to the representation vector of the sample user, the discretized feature vector of the sample item and the target model, the target representation of the sample user and the target representation of the sample item can be obtained, so that the target representation of the sample user and the target representation of the sample item can be used to train the target model, so that the trained target model can more accurately obtain the target representation of the target user and the target representation of the candidate item, thereby improving the accuracy of the target item recommended to the target user based on the target representation of the target user and the target representation of the candidate item.
[0082] In one embodiment, the modal features of the sample items may include a first number of feature segments corresponding to a first number of feature units, each feature unit may correspond to a second number of cluster centers, and this embodiment will describe in detail the specific implementation process of obtaining the discretized feature vector of the sample item based on the modal features of the sample item. Figure 3 As shown, the above S202 includes:
[0083] S301 : For each feature segment, determine a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment.
[0084] Optionally, in this embodiment, when obtaining the first number of feature segments of the sample item, the vector space of the modal features of the sample item can be decomposed into a first number of subspaces (i.e., feature units), thereby obtaining the first number of feature segments of the sample item corresponding to the first number of feature units.
[0085] Optionally, when obtaining the first number of feature segments of the sample item, the modal features of the sample item may be segmented according to a preset rule, thereby obtaining the first number of feature segments of the sample item corresponding to the first number of feature units. For example, the text features of the sample item may be segmented according to feature units such as punctuation, keywords, and semantics, and the image features of the sample item may be segmented according to feature units such as the number of frames and duration.
[0086] Exemplarily, assuming that the training samples include N sample items, the modal features of each sample item are decomposed into M feature segments corresponding to M feature units. That is to say, the first number in this embodiment may be M, that is, the modal features of each sample item may include M feature segments corresponding to M feature units, and N sample items correspond to N*M feature segments, and each feature unit corresponds to N feature segments.
[0087] Furthermore, in this embodiment, cluster learning can be performed on each feature unit to obtain a second number of cluster centers corresponding to each feature unit. That is to say, for each feature unit, the N feature segments corresponding to the feature unit are clustered to obtain K cluster centers. Then each feature unit will correspond to K cluster centers. That is, as an example, the second number in this embodiment can be K.
[0088] Optionally, in this embodiment, for each feature segment in the modal feature of the sample item, the target cluster center corresponding to the feature segment can be determined based on the distance between the second number of cluster centers corresponding to the feature unit to which the feature segment belongs and the feature segment corresponding to the feature unit. For example, if each feature unit corresponds to K cluster centers, then the cluster center among the K cluster centers that is closest to the feature segment corresponding to the feature unit in the modal feature can be determined as the target cluster center corresponding to the feature segment.
[0089] S302, obtaining a discretized feature vector of the sample item based on the unit vector of the target cluster center corresponding to each feature segment.
[0090] As described in the above embodiments, for each feature segment of the sample item, a corresponding target cluster center will be determined, that is, one feature segment corresponds to one target cluster center. In this embodiment, as an optional implementation, the unit vector of the target cluster center corresponding to each feature segment can be determined as the unit vector of the feature segment, so that each feature segment will correspond to a unit vector, and further, the unit vectors corresponding to all feature segments of the sample item can be used as the discretized feature vector of the sample item. It can be understood that, assuming that the sample item includes Q predetermined modes, M unit vectors corresponding to M feature segments of the sample item under each predetermined mode can be obtained, and the obtained Q*M unit vectors are used as the discretized feature vector of the sample item. In addition, since the discretized feature vectors of similar items are also similar, as an optional implementation, the discretized feature vector of the sample item can also be used to simulate the discretized feature vector of an item similar to the sample item, to ensure the efficiency of obtaining the discretized feature vector of an item similar to the sample item.
[0091] In this embodiment, for each feature segment, the process of determining the target cluster center corresponding to the feature segment from the second number of cluster centers corresponding to the feature units to which the feature segment belongs is relatively simple, and the target cluster center corresponding to each feature segment can be quickly determined, so that the discretized feature vector of the sample item can be quickly obtained based on the unit vector of the target cluster center corresponding to each feature segment, thereby ensuring the efficiency of obtaining the discretized feature vector of the sample item.
[0092] In the above scenario of clustering the feature segments corresponding to each feature unit of the sample item, each cluster center will correspond to an index number. As an optional implementation, a discretization value can be determined based on the index number of the target cluster center corresponding to the feature segment, and then the discretization feature vector of the sample item can be determined based on the determined discretization value. In one embodiment, Figure 4 As shown, the above S302 includes:
[0093] S401: Determine a first number of discretized values based on a target cluster center corresponding to each feature segment.
[0094] In this embodiment, since the modal features of the sample items have a first number of feature segments, a corresponding target cluster center is determined for each feature segment, and therefore, the first number of target cluster centers can be determined. As an optional implementation, the index number of the target cluster center corresponding to each feature segment of the sample items can be determined as the discretized value corresponding to the feature segment, and therefore, for the first number of feature segments, the first number of discretized values can be determined accordingly.
[0095] Exemplarily, assuming that cluster learning is performed on the feature segments corresponding to each feature unit, each feature unit will learn K cluster centers, so that each feature segment in the modal features of the sample item can find its nearest target cluster center among the K cluster centers corresponding to the corresponding feature unit, and then the index number of the target cluster center can be determined as the discrete value corresponding to the feature segment. Therefore, each feature segment of the sample item will be assigned a value between [1, K], so that the discrete value corresponding to each feature segment of the sample item can be obtained.
[0096] Optionally, since the modal features of similar items are also similar, the discretized values of similar items are also similar. For example, Figure 5 As shown, Figure 5 Item 1, Item 2, and Item 3 are relatively similar items, and Item 1 and Item 2 are items with relatively high interaction volume, while Item 3 is an item with relatively low interaction volume, that is, Item 3 can be a cold start item or a long tail item. Figure 5The value in the box corresponding to each item in is the discretized value of the modal feature corresponding to the item, which is given by Figure 5 It can be seen that the discretization value of the image feature shared by item 1, item 2 and item 3 is 2, the discretization value of the image feature shared by item 2 and item 3 is 4, the discretization value of the text feature shared by item 2 and item 3 is 3, and the discretization values of the text feature shared by item 1 and item 2 are 5 and 4.
[0097] S402: Determine a first number of unit vectors corresponding to a first number of discretized numerical values as discretized feature vectors of the sample items.
[0098] Optionally, in this embodiment, the first number of unit vectors corresponding to the first number of discretized values can be determined through the correspondence between the preset discretized values and the corresponding unit vectors, and the obtained first number of unit vectors can be determined as the discretized feature vectors of the sample item. Exemplarily, assuming that the sample item includes Q predetermined modes, and the sample item has M discretized values under each predetermined mode, then there are Q*M discretized values in total, then Q*M unit vectors can be obtained, and the obtained Q*M unit vectors can be determined as the discretized feature vectors of the sample item.
[0099] It can be understood that, assuming that there are N sample items and the characterization vectors of the sample items are d-dimensional, then in the prior art, it is necessary to maintain an N*d-dimensional vector table for the characterization vectors of the sample items. However, according to the method provided in the embodiment of the present application, a discretized characterization vector obtained based on the modal features of the sample items is used to replace the characterization vectors of the sample items in the prior art, wherein the features of each mode of the N sample items are decomposed into M feature segments corresponding to M feature units, and the N feature segments corresponding to each feature unit are clustered to obtain K cluster centers, each cluster center corresponds to a unit vector, and a total of M*K unit vectors are obtained, and the dimension of each unit vector is d-dimensional. For each mode of the sample item, it is only necessary to maintain an M*K*d vector table, wherein M*K is much smaller than N. Compared with the prior art, the space complexity of the storage space can be reduced, and the occupied storage space is reduced.
[0100] In this embodiment, the process of determining the first number of discretized values based on the target cluster center corresponding to each feature segment is relatively simple, and the first number of discretized values can be determined quickly, so that the first number of unit vectors corresponding to the first number of discretized values can be promptly determined as the discretized feature vectors of the sample items, thereby ensuring the timeliness of determining the discretized feature vectors of the sample items.
[0101] In this embodiment, the specific process of obtaining the target representation of the sample user and the target representation of the sample item based on the representation vector of the sample user, the discretized feature vector of the sample item and the target model is explained. In one embodiment, the target model includes a cross network and a recommendation network, such as Figure 6 As shown, the above S203 includes:
[0102] S501, inputting the discretized feature vector into a cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing.
[0103] In this embodiment, the discretized feature vector of the sample item can be input into the cross network of the target model, and the unit vectors in the discretized feature vector of the sample item can be weighted and / or the results of the weighted processing can be fused through the cross network to obtain the discretized representation vector of the sample item.
[0104] Optionally, in this embodiment, the weighted processing performed by the cross network on the unit vectors in the discretized feature vectors of the sample items may include at least one of the following processing:
[0105] 1. Perform a first weighted processing on multiple unit vectors of the discretized feature vector of the sample item to obtain a first-order crossover result.
[0106] Optionally, the first weighted processing may be a weighted aggregation processing, that is, in this embodiment, the discretized feature vectors of the sample items may be summed with weights to obtain a first-order crossover result.
[0107] As an optional implementation, when the modal feature of the sample item is a modal feature under a predetermined mode (i.e., Q is equal to 1), that is, the modal feature of the sample item is a unimodal feature, a first weighted processing can be performed on multiple unit vectors of the discretized feature vector of the sample item based on the learning weights corresponding to the multiple unit vectors of the sample item to obtain a first-order crossover result r order_1 , where the calculation formula can be In the formula, w x is the learning weight of the unit vector of the sample item. w can be used in the training process of the target model. x The value of is constantly optimized, e x is the unit vector of the sample item, and M is the number of unit vectors corresponding to a predetermined mode.
[0108] As another optional implementation, when the modal feature of the sample item is a modal feature under multiple (i.e., Q is greater than 1) predetermined modes, that is, the modal feature of the sample item is a multimodal feature, a modal weight can be assigned to each of the multiple unit vectors of the predetermined modal feature, and based on the learning weights corresponding to the multiple unit vectors of the sample item and the modal weights corresponding to the multiple unit vectors of the sample item, a first weighted processing is performed on the multiple unit vectors of the discretized feature vector of the sample item to obtain a first-order crossover result, wherein the calculation formula can be In the formula, w x is the learning weight of the unit vector of the sample item. w can be used in the training process of the target model. x The value of is constantly optimized, i x is the modal weight of the unit vector of the sample item, e x is the unit vector of the sample item, and M is the number of unit vectors corresponding to a predetermined modality. It can be understood that in another embodiment, the modality weights of different predetermined modalities may not be considered.
[0109] 2. Perform a second weighted processing on every third number of unit vectors of the discretized feature vector to obtain a second-order crossover result.
[0110] Optionally, in this embodiment, any third number of unit vectors may be any two unit vectors, any three unit vectors, or any four unit vectors, etc., which is not limited in this embodiment. Optionally, the second weighted processing in this embodiment may be a pairing weighted processing.
[0111] In this embodiment, as an optional implementation, this embodiment is described by taking the example that any third number of unit vectors can be any two unit vectors. When the modal feature of the sample item is a modal feature under a predetermined mode, that is, the modal feature of the sample item is a single modal feature, based on the learning weights corresponding to any two unit vectors of the discretized feature vector of the sample item, a second weighted processing can be performed on any two unit vectors of the discretized feature vector of the sample item to obtain a second-order crossover result r order_2 , where the calculation formula can be In the formula, the meaning of each parameter can be found in the above description, and will not be repeated here in this embodiment.
[0112] As another optional implementation, when the modal features of the sample items are modal features under multiple predetermined modes, that is, the modal features of the sample items are multimodal features, modal weights can be assigned to multiple unit vectors of each modal feature, and based on the learning weights corresponding to any two unit vectors of the discretized feature vectors of the sample items and the modal weights corresponding to any two unit vectors of the discretized feature vectors of the sample items, a second weighted processing is performed on any two unit vectors of the discretized feature vectors of the sample items to obtain a second-order crossover result r order_2 , where the calculation formula can be In the formula, in the formula, the meaning of each parameter can be found in the above description, and this embodiment will not be repeated here. It can be understood that in another embodiment, the modal weights of different predetermined modalities may not be considered.
[0113] 3. Perform the third linear processing on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
[0114] Optionally, in this embodiment, multiple unit vectors of the discretized feature vector of the sample object may be spliced to obtain a spliced vector, and then the obtained spliced vector may be subjected to multi-layer linear processing to obtain a high-order crossover result r order_high , wherein the multi-layer linear processing of the obtained concatenated vector can be performed using a multi-layer perceptron to process the concatenated vector. For example, the specific calculation formula of the high-order crossover result can be h0=concat(e1,…,e QM ), h l =σ(W l h l +b l ), r high_order =h L , where h0 represents the concatenation vector, h l is the output of the lth layer of the multilayer perceptron, W l is the weight matrix of the lth layer of the multilayer perceptron, b l is the bias vector of the lth layer of the multilayer perceptron, h L is the final output of the multilayer perceptron. It can be understood that in another embodiment, when the modal feature of the sample item is a modal feature under a predetermined modality, that is, the modal feature of the sample item is a single modal feature, the above formula h0=concat(e1,…,e QM ) where the value of Q is 1.
[0115] Optionally, in this embodiment, if two or more weighted processing is performed on the unit vectors in the discretized feature vectors of the sample items, the cross network is also used to fuse the results of the weighted processing. Optionally, the fusion processing performed by the cross network on the results of the weighted processing may include fusing at least two of the above-mentioned first-order cross results, second-order cross results, and high-order cross results. Exemplarily, assuming that the weighted processing performed on the unit vectors in the discretized feature vectors of the sample items includes first-order weighted processing and second-order weighted processing, then when the weighted processing results are fused, the first-order cross results and the second-order cross results are fused; assuming that the weighted processing performed on the unit vectors in the discretized feature vectors of the sample items includes first-order weighted processing, second-order weighted processing, and high-order weighted processing, then when the weighted processing results are fused, the first-order cross results, the second-order cross results, and the high-order cross results are fused.
[0116] S502: at least input the representation vector and the discretized representation vector of the sample user into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
[0117] Optionally, in this embodiment, the representation vector of the sample user and the discretized representation vector of the sample item can be input into the recommendation network, and the representation vector of the sample user and the discretized representation vector of the sample item can be learned through the recommendation network, so that the recommendation network can obtain the target representation of the sample user and the target representation of the sample item. As an optional implementation, in order to ensure that the recommendation network outputs more accurate target representations of the sample user and the target representations of the sample item, the modal features of the sample item can also be input into the recommendation network, that is, the representation vector of the sample user, the discretized representation vector of the sample item, and the modal features of the sample item can be input into the recommendation network, so that the recommendation network can perform richer and multi-level learning, thereby outputting the target representation of the sample user and the target representation of the sample item.
[0118] In addition, it should be noted in this embodiment that the cross network in this embodiment can be combined with any recommendation network and trained end-to-end with it, that is, the trainable parameters in the cross network and the trainable parameters in the recommendation network are trained together through the gradient feedback of the loss function. The cross network may not depend on a specific recommendation network, and the target model provided in this embodiment does not introduce additional loss functions.
[0119] In this embodiment, the discretized feature vector of the sample item is input into the cross network of the target model, and the unit vector in the discretized feature vector of the sample item can be weighted and / or the result of the weighted processing can be fused through the cross network to accurately obtain the discretized representation vector of the sample item. Furthermore, at least the representation vector of the sample user and the discretized representation vector of the sample item are input into the recommendation network of the target model, so that the recommendation network can learn the representation vector of the sample user and the discretized representation vector of the sample item, and accurately output the target representation of the sample user and the target representation of the sample item.
[0120] In an exemplary embodiment, Figure 7 As shown, a method for recommending items is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0121] S601, based on the modal features of the candidate items, obtain a discretized feature vector of the candidate items; the modal features include multiple feature segments, and the discretized feature vector includes multiple unit vectors corresponding to the multiple feature segments; the multiple unit vectors are trained based on the model training method in the above embodiment.
[0122] Among them, the modal features of the candidate items may include modal features under at least one predetermined modality, for example, the modal features of the candidate items may be unimodal features, or may be multimodal features. Exemplarily, the predetermined modality may include one or more of any modality such as image, text, video, audio, environment, temperature, time, location, etc., and the modal features of the candidate items may be at least one of the image features, text features, video features, audio features, etc. of the candidate items. Accordingly, the discretized feature vector of the candidate item may include multiple unit vectors corresponding to each predetermined modality. Among them, the unit vectors corresponding to the multiple feature units of the candidate item are obtained by training based on the model training method in the above embodiment.
[0123] Optionally, in this embodiment, the modal features of the candidate sample items may include a first number of feature segments corresponding to a first number of feature units, wherein the feature unit represents a low-dimensional subspace (d_v / M dimensions) obtained by decomposing a high-dimensional vector space (d_v dimensions) corresponding to the modal features of the candidate items. For example, the high-dimensional vector space corresponding to the modal features of the candidate items is 128 dimensions, and the high-dimensional vector space can be decomposed into 16 low-dimensional subspaces of 8 dimensions.
[0124] Optionally, in this embodiment, the modal features of the candidate items may be decomposed into multiple feature units to obtain multiple feature segments of the modal features of the candidate items. Furthermore, for each feature segment in the modal features, a unit vector corresponding to each feature segment may be determined, and the unit vectors corresponding to multiple feature segments in the modal features of the candidate items may be determined as the discretized feature vectors of the candidate items. For example, for the image features of the candidate items, assuming that the image features are originally d_v-dimensional, the d_v-dimensional vector space of the image features may be decomposed into M d_v / M-dimensional subspaces, i.e., M feature units, thereby obtaining M feature segments of the image features corresponding to the M feature units, and each feature segment of the image features may be d_v / M-dimensional.
[0125] It can be understood that if the modal features of the candidate items are multimodal features, that is, they include modal features under multiple predetermined modalities, then the modal features of each modality of the candidate items can be decomposed according to multiple feature units to obtain multiple feature segments corresponding to the modal features of each modality, and then, for the multiple feature segments corresponding to the modal features of each modality, the unit vector corresponding to each feature segment of the modal features of each modality is determined to obtain the discretized feature vector of the candidate items. Exemplarily, assuming that the candidate items include features of two modalities, text features and image features, the text features can be decomposed into M feature segments corresponding to M feature units, and the image features can be similarly decomposed to obtain M feature segments corresponding to M feature units of the image features, and further, the unit vectors corresponding to the M feature segments of the text features and the unit vectors corresponding to the M feature segments of the image features are determined, so that the unit vectors corresponding to the M feature segments of the text features and the unit vectors corresponding to the M feature segments of the image features can be determined as the discretized feature vector of the candidate items, that is, the discretized feature vector of the candidate items obtained in this scenario can include 2*M unit vectors.
[0126] In this embodiment, as an optional implementation, the candidate items may include a first item and / or a second item; wherein the interaction amount of the first item is greater than a preset interaction amount threshold, that is, the first item may be an item with a relatively high recommendation frequency among the candidate items, or the first item may be an item that is searched and viewed more by users; the interaction amount of the second item is not greater than the interaction amount threshold, that is, the second item may be an item with a relatively low recommendation frequency among the candidate items, or the second item may also be an item with a relatively low user access frequency.
[0127] Optionally, the first object and the second object may be relatively similar objects. Since the modal features of similar objects are also similar, the similar first object and second object also have similar discretized feature vectors. Therefore, in this embodiment, the discretized feature vector of the first object can be determined as the discretized feature vector of the second object that is similar to it.
[0128] S602, obtaining a target representation of the target user and a target representation of the candidate item at least according to the representation vector of the target user, the discretized feature vector of the candidate item and the target model.
[0129] Among them, the characterization vector of the target user can be used to characterize information such as the target user's item preferences, the target user's areas of interest, and the target user's expected item recommendation frequency; the target representation of the target user can be a feature vector that characterizes the target user's preferences, and the target representation of the candidate item can be a feature vector that integrates multiple discrete feature vectors of the candidate item.
[0130] Optionally, in this embodiment, the characterization vector of the target user and the discretized feature vector of the candidate item may be input into the target model, so that the target model combines the characterization vector of the target user and the discretized feature vector of the candidate item to obtain the target characterization of the target user and the target characterization of the candidate item. As an optional implementation, in order to ensure a more accurate target characterization of the target user and the target characterization of the candidate item, in addition to inputting the characterization vector of the target user and the discretized feature vector of the candidate item into the target model, the modal features of the candidate item may also be input into the target model, that is, the characterization vector of the target user, the discretized feature vector of the candidate item and the modal features of the candidate item may be input into the target model to obtain the target characterization of the target user and the target characterization of the candidate item.
[0131] S603: Determine a target item recommended to the target user from the candidate items according to the target representation of the target user and the target representation of the candidate items.
[0132] Optionally, in this embodiment, the target user's preference for the candidate item may be determined based on the product value of the target user's target representation and the candidate item's target representation. μ , the target representation of the candidate item is h i , then the dot product of the two can be used to determine the target user μ's preference for the candidate item i. Furthermore, according to the target user's preference for the candidate items, the candidate items that the target user prefers more can be determined as the target items recommended to the target user.
[0133] In the above-mentioned item recommendation method, based on the modal features of the candidate items, the discretized feature vectors of the candidate items can be obtained, wherein the modal features of the candidate items include multiple feature segments, the discretized feature vectors of the candidate items include multiple unit vectors corresponding to the multiple feature segments, and the multiple unit vectors are obtained by training based on the model training method. Since the unit vectors corresponding to the multiple feature units of the candidate items have lower spatial complexity than the feature vectors of the candidate items, the occupied storage space is reduced. Furthermore, based on at least the representation vector of the target user, the discretized feature vectors of the candidate items and the target model, the target representation of the target user and the target representation of the candidate items can be obtained, so that based on the target representation of the target user and the target representation of the candidate items, the target items recommended to the target user can be accurately determined from the candidate items.
[0134] To facilitate understanding by those skilled in the art, the training process of the target model in the item recommendation method provided by the present disclosure is described in detail below. Figure 8 As shown, the method may include:
[0135] S1, obtaining a training sample; the training sample includes a sample user and a corresponding sample item; the modal feature of the sample item includes a first number of feature segments corresponding to a first number of feature units.
[0136] S2: For each feature segment, determine a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment.
[0137] S3: Determine a first number of discretized values based on the target cluster center corresponding to each feature segment.
[0138] S4, determining a first number of unit vectors corresponding to the first number of discretized numerical values as discretized feature vectors of the sample items.
[0139] S5, inputting the discretized feature vector into the cross network of the target model to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or perform fusion processing on the results of the weighted processing; wherein the weighted processing includes at least one of the following processing: performing a first weighted processing on multiple unit vectors of the discretized feature vector to obtain a first-order cross result; performing a second weighted processing on every third arbitrary number of unit vectors of the discretized feature vector to obtain a second-order cross result; performing a third linear processing on multiple unit vectors of the discretized feature vector to obtain a high-order cross result;
[0140] S6, at least inputting the representation vector of the sample user and the discretized representation vector into the recommendation network of the target model to obtain the target representation of the sample user and the target representation of the sample item.
[0141] S7, using the target representation of the sample user and the target representation of the sample item to train the target model, and, during the training process of the target model, updating multiple unit vectors corresponding to the multiple feature units.
[0142] It should be noted that for the description of the above steps, reference may be made to the relevant description in the above embodiment, and the effects are similar, so this embodiment will not be repeated here.
[0143] For example, Fig. 9 This is a schematic diagram of the overall structure of the item recommendation method provided in an embodiment of the present application. Fig.10 The overall structure diagram of the item recommendation method provided by the prior art is as follows: Fig. 9 and Fig.10 It can be seen from the comparison that in the prior art, the target item recommended to the target user is determined from the candidate items based on the characterization vector of the target user, the characterization vector of the candidate item, the modal features of at least one predetermined modality of the candidate item, and the target model, wherein the characterization vector of the target user can be used to characterize the characteristics of the target user, and the characterization vector of the candidate item can be used to characterize the characteristics of the candidate item. It can be understood that the characterization vector of the target user and the characterization vector of the candidate item can be an embedding vector (for example, ID embedding) obtained by using any vector characterization technology, which is usually a high-dimensional vector. The item recommendation method provided in the embodiment of the present application is based on the characterization vector of the target user, the discretized feature vector of the candidate item, the modal features of at least one predetermined modality of the candidate item, and the target model, to determine the target item recommended to the target user from the candidate items. Compared with the prior art, the embodiment of the present application removes the learning requirement of the target model for the high-dimensional characterization vector of the candidate item, which is bloated and difficult to optimize, and uses the discretized feature vector of the candidate item instead, thereby overcoming multiple difficulties in learning the high-dimensional characterization vector of the candidate item.
[0144] It should be understood that, although the steps in the flowcharts involved in the above 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 is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may 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 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.
[0145] Based on the same inventive concept, the embodiment of the present application also provides a model training device for implementing the model training 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 model training device embodiments provided below can refer to the limitations on the model training method above, and will not be repeated here.
[0146] In an exemplary embodiment, Fig.11 As shown, a model training device is provided, which is applied to a server, and includes: a first acquisition module 10, a second acquisition module 11, a third acquisition module 12 and a training module 13, wherein:
[0147] The first acquisition module 10 is used to acquire training samples; the training samples include sample users and corresponding sample items;
[0148] A second acquisition module 11 is used to acquire a discretized feature vector of the sample object based on the modal feature of the sample object; the modal feature includes a plurality of feature segments, and the discretized feature vector includes unit vectors corresponding to the plurality of feature segments;
[0149] The third acquisition module 12 is used to obtain the target representation of the sample user and the target representation of the sample object based on at least the representation vector of the sample user, the discretized feature vector and the target model.
[0150] The training module 13 is used to train the target model by using the target representation of the sample user and the target representation of the sample object.
[0151] Optionally, the modal feature includes a modal feature under at least one predetermined mode, the discretized feature vector includes multiple unit vectors corresponding to each predetermined mode, and the weighted processing includes weighted processing using the learning weight corresponding to the unit vector and / or the modal weight of the unit vector corresponding to the predetermined mode.
[0152] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0153] Based on the above embodiments, Fig.12 As shown, optionally, the modal feature includes a first number of feature segments corresponding to a first number of feature units, each feature unit corresponds to a second number of cluster centers, and the second acquisition module 11 includes: a determination unit 111 and a first acquisition unit 112, wherein:
[0154] The determining unit 111 is configured to determine, for each feature segment, a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment.
[0155] The first acquisition unit 112 is used to obtain a discretized feature vector of the sample object based on the unit vector of the target cluster center corresponding to each feature segment.
[0156] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0157] On the basis of the above embodiment, optionally, the above acquisition unit 112 is specifically used to determine a first number of discretized values based on the target cluster center corresponding to each feature segment; and determine a first number of unit vectors corresponding to the first number of discretized values as discretized feature vectors of the sample item.
[0158] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0159] Based on the above embodiments, Fig.13 As shown, optionally, the target model includes a cross network and a recommendation network; the third acquisition module 12 includes: a second acquisition unit 121 and a third acquisition unit 122, wherein:
[0160] The second acquisition unit 121 is used to input the discretized feature vector into the cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing.
[0161] The third acquisition unit 122 is used to input at least the representation vector and the discretized representation vector of the sample user into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
[0162] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0163] On the basis of the above embodiment, optionally, the above-mentioned first acquisition unit 121 is specifically used to perform at least one of the following processing: performing a first weighted processing on multiple unit vectors of the discretized feature vector to obtain a first-order crossover result; performing a second weighted processing on every arbitrary third number of unit vectors of the discretized feature vector to obtain a second-order crossover result; performing a third linear processing on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
[0164] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0165] On the basis of the above embodiment, optionally, the above-mentioned first acquisition unit 121 is specifically used to perform at least one of the following processing: obtaining a first product value of each unit vector of the discretized feature vector and the weight corresponding to each unit vector; the weight corresponding to each unit vector includes the learning weight corresponding to each unit vector and / or the modal weight of each unit vector; the first product value corresponding to each unit vector is summed to obtain a first-order crossover result; obtaining a second product value of any two unit vectors of the discretized feature vector and the weight corresponding to any two unit vectors; the weight corresponding to any two unit vectors includes the learning weight corresponding to any two unit vectors and / or the modal weight corresponding to any two unit vectors; the second product value corresponding to any two unit vectors is summed to obtain a second-order crossover result; multiple unit vectors of the discretized feature vector are spliced to obtain a spliced vector; and the spliced vector is subjected to multi-layer linear processing to obtain a high-order crossover result.
[0166] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0167] Based on the above embodiments, Fig.14 As shown, optionally, the above device further includes: an updating module 14, wherein:
[0168] The updating module 14 is used to update multiple unit vectors corresponding to multiple feature segments during the training process of the target model.
[0169] The model training device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0170] Each module in the above-mentioned model training device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0171] Based on the same inventive concept, the embodiment of the present application also provides a model training device for implementing the model training 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 model training device embodiments provided below can refer to the limitations on the model training method above, and will not be repeated here.
[0172] In an exemplary embodiment, Fig.15 As shown, an item recommendation device is provided, which is applied to a server and includes: a first acquisition module 20, a second acquisition module 21 and a determination module 22, wherein:
[0173] The first acquisition module 20 is used to acquire a discretized feature vector of the candidate item based on the modal feature of the candidate item; the modal feature includes a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; the unit vector is obtained by training based on a model training method;
[0174] A second acquisition module 21, configured to obtain a target representation of the target user and a target representation of the candidate item based at least on the representation vector of the target user, the discretized feature vector of the candidate item, and the target model;
[0175] The determination module 22 is used to determine a target item recommended to the target user from the candidate items according to the target representation of the target user and the target representation of the candidate items.
[0176] Optionally, the candidate items include the first item and / or the second item; the interaction amount of the first item is greater than a preset interaction amount threshold; and the interaction amount of the second item is not greater than the interaction amount threshold.
[0177] The item recommendation device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0178] Each module in the above-mentioned item recommendation 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.
[0179] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.16 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. 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. 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 of training samples and / or candidate items. 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 model training method or an item recommendation method is implemented.
[0180] Those skilled in the art will understand that Fig.16 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.
[0181] In an exemplary embodiment, a server is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0182] Obtain training samples; the training samples include sample users and corresponding sample items;
[0183] Based on the modal features of the sample object, a discretized feature vector of the sample object is obtained; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments;
[0184] Obtaining a target representation of the sample user and a target representation of the sample item based at least on the representation vector of the sample user, the discretized feature vector, and the target model;
[0185] The target model is trained using the target representation of sample users and the target representation of sample items.
[0186] Optionally, the above-mentioned modal features include modal features under at least one predetermined mode, the discretized feature vector includes multiple unit vectors corresponding to each predetermined mode, and the weighted processing includes weighted processing using the learning weights corresponding to the unit vectors and / or the modal weights of the unit vectors corresponding to the predetermined modes.
[0187] In one embodiment, the modal feature includes a first number of feature segments corresponding to a first number of feature units, each feature unit corresponds to a second number of cluster centers, and the processor further implements the following steps when executing the computer program:
[0188] For each feature segment, determining a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment;
[0189] Based on the unit vector of the target cluster center corresponding to each feature segment, the discretized feature vector of the sample item is obtained.
[0190] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0191] Determine a first number of discretized values based on the target cluster center corresponding to each feature segment;
[0192] A first number of unit vectors corresponding to the first number of discretized values are determined as discretized feature vectors of the sample items.
[0193] In one embodiment, the target model includes a cross network and a recommendation network, and the processor further implements the following steps when executing the computer program:
[0194] The discretized feature vector is input into the cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing;
[0195] At least the representation vector and the discretized representation vector of the sample user are input into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
[0196] In one embodiment, the processor further implements at least one of the following steps when executing the computer program:
[0197] Performing a first weighted processing on multiple unit vectors of the discretized feature vector to obtain a first-order crossover result;
[0198] Perform a second weighted processing on every third arbitrary number of unit vectors of the discretized feature vector to obtain a second-order crossover result;
[0199] The third linear processing is performed on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
[0200] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0201] Obtaining a first product value of each unit vector of the discretized feature vector and a weight corresponding to each unit vector; the weight corresponding to each unit vector includes a learning weight corresponding to each unit vector and / or a modal weight of each unit vector; adding the first product value corresponding to each unit vector to obtain a first-order crossover result;
[0202] Obtain a second product value of any two unit vectors of the discretized feature vector and the weights corresponding to any two unit vectors; the weights corresponding to any two unit vectors include the learning weights corresponding to any two unit vectors and / or the modal weights corresponding to any two unit vectors; sum the second product values corresponding to any two unit vectors to obtain a second-order crossover result;
[0203] Multiple unit vectors of the discretized feature vector are concatenated to obtain a concatenated vector; multi-layer linear processing is performed on the concatenated vector to obtain a high-order crossover result.
[0204] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0205] During the training process of the target model, multiple unit vectors corresponding to multiple feature segments are updated.
[0206] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0207] Based on the modal features of the candidate items, a discretized feature vector of the candidate items is obtained; the modal features include multiple feature segments, and the discretized feature vector includes multiple unit vectors corresponding to the multiple feature segments; the unit vector is obtained by training based on a model training method;
[0208] Obtaining a target representation of the target user and a target representation of the candidate item at least based on the representation vector of the target user, the discretized feature vector of the candidate item, and the target model;
[0209] According to the target representation of the target user and the target representation of the candidate items, a target item recommended to the target user is determined from the candidate items.
[0210] Optionally, the candidate items include the first item and / or the second item; the interaction amount of the first item is greater than a preset interaction amount threshold; and the interaction amount of the second item is not greater than the interaction amount threshold.
[0211] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0212] Obtain training samples; the training samples include sample users and corresponding sample items;
[0213] Based on the modal features of the sample object, a discretized feature vector of the sample object is obtained; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments;
[0214] Obtaining a target representation of the sample user and a target representation of the sample item based at least on the representation vector of the sample user, the discretized feature vector, and the target model;
[0215] The target model is trained using the target representation of sample users and the target representation of sample items.
[0216] Optionally, the above-mentioned modal features include modal features under at least one predetermined mode, the discretized feature vector includes multiple unit vectors corresponding to each predetermined mode, and the weighted processing includes weighted processing using the learning weights corresponding to the unit vectors and / or the modal weights of the unit vectors corresponding to the predetermined modes.
[0217] In one embodiment, the modal feature includes a first number of feature segments corresponding to a first number of feature units, each feature unit corresponds to a second number of cluster centers, and the computer program, when executed by a processor, further implements the following steps:
[0218] For each feature segment, determining a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment;
[0219] Based on the unit vector of the target cluster center corresponding to each feature segment, the discretized feature vector of the sample item is obtained.
[0220] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0221] Determine a first number of discretized values based on the target cluster center corresponding to each feature segment;
[0222] A first number of unit vectors corresponding to the first number of discretized values are determined as discretized feature vectors of the sample items.
[0223] In one embodiment, the target model includes a cross network and a recommendation network, and when the computer program is executed by a processor, the following steps are also implemented:
[0224] The discretized feature vector is input into the cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing;
[0225] At least the representation vector and the discretized representation vector of the sample user are input into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
[0226] In one embodiment, when the computer program is executed by a processor, at least one of the following steps is also implemented:
[0227] Performing a first weighted processing on multiple unit vectors of the discretized feature vector to obtain a first-order crossover result;
[0228] Perform a second weighted processing on every third arbitrary number of unit vectors of the discretized feature vector to obtain a second-order crossover result;
[0229] The third linear processing is performed on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
[0230] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0231] Obtaining a first product value of each unit vector of the discretized feature vector and a weight corresponding to each unit vector; the weight corresponding to each unit vector includes a learning weight corresponding to each unit vector and / or a modal weight of each unit vector; adding the first product value corresponding to each unit vector to obtain a first-order crossover result;
[0232] Obtain a second product value of any two unit vectors of the discretized feature vector and the weights corresponding to any two unit vectors; the weights corresponding to any two unit vectors include the learning weights corresponding to any two unit vectors and / or the modal weights corresponding to any two unit vectors; sum the second product values corresponding to any two unit vectors to obtain a second-order crossover result;
[0233] Multiple unit vectors of the discretized feature vector are concatenated to obtain a concatenated vector; multi-layer linear processing is performed on the concatenated vector to obtain a high-order crossover result.
[0234] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0235] During the training process of the target model, multiple unit vectors corresponding to multiple feature segments are updated.
[0236] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0237] Based on the modal features of the candidate items, a discretized feature vector of the candidate items is obtained; the modal features include multiple feature segments, and the discretized feature vector includes multiple unit vectors corresponding to the multiple feature segments; the unit vector is obtained by training based on a model training method;
[0238] Obtaining a target representation of the target user and a target representation of the candidate item at least based on the representation vector of the target user, the discretized feature vector of the candidate item, and the target model;
[0239] According to the target representation of the target user and the target representation of the candidate items, a target item recommended to the target user is determined from the candidate items.
[0240] Optionally, the candidate items include the first item and / or the second item; the interaction amount of the first item is greater than a preset interaction amount threshold; and the interaction amount of the second item is not greater than the interaction amount threshold.
[0241] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0242] Obtain training samples; the training samples include sample users and corresponding sample items;
[0243] Based on the modal features of the sample object, a discretized feature vector of the sample object is obtained; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments;
[0244] Obtaining a target representation of the sample user and a target representation of the sample item based at least on the representation vector of the sample user, the discretized feature vector, and the target model;
[0245] The target model is trained using the target representation of sample users and the target representation of sample items.
[0246] Optionally, the above-mentioned modal features include modal features under at least one predetermined mode, the discretized feature vector includes multiple unit vectors corresponding to each predetermined mode, and the weighted processing includes weighted processing using the learning weights corresponding to the unit vectors and / or the modal weights of the unit vectors corresponding to the predetermined modes.
[0247] In one embodiment, the modal feature includes a first number of feature segments corresponding to a first number of feature units, each feature unit corresponds to a second number of cluster centers, and the computer program, when executed by a processor, further implements the following steps:
[0248] For each feature segment, determining a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment;
[0249] Based on the unit vector of the target cluster center corresponding to each feature segment, the discretized feature vector of the sample item is obtained.
[0250] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0251] Determine a first number of discretized values based on the target cluster center corresponding to each feature segment;
[0252] A first number of unit vectors corresponding to the first number of discretized values are determined as discretized feature vectors of the sample items.
[0253] In one embodiment, the target model includes a cross network and a recommendation network, and when the computer program is executed by a processor, the following steps are also implemented:
[0254] The discretized feature vector is input into the cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing;
[0255] At least the representation vector and the discretized representation vector of the sample user are input into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
[0256] In one embodiment, when the computer program is executed by a processor, at least one of the following steps is also implemented:
[0257] Performing a first weighted processing on multiple unit vectors of the discretized feature vector to obtain a first-order crossover result;
[0258] Perform a second weighted processing on every third arbitrary number of unit vectors of the discretized feature vector to obtain a second-order crossover result;
[0259] The third linear processing is performed on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
[0260] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0261] Obtaining a first product value of each unit vector of the discretized feature vector and a weight corresponding to each unit vector; the weight corresponding to each unit vector includes a learning weight corresponding to each unit vector and / or a modal weight of each unit vector; adding the first product value corresponding to each unit vector to obtain a first-order crossover result;
[0262] Obtain a second product value of any two unit vectors of the discretized feature vector and the weights corresponding to any two unit vectors; the weights corresponding to any two unit vectors include the learning weights corresponding to any two unit vectors and / or the modal weights corresponding to any two unit vectors; sum the second product values corresponding to any two unit vectors to obtain a second-order crossover result;
[0263] Multiple unit vectors of the discretized feature vector are concatenated to obtain a concatenated vector; multi-layer linear processing is performed on the concatenated vector to obtain a high-order crossover result.
[0264] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0265] During the training process of the target model, multiple unit vectors corresponding to multiple feature segments are updated.
[0266] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0267] Based on the modal features of the candidate items, a discretized feature vector of the candidate items is obtained; the modal features include multiple feature segments, and the discretized feature vector includes multiple unit vectors corresponding to the multiple feature segments; the unit vector is obtained by training based on a model training method;
[0268] Obtaining a target representation of the target user and a target representation of the candidate item at least based on the representation vector of the target user, the discretized feature vector of the candidate item, and the target model;
[0269] According to the target representation of the target user and the target representation of the candidate items, a target item recommended to the target user is determined from the candidate items.
[0270] Optionally, the candidate items include the first item and / or the second item; the interaction amount of the first item is greater than a preset interaction amount threshold; and the interaction amount of the second item is not greater than the interaction amount threshold.
[0271] 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.
[0272] Those of ordinary skill 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 the present application can include at least one of non-volatile memory 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), magnetic 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, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0273] 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 application.
[0274] 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 understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations 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 model training method, characterized in that: The model training method is used to train a target model, and the model training method includes: Acquire training samples; the training samples include sample users and corresponding sample items; Based on the modal features of the sample item, a discretized feature vector of the sample item is obtained; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; Obtaining a target representation of the sample user and a target representation of the sample object at least according to the representation vector of the sample user, the discretized feature vector and the target model; The target model is trained using the target representation of the sample user and the target representation of the sample object.
2. The method according to claim 1, characterized in that The modal feature includes a first number of feature segments corresponding to a first number of feature units, each feature unit corresponds to a second number of cluster centers; and obtaining a discretized feature vector of the sample item based on the modal feature of the sample item includes: For each feature segment, determining a target cluster center corresponding to the feature segment from a second number of cluster centers of feature units corresponding to the feature segment; Based on the unit vector of the target cluster center corresponding to each feature segment, a discretized feature vector of the sample object is obtained.
3. The method according to claim 2, characterized in that The step of obtaining the discretized feature vector of the sample object based on the unit vector of the target cluster center corresponding to each feature segment includes: Determine a first number of discretized values based on the target cluster center corresponding to each feature segment; A first number of unit vectors corresponding to the first number of discretized values are determined as discretized feature vectors of the sample items.
4. The method according to any one of claims 1 to 3, characterized in that: The target model includes a cross network and a recommendation network; the step of obtaining the target representation of the sample user and the target representation of the sample item at least according to the representation vector of the sample user, the discretized feature vector and the target model includes: The discretized feature vector is input into the cross network to obtain a discretized representation vector of the sample item; the cross network is used to perform weighted processing on the unit vectors in the discretized feature vector and / or to perform fusion processing on the results of the weighted processing; At least the representation vector of the sample user and the discretized representation vector are input into the recommendation network to obtain the target representation of the sample user and the target representation of the sample item.
5. The method according to claim 4, characterized in that The weighting process includes at least one of the following processes: Performing a first weighted processing on a plurality of unit vectors of the discretized feature vector to obtain a first-order crossover result; Performing a second weighted processing on every third arbitrary number of unit vectors of the discretized feature vector to obtain a second-order crossover result; A third linear process is performed on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result.
6. The method according to claim 5, characterized in that The modal features include modal features under at least one predetermined modality, the discretized feature vector includes multiple unit vectors corresponding to each predetermined modality, and the weighted processing includes weighted processing using the learning weights corresponding to the unit vectors and / or the modal weights of the unit vectors corresponding to the predetermined modalities.
7. The method according to claim 6, characterized in that The step of performing a first weighted processing on the multiple unit vectors of the discretized feature vector to obtain a first-order crossover result includes: obtaining a first product value of each unit vector of the discretized feature vector and a weight corresponding to each unit vector; the weight corresponding to each unit vector includes a learning weight corresponding to each unit vector and / or a modal weight of each unit vector; and summing the first product values corresponding to each unit vector to obtain the first-order crossover result; The step of performing a second weighted processing on every arbitrary third number of unit vectors of the discretized feature vector to obtain a second-order crossover result includes: obtaining a second product value of any two unit vectors of the discretized feature vector and the weights corresponding to the arbitrary two unit vectors; the weights corresponding to the arbitrary two unit vectors include the learning weights corresponding to the arbitrary two unit vectors and / or the modal weights corresponding to the arbitrary two unit vectors; and adding the second product values corresponding to the arbitrary two unit vectors to obtain the second-order crossover result; The performing third linear processing on multiple unit vectors of the discretized feature vector to obtain a high-order crossover result includes: performing splicing processing on multiple unit vectors of the discretized feature vector to obtain a spliced vector; and performing multi-layer linear processing on the spliced vector to obtain the high-order crossover result.
8. The method according to claim 1, characterized in that The method further comprises: During the training process of the target model, a plurality of unit vectors corresponding to the plurality of feature unit segments are updated.
9. An item recommendation method, characterized in that: The method comprises: Based on the modal features of the candidate items, a discretized feature vector of the candidate items is obtained; the modal features include a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; the unit vectors are obtained by training based on a model training method; Obtaining a target representation of the target user and a target representation of the candidate item at least according to the representation vector of the target user, the discretized feature vector of the candidate item, and a target model; According to the target representation of the target user and the target representation of the candidate items, a target item recommended to the target user is determined from the candidate items.
10. The method according to claim 9, characterized in that The candidate items include a first item and / or a second item; the interaction amount of the first item is greater than a preset interaction amount threshold; and the interaction amount of the second item is not greater than the interaction amount threshold.
11. A model training device, characterized in that: The device comprises: A first acquisition module is used to acquire training samples; the training samples include sample users and corresponding sample items; A second acquisition module is used to acquire a discretized feature vector of the sample item based on the modal feature of the sample item; the modal feature includes a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; A third acquisition module, configured to obtain a target representation of the sample user and a target representation of the sample object at least according to the representation vector of the sample user, the discretized feature vector and the target model; A training module is used to train the target model by using the target representation of the sample user and the target representation of the sample object.
12. An item recommendation device, characterized in that: The device comprises: A first acquisition module is used to acquire a discretized feature vector of the candidate item based on a modal feature of the candidate item; the modal feature includes a plurality of feature segments, and the discretized feature vector includes a plurality of unit vectors corresponding to the plurality of feature segments; the unit vector is obtained by training based on a model training method; A second acquisition module, configured to obtain a target representation of the target user and a target representation of the candidate item based at least on a representation vector of the target user, a discretized feature vector of the candidate item, and a target model; A determination module is used to determine a target item recommended to the target user from the candidate items according to the target representation of the target user and the target representation of the candidate items.
13. A server comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method of any one of claims 1 to 8 or any one of claims 9 to 10 are implemented.
14. 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 of any one of claims 1 to 8 or any one of claims 9 to 10 are implemented.
15. 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 of any one of claims 1 to 8 or any one of claims 9 to 10 are implemented.