Recommendation method, recommendation model training method, and related products

By fusing the feature information of target reference samples and deep neural network (DNN), the problem of insufficient recommendation accuracy in user behavior prediction in tabular data is solved, and more accurate and efficient user behavior prediction and recommendation are achieved.

CN113722583BActive Publication Date: 2025-10-24HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110877429.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-31
Publication Date
2025-10-24
Estimated Expiration
2041-07-31

AI Technical Summary

Technical Problem

Existing user behavior prediction models based on tabular data have shortcomings in recommendation accuracy. The isolated use of a single sample leads to low recommendation accuracy.

Method used

By fusing the feature information of target reference samples, using deep neural network (DNN) to obtain output values, and combining the interaction and splicing of target feature vector groups, the richness of feature information and similarity calculation are improved to obtain more accurate user behavior predictions.

Benefits of technology

The accuracy and efficiency of recommendations are improved by using the most correlated reference sample feature information for prediction, shortening the model training cycle and increasing the model convergence speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722583B_ABST
    Figure CN113722583B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a recommendation method, a recommendation model training method and related products. The recommendation method comprises: obtaining to-be-predicted data; obtaining a plurality of target reference samples from a plurality of reference samples according to the similarity of the to-be-predicted data and the plurality of reference samples; each reference sample and the to-be-predicted data comprise user feature domain data and item feature domain data, the user feature domain data of the to-be-predicted data is used to indicate target user features, the item feature domain data of the to-be-predicted data is used to indicate target item features, each target reference sample and the to-be-predicted data have partially same user feature domain data and / or item feature domain data; obtaining target feature information of the to-be-predicted data according to the plurality of target reference samples and the to-be-predicted data; obtaining an output value through a deep neural network (DNN) with the target feature information as input; and determining whether to recommend a target item to a target user according to the output value. Embodiments of the present application are conducive to improving recommendation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a recommendation method, a recommendation model training method, and related products. Background Art

[0002] Predicting user behavior based on tabular data is an important task with numerous real-world applications, such as click-through rate (CTR) prediction in online advertising, rating prediction and product ranking in recommendation systems, and fraud detection. The data collected in these application scenarios is stored in a tabular format. Each row in the table corresponds to a sample, and each column of each sample corresponds to a unique feature.

[0003] Extracting valuable relationships or patterns from tabular data is key to accurate learning in machine learning systems. To better utilize tabular data, it's crucial to fully exploit the rich information contained between rows and columns in tabular data. Early models, such as logistic regression, support vector machines, and tree models, used row samples as input for prediction. Deep models map the categorical features of row samples into embedding vectors and then use the feature vectors of individual row samples to predict user behavior. In recent years, feature interaction-based models and user sequence-based models have become mainstream in tabular data modeling. Feature interaction-based models focus on interacting between column features for each row sample in tabular data to fully exploit user sequence features to predict user behavior and make recommendations based on predicted user behavior.

[0004] However, the above methods all use a single sample to predict user behavior in isolation, resulting in low accuracy of recommendations based on the predicted user behavior. Summary of the Invention

[0005] This application provides a recommendation method, a recommendation model training method and related products, which make recommendations by integrating the feature information of target reference samples to improve the recommendation accuracy.

[0006] In a first aspect, embodiments of the present application provide a recommendation method, comprising: obtaining to-be-predicted data; obtaining a plurality of target reference samples from a plurality of reference samples according to a similarity between the to-be-predicted data and the plurality of reference samples; each reference sample and the to-be-predicted data comprising user feature domain data and item feature domain data, the user feature domain data of the to-be-predicted data being used to indicate target user features, the item feature domain data of the to-be-predicted data being used to indicate target item features, each target reference sample and the to-be-predicted data having partially same user feature domain data and / or item feature domain data; obtaining target feature information of the to-be-predicted data according to the plurality of target reference samples and the to-be-predicted data; the target feature information comprising a first target feature vector group and a second target feature vector group, the first target feature vector group being a vectorized to-be-predicted data, the second target feature vector group being obtained by fusing a plurality of target reference samples after vectorization; obtaining an output value by a deep neural network (DNN) with the target feature information as input; and determining whether to recommend a target item to a target user according to the output value.

[0007] The output value can be a probability value, which reflects a probability of the target user operating the target item. For different target items, the probability of the target user operating the target item can be understood differently. For example, when the target item is an application, the probability of the target user operating the target item can be understood as a probability of the target user clicking the application; for example, when the target item is a song, the probability of the target user operating the target item can be understood as a probability of the target user liking the song; for example, when the target item is a commodity, the probability of the target user operating the target item can be understood as a probability of the target user purchasing the commodity.

[0008] In actual application, after obtaining the probability value, the probability value can be post-processed to obtain the output value. For example, when the probability value is greater than a probability threshold, 1 is taken as the output value; when the probability value is less than or equal to the threshold, 0 is taken as the output value, where 0 indicates that the target user will not operate the target item, and 1 indicates that the target user will operate the target item.

[0009] For a single-item recommendation scenario, when the output value is greater than a threshold, it is determined to recommend the target item to the target user, otherwise it is determined not to recommend the target item to the target user. In addition, when the scheme of the present application is applied to a scenario of selecting an item from a plurality of candidate items for recommendation, the output value corresponding to each candidate item can be obtained; then, the candidate item with the highest output value is recommended to the target user, or the output values of the plurality of candidate items are sorted, and the candidate items in the front (for example, the first ten candidate items) are recommended to the target user. For example, when recommending songs, the output value of each candidate song in a song library can be obtained, and then the top ten songs in the output value are recommended to the target user.

[0010] It can be seen that, in addition to the feature information of the to-be-predicted data itself, the target feature information obtained in the present application also contains the feature information after the target reference sample is vectorized and fused. Since the target reference sample is selected from the plurality of reference samples through the similarity between the to-be-predicted data and the plurality of reference samples, and has part of the same user feature domain data and / or item feature domain data as the to-be-predicted data, the target reference sample is a reference sample that is more similar to the to-be-predicted data among the plurality of reference samples, and thus the user behavior in the target reference sample can provide reference and experience for the prediction of the target user's behavior, so that when the target feature information that fuses the features of the target reference sample is used to predict the output value, the predicted output value can be more accurate, and the recommendation accuracy is improved based on this output value.

[0011] In some possible implementation manners, the plurality of target reference samples further include label data; and the second target feature vector group is obtained by vectorizing and fusing the plurality of target reference samples, specifically, the second target feature vector group is obtained by vectorizing and fusing the user feature domain data, the item feature domain data, and the label data of the plurality of target reference samples.

[0012] The user feature data of the target reference sample is used to represent reference user features, and the item feature data of the target reference sample is used to represent reference item features. Since the target reference sample also carries label data, that is, the real operation behavior of the reference user on the reference item. Therefore, the second feature vector group contains the real operation behavior of the reference user on the reference item, so that when the target feature information is used to predict the behavior of the target user, the operation behavior of the target user on the target item can be predicted in combination with the real operation behavior of the reference user on the reference item, to obtain an output value, so that the predicted output value has high accuracy, and the item recommendation accuracy is further improved.

[0013] In some possible implementation manners, the target feature information further includes a third target feature vector group, the third target feature vector group is obtained by interacting the target feature vectors in the first vector group two by two, and the first vector group includes the first target feature vector group and the second target feature vector group.

[0014] It should be noted that the above is to interact the target feature vectors in the first vector group two by two, but the two-by-two interaction can be freely performed in actual application. For example, the plurality of first target feature vectors in the first target feature vector group can be interacted two by two to obtain a plurality of third target feature vectors; or the plurality of second target feature vectors in the second target feature vector group can be interacted two by two to obtain a plurality of third target feature vectors, and the like.

[0015] It can be seen that in the embodiment, the target feature vectors in the first vector group are interacted with each other to obtain a plurality of third target feature vectors, so that the target feature information also contains high-order feature information, that is, the third target feature vector can represent the relationship between the behaviors of the user, and therefore, the use of higher-order feature information for behavior prediction can further improve the accuracy of the output value. For example, a certain first target feature vector represents that the user is 28 years old, and another first target feature vector represents that the user is male, and then the third target feature vector obtained by interacting the two target feature vectors represents that the user is a 28-year-old male. When each target feature vector is used alone for prediction, if the target item meets the needs of people aged 28 or meets the needs of men, it is considered that the target user has a certain probability to operate the target item, and the output value obtained is generally greater than the probability threshold. However, after the target feature vectors are interacted, only when the target item meets the needs of 28-year-old men, the target user has a certain probability to operate the target item, and the output value obtained is greater than the probability threshold. Therefore, the accuracy of the output value is relatively high, and the recommendation accuracy is further improved.

[0016] In some possible embodiments, the plurality of first target feature vectors in the first target feature vector group are spliced to obtain a second feature vector of the to-be-predicted data; the plurality of first feature vectors of each target reference sample are spliced to obtain a second feature vector of each target reference sample, and the plurality of first feature vectors of each target reference sample are obtained by vectorizing the target reference sample; a similarity between the second feature vector of each target reference sample and the second feature vector of the to-be-predicted data is obtained; a weight of each target reference sample is determined according to the similarity between the second feature vector of each target reference sample and the second feature vector of the to-be-predicted data; and the first feature vectors of the plurality of target reference samples in the same feature domain are fused according to the weight of each target reference sample to obtain a second target feature vector group.

[0017] It can be seen that in the embodiment, the attention mechanism is used, so that the weight of the target reference sample with the highest association degree to the to-be-predicted data in the plurality of target reference samples is the largest. Therefore, the second target feature vector obtained by fusion mainly indicates the feature information of the target reference sample with the highest association degree, and the prediction of the behavior of the target user is guided as much as possible by the target reference sample with the highest association degree, so that the probability accuracy of the predicted target user operating the target item is higher, and the accuracy of the item recommendation is further improved.

[0018] In some possible implementation, before the target reference samples are obtained from the plurality of reference samples according to the similarity between the to-be-predicted data and the plurality of reference samples, the method further includes: obtaining a plurality of original samples, wherein each of the original samples includes user feature field data and item feature field data; and performing inverted indexing on the plurality of original samples by taking the user feature field data and the item feature field data of the to-be-predicted data as elements, to obtain the plurality of reference samples.

[0019] Optionally, the plurality of original samples are first inverted to obtain an inverted list. For example, the user feature field data and the item feature field data of each reference sample are taken as elements to be inverted, to obtain an inverted list as shown in Table 2. For example, the first column in each row in the inverted list is an element, that is, a domain data (user feature field data or item feature field data) in the plurality of reference samples, and the second column is a reference sample containing the domain data in the plurality of reference samples. After the inverted list is obtained, each user feature field data and each item feature field data of the to-be-predicted data are taken as elements to index the plurality of original samples, to obtain the plurality of reference samples. That is, according to the corresponding relationship in the inverted list, the reference samples corresponding to each user feature field data and the reference samples corresponding to each item feature field can be indexed. Then, the reference samples corresponding to each user feature field data and the reference samples corresponding to each item feature field are merged and deduplicated to obtain the plurality of reference samples. For example, the to-be-predicted data is [U4, LA, Student, L2, cell phone, B3], and U4, LA, Student, L2, cell phone, and B3 are all taken as query words to obtain, from the inverted list shown in Table 2, the reference samples corresponding to LA as [sample 1, sample 3], the reference samples corresponding to Student as [sample 1, sample 2, sample 3], the reference samples corresponding to L2 as [sample 3], the reference samples corresponding to cell phone as [sample 3, sample 4], and the reference samples corresponding to B3 as [sample 4]. Then, all the reference samples obtained from the inverted list are merged and deduplicated to obtain the plurality of reference samples, that is, [sample 1, sample 2, sample 3, sample 4].

