Recommendation model training method, recommendation method, device and computer equipment

By obtaining structured data and text-based data, using a wrap-based feature selection algorithm and a multi-pointer collaborative attention network to evaluate the importance of features, and training the recommendation model after fusion, solving the problem that the recommendation results in the existing technology do not match the user's preferences, and achieving accurate content recommendations.

CN116089713BActive Publication Date: 2025-08-26MIGU CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310001600.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-03
Publication Date
2025-08-26
Estimated Expiration
2043-01-03

AI Technical Summary

Technical Problem

The user-centered or content-centered content recommendation methods in the prior art lack comprehensive information analysis for users, resulting in the recommendation results not meeting user preferences and low accuracy.

Method used

By obtaining structured data and text-based data, the wrapped feature selection algorithm and multi-pointer collaborative attention network are used to evaluate the importance of features. After fusing, input the neural network to train the recommendation model to obtain structured importance features and text-based importance features to achieve accurate recommendations for user preferences.

Benefits of technology

Accurate recommendations for user preferences are achieved and the accuracy of content recommendations is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089713B_ABST
    Figure CN116089713B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of text processing technology and discloses a recommendation model training method, which includes: obtaining structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; performing feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features; performing feature importance evaluation on the text data according to a multi-pointer collaborative attention network to obtain text importance features; fusing the structured importance features and the text importance features and inputting them into a preset neural network for training to obtain a recommendation model. Through the above method, the embodiment of the present invention can achieve accurate recommendation of content to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of text processing technology, and specifically to a recommendation model training method, a recommendation method, a recommendation model training device, a recommendation device, a computer device, and a computer-readable storage medium. Background Art

[0002] Currently, content recommendation is generally performed through collaborative filtering (CF) and content-based methods (CBM). CF recommends items based on similar user choices, while CBM utilizes the similarity between contents.

[0003] However, the inventors of this application have discovered that the prior art uses user-centric or content-centric content recommendation, and only uses one-sided information to model one-sided user preferences. There is a lack of analysis for content recommendation based on comprehensive user information, which results in recommendation results that do not fit user preferences, resulting in low content recommendation accuracy. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention provide a recommendation model training method, a recommendation method, a recommendation model training device, a recommendation device, a computer device and a computer-readable storage medium, which are used to solve the problem of low content recommendation accuracy in the prior art.

[0005] According to one aspect of an embodiment of the present invention, a recommendation model training method is provided, the method comprising:

[0006] Acquire structured data and text data; the structured data includes user basic information data, basic information of historical content, and structured first-category user behavior data, and the text data includes second-category user behavior data;

[0007] Performing feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features;

[0008] Performing feature importance evaluation on the text data according to a multi-pointer collaborative attention network to obtain text importance features;

[0009] The structural importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model.

[0010] In an optional manner, the second type of user behavior data is user behavior content; before performing feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features, the method also includes: performing one-hot encoding processing on the user behavior content to obtain an encoding matrix corresponding to the user behavior content.

[0011] In an optional manner, the feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain text importance features, including:

[0012] Inputting the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features;

[0013] Calculating a standard collaborative attention mechanism based on a similarity matrix between the user-level behavioral content features and the content-level behavioral features;

[0014] By using a reparameterized algorithm and the standard collaborative attention mechanism, the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature are calculated to obtain a user-level feature vector and a content-level feature vector;

[0015] Determining average pooling of the user-level feature vector and average pooling of the content-level feature vector according to a similarity matrix of the user-level feature vector and the content-level feature vector;

[0016] Repeat the above steps to obtain the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors;

[0017] The average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors are aggregated to obtain text importance features.

[0018] In an optional manner, the first type of user behavior data is the number of user behaviors; and the step of performing feature importance evaluation on the structured data according to the wrapper feature selection algorithm to obtain structured importance features includes:

[0019] The LGBFS algorithm is used to evaluate the feature importance of the user basic information data, the basic information of the historical content and the number of user behaviors, and obtain the structured importance features corresponding to the user basic information data, the basic information of the historical content and the number of user behaviors, respectively.

[0020] In an optional manner, the feature importance evaluation is performed on the structured data according to a wrapper feature selection algorithm to obtain the structured feature importance;

[0021] Convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval;

[0022] Putting the structured data into each bin to obtain a histogram representation of the structured data;

[0023] Segmenting the histogram representation, determining an optimal segmentation point by gain calculation, and continuing to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information;

