Prediction Method, Device, Storage Medium, and Electronic Device for Object Recommendation
By obtaining and processing the behavioral data of the target user, calculating attention weights and intermediate features, and combining the features of the objects to be recommended for processing, the problem of low prediction accuracy of the existing recommendation system is solved, and higher prediction accuracy and user interest stimulation effect is achieved.
Patent Information
- Application Number
- CN202010177606.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-13
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2040-03-13
AI Technical Summary
The existing recommendation system does not have enough depth to mine user behavior information, resulting in low prediction accuracy of object recommendations.
By obtaining the target user's behavior data, including spatial and temporal features, calculating the spatial and temporal attention weights of the behavioral object, determining intermediate features, and processing them in combination with the features of the object to be recommended, to improve prediction accuracy.
It improves the prediction accuracy of object recommendations, can dig deeper into user behavior information, analyze users' behavior habits at different time periods, thereby stimulating users' interest in recommended objects and saving users' time costs.
Smart Images

Figure CN113392314B_ABST
Abstract
Description
Background Art
[0002] With the continuous development of the Internet industry, while meeting the users' information needs in the information age, it also brings troubles to users, that is, it is difficult for users to quickly find effective information in the vast amount of Internet information. The emergence of the recommendation system can recommend personalized information to users according to the users' information needs, interests and hobbies, etc., so as to guide users to discover their own information needs.
[0003] At present, the recommendation system has been widely applied in many fields. Among them, taking e-commerce as an example, in the existing recommendation system, first, the neural network is used to extract the features of the user's personalized information and the information of the items to be recommended respectively, then, the preference degree of the user for the items to be recommended is predicted according to the extracted features, and finally, the items are recommended according to the prediction results.
[0004] However, the existing technology lacks in-depth mining of the user's behavior information, so the prediction accuracy of the object to be recommended is relatively low.
[0005] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] The present disclosure provides a prediction method for object recommendation, a prediction device for object recommendation, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problem of relatively low prediction accuracy of object recommendation in the prior art.
[0007] Other features and advantages of the present disclosure will become apparent through the following detailed description, or be learned in part through the practice of the present disclosure.
[0008] According to a first aspect of the present disclosure, there is provided a prediction method for object recommendation, including:
[0009] Obtaining the behavior data of a target user within a preset time, where the behavior data includes the spatial features and temporal features of each behavior object of the target user;
[0010] Determining the spatial attention weights of each behavior object according to the spatial features of each behavior object and the spatial features of the object to be recommended, and determining the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended;
[0011] Determining the intermediate features of each behavior object based on the spatial features, temporal features, spatial attention weights and temporal attention weights of each behavior object;
[0012] Process the spatial features and temporal features of the object to be recommended and the intermediate features of each behavior object to obtain a prediction result for recommending the object to be recommended to the target user.
[0013] In an exemplary embodiment of the present disclosure, based on the foregoing solution, before determining the spatial attention weights of each behavior object according to the spatial features of each behavior object and the spatial features of the object to be recommended, the method further includes:
[0014] Use a first embedding network to process the spatial features of each behavior object and the spatial features of the object to be recommended respectively, to obtain the densified spatial features of each behavior object and the densified spatial features of the object to be recommended.
[0015] In an exemplary embodiment of the present disclosure, based on the foregoing solution, before determining the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended, the method further includes:
[0016] Use a second embedding network to process the temporal features of each behavior object and the temporal features of the object to be recommended respectively, to obtain the densified temporal features of each behavior object and the densified temporal features of the object to be recommended.
[0017] In an exemplary embodiment of the present disclosure, based on the foregoing solution, determining the spatial attention weights of each behavior object according to the spatial features of each behavior object and the spatial features of the object to be recommended includes:
[0018] For each behavior object, determine its spatial attention weight by the following method:
[0019] Calculate the outer product of the spatial features of the behavior object and the spatial features of the object to be recommended;
[0020] Concatenate the outer product, the spatial features of the behavior object and the spatial features of the object to be recommended to obtain the spatial concatenated features of the behavior object;
[0021] Use a first fully connected network to map the spatial concatenated features of the behavior object to the spatial attention weight of the behavior object.
[0022] In an exemplary embodiment of the present disclosure, based on the foregoing solution, determining the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended includes:
[0023] For each behavior object, determine its temporal attention weight by the following method:
[0024] Calculate the outer product of the time feature of the behavior object and the time feature of the object to be recommended;
[0025] Concatenate the outer product, the time feature of the behavior object, and the time feature of the object to be recommended to obtain the time concatenation feature of the behavior object;
[0026] Use a second fully connected network to map the time concatenation feature of the behavior object to the time attention weight of the behavior object.
[0027] In an exemplary embodiment of the present disclosure, based on the foregoing solution, after determining the intermediate features of each of the behavior objects, the method further includes:
[0028] Perform pooling processing on the intermediate features of each of the behavior objects respectively to convert the intermediate features of each of the behavior objects into a unified length.
[0029] In an exemplary embodiment of the present disclosure, based on the foregoing solution, processing the spatial feature and time feature of the object to be recommended, and the intermediate features of each of the behavior objects to obtain a prediction result of recommending the object to be recommended to the target user includes:
[0030] Concatenate the spatial feature and time feature of the object to be recommended, and the intermediate features of each of the behavior objects, and perform flattening processing to obtain a flattened feature tensor;
[0031] Use a third fully connected network to process the flattened feature tensor to obtain a prediction result of recommending the object to be recommended to the target user.
[0032] In an exemplary embodiment of the present disclosure, based on the foregoing solution, when obtaining the behavior data of the target user within a preset time, the user portrait data of the target user is also obtained; the concatenating the spatial feature and time feature of the object to be recommended, and the intermediate features of each of the behavior objects, and performing flattening processing to obtain a flattened feature tensor includes:
[0033] Concatenate the spatial feature and time feature of the object to be recommended, the intermediate features of each of the behavior objects, and the user portrait data, and perform flattening processing to obtain the flattened feature tensor.
[0034] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the prediction result includes a prediction probability value; the method further includes:
[0035] When the prediction probability value is greater than a preset threshold, recommend the object to be recommended to the target user.
[0036] According to a second aspect of the present disclosure, there is provided a prediction device for object recommendation, including:
[0037] A behavior data acquisition module, configured to acquire the behavior data of a target user within a preset time, where the behavior data includes the spatial features and temporal features of each behavior object of the target user;
[0038] An attention weight determination module, configured to determine the spatial attention weights of each behavior object according to the spatial features of each behavior object and the spatial features of the object to be recommended, and determine the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended;
[0039] An intermediate feature determination module, configured to determine the intermediate features of each behavior object based on the spatial features and temporal features of each behavior object, the spatial attention weights, and the temporal attention weights;
[0040] A prediction result determination module, configured to process the spatial features and temporal features of the object to be recommended and the intermediate features of each behavior object to obtain a prediction result of recommending the object to be recommended to the target user.
[0041] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned arbitrary method is implemented.
[0042] According to a fourth aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory, configured to store executable instructions of the processor; wherein, the processor is configured to execute the above-mentioned arbitrary method by executing the executable instructions.
[0043] The technical solution of the present disclosure has the following beneficial effects:
[0044] In the technical solutions provided by some embodiments of the present disclosure, first, through the behavior data of the target user within a preset time, the spatial characteristics and temporal characteristics of each behavior object of the target user can be determined; second, through the spatial characteristics of each of the above-mentioned behavior objects and the spatial characteristics of the object to be recommended, and the temporal characteristics of each of the above-mentioned behavior objects and the temporal characteristics of the object to be recommended, the spatial attention weights and temporal attention weights of each of the above-mentioned behavior objects can be determined respectively; then, through the spatial characteristics, temporal characteristics, spatial attention weights, and temporal attention weights of each of the above-mentioned behavior objects, the intermediate characteristics of each behavior object can be determined; finally, by processing the spatial characteristics and temporal characteristics of the object to be recommended and the intermediate characteristics of each behavior object, a prediction result of recommending the object to be recommended to the above-mentioned target user can be obtained. Compared with the existing prediction schemes for object recommendation, in the technical solution of the present disclosure, on the one hand, since both the spatial characteristics and temporal characteristics of each behavior object of the target user are considered, the user behavior information can be mined at a deeper level, and thus the prediction accuracy of object recommendation can be improved; on the other hand, the temporal attention weights determined by the temporal characteristics of each behavior object of the target user and the temporal characteristics of the object to be recommended can analyze the user's behavior habits at different time periods from the information of each behavior object of the user, and thus can stimulate the user's interest in the object to be recommended and save the user's time cost.
[0045] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0047] Figure 1 A flowchart showing the process of a prediction method for object recommendation in this exemplary embodiment;
[0048] Figure 2 A flowchart showing the process of a method for determining spatial attention weights in this exemplary embodiment;
[0049] Figure 3 A flowchart showing the process of a method for determining temporal attention weights in this exemplary embodiment;
[0050] Figure 4 A structural diagram showing a spatial attention mechanism model in this exemplary embodiment;
[0051] Figure 5 Shows a schematic structural diagram of a time attention mechanism model in this exemplary embodiment;
[0052] Figure 6 Shows a schematic flowchart of a method for obtaining a prediction result of recommending the to-be-recommended object to the target user in this exemplary embodiment;
[0053] Figure 7 Shows a block diagram of the structure of a prediction device for object recommendation in this exemplary embodiment;
[0054] Figure 8 Shows a computer-readable storage medium for implementing the above method in this exemplary embodiment;
[0055] Figure 9 Shows an electronic device for implementing the above method in this exemplary embodiment. Detailed implementation manners
[0056] Now, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0057] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0058] In another related art, the neural network is used to extract the features of the user's personalized information and the information of the to-be-recommended object respectively, and then, according to the extracted features, the preference degree of the user for the to-be-recommended object is predicted, and the to-be-recommended object is recommended according to the prediction result.
[0059] However, the existing technologies lack sufficient depth in mining users' behavioral information. Therefore, the prediction accuracy of existing prediction methods for object recommendation needs to be improved.
[0060] In an embodiment of the present disclosure, a prediction method for object recommendation is first provided, which at least to some extent overcomes the defects existing in the above-mentioned related technologies.
[0061] Figure 1 The flowchart of a prediction method for object recommendation in an exemplary embodiment of the present disclosure is shown. Specifically, referring to Figure 1 , the method includes:
[0062] Step S110: Obtain the behavioral data of the target user within a preset time, where the behavioral data includes the spatial features and temporal features of each behavioral object of the target user;
[0063] Step S120: Determine the spatial attention weights of each behavioral object according to the spatial features of each behavioral object and the spatial features of the object to be recommended, and determine the temporal attention weights of each behavioral object according to the temporal features of each behavioral object and the temporal features of the object to be recommended;
[0064] Step S130: Determine the intermediate features of each behavioral object based on the spatial features, temporal features, spatial attention weights, and temporal attention weights of each behavioral object;
[0065] Step S130: Process the spatial features and temporal features of the object to be recommended and the intermediate features of each behavioral object to obtain a prediction result for recommending the object to be recommended to the target user.
[0066] In Figure 1In the technical solution provided by the illustrated embodiment, first, based on the behavioral data of the target user within a preset time, the spatial characteristics and temporal characteristics of each behavioral object of the target user can be determined; second, based on the spatial characteristics of each of the above-mentioned behavioral objects and the spatial characteristics of the object to be recommended, and the temporal characteristics of each of the above-mentioned behavioral objects and the temporal characteristics of the object to be recommended, the spatial attention weights and temporal attention weights of each of the above-mentioned behavioral objects can be determined respectively; third, based on the spatial characteristics, temporal characteristics, spatial attention weights and temporal attention weights of each of the above-mentioned behavioral objects, the intermediate characteristics of each behavioral object can be determined; finally, by processing the spatial characteristics and temporal characteristics of the object to be recommended and the intermediate characteristics of each behavioral object, a prediction result for recommending the object to be recommended to the above-mentioned target user can be obtained. Compared with the existing prediction solutions for object recommendation, in the technical solution of the present disclosure, on the one hand, since both the spatial characteristics and temporal characteristics of each behavioral object of the target user are considered, the user's behavioral information can be mined at a deeper level, thereby improving the prediction accuracy of object recommendation; on the other hand, the temporal attention weights determined based on the temporal characteristics of each behavioral object of the target user and the temporal characteristics of the object to be recommended can analyze the user's behavioral habits at different time periods from the information of each behavioral object of the user, thereby stimulating the user's interest in the object to be recommended and saving the user's time cost.
[0067] Next, Figure 1 a detailed description of the specific implementation manners of each step in the illustrated embodiment will be given:
[0068] In step S110, behavioral data of the target user within a preset time is obtained, and the behavioral data includes the spatial characteristics and temporal characteristics of each behavioral object of the target user.
[0069] In an exemplary implementation manner, the object can be any information that can be obtained through the Internet, including but not limited to messages or news on web pages, advertisements, items on e-commerce platforms, and the like. A behavioral object can be an object that the target user has operated on among the above-mentioned objects. Among them, taking the above-mentioned object as an item on an e-commerce platform as an example, the operation can include clicking, browsing, collecting, purchasing, and the like.
[0070] Exemplarily, the target user can operate on multiple objects within a preset time to determine multiple different behavioral objects and generate multiple pieces of behavioral data. Among them, the preset time can be set according to requirements. For example, it can be one week, 10 days, one month, etc. The behavioral data generated by the target user within the preset time can include the spatial features and temporal features of the above-mentioned various behavioral objects of the target user. Specifically, the spatial feature can be a feature obtained by extracting features from the information of each of the above-mentioned behavioral objects itself. For example, it can be a one-hot (sparse) feature. The temporal feature can be a feature obtained by extracting features from the relevant temporal information of each of the above-mentioned behavioral objects.
[0071] Among them, taking the above-mentioned behavioral object as a commodity on an e-commerce platform as an example, the information of each behavioral object itself can include, but is not limited to, attributes such as the name, type, description information, price, color, material, origin, click volume, purchase volume, etc. of the item. The relevant temporal information of each behavioral object can include the timestamp when the target user operates on the item, and / or the browsing time of the target user on the web page where the item is located.
[0072] For example, target user A clicks on item 1 at time T1. Then item 1 can be a behavioral object of the target user. The spatial feature of the behavioral object can be the one-hot feature obtained by extracting the information of item 1, and the temporal feature of the behavioral object can be the feature obtained by extracting the feature of time T1.
[0073] In an exemplary embodiment, two neural networks can be respectively used to extract features from the information of each of the above-mentioned behavioral objects itself and the temporal information related to the behavioral object, so as to respectively obtain the spatial feature and temporal feature corresponding to each behavioral object.
[0074] After obtaining the behavioral data of the target user within the preset time, in step S120, according to the spatial features of each of the behavioral objects and the spatial features of the object to be recommended, determine the spatial attention weights of each of the behavioral objects, and according to the temporal features of each of the behavioral objects and the temporal features of the object to be recommended, determine the temporal attention weights of each of the behavioral objects.
[0075] In an exemplary embodiment, the spatial feature of the object to be recommended can be a feature obtained by extracting features from the information of the object to be recommended itself. The temporal feature of the object to be recommended can be a feature obtained by extracting features from the temporal information related to the object to be recommended.
[0076] Generally, the spatial features and temporal features of the object to be recommended and the spatial features and temporal features of the above-mentioned behavioral objects can be in the same format and the same dimension.
[0077] In one embodiment, the time information related to the object to be recommended may include the current time, and / or the average time for which the product to be recommended is viewed, etc.
[0078] Exemplarily, before determining the spatial attention weights of each behavioral object based on the spatial characteristics of each behavioral object and the spatial characteristics of the object to be recommended, the first embedding network may also be used to process the spatial characteristics of each behavioral object and the spatial characteristics of the object to be recommended respectively, so as to obtain the densified spatial characteristics of each behavioral object and the densified spatial characteristics of the object to be recommended.
[0079] Similarly, before determining the temporal attention weights of each behavioral object based on the temporal characteristics of each behavioral object and the temporal characteristics of the object to be recommended, the second embedding network may also be used to process the temporal characteristics of each behavioral object and the temporal characteristics of the object to be recommended respectively, to obtain the densified temporal characteristics of each behavioral object and the densified temporal characteristics of the object to be recommended.
[0080] Specifically, the above-mentioned first embedding network and second embedding network may be the Embedding layer of a neural network, which can convert discrete features into continuous features with a fixed length. Among them, the above-mentioned densified spatial characteristics and densified temporal characteristics may be the continuous features with a fixed length.
[0081] Through the Embedding of features, while maintaining the similarity of features, the problem of overfitting of the neural network caused by the sparsity of discrete features can be effectively avoided.
[0082] In an exemplary embodiment, after determining the densified spatial characteristics of each behavioral object and the densified spatial characteristics of the object to be recommended, the spatial attention weights of each behavioral object may be determined according to the spatial characteristics of each behavioral object and the spatial characteristics of the object to be recommended. Exemplarily, for each behavioral object, Figure 2 A flowchart of a method for determining spatial attention weights is shown, and the method may include step S210-step S230.
[0083] In step S210, calculate the outer product of the spatial characteristics of the behavioral object and the spatial characteristics of the object to be recommended.
[0084] In an exemplary embodiment, the spatial characteristics of the behavioral object and the spatial characteristics of the object to be recommended may be the above-mentioned densified spatial characteristics, or the initial spatial characteristics in the above-mentioned step S110.
[0085] After calculating the above-mentioned outer product, in step S220, the outer product, the spatial feature of the behavioral object, and the spatial feature of the object to be recommended are concatenated to obtain the spatial concatenated feature of the behavioral object.
[0086] In an exemplary embodiment, concatenation can be any operation that fuses different features, including but not limited to concat operation, add operation, etc. For example, the feature maps of the above-mentioned outer product, the spatial feature of the behavioral object, and the spatial feature of the object to be recommended can be concatenated along the channel dimension through the concat layer of the neural network to obtain the spatial concatenated feature of the behavioral object.
[0087] After obtaining the spatial concatenated feature of the behavioral object, in step S230, the spatial concatenated feature of the behavioral object is mapped to the spatial attention weight of the behavioral object by using the first fully connected network.
[0088] In an exemplary embodiment, the first fully connected network can be the first fully connected layer of the neural network. The input of this first fully connected layer can include the above-mentioned spatial concatenated feature of the behavioral object, and the output can include the coefficients of the spatial attention weight of the behavioral object.
[0089] Similarly, after determining the densified temporal features of the above-mentioned behavioral objects and the densified temporal feature of the object to be recommended, the temporal attention weights of the behavioral objects can be determined according to the temporal features of the behavioral objects and the temporal feature of the object to be recommended. Exemplarily, for each behavioral object, Figure 3 A flowchart showing a method for determining the temporal attention weight is shown. This method may include steps S310 - step S330.
[0090] In step S310, the outer product of the temporal feature of the behavioral object and the temporal feature of the object to be recommended is calculated.
[0091] In step S320, the outer product, the temporal feature of the behavioral object, and the temporal feature of the object to be recommended are concatenated to obtain the temporal concatenated feature of the behavioral object.
[0092] In step S330, the temporal concatenated feature of the behavioral object is mapped to the temporal attention weight of the behavioral object by using the second fully connected network.
[0093] Among them, the specific implementation details of steps S310 - step S330 correspond exactly to each step in the above steps S210 - step S230, and will not be elaborated here. For example, corresponding to the above step S210, in step S310, the temporal feature can be the densified temporal feature, or the initial temporal feature in the above step S110.
[0094] In an exemplary embodiment, the spatial attention weight of the behavioral object can be determined by the Figure 4 spatial attention mechanism model shown, and the temporal attention weight of the behavioral object can be determined by the Figure 5 temporal attention mechanism model shown.
[0095] Among them, in Figure 4 , the inputs of the spatial attention mechanism model 400 are respectively the spatial feature 410 of the behavioral object of the target user and the spatial feature 420 of the object to be recommended. First, the outer product of 410 and 420 is calculated through the out product layer 430; then, the outer product result calculated in 430, 410, and 420 are concatenated through the concat layer 440 to obtain the spatial concatenated feature; finally, the spatial concatenated feature is input into the dense layer 450, and the spatial attention weight 460 of the behavioral object is output.
[0096] Similarly, the inputs of the temporal attention mechanism model 500 are respectively the temporal feature 510 of the behavioral object of the target user and the temporal feature 520 of the object to be recommended, and the output is the temporal attention weight 560 of the behavioral object. And 530 - 550 in the temporal attention mechanism model 500 correspond to 430 - 450 in the above-mentioned spatial attention model 400.
[0097] It should be noted that, in this exemplary embodiment, the attention weight of the above-mentioned behavioral object is mainly a numerical measure of the user's interest in the object. Therefore, the attention mechanism model may not undergo the normalization process of the softmax layer. In addition, in order to speed up the data processing speed, the spatial attention mechanism model and the temporal attention mechanism model can be used in parallel.
[0098] Through the above steps S210 - step S230 and steps S310 - step S330, the object weight information of the target user's behavior under the current object to be recommended can be obtained.
[0099] Continuing to refer to Figure 1 , after determining the spatial attention weight and the temporal attention weight of each behavioral object, in step S130, based on the spatial feature and temporal feature, spatial attention weight and temporal attention weight of each behavioral object, the intermediate feature of each behavioral object is determined.
[0100] Exemplarily, a specific implementation manner for determining the intermediate feature of each behavioral object may be to weight the spatial feature and temporal feature of each behavioral object by using the spatial attention weight and temporal attention weight of each behavioral object to obtain the intermediate feature of each behavioral object.
[0101] After determining the intermediate features of each behavioral object, the intermediate features of each of the above-mentioned behavioral objects can be respectively subjected to pooling processing. For example, it can be Sum pooling (summation pooling) to convert the intermediate features of each behavioral object into a unified length. Among them, the pooling processing can be to input the above-mentioned intermediate features into the pooling layer of the neural network and then output.
[0102] Taking the behavioral object generated by the target user browsing items on the e-commerce platform as an example, this can solve the problem of inconsistent browsing behaviors of different target users.
[0103] After determining the intermediate features of each behavioral object, in step S140, the spatial features and temporal features of the to-be-recommended object and the intermediate features of each of the behavioral objects are processed to obtain a prediction result for recommending the to-be-recommended object to the target user.
[0104] In an exemplary embodiment, the prediction result may include a prediction probability value, which can represent the confidence level of recommending the above-mentioned to-be-recommended object to the target user. Specifically, when the prediction probability value is greater than a preset threshold, the above-mentioned to-be-recommended object is recommended to the target user; when the prediction probability value is less than the preset threshold, the above-mentioned to-be-recommended object is not recommended to the target user. The preset threshold is a measurement standard determined according to experience and actual application requirements. When the prediction probability value is greater than the preset threshold, it can be considered that the expected benefit obtained by recommending the to-be-recommended object to the target user exceeds the recommendation cost, that is, a positive benefit can be obtained after the recommendation, so the recommendation is made.
[0105] Next, in combination with Figure 6 the above step S140 is described in more detail. Specifically, Figure 6 shows a schematic diagram of obtaining a prediction result for recommending a to-be-recommended object to a target user. For example, referring to Figure 6 , this method may include step S610 - step S620.
[0106] In step S610, the spatial features and temporal features of the above-mentioned to-be-recommended object and the intermediate features of each behavioral object are concatenated and flattened to obtain a flattened feature tensor.
[0107] In an exemplary embodiment, when obtaining the behavioral data of the target user within a preset time, the user portrait data of the target user is also obtained. Among them, the user portrait data may include the age, gender, occupation, purchase item preferences, etc. of the target user.
[0108] Exemplarily, the specific implementation of concatenating the spatial features and temporal features of the object to be recommended, the intermediate features of each behavioral object, and performing flattening processing to obtain a flattened feature tensor can be to concatenate the spatial features and temporal features of the object to be recommended, the intermediate features of each behavioral object, and the user portrait data, and perform flattening processing to obtain a flattened feature tensor.
[0109] Among them, the above-mentioned concatenation can be any operation capable of performing feature fusion, including but not limited to concat operation, add operation, etc. Specifically, the above-mentioned concatenation can be implemented through the concat layer of the neural network.
[0110] After concatenating the spatial features and temporal features of the object to be recommended, the intermediate features of each behavioral object, and the user portrait data, the concatenated features can be flattened to obtain a flattened feature tensor. For example, the above-mentioned flattening can be implemented through the flatten layer of the neural network.
[0111] After obtaining the flattened feature tensor, in step S620, the third fully connected network is used to process the flattened feature tensor to obtain a prediction result of recommending the object to be recommended to the target user.
[0112] In an exemplary embodiment, the above-mentioned third fully connected network can be the third fully connected layer of the neural network. The above-mentioned flattened feature tensor can be mapped to a predicted probability value of the object to be recommended through the third fully connected layer, so as to obtain a prediction result of recommending the object to be recommended to the target user.
[0113] Specifically, the above-mentioned third fully connected layer is connected to an activation function. For example, it can be a dice (data-dependent) activation function, and the specific form of this activation function is as follows:
[0114]
[0115] Among them: E(s) and Var(s) in the above formula (1) respectively represent the expectation and variance of each mini-batch of samples in the training process of the third fully connected network, ε is a very small fixed constant. p(s) is the predicted probability value. s represents the mini-batch of sample sets. The samples can be the above-mentioned flattened feature tensors. Exemplarily, the number of samples in each mini-batch during the training process can be set according to requirements. For example, it can be 32, 64, etc.
[0116] Exemplarily, the entire training process of the above-mentioned neural network can be realized by minimizing the cross-entropy loss function. Specifically, the cross-entropy loss function can refer to the following formula (2).
[0117]
[0118] Wherein, in the above formula (2), s is the sample set for network training, N is the number of samples, y is the training label, and p(x) is the predicted probability of the sample to be recommended.
[0119] In this exemplary embodiment, by simultaneously considering the spatial features and temporal features of each behavioral object of the target user, the user behavior information can be mined more deeply, thereby improving the prediction accuracy of object recommendation.
[0120] Furthermore, in an exemplary embodiment of the present invention, a prediction device for object recommendation is further provided. Specifically, refer to Figure 7 , the prediction device 700 for object recommendation includes: a behavior data acquisition module 710, an attention weight determination module 720, an intermediate feature determination module 730, and a prediction result determination module 740. Wherein:
[0121] The above-mentioned behavior data acquisition module 710 is used to acquire the behavior data of the target user within a preset time, and the behavior data includes the spatial features and temporal features of each behavioral object of the target user;
[0122] The above-mentioned attention weight determination module 720 is used to determine the spatial attention weights of each behavioral object according to the spatial features of each behavioral object and the spatial features of the object to be recommended, and to determine the temporal attention weights of each behavioral object according to the temporal features of each behavioral object and the temporal features of the object to be recommended;
[0123] The above-mentioned intermediate feature determination module 730 is used to determine the intermediate features of each behavioral object based on the spatial features and temporal features, spatial attention weights and temporal attention weights of each behavioral object;
[0124] The above-mentioned prediction result determination module 740 is used to process the spatial features and temporal features of the object to be recommended and the intermediate features of each behavioral object to obtain a prediction result of recommending the object to be recommended to the target user.
[0125] In an exemplary embodiment of the present disclosure, based on the foregoing embodiment, the above-mentioned attention weight determination module 720 includes a densified spatial feature determination unit, a densified temporal feature determination unit, a spatial attention weight determination unit, and a temporal attention weight determination unit. Wherein:
[0126] The above-mentioned densified spatial feature determination unit is used to process the spatial features of each of the above-mentioned behavioral objects and the spatial features of the above-mentioned object to be recommended by using a first embedding network to obtain the densified spatial features of each of the above-mentioned behavioral objects and the densified spatial features of the above-mentioned object to be recommended;
[0127] The above-mentioned densification time feature determination unit is configured to use the second embedding network to process the time features of each of the above-mentioned behavior objects and the time features of the above-mentioned object to be recommended, so as to obtain the densified time features of each of the above-mentioned behavior objects and the densified time features of the above-mentioned object to be recommended;
[0128] The above-mentioned spatial attention weight determination unit is configured to determine the spatial attention weight of each of the above-mentioned behavior objects;
[0129] The above-mentioned time attention weight determination unit is configured to determine the time attention weight of each of the above-mentioned behavior objects;
[0130] Wherein, the above-mentioned spatial attention weight determination unit specifically is configured to:
[0131] Calculate the outer product of the spatial features of the above-mentioned behavior object and the spatial features of the above-mentioned object to be recommended;
[0132] Concatenate the above-mentioned outer product, the spatial features of the above-mentioned behavior object and the spatial features of the above-mentioned object to be recommended to obtain the spatial concatenated features of the above-mentioned behavior object;
[0133] Use the first fully connected network to map the above-mentioned spatial concatenated features of the above-mentioned behavior object to the spatial attention weight of the above-mentioned behavior object;
[0134] Wherein, the above-mentioned time attention weight determination unit specifically is configured to:
[0135] Calculate the outer product of the time features of the above-mentioned behavior object and the time features of the above-mentioned object to be recommended;
[0136] Concatenate the above-mentioned outer product, the time features of the above-mentioned behavior object and the time features of the above-mentioned object to be recommended to obtain the time concatenated features of the above-mentioned behavior object;
[0137] Use the second fully connected network to map the time concatenated features of the above-mentioned behavior object to the time attention weight of the above-mentioned behavior object.
[0138] In an exemplary embodiment of the present disclosure, based on the foregoing embodiment, the above-mentioned intermediate feature determination module 730 is further specifically configured to:
[0139] Use the spatial attention weight and time attention weight of each of the above-mentioned behavior objects to weight the spatial features and time features of each of the above-mentioned behavior objects to obtain the intermediate features of each of the above-mentioned behavior objects; and
[0140] Perform pooling processing on the intermediate features of each of the above-mentioned behavior objects respectively, so as to convert the intermediate features of each of the above-mentioned behavior objects into a unified length.
[0141] In an exemplary embodiment of the present disclosure, based on the foregoing embodiments, the above-mentioned prediction result determination module 740 includes a user profile data acquisition unit, a flattening processing unit, and a prediction result determination unit. Specifically:
[0142] The above-mentioned user profile data acquisition unit is configured to, when acquiring the behavior data of the target user within a preset time, also acquire the user profile data of the above-mentioned target user;
[0143] The above-mentioned flattening processing unit is configured to splice the spatial features and temporal features of the above-mentioned object to be recommended, the intermediate features of each of the above-mentioned behavior objects, and the above-mentioned user profile data, and perform flattening processing to obtain a flattened feature tensor;
[0144] The above-mentioned prediction result determination unit is configured to process the above-mentioned flattened feature tensor by using a third fully connected network to obtain a prediction result of recommending the above-mentioned object to be recommended to the above-mentioned target user, where the prediction result includes a prediction probability value. Specifically, when the prediction probability value is greater than a preset threshold, the above-mentioned object to be recommended is recommended to the above-mentioned target user.
[0145] The specific details of each module / unit in the above-mentioned device have been described in detail in the implementation manner of the method part. The details not disclosed can be referred to the implementation manner content of the method part, and thus will not be elaborated here.
[0146] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation manner, a complete software implementation manner (including firmware, microcode, etc.), or an implementation manner combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "system" here.
[0147] The exemplary embodiment of the present disclosure also provides a computer-readable storage medium, on which a program product capable of implementing the above method of this specification is stored. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "exemplary method" part of this specification.
[0148] Refer to Figure 8As shown, a program product 800 for implementing the above method according to an exemplary embodiment of the present disclosure is described. It may be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0149] The program product may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0150] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0151] The program code contained on the readable medium may be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0152] Program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0153] Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above method. Referring below to Figure 9 describe the electronic device 900 according to such an exemplary embodiment of the present disclosure. Figure 9 The electronic device 900 shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0154] As Figure 9 shown, the electronic device 900 can be presented in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
[0155] The storage unit 920 stores program code, and the program code can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 910 can execute Figures 1 to 6 any one or more of the method steps.
[0156] In some embodiments, the electronic device 900 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
[0157] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 921 and / or a cache storage unit 922, and may further include a read-only storage unit (ROM) 923.
[0158] The storage unit 920 may also include a program / utilities 924 having a set (at least one) of program modules 925. Such program modules 925 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.
[0159] The bus 930 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.
[0160] The electronic device 900 may also communicate with one or more external devices 1000 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be through an input / output (I / O) interface 950. Moreover, the electronic device 900 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 960. As shown in the figure, the network adapter 960 communicates with other modules of the electronic device 900 through the bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0161] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiments of the present disclosure.
[0162] In addition, the above drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above drawings do not indicate or limit the time sequence of these processes. Additionally, it is also easy to understand that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0163] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, such division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of the two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by a plurality of modules or units.
[0164] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the claims.
[0165] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A prediction method for object recommendation, characterized in that, Including: Obtain the behavior data of the target user within a preset time, where the behavior data includes the spatial features and temporal features of each behavior object of the target user; Determine the spatial attention weights of each behavior object according to the spatial features of each behavior object and the spatial features of the object to be recommended, and determine the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended; Based on the spatial features, temporal features, spatial attention weights, and temporal attention weights of each behavior object, determine the intermediate features of each behavior object; Process the spatial features and temporal features of the object to be recommended and the intermediate features of each behavior object to obtain a prediction result for recommending the object to be recommended to the target user; Among them, determining the spatial attention weights of each behavior object according to the spatial features of each behavior object and the temporal features of the object to be recommended includes: determining the spatial attention weights of the behavior objects based on a spatial attention mechanism model according to the spatial features of each behavior object and the temporal features of the object to be recommended; determining the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended includes: determining the temporal attention weights of each behavior object based on a temporal attention mechanism model according to the temporal features of each behavior object and the temporal features of the object to be recommended; the temporal attention weights and spatial attention weights are used to characterize the degree of interest of the user in each behavior object; The behavior objects include the objects operated by the target user, the spatial features of each behavior object include the features obtained by performing feature extraction on the self-information of the behavior object, and the temporal features of each behavior object include the features obtained by performing feature extraction on the operation time information of the target user on the behavior object; Based on the spatial features, temporal features, spatial attention weights, and temporal attention weights of each behavior object, determining the intermediate features of each behavior object includes: using the spatial attention weights and temporal attention weights of each behavior object to weight the spatial features and temporal features of each behavior object to obtain the intermediate features of each behavior object.
2. The method according to claim 1, characterized in that, Before determining the spatial attention weights of each behavior object according to the spatial features of each behavior object and the spatial features of the object to be recommended, the method further includes: Use a first embedding network to process the spatial features of each behavior object and the spatial features of the object to be recommended respectively to obtain the densified spatial features of each behavior object and the densified spatial features of the object to be recommended.
3. The method according to claim 1, characterized in that, Before determining the temporal attention weights of each behavior object according to the temporal features of each behavior object and the temporal features of the object to be recommended, the method further includes: Use a second embedding network to process the temporal features of each behavior object and the temporal features of the object to be recommended respectively to obtain the densified temporal features of each behavior object and the densified temporal features of the object to be recommended.
4. The method according to claim 1, characterized in that, Determining the spatial attention weights of each of the behavioral objects according to the spatial characteristics of each of the behavioral objects and the spatial characteristics of the object to be recommended includes: For each of the behavioral objects, determining its spatial attention weight by the following method: Calculating the outer product of the spatial characteristics of the behavioral object and the spatial characteristics of the object to be recommended; Concatenating the outer product, the spatial characteristics of the behavioral object, and the spatial characteristics of the object to be recommended to obtain the spatial concatenated characteristics of the behavioral object; Using a first fully connected network to map the spatial concatenated characteristics of the behavioral object to the spatial attention weight of the behavioral object.
5. The method according to claim 1, characterized in that, Determining the temporal attention weights of each of the behavioral objects according to the temporal characteristics of each of the behavioral objects and the temporal characteristics of the object to be recommended includes: For each of the behavioral objects, determining its temporal attention weight by the following method: Calculating the outer product of the temporal characteristics of the behavioral object and the temporal characteristics of the object to be recommended; Concatenating the outer product, the temporal characteristics of the behavioral object, and the temporal characteristics of the object to be recommended to obtain the temporal concatenated characteristics of the behavioral object; Using a second fully connected network to map the temporal concatenated characteristics of the behavioral object to the temporal attention weight of the behavioral object.
6. The method according to claim 1, characterized in that, After determining the intermediate characteristics of each of the behavioral objects, the method further includes: Performing pooling processing on the intermediate characteristics of each of the behavioral objects respectively to convert the intermediate characteristics of each of the behavioral objects into a unified length.
7. The method according to claim 1, characterized in that, Processing the spatial characteristics and temporal characteristics of the object to be recommended and the intermediate characteristics of each of the behavioral objects to obtain a prediction result of recommending the object to be recommended to the target user includes: Concatenating the spatial characteristics and temporal characteristics of the object to be recommended and the intermediate characteristics of each of the behavioral objects, and performing flattening processing to obtain a flattened feature tensor; Using a third fully connected network to process the flattened feature tensor to obtain a prediction result of recommending the object to be recommended to the target user.
8. The method according to claim 7, characterized in that, When obtaining the behavioral data of the target user within a preset time, the user portrait data of the target user is also obtained; the concatenating the spatial characteristics and temporal characteristics of the object to be recommended and the intermediate characteristics of each of the behavioral objects, and performing flattening processing to obtain a flattened feature tensor includes: Concatenating the spatial characteristics and temporal characteristics of the object to be recommended, the intermediate characteristics of each of the behavioral objects, and the user portrait data, and performing flattening processing to obtain the flattened feature tensor.
9. The method according to any one of claims 1 to 8, characterized in that, The prediction result includes a prediction probability value; the method further includes: When the prediction probability value is greater than a preset threshold, recommending the object to be recommended to the target user.
10. A prediction device for object recommendation, characterized in that, Including: A behavioral data acquisition module, configured to acquire the behavioral data of the target user within a preset time, where the behavioral data includes the spatial characteristics and temporal characteristics of each behavioral object of the target user; An attention weight determination module, configured to determine the spatial attention weights of the behavior objects according to the spatial features of the behavior objects and the spatial features of the object to be recommended, and determine the temporal attention weights of the behavior objects according to the temporal features of the behavior objects and the temporal features of the object to be recommended; An intermediate feature determination module, configured to determine the intermediate features of the behavior objects based on the spatial features and temporal features of the behavior objects, the spatial attention weights, and the temporal attention weights; A prediction result determination module, configured to process the spatial features and temporal features of the object to be recommended and the intermediate features of the behavior objects to obtain a prediction result for recommending the object to be recommended to the target user; Wherein, determining the spatial attention weights of the behavior objects according to the spatial features of the behavior objects and the temporal features of the object to be recommended includes: determining the spatial attention weights of the behavior objects based on a spatial attention mechanism model according to the spatial features of the behavior objects and the temporal features of the object to be recommended; determining the temporal attention weights of the behavior objects according to the temporal features of the behavior objects and the temporal features of the object to be recommended includes: determining the temporal attention weights of the behavior objects based on a temporal attention mechanism model according to the temporal features of the behavior objects and the temporal features of the object to be recommended; the temporal attention weights and the spatial attention weights are used to represent the degree of interest of the user in the behavior objects; The behavior objects include the objects operated by the target user, the spatial features of the behavior objects include the features obtained by performing feature extraction on the self-information of the behavior objects, and the temporal features of the behavior objects include the features obtained by performing feature extraction on the operation time information of the target user on the behavior objects; Determining the intermediate features of the behavior objects based on the spatial features and temporal features of the behavior objects, the spatial attention weights, and the temporal attention weights includes: using the spatial attention weights and temporal attention weights of each behavior object to weight the spatial features and temporal features of each behavior object to obtain the intermediate features of each behavior object.
11. A computer-readable storage medium, on which a computer program is stored, characterized in that, The computer program, when executed by a processor, implements the method according to any one of claims 1 to 9.
12. An electronic device, characterized in that, Including: A processor; And A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method according to any one of claims 1 to 9 by executing the executable instructions.
Citation Information
Patent Citations
Recurrent neural network interest site recommendation method based on space-time periodic attention mechanism
CN110399565A