[0020] As can be seen, in this embodiment, the plurality of original samples are sorted by inversion to obtain an inverted list. Since the inverted list is used, the plurality of reference samples can be quickly indexed from the plurality of original samples using the inverted list, and a part of irrelevant original samples are excluded. In this way, the similarity calculation with each original sample can be avoided, the calculation pressure is reduced, the target reference samples can be quickly screened, and the efficiency of item recommendation is improved.

[0021] In a second aspect, the embodiments of the present application provide a recommendation model training method. The recommendation model comprises a feature information extraction network and a deep neural network (DNN). The method comprises: obtaining a plurality of training samples, wherein each training sample comprises user feature domain data and item feature domain data; obtaining a plurality of target training samples from a plurality of second training samples according to the similarity of a first training sample and the plurality of second training samples, wherein the first training sample is one of the plurality of training samples, the plurality of second training samples are part or all of the plurality of training samples except the first training sample, the user feature domain data of the first training sample is used to indicate a first reference user feature, the item feature domain data of the first training sample is used to indicate a first reference item feature, the first training sample and each target training sample have partially same user feature domain data and / or item feature domain data; inputting the first training sample and the plurality of target training samples into the feature information extraction network to obtain target feature information of the first training sample, wherein the target feature information comprises a fourth target feature vector group and a fifth target feature vector group, the fourth target feature vector group is obtained by vectorizing the first training sample through the feature information extraction network, and the fifth target feature vector group is obtained by fusing the plurality of target training samples after vectorization through the feature information extraction network; inputting the target feature information into the deep neural network (DNN) to obtain an output value, wherein the output value is used to represent the probability of the first reference user operating the first reference item; training the recommendation model according to the output value and label data of the first training sample to obtain a target recommendation model.

[0022] It should be noted that the first training sample and the plurality of target training samples are input into the feature information extraction network of the recommendation model, and the target feature information with more information is constructed. The target feature information contains not only the feature information of the first training sample, i.e., the plurality of fourth target feature vectors, but also the fused feature information of the plurality of target training samples after vectorization, i.e., the plurality of fifth target feature vectors. In addition, the target training samples are selected from the plurality of second training samples according to the similarity between the first training sample and the plurality of second training samples. Therefore, the target training samples are similar to the first training sample, and the user behavior prediction can be performed by referring to the fused feature information (i.e., prior knowledge) of the plurality of target training samples after vectorization when the model is trained by using the target feature information of the first training sample. The output value is obtained, and the predicted output value is more accurate, so that the loss in the training process is smaller, and the model is more easily converged. In addition, the user feature information of the plurality of target training samples is referred to, so that the model can remember more rich user feature information, thereby improving the precision of the trained model and the robustness of the model.

[0023] In some possible implementation manners, the fifth target feature vector group is obtained by vectorizing and fusing the plurality of target training samples. Specifically, the fifth target feature vector group is obtained by vectorizing and fusing the user feature field data, the item feature field data, and the label data of the plurality of target training samples by using the feature information extraction network.

[0024] It can be seen that in the embodiment, the target training sample carries the label data, and since the label data of each target training sample reflects the real operation behavior of the user on the item in each target training sample, when the target feature information is used to predict the behavior of the target user, the probability that the first reference user operates the first reference item in the first training sample can be predicted in combination with the real operation behavior of the user on the item in the target training sample, so that the accuracy of the predicted output value is relatively high. Since the accuracy of the predicted output value is relatively high, the loss obtained in the training process is relatively small, the model training period is shortened, and the model convergence speed is improved.

[0025] In some possible implementation manners, the target feature information further includes a sixth target feature vector group, and the sixth target feature vector group is obtained by interacting the target feature vectors in the second vector group with each other by using the feature information extraction network, and the second vector group includes the fourth target feature vector group and the fifth target feature vector group.

[0026] It can be seen that in the embodiment, the target feature vectors in the second vector group are interacted with each other to obtain a plurality of sixth target feature vectors, so that the high-order feature information is further included in the target feature information, that is, the sixth target feature vector can represent the high-order feature of the first reference user. Therefore, the prediction accuracy of the user behavior can be further improved, and the model convergence speed can be further improved by using the high-order feature to predict the behavior. For example, one fourth target feature vector represents that the user is 28 years old, and another fourth target feature vector represents that the user is a male. The sixth target feature vector obtained by interacting the two fourth target feature vectors represents that the user is a 28-year-old male. When each fourth target feature vector is used for prediction alone, if the item meets the demand of the 28-year-old person or the demand of the male, it is considered that the user has a certain probability to operate the item. However, after the target feature vectors are interacted, only when the item meets the demand of the 28-year-old male, the user has a certain probability to operate the item, so that the prediction accuracy of the user behavior is improved.

[0027] In some possible implementation, the fusing comprises: splicing the plurality of fourth target feature vectors in the fourth target feature vector group to obtain the second feature vector of the first training sample; splicing the plurality of first feature vectors of each target training sample to obtain the second feature vector of each target training sample, the plurality of first feature vectors of each target training sample being obtained by vectorizing the target training sample; obtaining the similarity between the second feature vector of each target training sample and the second feature vector of the first training sample; determining the weight of each target training sample according to the similarity between the second feature vector of each target training sample and the second feature vector of the first training sample; and fusing the first feature vectors of the plurality of target training samples in the same feature domain according to the weight of each target training sample to obtain the fifth target feature vector group.

[0028] It can be seen that, through the attention mechanism, the weight of the target training sample with the highest correlation degree to the first training sample in the plurality of target training samples is maximized, so that the fifth target feature vector obtained by fusing mainly indicates the feature information of the target training sample, thereby using the target training sample with the highest correlation degree as much as possible to guide the prediction of the first reference user behavior, so that the predicted probability of the first reference user operating the first reference item is more accurate, and the model convergence speed is improved.

[0029] In some possible implementation, before the plurality of target training samples are obtained from the plurality of second training samples according to the similarity between the first training sample and the plurality of second training samples, the method further comprises: indexing the plurality of training samples by taking the plurality of user feature domain data and the plurality of item feature domain data of the first training sample as elements to obtain the plurality of second training samples.

[0030] Optionally, the plurality of training samples are indexed by taking the user feature domain data and the item feature domain data of each training sample as elements, where the inverted list contains the correspondence between the elements and the samples, as shown in Table 2, the first column in each row in the inverted list is an element, that is, a domain data (user feature domain data or item feature domain data) under a sample, and the second column is a reference sample containing the domain data in the plurality of reference samples. After the inverted list is obtained, each user feature domain data and each item feature domain data in the first training sample are taken as elements to index the plurality of second training samples from the plurality of training samples, that is, according to the correspondence in the inverted list, the training sample corresponding to each user feature domain data and the training sample corresponding to each item feature domain are obtained; and then, the training sample corresponding to each user feature domain data and the training sample corresponding to each item feature domain are merged and deduplicated to obtain the plurality of second training samples.

[0031] It can be seen that in the embodiment, the plurality of training samples are sorted by the inverted index to obtain the inverted list. Since the inverted list is used, the plurality of second training samples can be quickly found using the inverted list, without calculating the similarity with each training sample, thereby reducing the calculation pressure, and the plurality of target training samples can be quickly obtained from the plurality of second training samples, thereby improving the model training speed.

[0032] In a third aspect, the embodiments of the present application provide a recommendation device, comprising: an acquisition unit and a processing unit; the acquisition unit is configured to acquire to-be-predicted data; the processing unit is configured to acquire a plurality of target reference samples from a plurality of reference samples according to the similarity between the to-be-predicted data and the plurality of reference samples; each reference sample and the to-be-predicted data comprise user feature domain data and item feature domain data, the user feature domain data of the to-be-predicted data is used to indicate target user features, the item feature domain data of the to-be-predicted data is used to indicate target item features, each target reference sample and the to-be-predicted data have partially same user feature domain data and / or item feature domain data; target feature information of the to-be-predicted data is acquired according to the plurality of target reference samples and the to-be-predicted data; the target feature information comprises a first target feature vector group and a second target feature vector group, the first target feature vector group is the to-be-predicted data after vectorization, and the second target feature vector group is obtained by fusing the plurality of target reference samples after vectorization; an output value is acquired by taking the target feature information as input through a deep neural network DNN; and it is determined whether to recommend a target item to a target user according to the output value.

[0033] In some possible implementation manners, the plurality of target reference samples further comprise label data; the second target feature vector group is obtained by fusing the plurality of target reference samples after vectorization, specifically, the second target feature vector group is obtained by fusing the user feature domain data, the item feature domain data and the label data of the plurality of target reference samples after vectorization.

[0034] In some possible implementation manners, the target feature information further comprises a third target feature vector group, the third target feature vector group is obtained by interacting the target feature vectors in the first vector group two by two, and the first vector group comprises the first target feature vector group and the second target feature vector group.

[0035] In some possible implementation manners, in the process of fusing the target feature vectors by the processing unit, the processing unit is specifically configured to: splice the plurality of first target feature vectors in the first target feature vector group to obtain a second feature vector of the to-be-predicted data; splice the plurality of first feature vectors of each target reference sample to obtain a second feature vector of each target reference sample, the plurality of first feature vectors of each target reference sample being obtained by vectorizing the target reference sample; obtain a similarity between the second feature vector of each target reference sample and the second feature vector of the to-be-predicted data; determine a weight of each target reference sample according to the similarity between the second feature vector of each target reference sample and the second feature vector of the to-be-predicted data; and fuse the first feature vectors of the plurality of target reference samples in the same feature domain according to the weight of each target reference sample, to obtain the second target feature vector group.

[0036] Before the processing unit obtains the plurality of target reference samples from the plurality of reference samples according to the similarities between the to-be-predicted data and the plurality of reference samples, the processing unit is further configured to: obtain a plurality of original samples, wherein each original sample includes user feature domain data and item feature domain data.

[0037] The plurality of user feature domain data and the plurality of item feature domain data of the to-be-predicted data are taken as elements, and the plurality of original samples are inverted indexed to obtain the plurality of reference samples.

[0038] In a fourth aspect, an embodiment of the present application provides a recommendation model training apparatus, the recommendation model comprising a feature information extraction network and a deep neural network (DNN), the apparatus comprising: an acquisition unit and a processing unit; the acquisition unit is configured to acquire a plurality of training samples, wherein each training sample comprises user feature domain data and item feature domain data; the processing unit is configured to acquire a plurality of target training samples from a plurality of second training samples according to a similarity between a first training sample and the plurality of second training samples, wherein the first training sample is one of the plurality of training samples, the plurality of second training samples are part or all of the plurality of training samples except the first training sample, the user feature domain data of the first training sample is used to indicate a first reference user feature, the item feature domain data of the first training sample is used to indicate a first reference item feature, the first training sample and each target training sample have partially same user feature domain data and / or item feature domain data; inputting the first training sample and the plurality of target training samples into the feature information extraction network to obtain target feature information of the first training sample, wherein the target feature information comprises a fourth target feature vector group and a fifth target feature vector group, the fourth target feature vector group is obtained by vectorizing the first training sample through the feature information extraction network, and the fifth target feature vector group is obtained by fusing the plurality of target training samples after vectorization through the feature information extraction network; inputting the target feature information into the deep neural network (DNN) to obtain an output value, the output value being used to represent a probability of a first reference user performing an operation on a first reference item; training the recommendation model according to the output value and label data of the first training sample to obtain a target recommendation model.

[0039] In some possible implementation manners, the fifth target feature vector group is obtained by fusing the plurality of target training samples after vectorization, specifically: the fifth target feature vector group is obtained by fusing the user feature domain data, the item feature domain data, and the label data of the plurality of target training samples after vectorization through the feature information extraction network.