[0024] Calculating the total gain of each feature in the structured data after being used for segmentation in the K decision trees;

[0025] The structural importance feature is determined by the number of times it is used for segmentation and the total gain.

[0026] According to another aspect of an embodiment of the present invention, a recommendation method is provided, comprising the following steps:

[0027] Obtain target structured importance features and target text importance features corresponding to target users;

[0028] After fusing the target structured importance features and the target text importance features, the features are input into a recommendation model to obtain target recommended content; the recommendation model is obtained according to the recommendation model training method or the recommendation model training device;

[0029] Recommend the target recommended content to the target user.

[0030] According to another aspect of an embodiment of the present invention, a recommendation model training device is provided, comprising:

[0031] A first acquisition module is configured to acquire structured data and text data; the structured data includes basic user information data, basic information of historical content, and structured first-category user behavior data; and the text data includes second-category user behavior data;

[0032] A structured feature module, configured to perform feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features;

[0033] A text feature module is used to evaluate the feature importance of the text data based on a multi-pointer collaborative attention network to obtain text importance features;

[0034] The training module is used to fuse the structural importance features and the text importance features and input them into a preset neural network for training to obtain a recommendation model.

[0035] According to another aspect of an embodiment of the present invention, a recommendation device is provided, comprising: a second acquisition module, configured to acquire target structured importance features and target text importance features corresponding to a target user;

[0036] A prediction module is configured to fuse the target structured importance features and the target text importance features, and input the integrated features into a recommendation model to obtain target recommended content; the recommendation model is trained according to the recommendation model training method or the recommendation model training device;

[0037] The recommendation module is used to recommend the target recommended content to the target user.

[0038] According to another aspect of an embodiment of the present invention, there is provided a computer device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0039] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the recommendation model training method or the operation of the recommendation method.

[0040] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction. When the executable instruction is executed on a recommendation device, the recommendation device executes the recommendation model training method or the operation of the recommendation method.

[0041] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0042] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the drawings. In the drawings:

[0044] Figure 1A schematic diagram of the flow of a recommendation model training method provided by an embodiment of the present invention is shown;

[0045] Figure 2 A schematic diagram showing a flow chart of a recommendation model training method provided by another embodiment of the present invention is shown;

[0046] Figure 3 A schematic diagram showing the structure of a recommendation model training device provided by an embodiment of the present invention is shown;

[0047] Figure 4 A schematic structural diagram of a recommended device provided by an embodiment of the present invention is shown;

[0048] Figure 5 A schematic structural diagram of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0049] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0050] Figure 1 The flowchart of the recommendation model training method provided by the embodiment of the present invention is shown, and the method is executed by a computer device. The computer device can be a personal computer, a terminal device, etc., and the embodiment of the present invention does not make specific restrictions. Figure 1 As shown, the method includes the following steps:

[0051] Step 110: Acquire structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data.

[0052] The present invention is used to identify important features before recommending content to users. The first type of user behavior data is the number of user behaviors; the second type of user behavior data is the content of user behaviors. In the present invention, the following data (including but not limited to the following data) is extracted from user basic information, user behavior information, and music basic information: user basic information features, first-type user behavior features, second-type user behavior features, and content basic information. Taking music as an example, the user basic information features include gender, age, user membership, geographic location, and user status (sleeping, studying, running, mood). User behavior features differ from user basic information features and music basic information features. Although user behavior is complex, frequent, and changeable, it can timely reflect the development trends of user preferences and is crucial for music preference analysis. Mining changes in user behavior is therefore of great significance. Therefore, the present invention divides user behavior features into two categories. The first type of user behavior data is an indicator of the number of times a user behavior is performed, denoted as the first type of user behavior features. The second type of user behavior data is derived from the content of the user behavior, denoted as the second type of user behavior features. Taking "comments" as an example, the behavior of user comments can derive the indicator of the number of comments. At the same time, the content of user comments can be deeply mined to obtain new information. User behavior characteristics are as follows: number of song searches, number of song switching, song collection, number of song plays, number of song downloads, number of song shares, song repeat play rate, time users listen to songs, song purchases, moving to the trash, setting background music, liking songs, number of song comments and replies, song comments and reply content, etc. The basic information characteristics of music are as follows: song popularity value, language, song genre, song release year, song theme, singer ID, etc. To obtain the above n features, the mathematical form is: A = [a1, a2, ..., a n ].

[0053] Step 120: performing feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features.