[0040] In some possible implementation manners, the target feature information further comprises a sixth target feature vector group, the sixth target feature vector group being obtained by interacting the target feature vectors in a second vector group with each other, and the second vector group comprising the fourth target feature vector group and the fifth target feature vector group.

[0041] In some possible implementation manners, in the fusion of the processing unit, the processing unit is specifically configured to: splice a plurality of fourth target feature vectors in a fourth target feature vector group to obtain a second feature vector of the first training sample; splice a plurality of first feature vectors of each target training sample to obtain a second feature vector of each target training sample, the plurality of first feature vectors of each target training sample being obtained by vectorizing the target training sample; obtain a similarity between the second feature vector of each target training sample and the second feature vector of the first training sample; determine a weight of each target training sample according to the similarity between the second feature vector of each target training sample and the second feature vector of the first training sample; and fuse the first feature vectors of the plurality of target training samples in a same feature domain according to the weight of each target training sample, to obtain a fifth target feature vector group.

[0042] In some possible implementation manners, before the processing unit obtains a plurality of target reference samples from the plurality of reference samples according to the similarity between the to-be-predicted data and the plurality of reference samples, the processing unit is further configured to:

[0043] perform inverted indexing on the plurality of training samples by taking each user feature domain data and each item feature domain data of each training sample as an element, to obtain an inverted list; and obtain a plurality of second training samples from the inverted list by taking each user feature domain data and each item feature domain data of the first training sample as a query word.

[0044] In some possible implementation manners, before the processing unit obtains a plurality of target training samples from the plurality of second training samples according to the similarity between the first training sample and the plurality of second training samples, the processing unit is further configured to:

[0045] perform inverted indexing on the plurality of training samples by taking a plurality of the user feature domain data and a plurality of the item feature domain data of the first training sample as elements, to obtain the plurality of second training samples.

[0046] In a fifth aspect, an embodiment of the present application provides an electronic device, including: a memory configured to store a program; and a processor configured to execute the program stored in the memory; when the program stored in the memory is executed, the processor is configured to implement the method in the first aspect or the second aspect.

[0047] In a sixth aspect, an embodiment of the present application provides a computer readable medium storing program code for execution by a device, the program code including code for implementing the method in the first aspect or the second aspect.

[0048] In a seventh aspect, an embodiment of the present application provides a computer program product comprising instructions which, when the computer program product runs on a computer, enable the computer to implement the method in the first aspect or the second aspect.

[0049] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a data interface, the processor reading instructions stored on a memory through the data interface, and implementing the method in the first aspect or the second aspect.

[0050] Optionally, as an implementation manner, the chip can further comprise a memory, the memory storing the instructions, and the processor being configured to execute the instructions stored on the memory, and the processor being configured to implement the method in the first aspect or the second aspect when the instructions are executed. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 A schematic diagram of an artificial intelligence subject framework is provided for an embodiment of the present application.

[0052] Figure 2 A schematic diagram of a system architecture is provided for an embodiment of the present application.

[0053] Figure 3 A hardware structure diagram of a chip is provided for an embodiment of the present application.

[0054] Figure 4 A flowchart of a recommendation method is provided for an embodiment of the present application.

[0055] Figure 5 A schematic diagram of feature vector interaction and splicing is provided for an embodiment of the present application.

[0056] Figure 6 A structure diagram of a model is provided for an embodiment of the present application.

[0057] Figure 7 A flowchart of a recommendation model training method is provided for an embodiment of the present application.

[0058] Figure 8 A user behavior prediction flow comparison diagram is provided for an embodiment of the present application.

[0059] Figure 9 A schematic diagram of an application recommendation is provided for an embodiment of the present application.

[0060] Figure 10 A schematic diagram of a commodity recommendation is provided for an embodiment of the present application.

[0061] Figure 11 A schematic diagram of a song recommendation is provided for an embodiment of the present application.

[0062] Figure 12 A structural diagram of a recommendation device provided for an embodiment of the present application;

[0063] Figure 13 A structural diagram of a recommendation model training device provided for an embodiment of the present application;

[0064] Figure 14 A structural diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0066] Reference Figure 1 , Figure 1 An artificial intelligence subject framework provided for an embodiment of the present application. The subject framework describes the overall workflow of the artificial intelligence system, and is suitable for general artificial intelligence field requirements.

[0067] The above artificial intelligence subject framework will be described below from two dimensions of "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis).

[0068] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data undergoes the condensation process of "data-information-knowledge-wisdom".

[0069] The "IT value chain" reflects the value brought by artificial intelligence to the information technology industry from the underlying infrastructure of human intelligence, information (provision and processing technology implementation) to the industrial ecological process of the system.

[0070] (1) Infrastructure:

[0071] Infrastructure provides computing power support for artificial intelligence systems, realizes communication with the external world, and realizes support through the underlying platform. Communication with the outside world through sensors; computing power is provided by intelligent chips, such as central processing units (CPU), neural network processing units (NPU), graphics processing units (GPU), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), etc. Hardware acceleration chips; the underlying platform includes distributed computing frameworks and related platform guarantees and support for networks, which can include cloud storage and computing, interconnection networks, etc. For example, sensors and external communication obtain data, which are provided to intelligent chips in the distributed computing system provided by the underlying platform for computing.

[0072] (2) Data:

[0073] The data of the upper layer of the infrastructure is used to represent the data source in the field of artificial intelligence. The data relates to graphics, images, speech, text, and also relates to the Internet of Things data of traditional devices, including business data of existing systems and sensing data such as force, displacement, liquid level, temperature, and humidity.

[0074] (3) Data processing:

[0075] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.

[0076] Among them, machine learning and deep learning can model, extract, preprocess, train, etc. symbolic and formalized intelligent information.

[0077] Reasoning refers to the process of simulating human intelligent reasoning methods in computers or intelligent systems, using formalized information to perform machine thinking and solve problems according to reasoning control strategies, and the typical functions are search, matching, and prediction.

[0078] Decision-making refers to the process of decision-making after intelligent information is reasoned, which usually provides functions such as classification, sorting, and prediction.

[0079] (4) General capabilities:

[0080] After the data is processed by the above-mentioned data processing, some general capabilities can be formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, user behavior prediction, computer vision processing, speech recognition, image recognition, etc.

[0081] (5) Intelligent product and industry application:

[0082] Intelligent product and industry application refers to the product and application of artificial intelligence system in various fields, which is the packaging of the overall solution of artificial intelligence, and realizes the application of intelligent information decision productization. Its application fields mainly include: intelligent manufacturing, intelligent transportation, smart home, intelligent medical treatment, intelligent security, automatic driving, intelligent terminal, etc.

[0083] Referring to Figure 2 , Figure 2 A schematic diagram of a system architecture 200 provided by an embodiment of the present application is shown. The data acquisition device 260 is used to collect multi-domain discrete data including user feature domain data, item feature domain data and label data, i.e. training samples, and store the training samples in the database 230. The training device 220 generates a model / rule 201 based on the training samples maintained in the database 230. How the training device 220 obtains the model / rule 201 based on the training samples will be described in more detail below. The model / rule 201 can process the to-be-predicted data to obtain an output value, i.e. the probability of the target user operating the target item, so as to determine whether to recommend the target item to the target user according to the output value.

[0084] The model / rule obtained by the training device 220 can be applied in different systems or devices. In the following Figure 2 In the following, the execution device 210 is configured with an I / O interface 212 to interact with external devices. The "user" can input data to the I / O interface 212 through the client device 240, for example, the to-be-predicted data can be input to the I / O interface 212 through the client device 240, wherein the to-be-predicted data includes user feature domain data and item feature domain data. The purpose of the "user" inputting the to-be-predicted data to the execution device 210 is to obtain the output value to obtain the probability of the target user operating the target item.

[0085] The execution device 210 can call the data, code, etc. stored in the data storage system 250, or store the data, instructions, etc. in the data storage system 250. A large number of reference samples are stored in the data storage system 250, and the reference samples can be the training samples maintained in the database 230, i.e. the database 230 can migrate the data to the data storage system 250;

[0086] The correlation function module 213 analyzes the to-be-predicted data and queries a plurality of target reference samples from reference samples maintained in the data storage system 250;

[0087] The calculation module 211 processes the plurality of target reference samples queried by the correlation function module 213 and the to-be-predicted data using the model / rule 201. Specifically, the calculation module 211 calls the model / rule 201 to vectorize and fuse the plurality of target reference samples, and vectorize the to-be-predicted data to obtain target feature information of the to-be-predicted data, and obtain an output value according to the target feature information;

[0088] Finally, the calculation module 211 returns the output value to the client device 240 through the I / O interface 212, so that the client device 240 obtains the probability of the target user operating the target item.

[0089] More deeply, the training device 220 can generate corresponding models / rules 201 based on different data for different purposes to provide better results for users.

[0090] In the case shown in Figure 2 , the user can manually specify the data input into the execution device 210, for example, by operating in the interface provided by the I / O interface 212. In another case, the client device 240 can automatically input data into the I / O interface 212 and obtain results, and if the client device 240 needs to obtain authorization of the user to automatically input data, the user can set the corresponding permissions in the client device 240. The user can view the results output by the execution device 210 in the client device 240, and the specific presentation form can be a specific way such as display, sound, action, etc. The client device 240 can also act as a data collection end to store the collected data into the database 230.

[0091] It is worth noting that, Figure 2 only a schematic diagram of a system architecture provided by an embodiment of the present application, Figure 2 the positional relationship between the devices, components, modules, etc. shown in Figure 2 , the data storage system 250 is an external memory relative to the execution device 210, and in other cases, the data storage system 250 can also be placed in the execution device 210.

[0092] Referring to Figure 3 , Figure 3Figure 1 is a diagram of a chip hardware architecture according to an embodiment of the present application. A neural-network processing unit (NPU) 30 is mounted as a co-processor to a host central processing unit (CPU) and is assigned tasks by the host CPU. The core of the NPU is an arithmetic circuit 303, and a controller 304 controls the arithmetic circuit 303 to fetch data from a memory (weight memory 302 or input memory 301) and perform arithmetic operations.

[0093] In some implementations, the arithmetic circuit 303 includes a plurality of processing engines (PEs) inside.

[0094] In some implementations, the arithmetic circuit 303 is a two-dimensional systolic array. The arithmetic circuit 303 can also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition.

[0095] In some implementations, the arithmetic circuit 303 is a general-purpose matrix processor.

[0096] For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit 303 fetches the weight matrix B from the weight memory 302 and caches it on each PE of the arithmetic circuit 303. The arithmetic circuit 303 performs a matrix operation on the input matrix A and the weight matrix B fetched from the input memory 301 to obtain a partial result or final result of the matrix, which is saved in an accumulator 308.

[0097] The vector computation unit 307 can perform further processing on the output of the arithmetic circuit 303, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. For example, the vector computation unit 307 can be used for network computation in non-convolutional / non-fully connected layers (FC) in a neural network, such as pooling, batch normalization, local response normalization, etc.

[0098] In some implementations, the vector computation unit 307 stores the processed vector to a unified buffer 306. For example, the vector computation unit 307 can apply a non-linear function to the output of the arithmetic circuit 303, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit 307 generates normalized values, merged values, or both. In some implementations, the processed vector can be used as an activation input to the arithmetic circuit 303, such as for use in a subsequent layer in a neural network.

[0099] For example, the operation circuit 303 obtains the to-be-predicted data from the input memory 301 and obtains the target reference sample from the unified memory 306. Then, the operation circuit 303 obtains the target feature information of the to-be-predicted data and the target reference sample, and obtains the output value, i.e., the probability of the target user operating the target item, according to the target feature information.