[0054] In this embodiment of the present invention, the LGBFS algorithm is used to perform feature importance evaluation on the user basic information data, the basic information of the historical content, and the number of user behaviors, respectively, to obtain structured importance features corresponding to the user basic information data, the basic information of the historical content, and the number of user behaviors. The first type of user behavior data is the number of user behaviors.

[0055] In the embodiment of the present invention, the wrapper feature selection algorithm performs feature importance evaluation on the structured data to obtain structured importance features, specifically including:

[0056] Step 201: convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval, and the structured data is placed in each bin to obtain a histogram representation of the structured data.

[0057] Specifically, if Figure 2 As shown, the feature values ​​corresponding to each sub-feature of the user basic information data, the basic information of the historical content, and the number of user behaviors in the sample set are each converted into a histogram. Each histogram forms K bins according to the data interval, resulting in a histogram representation of the original data in the structured data. In this way, the feature values ​​are converted into bins before training. In other words, a piecewise function is applied to the value of each feature, dividing the values ​​of all samples on that feature into a certain segment (bin). Ultimately, the feature values ​​are converted from continuous values ​​to discrete values.

[0058] Step 202: Segment the histogram representation, determine the optimal segmentation point by gain calculation, and continue to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information.

[0059] Among them, after obtaining the histogram representation, each original feature is converted into a histogram, and the original feature value is also stored in all bins of each histogram in the form of integers. LightGBM finds the optimal split point (that is, the optimal split histogram) by traversing each histogram and calculating the split gain for each histogram as a split point. LightGBM implements a many vs many strategy for discrete features. All bin containers to the left or right of the optimal split threshold in these K bins are a many set, and other bin containers are another many set. Since structured data is discrete values, there may be multiple split thresholds, each of which corresponds to a bin container number. When a certain feature is used for splitting, as long as the bin container number corresponding to the data sample is in the bin set corresponding to these thresholds, this data is added to the left subtree after the split, otherwise it is added to the right subtree after the split. Among them, the optimal split point is determined by the gain Gain, that is, the total split weight of the left and right leaf points after the split minus the weight of the original node before the split:

[0060]

[0061] Among them, w i is the total weight of the left leaf point after segmentation, w j is the total weight of the right leaf point after segmentation; w k is the weight of the original node before splitting.

[0062] Step 203: Calculate the number of times each feature in the structured data is used for segmentation in the K decision trees and the total gain after segmentation.

[0063] Among them, the iterative tree is constructed by performing K iterative segmentation on the histogram. In each iteration, a new tree is fitted using the gradient information to join the previous iterative tree. The resulting iterative tree is expressed as:

[0064]

[0065] Among them, x i is the function space of the iteration tree, f q (x i ) represents the predicted value of the i-th sample in the q-th tree. Among them, the split nodes at each level of the iterative tree adopt the optimal split point.

[0066] After obtaining the iterative tree, the total number of times each feature is split in the K iterative trees (T_Split) and the total gain (T_Gain) brought by the feature being used for splitting in the K decision trees are calculated.

[0067] Step 204: Determine the structural importance feature according to the number of times the feature is used for segmentation and the total gain.

[0068] The structural importance of features is determined by the total number of times each feature is split in K iterative trees (T_Split) and the total gain (T_Gain) after the feature is used for splitting in K decision trees. Specifically, the more times each feature is split in K iterative trees (T_Split), the higher its importance; the larger the total gain (T_Gain) after the feature is used for splitting in K decision trees, the higher its importance.

[0069] After determining the importance of each feature based on the number of times it is used for segmentation and the total gain, each structured data is sorted according to its importance, and a floating search is performed on the feature subset using a sequential floating forward search method. If adding L features each time makes the feature subset performance more superior, then L features are added. If removing R features makes the feature subset performance more stable and superior, then R features are removed. Through repeated floating forward searches, the final structured importance feature is obtained. Since the embodiment of the present invention can sort the importance of each feature in the structured data, the weight of each feature in the structured importance feature can also be obtained, and the weight is determined according to the importance.

[0070] Step 130: Perform feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features.

[0071] Among them, before evaluating the feature importance of the text data according to the multi-pointer collaborative attention network to obtain the text importance features, the embodiment of the present invention also pre-one-hot encodes the user behavior content to obtain the encoding matrix corresponding to the user behavior content.

[0072] In an embodiment of the present invention, after obtaining the encoding matrix, the feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain the text importance feature, including the following steps:

[0073] Step 301: Input the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features.

[0074] The embodiment of the present invention first classifies the encoding matrix according to the user level and content level, and then inputs the obtained encoding matrix into the Review Gating mechanism of the multi-pointer collaborative attention network. This mechanism has a first-stage filter, similar to a gating mechanism, which determines how much review information can be passed to the next layer. In this way, important reviews can be screened. The formula of the first-stage filter is as follows:

[0075]

[0076] Among them, input represents the original user sequence or music sequence, ⊙ is the Hadamard product, x i is the i-th comment of sequence x, W g 、W u 、b g 、b u is the layer parameter.

[0077] Through the above method, the more important user-level behavioral content features (user sequence a) and content-level behavioral features (content sequence b, for example, when the content is music, it can be a music sequence) can be obtained respectively.

[0078] Step 302: Calculate a standard collaborative attention mechanism based on the similarity matrix between the behavioral content features at the user level and the behavioral features at the content level.

[0079] After obtaining important user-level behavioral content features and content-level behavioral features, they are input into the Review-level Co-Attention layer to further extract features with rich information. Calculate the similarity matrix s for user sequence a or content sequence b:

[0080] s ij =F(a iT )MF(b j )

[0081] After performing the maximum pooling, take the maximum value of the row of the similarity matrix s col (s), column maximum value max row (s), use the row maximum value max col (s) and column maximum value max row (s) Weight the user sequence a and the music sequence b separately to obtain the standard collaborative attention mechanism as follows:

[0082] a′=(G(max col (s))) T ab′=(G(max row (s))) T b

[0083] Step 303: Calculate the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature respectively through the reparameterization algorithm and the standard collaborative attention mechanism to obtain the user-level feature vector and the content-level feature vector.

[0084] Among them, the comment pointers on the user sequence a and music sequence b are calculated by Gumbel-Softmax respectively, and the pth comment pointer of the user sequence a is selected. a Comments, pth of music sequence b b Get the content pointer p using the user-level behavioral content features a and content pointer p of behavioral characteristics at the content level b ,as follows:

[0085] p a =(Gumbel(max col (s)))p b =(Gumbel(max row (s)))

[0086] in:

[0087] a′=p a a;

[0088] b′=p b b

[0089] Step 304: Determine average pooling of the user-level feature vector and average pooling of the content-level feature vector based on the similarity matrix of the user-level feature vector and the content-level feature vector.

[0090] After the user-level feature vector a′ and the content-level feature vector b′ are input into the Word-level Co-Attention layer, the similarity matrix of the user-level feature vector and the content-level feature vector is calculated, and the average pooling of the user-level feature vector and the average pooling of the content-level feature vector are determined according to the similarity matrix:

[0091] a″=(S(avg col (w))) T a′;

[0092] b″=(S(avg row (w))) T b′

[0093] Step 305: Repeat the above steps to obtain average pooling of multiple different user-level feature vectors and average pooling of multiple different content-level feature vectors.

[0094] Repeat the above steps n p times, n is obtained on both the user sequence a and the music sequence b levels. p The average pooling of different user-level feature vectors and the average pooling of different content-level feature vectors, that is, the pointer, namely:

[0095] Step 306: Aggregate the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors to obtain text importance features.

[0096] Aggregate these comments through neural network to get multiple pointers a f and b f , as the final text feature. In this embodiment of the present invention, multiple pointers have different sizes, and their corresponding weights can be determined according to the size. Therefore, the text importance feature and the weights of each sub-feature in the text importance feature can be determined.

[0097] Step 140: The structural importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model.

[0098] After obtaining the structural importance features and the text importance features, the two are fused and input into a preset neural network for training to obtain a recommendation model. The fusion method is determined based on different neural network models. In an embodiment of the present invention, since the weights corresponding to the structural importance features and the text importance features can be obtained, the weights can also be combined during training. The trained recommendation model can recommend similar content to other users who have similar characteristics to the user.

[0099] The embodiment of the present invention does not specifically limit the training process. It can adopt the existing model training method, fuse the structured importance features of the sample data and the text importance features, and input them into a preset neural network for training to obtain a prediction result. The loss function is calculated based on the prediction result and the sample label, and then the parameters of the neural network are adjusted according to the loss function. The training is iterated until the optimal value is reached to obtain the recommendation model.

[0100] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0101] Figure 3 FIG1 shows a flow chart of a recommendation method provided by another embodiment of the present invention, which is executed by a computer device. The computer device may be a personal computer, a terminal device, etc., and the present invention does not make any specific restrictions. Figure 3 As shown, the method includes the following steps:

[0102] Step 210: Obtain target structured importance features and target text importance features corresponding to the target user.

[0103] Among them, the target structural importance features and target text importance features corresponding to the target user can be determined by using the method for determining the structural importance features and the text importance features described in the above-mentioned recommendation model training method.

[0104] Step 220: After fusing the target structured importance features and the target text importance features, the features are input into a recommendation model to obtain target recommended content. The recommendation model is trained using the recommendation model training method of the above embodiment. The specific training method is generally consistent with the steps of the above embodiment and will not be repeated here.

[0105] Step 230: Recommend the target recommended content to the target user.

[0106] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0107] Figure 4 FIG. 1 shows a schematic diagram of the structure of the recommendation model training device provided by an embodiment of the present invention. Figure 4 As shown, the device 300 includes:

[0108] A first acquisition module 310 is configured to acquire structured data and text data; the structured data includes basic user information data, basic information of historical content, and structured first-category user behavior data; and the text data includes second-category user behavior data.

[0109] A structured feature module 320 is configured to perform feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features;

[0110] A text feature module 330 is configured to perform feature importance evaluation on the text data based on a multi-pointer collaborative attention network to obtain text importance features;

[0111] The training module 340 is used to fuse the structural importance features and the text importance features and input them into a preset neural network for training to obtain a recommendation model.

[0112] In an optional manner, the second type of user behavior data is user behavior content; before performing feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features, the method also includes: performing one-hot encoding processing on the user behavior content to obtain an encoding matrix corresponding to the user behavior content.

[0113] In an optional manner, the feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain text importance features, including:

[0114] Inputting the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features;

[0115] Calculating a standard collaborative attention mechanism based on a similarity matrix between the user-level behavioral content features and the content-level behavioral features;

[0116] By using a reparameterized algorithm and the standard collaborative attention mechanism, the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature are calculated to obtain a user-level feature vector and a content-level feature vector;

[0117] Determining average pooling of the user-level feature vector and average pooling of the content-level feature vector according to a similarity matrix of the user-level feature vector and the content-level feature vector;

[0118] Repeat the above steps to obtain the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors;

[0119] The average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors are aggregated to obtain text importance features.

[0120] In an optional manner, the first type of user behavior data is the number of user behaviors; and the step of performing feature importance evaluation on the structured data according to the wrapper feature selection algorithm to obtain structured importance features includes:

[0121] The LGBFS algorithm is used to evaluate the feature importance of the user basic information data, the basic information of the historical content and the number of user behaviors, and obtain the structured importance features corresponding to the user basic information data, the basic information of the historical content and the number of user behaviors, respectively.

[0122] In an optional manner, the feature importance evaluation is performed on the structured data according to a wrapper feature selection algorithm to obtain the structured feature importance;

[0123] Convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval;

[0124] Putting the structured data into each bin to obtain a histogram representation of the structured data;

[0125] Segmenting the histogram representation, determining an optimal segmentation point by gain calculation, and continuing to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information;

[0126] Calculating the total gain of each feature in the structured data after being used for segmentation in the K decision trees;

[0127] The structural importance feature is determined by the number of times it is used for segmentation and the total gain.

[0128] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0129] Figure 5 FIG. 1 shows a schematic diagram of the structure of the recommendation device provided by an embodiment of the present invention. Figure 5 As shown, the apparatus 500 includes:

[0130] The second acquisition module 510 is used to acquire the target structured importance features and target text importance features corresponding to the target user.

[0131] The prediction module 520 is used to fuse the target structured importance features and the target text importance features, input them into the recommendation model, and obtain target recommended content; the recommendation model is obtained according to the above-mentioned recommendation model training method or the above-mentioned recommendation model training device.

[0132] The recommendation module 530 is configured to recommend the target recommended content to the target user.

[0133] In an optional manner, the second type of user behavior data is user behavior content; before performing feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features, the method also includes: performing one-hot encoding processing on the user behavior content to obtain an encoding matrix corresponding to the user behavior content.

[0134] In an optional manner, the feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain text importance features, including:

[0135] Inputting the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features;

[0136] Calculating a standard collaborative attention mechanism based on a similarity matrix between the user-level behavioral content features and the content-level behavioral features;

[0137] By using a reparameterized algorithm and the standard collaborative attention mechanism, the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature are calculated to obtain a user-level feature vector and a content-level feature vector;