[0100] The unified memory 306 is used to store the input data (e.g., the to-be-predicted data) and the output data (e.g., the output value).

[0101] The direct memory access controller (DMAC) 305 is used to transfer the input data in the external memory to the input memory 301 and / or the unified memory 306, store the weight data in the external memory into the weight memory 302, and store the data in the unified memory 306 into the external memory.

[0102] The bus interface unit (BIU) 310 is used to realize the interaction between the main CPU, the DMAC, and the instruction fetch memory 309 through a bus.

[0103] The instruction fetch memory 309 is used to store the instructions used by the controller 304.

[0104] The controller 304 is used to call the instructions cached in the instruction fetch memory 309, and realize the control of the working process of the operation circuit 303.

[0105] Generally, the unified memory 306, the input memory 301, the weight memory 302, and the instruction fetch memory 309 are on-chip memories, and the external memory is a memory outside the NPU. The external memory can be a double data rate synchronous dynamic random access memory (DDR SDRAM), a high bandwidth memory (HBM), or other readable and writable memories.

[0106] In order to facilitate the understanding of the present application, the concepts related to the present application are introduced as follows.

[0107] Tabular Data, also known as Multi-Field Categorical Data, as shown in Table 1, each row in the Tabular Data is a data point (also known as a sample), each column represents a feature (also known as a field, also known as a feature field), and each sample contains multiple feature fields; and the value of the sample in each feature field is referred to as feature field data, also known as field value. For example, LA, NYC, LA, London in Table 1 are respectively the field values of sample 1, sample 2, sample 3 and sample 4 in the city feature field.

[0108] Table 1:

[0109] Sample User ID City Identity Item ID Category Brand Sample 1 U1 LA Student L1 T-shirt B1 Sample 2 U2 NYC Student L1 T-shirt B1 Sample 3 U1 LA Student L2 cell phone B2 Sample 4 U3 London manager L3 cell phone B3

[0110] When the Tabular Data is used to predict user behavior, the feature fields of each sample include user feature fields and item feature fields, and the field value in the user feature field is referred to as user feature field data, and the field value in the item feature field is referred to as item feature field data. Generally, the user feature field data includes user attribute information and user behavior sequence (optional), wherein the user attribute information includes user ID, residence, identity, gender, age, and other basic information, and the item feature field data includes item ID, category, brand, size, color, and other basic information; the user behavior sequence includes user historical behavior, such as user past clicks, browses, purchases, and the like.

[0111] Referring to Figure 4 , Figure 4 A flowchart of a recommendation method provided by an embodiment of the present application. The method includes the following steps:

[0112] 401: Obtain to-be-predicted data.

[0113] The to-be-predicted data is multi-field discrete data, and the to-be-predicted data contains user feature field data and item feature field data.

[0114] Optionally, the user feature field data of the to-be-predicted data is used to indicate a target user feature. Illustratively, the user feature field data includes target user attribute information, such as target user ID, age, gender, residence, household registration, and other basic information;

[0115] Optionally, the item feature field data of the to-be-predicted data is used to indicate the target item feature. The target item can be a commodity, an application program, a song, a webpage, or any item related to the user. The target item feature field data can have different representations for different target items. For example, if the target item is an application program, the target item feature field data includes the type, installation size, access popularity, and installation times of the application program. For another example, if the target item is a song, the target item feature field data includes the style, rhythm, duration, and play times of the song. For another example, if the target item is a commodity, the target item feature field data includes the color, size, price, trademark, manufacturer, and evaluation of the commodity.

[0116] Optionally, the user feature field data of the to-be-predicted data can also include the behavior sequence of the target user. For example, the behavior sequence of the target user includes the items that the target user has clicked, browsed, or purchased in the past.

[0117] 402: Obtain a plurality of target reference samples from the plurality of reference samples according to the similarity between the to-be-predicted data and the plurality of reference samples.

[0118] For example, the similarity between the to-be-predicted data and each reference sample in the plurality of reference samples is obtained, and a plurality of target reference samples are obtained from the plurality of reference samples according to the similarity between the to-be-predicted data and each reference sample.

[0119] Each reference sample is also multi-field discrete data, and each reference sample includes user feature field data and item feature field data. The user feature field data of each reference sample is used to indicate a reference user feature, and the item feature field data is used to indicate a reference item feature. Similar to the to-be-predicted data, the user feature field data of each reference sample includes attribute information of a reference user, and the item feature field data includes attribute information of a reference item, such as color, shape, price, and other information, which will not be described again.

[0120] Each target reference sample and the to-be-predicted data have partially same user feature field data and / or item feature field data. It should be noted that, in order to ensure that the target reference sample truly has a reference effect on the to-be-predicted data, it is required that each target reference sample and the to-be-predicted data have partially same user feature field data and item feature field data. For example, if the target reference sample and the to-be-predicted data only have partially same user feature field data, for example, both are male, the behavior prediction of the target reference sample on the to-be-predicted data does not have reference value; or, the target reference sample and the to-be-predicted data only have partially same item feature field data, for example, the purchased items are both black, the behavior prediction of the target reference sample on the to-be-predicted data also does not have reference value. Therefore, in actual application, the obtained target reference sample and the to-be-predicted data need to have partially same user feature field data and item feature field data.

[0121] Generally, the user feature field data included in each reference sample and the user feature field data included in the to-be-predicted data are not completely same, and the item feature field data included in each reference sample and the item feature field data included in the to-be-predicted data can be completely same.

[0122] It should be noted that, the plurality of reference samples can be pre-stored in the manner shown in Table 1 to form table format data, or can be freely stored, as long as the plurality of feature fields of the reference samples and the plurality of feature fields of the to-be-predicted data are same, which is within the protection scope of the present application, and the storage manner of the plurality of reference samples is not limited.

[0123] For example, the plurality of reference samples can be a plurality of original samples in a sample library, or can be samples selected from the plurality of original samples, wherein each original sample is also multi-field discrete data, and similar to the to-be-predicted data, each original sample also includes user feature field data and item feature field data, which will not be described again.

[0124] Optionally, if the plurality of reference samples are selected from the plurality of original samples, in order to quickly obtain the plurality of reference samples from the plurality of original samples, the plurality of original samples can be inverted indexed to obtain an inverted list, and the plurality of reference samples are obtained based on the inverted list.

[0125] For example, each user feature field data and each item feature field data of each original sample are taken as an element, and each original sample is taken as a document, and the plurality of original samples are inverted indexed to obtain an inverted list. Since the present application only needs to obtain the plurality of reference samples from the plurality of original samples, and does not concern the number of times of occurrence of the element in the document and other information, therefore, the inverted list in the present application can only include the corresponding relationship between the element and the document.

[0126] Therefore, the plurality of original samples shown in Table 1 can be converted into the inverted list shown in Table 2 by the inverted index:

[0127] Table 2:

[0128] Element Document U1 Sample 1, Sample 3 U2 Sample 2 U3 Sample 4 LA Sample 1, Sample 3 NYC Sample 2 London Sample 4 Student Sample 1, Sample 2, Sample 3 L1 Sample 1, Sample 2 L2 Sample 3 L3 Sample 4 T-shirt Sample 1, Sample 2 cell phone Sample 3, Sample 4 B1 Sample 1, Sample 2 B2 Sample 3 B3 Sample 4

[0129] Then, each user feature field data and each item feature field data of the to-be-predicted data are taken as elements, and a plurality of reference samples corresponding to the to-be-predicted data are indexed from the inverted list. That is, the reference samples corresponding to each user feature field data of the to-be-predicted data and the reference samples corresponding to each item feature field are indexed from the inverted list; and all the indexed reference samples are merged and de-duplicated to obtain a plurality of reference samples. Therefore, each reference sample is identical to the to-be-predicted data in at least one same feature field, such as being identical in the same user feature field, for example, living in the same city.

[0130] For example, the to-be-predicted data is [U4, LA, Student, L2, cell phone, B3], and U4, LA, Student, L2, cell phone, and B3 are taken as query words to index the reference samples corresponding to LA [sample 1, sample 3], the reference samples corresponding to Student [sample 1, sample 2, sample 3], the reference samples corresponding to L2 [sample 3], the reference samples corresponding to cell phone [sample 3, sample 4], and the reference samples corresponding to B3 [sample 4] from the inverted list. Then, after merging and de-duplicating all the reference samples, a plurality of reference samples [sample 1, sample 2, sample 3, sample 4] are obtained.

[0131] As can be seen, the original samples are stored by inversion, so that a part of the original samples can be indexed as a plurality of reference samples from the plurality of original samples, so that only the similarity between the to-be-predicted data and the plurality of reference samples needs to be calculated, and the calculation pressure is reduced, so that the plurality of target reference samples can be quickly obtained.

[0132] Further, after obtaining the plurality of reference samples, the similarity between the to-be-predicted data and each reference sample can be obtained. Optionally, the similarity between the to-be-predicted data and each reference sample is obtained by the BM25 algorithm, which is not described again.

[0133] For example, the reference samples with a similarity greater than a threshold value are taken as target reference samples to obtain a plurality of target reference samples, or a predetermined number of reference samples are selected from the plurality of reference samples in order from high to low according to the similarity, as the plurality of target reference samples.

[0134] 403: Obtain target feature information of the to-be-predicted data according to the plurality of target reference samples and the to-be-predicted data.

[0135] Optionally, the target feature information comprises a first target feature vector group and a second target feature vector group, wherein the first target feature vector group is the vectorized to-be-predicted data, and the second target feature vector group is obtained by fusing the plurality of target reference samples after vectorization.

[0136] Optionally, the to-be-predicted data is vectorized to obtain the first target feature vector group, wherein the first target feature vector group comprises a plurality of first target feature vectors.

[0137] Optionally, each user feature domain data and each item feature domain data of the to-be-predicted data are encoded to obtain a feature vector of the to-be-predicted data. The encoding of each user feature domain data and each item feature domain data of the to-be-predicted data can be understood as digitizing each user feature domain data and each item feature domain data of the to-be-predicted data of the to-be-predicted sample to obtain a feature vector of the to-be-predicted data. Then, the feature vector of the to-be-predicted data is mapped to obtain a plurality of first target feature vectors, wherein each first target feature vector is used to represent a feature domain data of the to-be-predicted data, that is, the encoding results of each feature domain data in the to-be-predicted data are mapped to obtain a first target feature vector corresponding to the feature domain data.

[0138] It should be noted that if the to-be-predicted data contains a behavior sequence of a target user, the behavior sequence of the target user is encoded, and the encoding result is mapped to obtain a mapping result. Then, the mapping result corresponding to the user behavior sequence is fused to obtain a first target feature vector corresponding to the behavior sequence of the target user, and the first target feature vector is used to represent the behavior sequence of the target user.

[0139] Optionally, the plurality of first target feature vectors can be obtained by a target recommendation model, and the training process of the target recommendation model will be described in detail later, and will not be described here.

[0140] Specifically, the target recommendation model comprises a feature information extraction network and a deep neural network (DNN), wherein the DNN can be a multi-layer perceptron (MLP), and the DNN is taken as an example for illustration in this application, and will not be described here. The feature information extraction network comprises an encoding layer and an embedding layer. Each user feature domain data and each item feature domain data of the to-be-predicted data are encoded by the encoding layer to obtain a feature vector (c1, c2, c3, …, cn) of the to-be-predicted data.n ), where c1, c2, c3, ..., c n Respectively represent the encoding results of the first, second, third, ..., nth feature domain data of the data to be predicted; then, the feature vectors (c1, c2, c3, ..., c n ) is input to the mapping layer for mapping, and multiple first target feature vectors (e1, e2, e3, ..., e n ), that is, the encoding results of the first, second, third, ..., nth feature domain data of the data to be predicted are mapped respectively to obtain multiple first target feature vectors (e1, e2, e3, ..., e n ).