[0138] Determining average pooling of the user-level feature vector and average pooling of the content-level feature vector according to a similarity matrix of the user-level feature vector and the content-level feature vector;

[0139] Repeat the above steps to obtain the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors;

[0140] The average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors are aggregated to obtain text importance features.

[0141] In an optional manner, the first type of user behavior data is the number of user behaviors; and the step of performing feature importance evaluation on the structured data according to the wrapper feature selection algorithm to obtain structured importance features includes:

[0142] The LGBFS algorithm is used to evaluate the feature importance of the user basic information data, the basic information of the historical content and the number of user behaviors, and obtain the structured importance features corresponding to the user basic information data, the basic information of the historical content and the number of user behaviors, respectively.

[0143] In an optional manner, the feature importance evaluation is performed on the structured data according to a wrapper feature selection algorithm to obtain the structured feature importance;

[0144] Convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval;

[0145] Putting the structured data into each bin to obtain a histogram representation of the structured data;

[0146] Segmenting the histogram representation, determining an optimal segmentation point by gain calculation, and continuing to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information;

[0147] Calculating the total gain of each feature in the structured data after being used for segmentation in the K decision trees;

[0148] The structural importance feature is determined by the number of times it is used for segmentation and the total gain.

[0149] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0150] Figure 4 The schematic diagram of the structure of the computer device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.

[0151] like Figure 4 As shown, the computer device may include: a processor 402 , a communications interface 404 , a memory 406 , and a communication bus 408 .

[0152] Processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other devices, such as clients or other server network elements. Processor 402 is used to execute program 410, which may specifically perform the steps described above for the recommendation model training method or recommendation method embodiments.

[0153] Specifically, the program 410 may include program code including computer-executable instructions.

[0154] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a computer device may be of the same type, such as one or more CPUs, or may be of different types, such as one or more CPUs and one or more ASICs.

[0155] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0156] The program 410 may be specifically called by the processor 402 to cause the computer device to perform the following operations:

[0157] Acquire structured data and text data; the structured data includes user basic information data, basic information of historical content, and structured first-category user behavior data, and the text data includes second-category user behavior data;

[0158] Performing feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features;

[0159] Performing feature importance evaluation on the text data according to a multi-pointer collaborative attention network to obtain text importance features;

[0160] The structural importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model.

[0161] In an optional manner, the second type of user behavior data is user behavior content; before performing feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features, the method also includes: performing one-hot encoding processing on the user behavior content to obtain an encoding matrix corresponding to the user behavior content.

[0162] In an optional manner, the feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain text importance features, including:

[0163] Inputting the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features;

[0164] Calculating a standard collaborative attention mechanism based on a similarity matrix between the user-level behavioral content features and the content-level behavioral features;

[0165] By using a reparameterized algorithm and the standard collaborative attention mechanism, the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature are calculated to obtain a user-level feature vector and a content-level feature vector;

[0166] Determining average pooling of the user-level feature vector and average pooling of the content-level feature vector according to a similarity matrix of the user-level feature vector and the content-level feature vector;

[0167] Repeat the above steps to obtain the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors;

[0168] The average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors are aggregated to obtain text importance features.

[0169] In an optional manner, the first type of user behavior data is the number of user behaviors; and the step of performing feature importance evaluation on the structured data according to the wrapper feature selection algorithm to obtain structured importance features includes:

[0170] The LGBFS algorithm is used to evaluate the feature importance of the user basic information data, the basic information of the historical content and the number of user behaviors, and obtain the structured importance features corresponding to the user basic information data, the basic information of the historical content and the number of user behaviors, respectively.

[0171] In an optional manner, the feature importance evaluation is performed on the structured data according to a wrapper feature selection algorithm to obtain the structured feature importance;

[0172] Convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval;

[0173] Putting the structured data into each bin to obtain a histogram representation of the structured data;

[0174] Segmenting the histogram representation, determining an optimal segmentation point by gain calculation, and continuing to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information;

[0175] Calculating the total gain of each feature in the structured data after being used for segmentation in the K decision trees;

[0176] The structural importance feature is determined by the number of times it is used for segmentation and the total gain.

[0177] In an optional manner, the program 410 is called by the processor 402 to enable the computer device to perform the following operations:

[0178] Obtain target structured importance features and target text importance features corresponding to target users;

[0179] After fusing the target structured importance features and the target text importance features, the features are input into a recommendation model to obtain target recommended content; the recommendation model is obtained according to the recommendation model training method or the recommendation model training device;

[0180] Recommend the target recommended content to the target user.

[0181] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0182] An embodiment of the present invention provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a computer device, the computer device executes the recommendation model training method or recommendation method in any of the above method embodiments.

[0183] The executable instructions can be used to cause the computer device to perform the following operations:

[0184] Acquire structured data and text data; the structured data includes user basic information data, basic information of historical content, and structured first-category user behavior data, and the text data includes second-category user behavior data;

[0185] Performing feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features;

[0186] Performing feature importance evaluation on the text data according to a multi-pointer collaborative attention network to obtain text importance features;

[0187] The structural importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model.

[0188] In an optional manner, the second type of user behavior data is user behavior content; before performing feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features, the method also includes: performing one-hot encoding processing on the user behavior content to obtain an encoding matrix corresponding to the user behavior content.

[0189] In an optional manner, the feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain text importance features, including:

[0190] Inputting the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features;

[0191] Calculating a standard collaborative attention mechanism based on a similarity matrix between the user-level behavioral content features and the content-level behavioral features;

[0192] By using a reparameterized algorithm and the standard collaborative attention mechanism, the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature are calculated to obtain a user-level feature vector and a content-level feature vector;

[0193] Determining average pooling of the user-level feature vector and average pooling of the content-level feature vector according to a similarity matrix of the user-level feature vector and the content-level feature vector;

[0194] Repeat the above steps to obtain the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors;

[0195] The average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors are aggregated to obtain text importance features.

[0196] In an optional manner, the first type of user behavior data is the number of user behaviors; and the step of performing feature importance evaluation on the structured data according to the wrapper feature selection algorithm to obtain structured importance features includes:

[0197] The LGBFS algorithm is used to evaluate the feature importance of the user basic information data, the basic information of the historical content and the number of user behaviors, and obtain the structured importance features corresponding to the user basic information data, the basic information of the historical content and the number of user behaviors, respectively.

[0198] In an optional manner, the feature importance evaluation is performed on the structured data according to a wrapper feature selection algorithm to obtain the structured feature importance;

[0199] Convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval;

[0200] Putting the structured data into each bin to obtain a histogram representation of the structured data;

[0201] Segmenting the histogram representation, determining an optimal segmentation point by gain calculation, and continuing to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information;

[0202] Calculating the total gain of each feature in the structured data after being used for segmentation in the K decision trees;

[0203] The structural importance feature is determined by the number of times it is used for segmentation and the total gain.

[0204] In an optional manner, the executable instructions cause the computer device to perform the following operations:

[0205] Obtain target structured importance features and target text importance features corresponding to target users;

[0206] After fusing the target structured importance features and the target text importance features, the features are input into a recommendation model to obtain target recommended content; the recommendation model is obtained according to the recommendation model training method or the recommendation model training device;

[0207] Recommend the target recommended content to the target user.

[0208] The embodiment of the present invention obtains structured data and text data; the structured data includes user basic information data, basic information of historical content and structured first-category user behavior data, and the text data includes second-category user behavior data; the feature importance of the structured data is evaluated according to the parcel feature selection algorithm to obtain structured importance features; the feature importance of the text data is evaluated according to the multi-pointer collaborative attention network to obtain text importance features; the structured importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model, which can achieve accurate recommendation of content to users.

[0209] An embodiment of the present invention provides a recommendation model training device for executing the above-mentioned recommendation model training method.

[0210] An embodiment of the present invention provides a computer program that can be called by a processor to enable a computer device to execute the recommendation model training method in any of the above method embodiments.

[0211] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are run on a computer, the computer executes the recommendation model training method in any of the above method embodiments.

[0212] The algorithm or demonstration provided herein are not inherently relevant to any particular computer, virtual system or other equipment. Various general-purpose systems may also be used together with the teachings based on this. According to the above description, it is apparent that the structure required for constructing this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of the present invention.

[0213] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0214] Similarly, it should be understood that in order to streamline the present invention and facilitate understanding of one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0215] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed so far can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0216] It should be noted that the above embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by a person skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. A recommendation model training method, characterized in that: The method comprises: Acquire structured data and text data; the structured data includes user basic information data, basic information of historical content, and structured first-category user behavior data, and the text data includes second-category user behavior data; Performing feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features; Performing feature importance evaluation on the text data according to a multi-pointer collaborative attention network to obtain text importance features; The structural importance features and the text importance features are fused and input into a preset neural network for training to obtain a recommendation model.