[0141] The reference sample may carry label data or not. The following describes the process of obtaining the second target feature vector group when the reference sample carries label data and when the reference sample does not carry label data.

[0142] For the case of no label data:

[0143] Exemplarily, each target reference sample is vectorized to obtain multiple first feature vectors for each target reference sample. Optionally, each user feature domain data and each item feature domain data of each target reference sample are encoded to obtain a feature vector for each target reference sample; and the feature vector of each target reference sample is mapped to obtain multiple first feature vectors for each target reference sample, wherein each first feature vector is used to represent a feature domain data of the target reference sample.

[0144] Then, the first feature vectors of the plurality of target reference samples are fused to obtain a second target feature vector group, wherein the second target feature vector group includes a plurality of second target feature vectors.

[0145] Exemplarily, based on multiple first target feature vectors of the data to be predicted and multiple first feature vectors of each target reference sample, the weight corresponding to each target reference sample is determined; based on the multiple weights of the multiple target reference samples, the first feature vectors of the multiple target reference samples in the same feature domain are fused to obtain multiple second target feature vectors.

[0146] Specifically, a plurality of first target feature vectors of the to-be-predicted data are spliced to obtain a second feature vector of the to-be-predicted data; a plurality of first feature vectors of each target reference sample are spliced to obtain a second feature vector of each target reference sample; a similarity between the second feature vector of the to-be-predicted data and the second feature vector of each target reference sample is obtained, to obtain a plurality of similarities corresponding to the plurality of target reference samples, wherein the similarity can be an Euclidean distance, a cosine similarity, or the like; then, the plurality of similarities of the plurality of target reference samples are normalized, and a normalized result corresponding to each target reference sample is taken as a weight of each target reference sample. Therefore, the weight of the i th target reference sample in the target reference sample can be represented by formula (1):

[0147]

[0148] wherein a i is the weight of the i th target reference sample, q is the second feature vector of the to-be-predicted data, r i is the second feature vector of the i th target reference sample, similarity(q, e i ) is the similarity between the second feature vector of the i th target reference sample and the second feature vector of the to-be-predicted data, and k is the number of the plurality of target reference samples.

[0149] Optionally, according to the weight of each target reference sample, the first feature vectors of the plurality of target reference samples in any one same feature domain (i.e., each target reference sample corresponds to one first feature vector in the feature domain) are fused, i.e., weighted, to obtain a second target feature vector in the feature domain; then, the first feature vectors of the plurality of target reference samples in each same domain are fused respectively to obtain a plurality of second target feature vectors, so that the number of the plurality of second target feature vectors is the same as the number of the feature domains of the target reference samples. Exemplarily, the j th second target feature vector in the plurality of second target feature vectors can be represented by formula (2):

[0150]

[0151] wherein R j is the j th second target feature vector, e ij is the j th first feature vector of the i th target reference sample, j is an integer from 1 to n, n is the number of the plurality of first feature vectors of each target reference sample, i.e., the number of the feature domains of each target reference sample, and is also the number of the plurality of second target feature vectors.

[0152] Optionally, since the plurality of first feature vectors of each target reference sample has been spliced to obtain the second feature vector of each target reference sample. Therefore, after obtaining the second feature vector of each target reference sample, the plurality of second feature vectors of the plurality of target reference samples can be directly fused, i.e., weighted, using the weight of each target reference sample to obtain a fused feature vector; then, the fused feature vector is split in the reverse order of splicing the plurality of first feature vectors of each target reference sample to obtain a plurality of second target feature vectors.

[0153] It should be understood that when splicing the plurality of first feature vectors of the to-be-predicted data and the first feature vectors of each target reference sample, the order of splicing the plurality of first feature vectors is not limited, but it is necessary to ensure that the splicing order of the plurality of first target feature vectors of the to-be-predicted data and the splicing order of the plurality of first feature vectors of each target reference sample are consistent.

[0154] Optionally, the plurality of second target feature vectors can also be obtained through the target recommendation model.

[0155] For example, the user feature domain data and the item feature domain data of each target reference sample are input into the encoding layer to encode each target reference sample to obtain the feature vector of each target reference sample, such as the feature vector of the i th target reference sample (r i1 , r i2 , r i3 ,..., r in ), i is 1 to k, and k is the number of the plurality of target reference samples; then, the feature vector of each target reference sample is input into the embedding layer to map the feature vector of each target reference vector to obtain the plurality of first feature vectors of each target reference sample, such as the plurality of first feature vectors of the i th target reference sample (e i1 , e i2 , e i3 ,..., e in ); optionally, the feature information extraction network further comprises an attention layer, and the plurality of first feature vectors of each target reference sample and the plurality of first target feature vectors of the to-be-predicted data (e1, e2, e3,..., e n ) are input into the attention layer, and (e1, e2, e3,..., e n ) are spliced to obtain the second feature vector of the to-be-predicted data, i.e. The first feature vectors of each target reference sample are spliced to obtain the second feature vector of each target reference sample, such as the second feature vector of the i th target reference sample Then, weights of each target reference sample are determined based on the second feature vector of the to-be-predicted data and the second feature vector of each target reference sample; and finally, the first feature vectors of the plurality of target reference samples are fused based on the weights of each target reference sample to obtain a plurality of second target feature vectors, i.e., (a1*e 11 +a2*e 21 +...+a k *e k1 , a1*e 12 +a2*e 22 +...+a k *e k2 ,..., a1*e 1n +a2*e 2n +...+a k *e kn ). n+1 n+2 n+3 2n .

[0156] For the case of carrying label data:

[0157] For example, each reference sample also carries label data, which is used to represent the actual operation of the reference user on the reference item, for example, when the reference item is an application program, the label is used to represent whether the reference user clicks the application program. Therefore, in the process of vectorizing each target reference sample to obtain a plurality of first feature vectors of each target reference sample, in addition to vectorizing each user feature domain data and each item feature domain data of each target reference sample, the label data of each target reference sample is also vectorized to obtain a plurality of first feature vectors of each target reference sample. Therefore, compared with the above case without carrying label data, the plurality of first target feature vectors of each target reference sample obtained by vectorization also contain a first target feature vector for indicating the label data. Specifically, each user feature domain data, each item feature domain data and label data of each target reference sample are encoded to obtain a feature vector of each target reference sample. For example, the feature vector of the ith target reference sample is (r i1 , r i2 , r i3 ,..., r in , r i(n+1) ), wherein r i(n+1) ​​​an encoding result of the label data of the i-th target reference sample; then, the feature vectors of each target reference sample are mapped to obtain a plurality of first feature vectors of each target reference sample. For example, the plurality of feature vectors of the i-th target reference sample are (e i1 i2 i3 in i(n+1) , where e i(n+1) is used to indicate the label data of the i-th target reference sample.

[0158] Further, similar to the fusion described above, according to the weight of each target reference sample calculated above, the first feature vectors of the plurality of target reference samples in the same feature domain (including the user feature domain, the item feature domain and the label domain) are fused to obtain a second target feature vector group, that is, compared with the case where the label data is not carried, the plurality of second feature vectors in the second feature vector group fused this time further contain a second target feature vector used to indicate the fused label data. For example, the second target feature vector group is (e n+1 n+2 n+3 2n 2n+1 , where e 2n+1 is used to indicate the fused label data of the plurality of target reference samples.

[0159] Optionally, for the case where the label data is not carried or the label data is carried, after the first target feature vector group and the second target feature vector group are obtained, the first target feature vector group and the second target feature vector group can be spliced to obtain target feature information, and the target feature information is (e1, e2, e3..., e n n+1 n+2 n+3 2n ) or (e1, e2, e3..., e n n+1 n+2 n+3 2n 2n+1 ); optionally, the first target feature vector group and the second target feature vector group can also not be spliced. For example, the first target feature vector group and the second target feature vector group can be used as input data for prediction of an output value, to obtain the output value.

[0160] ​​​​​​​​​​​​​​​​​In one embodiment of the present application, after obtaining the first target feature vector group and the second target feature vector group, in addition to concatenating the first target feature vector group and the second target feature vector group, the target feature vectors may also be interacted to obtain high-order feature information. For example, Figure 5 As shown, multiple first target feature vectors and multiple second target feature vectors can be concatenated to obtain a first vector group. Then, the target feature vectors in the first vector group are interacted with each other to obtain a third target feature vector group. The first vector group and the third target feature vector group are then concatenated to obtain target feature information. Similarly, the first and third target feature vector groups can be used as input data without concatenating them, which will not be described further.

[0161] Exemplarily, multiple third target feature vectors can be expressed by formula (3):

[0162] e ij =inter(e i , e j ) formula (3);

[0163] Wherein, the value of i ranges from 1 to 2n, the value of j ranges from 2 to 2n, and the value of j is greater than i, 2n is the number of target feature vectors in the first vector group, and inter is the interaction operation between vectors.

[0164] The above-mentioned two-way interaction of vectors mainly involves fusing two vectors into one vector, and the feature information represented by the fused vector is the feature information after the feature information represented by the two vectors is fused. Optionally, the two-way interaction of vectors can be implemented by vector dot product, kernel product, and network layer. This application does not limit the interaction method of the two vectors, as long as the fusion can obtain a vector that can represent the feature information represented by the two vectors.

[0165] It should be understood that the above only describes the case where the feature vectors interact with each other in pairs. In actual applications, three feature vectors or more feature vectors can also interact with each other. In addition, in the above process of vector interaction, all target feature vectors in the first vector group interact with each other in pairs. However, in actual applications, some target feature vectors can also be selected from the first vector group for interaction. For example, only some of the multiple first target feature vectors and some of the multiple second target feature vectors in the target feature information can be interacted to obtain multiple third target feature vectors. Therefore, this application does not limit the source of the interacting vectors and the number of interacting vectors.

[0166] 404: Using the target feature information as input, an output value is obtained through a deep neural network (DNN).

[0167] Exemplarily, the target feature information is input into the deep neural network DNN as input data to obtain an output value.

[0168] Exemplarily, the output value is generally a probability value representing a probability of the target user operating the target item. It should be noted that the probability of the target user operating the target item has different understandings for different target items. For example, when the target item is an application program, the probability of the target user operating the target item can be understood as a click probability of the target user on the application program; for another example, when the target item is a song, the probability of the target user operating the target item can be understood as a probability of the target user liking the song; for another example, when the target item is a commodity, the probability of the target user operating the target item can be understood as a probability of the target user purchasing the commodity.

[0169] In actual application, after obtaining the probability value, the probability value can be post-processed to obtain the output value. For example, when the probability value is greater than a probability threshold, 1 is taken as the output value, and when the probability value is less than or equal to the threshold, 0 is taken as the output value, where 0 represents that the target user will not operate the target item, and 1 represents that the target user will operate the target item.

[0170] 405: determining whether to recommend the target item to the target user according to the output value.

[0171] Optionally, when the output value is represented by binary data of 0 or 1, when the output value is 1, it is determined to recommend the target item to the target user, and when the output value is 0, it is determined not to recommend the target item to the target user. Optionally, when the output value is represented in the form of probability, when the probability is greater than a probability threshold, it is determined to recommend the target item to the target user, and when the probability is less than or equal to the probability threshold, it is determined not to recommend the target item to the target user.

[0172] It should be noted that when the recommendation method of the present application is applied to a multi-item recommendation scenario, the probability of the target user operating each candidate item needs to be calculated; then, the operation probabilities of the plurality of candidate items are sorted, and the candidate items with high rankings are recommended to the target user. For example, when recommending songs, the probabilities of the target user liking each candidate song need to be calculated, and then the songs with high like probabilities are recommended to the target user.

[0173] It can be seen that in the embodiments of the present application, the target feature information obtained contains not only the feature information of the to-be-predicted data itself, but also the feature information fused after the target reference sample is vectorized. Since the target reference sample and the to-be-predicted data have part of the same user feature domain data and / or item feature domain data, the user behavior in the target reference sample can provide reference and experience for the prediction of the target user's behavior, so that when the target feature information is used to predict the output value, the predicted output value can be more accurate, and the accuracy of the recommendation based on the output value is improved.

[0174] The process of obtaining the output value will be described below in combination with a specific model structure and in a manner that the reference sample carries label data and the target feature vector is interacted.

[0175] As shown in Figure 6 , the model includes a feature information extraction network and an MLP, wherein the feature information extraction network includes an encoding layer, an embedding layer, an attention layer and an interaction layer. The interaction layer is optional, and when the target feature vector needs to be interacted, the interaction layer needs to be designed; if the target feature vector is not interacted, the interaction layer can not be designed.

[0176] First, the to-be-predicted data is input into the search engine, and k target reference samples, i.e., S1, S2,..., Sk, are obtained from the plurality of reference samples. k Then, the user feature domain data and the item feature domain data of the to-be-predicted data are input into the encoding layer for encoding to obtain the feature vector of the to-be-predicted data, i.e., (c1, c2, c3,..., c n ); and the user feature domain data, the item feature domain data and the label data of each target reference sample are input into the encoding layer for encoding to obtain a plurality of feature vectors corresponding to the plurality of target reference samples, i.e., (r 11 , r 12 , r 13 ,..., r 1n , r 1n+1 ), (r 21 , r 22 , r 23 ,..., r 2n , r 2n+1 ),..., (r k1 , r k2 , r k3 ,..., r kn , r kn+1 ). Then, (c1, c2, c3,..., c n ) and (r 11 , r 12 , r 13..., r 1n ..., r 1n+1 ..., r 21 ..., r 22 ..., r 23 ..., r 2n ..., r 2n+1 ..., r k1 ..., r k2 ..., r k3 ..., r kn ..., r kn+1 ) are input into the embedding layer, respectively, and mapping processing is performed on (c1, c2, c3,..., c n ) and (r 11 , r 12 , r 13 ,..., r 1n , r 1n+1 ), (r 21 , r 22 , r 23 ,..., r 2n , r 2n+1 ),..., (r k1 , r k2 , r k3 ,..., r kn , r kn+1 ), respectively, to obtain a plurality of first target feature vectors (e1, e2, e3,..., e n ) of the to-be-predicted data, and a plurality of first feature vectors of each target reference sample, i.e., (e 11 , e 12 , e 13 ..., e 1n , e 1n+1 ), (e 21 , e 22 , e 23 ..., e 2n , e 2n+1 ),..., (e k1 , e k2 , e k3 ,..., e kn , e kn+1 ); then, (e1, e2, e3,..., e n ), (e 11 , e 12 , e 13 ..., e 1n , e 1n+1 ), (e 21 , e 22 , e 23 ..., e 2n , e 2n+1),...,(e k1 , e k2 , e k3 ,...,e kn , e kn+1 ) are input to the attention layer, and (e 11 , e 12 , e 13 ..., e 1n , e 1n+1 ), (e 21 , e 22 , e 23 ..., e 2n , e 2n+1 ),...,(e k1 , e k2 , e k3 ,...,e kn , e kn+1 ) are fused to obtain multiple target second eigenvectors (e n+1 , e n+2 , e n+3 ,...,e 2n , e 2n+1 ); Then, multiple first target feature vectors (e1, e2, e3, ..., e n ), multiple second target feature vectors (e n+1 , e n+2 , e n+3 ,...,e 2n , e 2n+1 ) are concatenated to obtain the first vector group, namely (e1, e2, e3..., e n , e n+1 , e n+2 , e n+3 ,...,e 2n , e 2n+1 ); Then, the target feature vectors in the first vector group are interacted with each other to obtain the third target feature vector, that is, the above inter(e i , e j ); concatenate the target feature vector in the first vector group with the third target feature vector to obtain target feature information, i.e. (e1, e2, e3..., e n , e n+1 , e n+2 , e n+3 ..., e 2n , e 2n+1 ,inter(e i , e j ));

[0177] Finally, the target feature information is input into a multi-layer perceptron (MLP) to obtain an output value.

[0178] Referring to Figure 7 , Figure 7 A flowchart of a recommendation model training method provided by an embodiment of the present application is shown. The recommendation model includes a feature information extraction network and a multi-layer perceptron (MLP). The method includes the following steps:

[0179] 701: Obtain a plurality of training samples.

[0180] Each training sample is multi-domain discrete data. Similar to the reference samples described above, each training sample includes user feature domain data and user feature domain data. It should be understood that each training sample also carries label data, and the label data of each training sample is used to represent the actual operation of the user in the training sample. For example, when the item is an application, the actual operation is whether the user clicks the application.

[0181] It should be noted that the plurality of reference samples described above can be the plurality of training samples, or part of the plurality of training samples, for example, part of the training samples with high data integrity are selected from the plurality of training samples as reference samples.

[0182] 702: Obtain a plurality of target training samples from the plurality of second training samples according to the similarity of the first training sample and the plurality of second training samples.

[0183] The first training sample is any one of the plurality of training samples, and the user feature domain data of the first training sample is used to indicate the first reference user feature. The item feature domain data of the first training sample is used to indicate the first reference item feature. The plurality of second training samples are part or all of the plurality of training samples excluding the first training sample.

[0184] The first training sample and each target training sample have partially same user feature domain data and / or item feature domain data. Similarly, in actual application, in order to ensure the similarity of each target training sample and the first training sample, generally, each target reference sample and the first training sample have partially same user feature domain data and item feature domain data.

[0185] For example, the plurality of target training samples are obtained from the plurality of second training samples according to the similarity between the first training sample and each second training sample. For example, the second training sample with a similarity greater than a threshold value can be selected as a target training sample to obtain a plurality of target training samples, or a predetermined number of second training samples are selected from the plurality of second training samples in order from high to low similarity, as the plurality of target training samples.

[0186] It should be understood that all the training samples except the first training sample in the plurality of training samples can be directly taken as the plurality of second training samples, and then the similarity between the first training sample and the plurality of second training samples is obtained. Alternatively, the training samples except the first training sample can be selected as the plurality of second training samples in the manner of the inverted index.

[0187] For example, in the manner of the inverted index, each user feature field data and each item feature field data of each training sample are taken as elements, and each training sample is taken as a document, and the inverted index is obtained by indexing the plurality of training samples. Then, each user feature field data and each item feature field data of the first training sample are taken as query words, and the plurality of second training samples are obtained from the inverted index. Therefore, the second training samples are at least the same in the same feature field as the first training sample. Therefore, if a certain training sample is not the same in any same feature field as the first training sample, the training sample is not taken as the second training sample. Therefore, the second training sample described above can be part of the plurality of training samples except the first training sample.

[0188] 703: input the first training sample and the plurality of target training samples into the feature information extraction network to obtain the target feature information of the first training sample.

[0189] For example, in the manner of the inverted index, each user feature field data and each item feature field data of each training sample are taken as elements, and each training sample is taken as a document, and the inverted index is obtained by indexing the plurality of training samples. Then, each user feature field data and each item feature field data of the first training sample are taken as query words, and the plurality of second training samples are obtained from the inverted index. Therefore, the second training samples are at least the same in the same feature field as the first training sample. Therefore, if a certain training sample is not the same in any same feature field as the first training sample, the training sample is not taken as the second training sample. Therefore, the second training sample described above can be part of the plurality of training samples except the first training sample. Figure 4 The recommended method is similar to the above, the first training sample and each target training sample are input into the feature information extraction network as input data to obtain the target feature information of the first training sample.

[0190] Optionally, the target feature information includes a fourth target feature vector group (including a plurality of fourth target feature vectors) and a fifth target feature vector group (including a plurality of fifth target feature vectors). The plurality of fourth target feature vectors are obtained in a manner similar to that of obtaining the plurality of first target feature vectors, that is, the feature vector of the first training sample is mapped to obtain the plurality of fourth target feature vectors, wherein the feature vector of the first training sample is obtained by encoding each user feature field data and each item feature field data of the first training sample, which will not be described in detail. Optionally, the plurality of fifth target feature vectors are obtained in a manner similar to that of obtaining the plurality of second target feature vectors, that is, the plurality of first feature vectors of the plurality of target training samples in the same feature field are fused to obtain the plurality of fifth target feature vectors, wherein the plurality of first feature vectors corresponding to each target training sample are obtained by mapping the feature vector of each target training sample, and the feature vector of each target training sample is obtained by encoding each user feature field data and each item feature field data of each target training sample, which will not be described in detail.

[0191] Similar to the above-mentioned manner of obtaining the second feature vector group, in obtaining the fifth feature vector group, the label data of the target reference sample can or can not be vectorized and fused.

[0192] Optionally, the target feature information can further include a sixth target feature vector group (including a plurality of sixth target feature vectors), wherein the plurality of sixth target feature vectors are obtained in a manner similar to the above-mentioned manner of obtaining the plurality of third target feature vectors, i.e., the plurality of fourth target feature vectors and the plurality of fifth target feature vectors are spliced to obtain a second vector group; then, the target feature vectors in the second vector group are interacted with each other to obtain the plurality of sixth target feature vectors, which will not be described in detail.

[0193] 704: input the target feature information into the deep neural network DNN to obtain an output value, the output value being used to represent the probability of the first reference user operating the first reference item.

[0194] The target feature information of the first training sample is input into the multi-layer perceptron of the recommendation model to obtain an output value, i.e., the operation of the first reference user on the first reference item is predicted.

[0195] 705: train the recommendation model according to the output value and the label data of the first training sample to obtain a target recommendation model.

[0196] For example, the loss is determined according to the output value and the label data of the first training sample, i.e., the loss is determined according to the predicted operation of the first reference user on the first reference item and the actual operation of the first reference user on the first reference item; the model parameters of the recommendation model to be trained are adjusted according to the loss and the gradient descent method, the recommendation model is trained, and the target recommendation model is obtained.

[0197] It should be understood that the training of the recommendation model is an iterative training using a plurality of training samples, wherein the training process of each training sample is similar to the training process of the first training sample as shown, which will not be described; until the recommendation model converges, the training of the recommendation model is completed, and the target recommendation model is obtained. Figure 7

[0198] Therefore, based on the above-mentioned model training method and the application process of the model, the article recommendation process of the present application and the existing article recommendation exist differences as shown. Figure 8 Figure 8 ​​As shown in the figure, the existing item recommendation process is to first use the training samples to train the model (consistent with the existing supervised training method). After the model training is completed, the data to be predicted is directly input into the recommendation model to predict user behavior, and the output value is obtained. Based on the output value, it is determined whether to recommend items to the user; while the user behavior prediction of this application is to first use the training samples to train the recommendation model (consistent with the existing supervised training method). Figure 7 (The training method is consistent with that shown in the figure). After the model training is completed, the training sample is used as a reference sample. When the data to be predicted is obtained, the target training sample corresponding to the data to be predicted is first obtained from the training sample. Then, the data to be predicted and the target training sample are input into the target recommendation model together to predict user behavior, obtain an output value, and determine whether to recommend items to the user based on the output value. Because the feature information of the target training sample is integrated in the user behavior prediction process of the present application, rich target feature information is obtained, the accuracy of user behavior prediction is improved, and the accuracy of the output value is improved, so that accurate item recommendations can be made.

[0199] Finally, several common recommendation scenarios after applying the recommendation method of this application are introduced in detail with reference to the accompanying drawings.

[0200] Application 1: Prediction of click probability.

[0201] like Figure 9 As shown, for application recommendations, for example, application recommendations under the boutique applications and application recommendations under the boutique new game list; for each type of application recommendation, first obtain multiple candidate applications; then, based on the user feature domain data of the target user and the item feature domain data of each candidate application, construct the data to be predicted corresponding to each candidate application, that is, splice the user feature domain data of the target user and the item feature domain data of each candidate application into one data to be predicted; then, based on the above recommendation method and the data to be predicted, predict the click probability of the target user for each candidate application; then, sort the multiple candidate applications in descending order according to the click probability of each candidate application, and display the sorted multiple candidate applications in descending order according to the click probability on the recommendation page, or only display the candidate applications with the highest ranking.

[0202] Since the feature information of the target reference sample is integrated when predicting the click-through rate in this application, the predicted click-through rate is more accurate, and the application recommended to the target user is more precise, thereby improving the download rate of the application.

[0203] Application 2: Prediction of purchase probability.

[0204] like Figure 10As shown, for product recommendations, the data to be predicted corresponding to each candidate product can be constructed based on the item feature domain data of each candidate product and the user feature domain data of the target user, that is, the user feature domain data of the target user and the item feature domain data of each candidate product are spliced ​​into one data to be predicted; based on the above recommendation method and the data to be predicted, the purchase probability of the target user for each candidate product is predicted; then, the multiple candidate products are sorted in descending order according to the purchase probability of each candidate product, and the sorted multiple candidate products are displayed on the recommendation page in descending order according to the purchase probability, or only the candidate products with the highest ranking are displayed.

[0205] Since the feature information of the target reference sample is integrated when predicting the purchase probability in this application, the predicted purchase probability is made more accurate, so that the products recommended to the target users are more in line with the users' needs, thereby increasing the sales of the products.

[0206] Application 3: Prediction of song ratings.

[0207] like Figure 11 As shown, for song recommendations, for example, song recommendations in private FM and song recommendations in 30 songs per day; for recommendations under each type, first obtain multiple candidate songs, and construct the data to be predicted corresponding to each candidate song according to the item feature domain data of each candidate song and the user feature domain data of the target user, that is, splice the user feature domain data of the target user and the item feature domain data of each candidate song into one data to be predicted; based on the above recommendation method and the data to be predicted, predict the score of each candidate song, and the score of each candidate song is used to characterize the target user's liking for the candidate song; then, sort the multiple candidate songs in descending order according to the score of each candidate song, and display the sorted multiple candidate songs in descending order according to the score on the recommendation page, or only display the candidate songs with the highest score.

[0208] Since the feature information of the target reference sample is integrated when predicting the score of the song in this application, the predicted score is more accurate, so that the recommended songs are more in line with the needs of the user, and the accuracy of song recommendations is improved.

[0209] The user behavior modeling method of this application was compared with existing user behavior modeling methods based on feature interaction and user behavior sequence, and extensive experiments were conducted on the CTR prediction task. The experimental settings are as follows:

[0210] Experimental Setting 1: The following test indicators are used to evaluate the prediction accuracy of the model, namely:

[0211] Area Under Curve (AUC), Logloss (LL) and relative improvement (REI.Impr); wherein, for the test index AUC, the larger the value is, the better the effect of the model is; for the test index LL, the smaller the value is, the better the effect of the model is; wherein, the test REI.Impr is the improvement of the prediction accuracy of the model (RIM) of the present application relative to other models, then for the test index REI.Impr, the larger the value is, the higher the prediction accuracy of the RIM is relative to the accuracy of the compared model.

[0212] Experiment setting 2: obtain the data set of application A, the data set of application B and the data set of application C, test the AUC and LL of the model for predicting CTR based on user behavior on the data set of application A, the data set of application B and the data set of application C respectively, and test the AUC and LL of the model of the present application for predicting CTR;

[0213] Experiment setting 3: obtain the first data set and the second data set, test the AUC and LL of the model for predicting CTR based on feature interaction on the first data set and the second data set respectively, and test the AUC and LL of the model of the present application for predicting CTR; for example, the first data set can be avazu, and the second data set can be criteo.

[0214] Wherein, the model for predicting CTR based on user behavior includes: HPMN, MIMN, DIN, DIEN, SIM, UBR; the model for predicting CTR based on feature interaction includes: LR, GBDT, FM, FFM, AFM, FNN, DeepFM, IPNN, PIN, xDeepFM, FGCNN.

[0215] Wherein, Table 3 and Table 4 are comparison results.

[0216] Table 3: comparison results with the model for predicting CTR based on user behavior:

[0217]

[0218] Table 4: comparison results with the model for predicting CTR based on feature interaction:

[0219]

[0220] Experiments show that our model achieves the best prediction accuracy in both AUC and Logloss. Therefore, using our model to predict user behavior results in more accurate predictions and outputs, leading to more precise recommendations for users.

[0221] See Figure 12 , Figure 12 This is a structural diagram of a recommendation device provided in an embodiment of the present application. The recommendation device 1200 includes an acquisition unit 1201 and a processing unit 1202;

[0222] An acquisition unit 1201 is used to acquire data to be predicted;

[0223] Processing unit 1202 is used to obtain data to be predicted; obtain multiple target reference samples from multiple reference samples based on the similarity between the data to be predicted and multiple reference samples; each reference sample and the data to be predicted includes user feature domain data and item feature domain data, the user feature domain data of the data to be predicted is used to indicate target user features, and the item feature domain data of the data to be predicted is used to indicate target item features, and each target reference sample and the data to be predicted have partially the same user feature domain data and / or item feature domain data; obtain target feature information of the data to be predicted based on multiple target reference samples and the data to be predicted; the target feature information includes a first target feature vector group and a second target feature vector group, the first target feature vector group is the vectorized data to be predicted, and the second target feature vector group is obtained by fusion of multiple target reference samples after vectorization; obtain an output value through a deep neural network DNN with the target feature information as input; determine whether to recommend the target item to the target user based on the output value.

[0224] For a more detailed description of the acquisition unit 1201 and the processing unit 1202 , please refer to the relevant description in the above method embodiment, which will not be described again here.

[0225] See Figure 13 , Figure 13 This is a structural diagram of a recommendation model training device provided in an embodiment of the present application. The recommendation model includes a feature information extraction network and a deep neural network (DNN). The recommendation model training device 1300 includes an acquisition unit 1301 and a processing unit 1302;

[0226] An acquiring unit 1301 is configured to acquire a plurality of training samples, wherein each training sample includes user feature domain data and item feature domain data;

[0227] The processing unit 1302 is configured to obtain a plurality of target training samples from the plurality of second training samples according to a similarity of the first training sample and the plurality of second training samples, wherein the first training sample is one of the plurality of training samples, the plurality of second training samples are part or all of the plurality of training samples except the first training sample, the user feature field data of the first training sample is used to indicate a first reference user feature, the item feature field data of the first training sample is used to indicate a first reference item feature, and the first training sample and each target training sample have partially same user feature field data and / or item feature field data.

[0228] The first training sample and the plurality of target training samples are input into the feature information extraction network to obtain target feature information of the first training sample, wherein the target feature information comprises a fourth target feature vector group and a fifth target feature vector group, the fourth target feature vector group is obtained by vectorizing the first training sample through the feature information extraction network, and the fifth target feature vector group is obtained by fusing the plurality of target training samples after vectorizing the plurality of target training samples through the feature information extraction network.

[0229] The target feature information is input into the deep neural network DNN to obtain an output value, and the output value is used to represent a probability of the first reference user operating the first reference item.

[0230] The output value and a label of the first training sample are used to train the recommendation model to obtain a target recommendation model.

[0231] For more detailed descriptions of the obtaining unit 1301 and the processing unit 1302, refer to the related descriptions in the above method embodiments, which will not be repeated here.

[0232] Referring to Figure 14 , Figure 14 A structural diagram of an electronic device is provided in the embodiments of the present application. The electronic device 1400 can be the recommendation device 1200 described above; or, a chip or chip system in the recommendation device 1200; the electronic device can also be the recommendation model training device 1300 described above; or, a chip or chip system in the recommendation model training device 1300.

[0233] The electronic device 1400 comprises a memory 1401, a processor 1402, a communication interface 1403 and a bus 1404. The memory 1401, the processor 1402 and the communication interface 1403 are in communication connection with each other through the bus 1404.

[0234] The memory 1401 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1401 can store programs, and when the programs stored in the memory 1401 are executed by the processor 1402, the processor 1402 and the communication interface 1403 are configured to perform each step in the data stream transmission method of the embodiments of the present application.

[0235] The processor 1402 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits, configured to execute related programs to implement the functions required by the units in the audio feature compensation device or the audio recognition device of the embodiments of the present application, or to perform the data stream transmission method of the method embodiments of the present application.

[0236] The processor 1402 can also be an integrated circuit chip with signal processing capability. In the implementation process, each step in the data stream transmission method of the present application can be completed by the integrated logic circuit of hardware in the processor 1402 or the instruction in the form of software. The processor 1402 described above can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory 1401, and the processor 1402 reads the information in the memory 1401, and combines the hardware to complete the functions required by the units included in the user equipment or the head-mounted device in the embodiments of the present application, or to perform each step in the data stream transmission method of the method embodiments of the present application.

[0237] The communication interface 1403 can be a transceiver, to implement communication between the electronic device 1400 and other devices or communication networks; the communication interface 1403 can also be an input-output interface, to implement data transmission between the electronic device 1400 and input-output devices, including but not limited to a keyboard, a mouse, a display screen, a U disk, and a hard disk. For example, the processor 1402 can acquire to-be-predicted data through the communication interface 1403.

[0238] The bus 1404 can include a path for transmitting information between various components (for example, the memory 1401, the processor 1402, and the communication interface 1403) of the device electronic device 1400.

[0239] It should be noted that, although Figure 14 The electronic device 1400 shown in the figure only shows the memory, the processor, and the communication interface, but in the specific implementation process, those skilled in the art should understand that the electronic device 1400 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 1400 can also include hardware devices for realizing other additional functions. In addition, those skilled in the art should understand that the electronic device 1400 can also only include devices necessary for realizing the embodiments of the present application, and does not necessarily include all the devices shown in the figure. Figure 14

[0240] In several embodiments provided in the present application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device, or unit, and can be electrical, mechanical, or in other forms.

[0241] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0242] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0243] ​In the present application, "at least one" means one or more, and "multiple" means two or more. The association relationship of "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In the textual description of the present application, the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship; in the formula of the present application, the character " / ", indicates that the front and rear associated objects are in a "division" relationship.

[0244] It can be understood that various numerical numbers involved in the embodiments of the present application are only distinguished for convenience of description, and are not used to limit the scope of the embodiments of the present application. The size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic.

[0245] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and various program code storage media.

[0246] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A recommendation method characterized by comprising: The method comprises: obtaining to-be-predicted data; obtaining a plurality of target reference samples from a plurality of reference samples according to the similarity between the to-be-predicted data and the plurality of reference samples; each of the reference samples and the to-be-predicted data comprises user feature domain data and item feature domain data, the user feature domain data of the to-be-predicted data is used to indicate a target user feature, and the item feature domain data of the to-be-predicted data is used to indicate a target item feature, each of the target reference samples and the to-be-predicted data has partially same user feature domain data and / or item feature domain data; obtaining target feature information of the to-be-predicted data according to the plurality of target reference samples and the to-be-predicted data; the target feature information comprises a first target feature vector group and a second target feature vector group, the first target feature vector group is a vectorized to-be-predicted data, and the second target feature vector group is obtained by fusing the plurality of target reference samples after being vectorized; inputting the target feature information into a deep neural network (DNN) to obtain an output value; the output value is a probability value, and the probability value reflects a probability that the target user performs an operation on the target item; determining whether to recommend the target item to the target user according to the output value.