2. The method according to claim 1, characterized in that The second type of user behavior data is user behavior content; before performing feature importance evaluation on the text data according to the multi-pointer collaborative attention network to obtain text importance features, the method further includes: The user behavior content is one-hot encoded to obtain a coding matrix corresponding to the user behavior content.

3. The method according to claim 2, characterized in that The feature importance evaluation of the text data is performed according to the multi-pointer collaborative attention network to obtain text importance features, including: Inputting the encoding matrix into the gating mechanism of the multi-pointer collaborative attention network to filter out user-level behavioral content features and content-level behavioral features; A standard collaborative attention mechanism is calculated based on a similarity matrix between the behavioral content features at the user level and the behavioral features at the content level; By using a reparameterized algorithm and the standard collaborative attention mechanism, the content pointer of the user-level behavioral content feature and the content pointer of the content-level behavioral feature are calculated to obtain a user-level feature vector and a content-level feature vector; Determining average pooling of the user-level feature vector and average pooling of the content-level feature vector according to a similarity matrix of the user-level feature vector and the content-level feature vector; Repeat the above steps to obtain the average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors; The average pooling of multiple different user-level feature vectors and the average pooling of multiple different content-level feature vectors are aggregated to obtain text importance features.

4. The method according to claim 1, wherein The first type of user behavior data is the number of user behaviors; the feature importance evaluation of the structured data according to the parcel feature selection algorithm is performed to obtain structured importance features, including: The LGBFS algorithm is used to evaluate the feature importance of the user basic information data, the basic information of the historical content and the number of user behaviors, and obtain the structured importance features corresponding to the user basic information data, the basic information of the historical content and the number of user behaviors, respectively.

5. The method according to claim 1, characterized in that performing feature importance evaluation on the structured data according to the wrapper feature selection algorithm to obtain structured feature importance; Convert each of the structured data into a plurality of histograms; the plurality of histograms are divided into K bins according to the data interval; Putting the structured data into each bin to obtain a histogram representation of the structured data; Segmenting the histogram representation, determining an optimal segmentation point by gain calculation, and continuing to fit and iteratively construct K decision trees based on the optimal segmentation point using gradient information; Calculate the number of times each feature in the structured data is used for segmentation in the K decision trees and the total gain after segmentation; The structural importance feature is determined by the number of times it is used for segmentation and the total gain.

6. A recommendation method, characterized in that: The method comprises the following steps: Obtain target structured importance features and target text importance features corresponding to target users; After fusing the target structured importance feature and the target text importance feature, the feature is input into a recommendation model to obtain target recommended content; the recommendation model is trained according to the recommendation model training method according to any one of claims 1 to 5; Recommend the target recommended content to the target user.

7. A recommendation model training device, characterized in that: The device comprises: A first acquisition module is configured to acquire structured data and text data; the structured data includes basic user information data, basic information of historical content, and structured first-category user behavior data; and the text data includes second-category user behavior data; A structured feature module, configured to perform feature importance evaluation on the structured data according to a wrapper feature selection algorithm to obtain structured importance features; A text feature module is used to evaluate the feature importance of the text data based on a multi-pointer collaborative attention network to obtain text importance features; The training module is used to fuse the structural importance features and the text importance features and input them into a preset neural network for training to obtain a recommendation model.

8. A recommendation device, characterized in that: The device comprises: The second acquisition module is used to obtain the target structured importance features and target text importance features corresponding to the target user; A prediction module, configured to fuse the target structured importance features and the target text importance features, and input the integrated features into a recommendation model to obtain target recommended content; the recommendation model is obtained according to the recommendation model training method according to any one of claims 1 to 5 or the recommendation model training device according to claim 7; The recommendation module is used to recommend the target recommended content to the target user.

9. A computer device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the recommendation model training method according to any one of claims 1 to 5 or the recommendation method according to claim 6.

10. A computer-readable storage medium, characterized in that The storage medium stores at least one executable instruction, and when the executable instruction is executed on the recommendation device, the recommendation device executes the operation of the recommendation model training method according to any one of claims 1 to 5 or the recommendation method according to claim 6.

Citation Information

Patent Citations

  • Content recommendation model training method, content recommendation method and related device

    CN110413894A

  • Recommendation model training method and device, recommendation method and device, medium and equipment

    CN114117213A