2. The method of claim 1, wherein: the plurality of target reference samples further comprise label data; the second target feature vector group is obtained by fusing the plurality of target reference samples after being vectorized, specifically: the second target feature vector group is obtained by fusing the user feature domain data, the item feature domain data, and the label data of the plurality of target reference samples after being vectorized.

3. The method of claim 1 or 2, wherein: the target feature information further comprises a third target feature vector group, the third target feature vector group is obtained by interacting target feature vectors in a first vector group with each other, and the first vector group comprises the first target feature vector group and the second target feature vector group.

4. The method according to any one of claims 1 to 3, characterized in that, the fusing comprises: splicing a plurality of first target feature vectors in the first target feature vector group to obtain a second feature vector of the to-be-predicted data; splicing a plurality of first feature vectors of each of the target reference samples to obtain a second feature vector of each of the target reference samples, the plurality of first feature vectors of each of the target reference samples being obtained by vectorizing the target reference sample; obtaining the similarity between the second feature vector of each of the target reference samples and the second feature vector of the to-be-predicted data; determining the weight of each of the target reference samples according to the similarity between the second feature vector of each of the target reference samples and the second feature vector of the to-be-predicted data; fusing the first feature vectors of the plurality of target reference samples in the same feature domain according to the weight of each of the target reference samples to obtain the second target feature vector group.

5. The method according to any one of claims 1-4, characterized in that, Before the step of obtaining a plurality of target reference samples from a plurality of reference samples according to the similarity between the to-be-predicted data and the plurality of reference samples, the method further comprises: obtaining a plurality of original samples, wherein each of the original samples comprises user feature field data and item feature field data; inverting indexing the plurality of original samples by taking the plurality of user feature field data and the plurality of item feature field data of the to-be-predicted data as elements, to obtain the plurality of reference samples. 6.A method for training a recommendation model, the method comprising: The recommendation model comprises a feature information extraction network and a deep neural network (DNN), and the method comprises: obtaining a plurality of training samples, wherein each of the training samples comprises user feature field data and item feature field data; obtaining a plurality of target training samples from a plurality of second training samples according to the similarity of a first training sample and the plurality of second training samples, wherein the first training sample is one of the plurality of training samples, the plurality of second training samples are part or all of the plurality of training samples except the first training sample, the user feature field data of the first training sample is used to indicate a first reference user feature, the item feature field data of the first training sample is used to indicate a first reference item feature, the first training sample and each of the target training samples have partially same user feature field data and / or item feature field data; inputting the first training sample and the plurality of target training samples into the feature information extraction network to obtain target feature information of the first training sample, wherein the target feature information comprises a fourth target feature vector group and a fifth target feature vector group, the fourth target feature vector group is obtained by vectorizing the first training sample through the feature information extraction network, and the fifth target feature vector group is obtained by fusing the plurality of target training samples after vectorization through the feature information extraction network; inputting the target feature information into the deep neural network (DNN) to obtain an output value, wherein the output value is used to represent the probability of the first reference user operating the first reference item; training the recommendation model according to the output value and label data of the first training sample to obtain a target recommendation model.

7. The method of claim 6, wherein the fifth target feature vector group is obtained by fusing the plurality of target training samples after vectorization, specifically: the fifth target feature vector group is obtained by fusing the user feature field data, the item feature field data, and the label data of the plurality of target training samples after vectorization through the feature information extraction network.

8. The method of claim 6 or 7, wherein the target feature information further comprises a sixth target feature vector group, the sixth target feature vector group is obtained by interacting the target feature vectors in a second vector group with each other, and the second vector group comprises the fourth target feature vector group and the fifth target feature vector group.

9. The method according to any one of claims 6-8, characterized in that, the fusing comprises: splicing a plurality of fourth target feature vectors in the fourth target feature vector group to obtain a second feature vector of the first training sample; Splice a plurality of first feature vectors of each of the target training samples to obtain a second feature vector of each of the target training samples, wherein the plurality of first feature vectors of each of the target training samples are obtained by vectorizing the target training sample; Obtain a similarity between the second feature vector of each of the target training samples and the second feature vector of the first training sample; Determine a weight of each of the target training samples according to the similarity between the second feature vector of each of the target training samples and the second feature vector of the first training sample; Fuse the first feature vectors of the plurality of target training samples under the same feature domain according to the weight of each of the target training samples to obtain the fifth target feature vector group.

10. The method according to any one of claims 6-9, characterized in that, Before obtaining the plurality of target training samples from the plurality of second training samples according to the similarity between the first training sample and the plurality of second training samples, the method further comprises: Invert index the plurality of training samples by taking the plurality of user feature domain data and the plurality of item feature domain data of the first training sample as elements to obtain the plurality of second training samples.

11. A recommendation apparatus characterized by comprising: Comprise: An obtaining unit and a processing unit; The obtaining unit is configured to obtain to-be-predicted data; The processing unit is configured to obtain a plurality of target reference samples from a plurality of reference samples according to a similarity between the to-be-predicted data and the plurality of reference samples; each of the reference samples and the to-be-predicted data comprises user feature domain data and item feature domain data, the user feature domain data of the to-be-predicted data is used to indicate target user features, the item feature domain data of the to-be-predicted data is used to indicate target item features, and each of the target reference samples and the to-be-predicted data has partially same user feature domain data and / or item feature domain data; Obtain target feature information of the to-be-predicted data according to the plurality of target reference samples and the to-be-predicted data; the target feature information comprises a first target feature vector group and a second target feature vector group, the first target feature vector group is the to-be-predicted data after vectorization, and the second target feature vector group is obtained by fusing the plurality of target reference samples after vectorization; Input the target feature information into a deep neural network (DNN) to obtain an output value; The output value is a probability value, and the probability value reflects a probability that the target user performs an operation on the target item; Determine whether to recommend the target item to the target user according to the output value.

12. The apparatus of claim 11, wherein: The plurality of target reference samples further comprise label data; The second target feature vector group is obtained by fusing user feature domain data, item feature domain data, and label data of the plurality of target reference samples after vectorization.

13. The apparatus of claim 12, wherein: ​ The target feature information further includes a third target feature vector group, the third target feature vector group being obtained by interacting each two target feature vectors in a first vector group, the first vector group including the first target feature vector group and the second target feature vector group.

14. The apparatus of any one of claims 11-13, wherein, In the aspect of fusing by the processing unit, the processing unit is specifically configured to: splice a plurality of first target feature vectors in the first target feature vector group to obtain a second feature vector of the to-be-predicted data; splice a plurality of first feature vectors of each of the target reference samples to obtain a second feature vector of each of the target reference samples, the plurality of first feature vectors of each of the target reference samples being obtained by vectorizing the target reference sample; obtain a similarity between the second feature vector of each of the target reference samples and the second feature vector of the to-be-predicted data; determine a weight of each of the target reference samples according to the similarity between the second feature vector of each of the target reference samples and the second feature vector of the to-be-predicted data; fuse the first feature vectors of the plurality of target reference samples in the same feature domain according to the weight of each of the target reference samples to obtain the second target feature vector group.

15. The apparatus of any one of claims 11-14, wherein, before the processing unit obtains a plurality of target reference samples from a plurality of reference samples according to similarities between the to-be-predicted data and the plurality of reference samples, the processing unit is further configured to obtain a plurality of original samples, wherein each of the original samples includes user feature domain data and item feature domain data; perform an inverted index on the plurality of original samples by taking a plurality of the user feature domain data and a plurality of the item feature domain data of the to-be-predicted data as elements to obtain the plurality of reference samples. 16.A device for training a recommendation model, characterized in that, The recommendation model includes a feature information extraction network and a deep neural network (DNN), and the apparatus includes an obtaining unit and a processing unit. The obtaining unit is configured to obtain a plurality of training samples, wherein each of the training samples includes user feature domain data and item feature domain data. The processing unit is configured to obtain a plurality of target training samples from a plurality of second training samples according to similarities between a first training sample and the plurality of second training samples, wherein the first training sample is one of the plurality of training samples, the plurality of second training samples are part or all of the plurality of training samples except the first training sample, the user feature domain data of the first training sample is used to indicate a first reference user feature, the item feature domain data of the first training sample is used to indicate a first reference item feature, the first training sample and each of the target training samples have partially same user feature domain data and / or item feature domain data. inputting the first training sample and the plurality of target training samples into the feature information extraction network to obtain target feature information of the first training sample, wherein the target feature information comprises a fourth target feature vector group and a fifth target feature vector group, the fourth target feature vector group is obtained by vectorizing the first training sample through the feature information extraction network, and the fifth target feature vector group is obtained by fusing the plurality of target training samples after being vectorized through the feature information extraction network; inputting the target feature information into the deep neural network DNN to obtain an output value, the output value being used to represent a probability of the first reference user operating the first reference item; training the recommendation model according to the output value and a label of the first training sample to obtain a target recommendation model.

17. The apparatus of claim 16, wherein the fifth target feature vector group is obtained by fusing the plurality of target training samples after being vectorized, and specifically: the fifth target feature vector group is obtained by fusing user feature domain data, item feature domain data and label data of the plurality of target training samples after being vectorized through the feature information extraction network.

18. The apparatus of any one of claims 16 or 17, wherein the target feature information further comprises a sixth target feature vector group, the sixth target feature vector group is obtained by interacting target feature vectors in a second vector group with each other, and the second vector group comprises the fourth target feature vector group and the fifth target feature vector group.

19. The apparatus of any one of claims 16-18, wherein in the aspect of fusing by the processing unit, the processing unit is specifically configured to: splice a plurality of fourth target feature vectors in the fourth target feature vector group to obtain a second feature vector of the first training sample; splice a plurality of first feature vectors of each target training sample to obtain a second feature vector of each target training sample, the plurality of first feature vectors of each target training sample being obtained by vectorizing the target training sample; obtain a similarity between the second feature vector of each target training sample and the second feature vector of the first training sample; determine a weight of each target training sample according to the similarity between the second feature vector of each target training sample and the second feature vector of the first training sample; fuse the first feature vectors of the plurality of target training samples in the same feature domain according to the weight of each target training sample to obtain the fifth target feature vector group.

20. The apparatus of any one of claims 16-19, wherein Before the processing unit acquires a plurality of target training samples from the plurality of second training samples according to the similarity of the first training sample and the plurality of second training samples, the processing unit inverts indexes the plurality of training samples by taking the plurality of user feature domain data and the plurality of item feature domain data of the first training sample as elements, to obtain the plurality of second training samples.

21. An electronic device, comprising: Comprise: a memory for storing a program; a processor for executing the program stored in the memory; when the program stored in the memory is executed, the processor is used to implement the method of any one of claims 1-5 or claims 6-10.

22. A computer-readable storage medium, characterized in that, The computer readable storage medium stores program code for device execution, and the program code comprises program code for implementing the method of any one of claims 1-5 or claims 6-10.

Citation Information

Patent Citations

  • Content item recommendation method and device, server and storage medium

    CN111008332A

  • Content recommendation method and device, equipment and readable storage medium

    CN111008336A

  • Article recommendation method and device, computer equipment and storage medium

    CN111259263A