Method, device, computer device and storage medium for recommending objects
By obtaining target user and object features from the feature set that maximizes the relative willingness value and using a multi-layer perception model for mapping processing, the problem of inaccurate recommendation results in traditional recommendation methods is solved, and accurate object recommendations and improved user experience are achieved.
Patent Information
- Application Number
- CN202110639633.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-08
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-06-08
AI Technical Summary
Traditional object recommendation methods cannot accurately express the user's willingness to use each object, resulting in inaccurate recommendation results.
By obtaining the target user's features and the object features of the candidate objects from the feature set that maximizes the cumulative value of the relative willingness value, a multi-layer perception model is used for mapping processing to determine the predicted recommendation results and screen out the target recommendation objects.
It achieves accurate recommendation of objects, improves the accuracy of recommendation results and user experience.
Smart Images

Figure CN115455276B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for recommending an object. Background Art
[0002] With the development of computer technology, more and more human-computer interaction scenarios have emerged. For example, users interact with everyday objects, such as mini-programs running within applications, official accounts, and visited web pages, greatly facilitating daily business operations, travel, shopping, information verification, and other aspects of their daily lives. The display of interactive objects on the interactive interface is generally fixed by the system default or customized by the user.
[0003] However, traditional object recommendation methods generally recommend objects that users have used recently. Based on this object recommendation method, it cannot accurately express the user's willingness to use each object, resulting in inaccurate recommendation results. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for recommending objects that can accurately recommend objects in response to the above technical problems.
[0005] A method for recommending an object, the method comprising:
[0006] Obtaining, from the feature set that maximizes the cumulative value of the relative willingness value, the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object; the relative willingness value is the difference between the willingness value of any user identifier corresponding to a used object and the willingness value of the user identifier corresponding to an unused object, wherein the willingness value is positively correlated with the user's features corresponding to the corresponding user identifier and with the object features of the corresponding object;
[0007] For each candidate recommendation object, determining a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user;
[0008] According to the predicted recommendation result, a target recommended object is screened out from the candidate recommended objects, and the target recommended object is recommended based on the target user identifier.
[0009] In one embodiment, the method for recommending an object further includes:
[0010] According to the update cycle, the object features and user features in the feature set are updated based on the used objects and unused objects corresponding to each user identification in each update cycle.
[0011] A device for recommending an object, the device comprising:
[0012] a feature acquisition module configured to acquire, from a feature set that maximizes the cumulative value of the relative willingness value, the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object; the relative willingness value being the difference between the willingness value corresponding to a used object for any user identifier and the willingness value corresponding to an unused object for the same user identifier, the willingness value being positively correlated with the user's features corresponding to the corresponding user identifier and with the object features of the corresponding object;
[0013] A recommendation result prediction module is used to determine, for each candidate recommendation object, a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user;
[0014] The object recommendation module is used to filter out a target recommended object from the candidate recommended objects according to the predicted recommendation result, and recommend the target recommended object based on the target user identifier.
[0015] In one embodiment, the device for recommending objects further comprises a model determination module;
[0016] The model determination module is used to obtain target scene mode data matching the target user identifier and determine a prediction model corresponding to the target scene mode data;
[0017] The recommendation result prediction module is further used to input the corresponding object features and the target user features into the prediction model for each candidate recommendation object to obtain the predicted recommendation result corresponding to each candidate recommendation object.
[0018] In one embodiment, the device for recommending objects further includes a data acquisition module and a model search module;
[0019] The data acquisition module is used to acquire target scene mode data that matches the target user identifier;
[0020] The model search module is used to search for a target multi-layer perception model that matches the target scene pattern data from candidate multi-layer perception models constructed based on the scene pattern data;
[0021] The recommendation result prediction module is also used to input the corresponding object features and the target user features into the target multi-layer perception model for each candidate recommendation object, perform multi-layer perception mapping processing based on the target multi-layer perception model, and determine the predicted recommendation result corresponding to each candidate recommendation object.
[0022] In one embodiment, the device for recommending objects further includes a data arrangement and combination module and a multi-layer perception model construction module:
[0023] The data permutation and combination module is used to permutate and combine the candidate scene mode data corresponding to each scene mode dimension to obtain multiple groups of scene mode data;
[0024] The multi-layer perception model construction module is used to extract corresponding scene pattern features for each set of scene pattern data to construct a model, and obtain a candidate multi-layer perception model corresponding to each set of scene pattern data.
[0025] In one embodiment, the multi-layer perception model building module includes an initial model building module and a model optimization module;
[0026] The initial model building module is used to extract corresponding scene pattern features for each set of scene pattern data to build a model, thereby obtaining an initial multi-layer perception model corresponding to each set of scene pattern data;
[0027] The model optimization module is used to calculate the corresponding loss value based on the predicted recommendation results and actual results of each sample object corresponding to the corresponding scene pattern data, perform error backpropagation based on the loss value, optimize the initial multi-layer perception parameters of the initial multi-layer perception model, and obtain a candidate multi-layer perception model corresponding to each set of scene pattern data.
[0028] In one embodiment, the target scene mode data includes a region attribute corresponding to the target user identifier and a state time corresponding to the region attribute;
[0029] The data acquisition module includes a geographic location information acquisition module, a regional attribute and state time determination module;
[0030] The geographic location information acquisition module is used to acquire the geographic location information collected by the terminal corresponding to the target user identifier when responding to the user interaction operation;
[0031] The region attribute and status time determination module is used to obtain the corresponding status time based on the geographical location information and determine the region attribute of the region corresponding to the geographical location information.
[0032] In one embodiment, the target recommendation object includes a target recommendation sub-application for running in a running environment of a parent application;
[0033] The geographic location information acquisition module is further configured to acquire the geographic location information collected by the terminal when the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page;
[0034] The object recommendation module is also used to push the recommendation information of the target recommendation sub-application to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommendation sub-application and displaying the target recommendation sub-application on the sub-application access page.
[0035] In one embodiment, the device for recommending objects further includes a feature initialization module, a willingness value determination module, and a feature optimization module;
[0036] The feature initialization module is used to randomly initialize the feature set to obtain the initial user feature corresponding to each user identifier and the initial object feature corresponding to each object;
[0037] The willingness value determination module is configured to obtain, for each user identifier, a willingness value corresponding to a used object and a willingness value corresponding to an unused object based on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object and the unused object;
[0038] The feature optimization module is used to optimize the features of the initial user and the initial object features until the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object is maximized.
[0039] In one embodiment, the willingness value determination module includes an object classification module and a willingness value calculation module;
[0040] The object classification module is used to obtain object usage record data corresponding to each user identifier and determine the used objects corresponding to each user identifier; for each user identifier, remove the used objects corresponding to the corresponding user identifier from the full object set to obtain unused objects corresponding to each user identifier;
[0041] The willingness value calculation module is used to perform vector dot multiplication processing on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object for each user identifier to obtain the willingness value of each user identifier corresponding to the used object, and to perform vector dot multiplication processing on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding unused object to obtain the willingness value of each user identifier corresponding to the unused object.
[0042] In one embodiment, the feature optimization module is further configured to perform feature optimization on the initial user features and the initial object features based on the invoked loss function, so as to minimize a function value of the loss function, wherein the function value of the loss function is negatively correlated with a cumulative value of a difference between a willingness value of each user identifier corresponding to a used object and a willingness value of the user identifier corresponding to an unused object;
[0043] The feature acquisition module is further configured to acquire the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object from the feature set that minimizes the function value of the loss function.
[0044] In one embodiment, the feature optimization module includes a partial derivative processing module and an initial feature optimization module;
[0045] The partial derivative processing module is used to call the loss function, calculate the partial derivative of the loss function based on the initial user characteristics and the initial object characteristics, and obtain the partial derivative;
[0046] The initial feature optimization module is used to perform feature optimization on the initial user features and the initial object features based on the partial derivatives, so as to minimize the function value of the loss function.
[0047] In one embodiment, the device for recommending objects further includes a function value calculation module of a loss function;
[0048] The function value calculation module of the loss function is used to accumulate the function value of the loss function for each triple consisting of a user identifier, a used object corresponding to the user identifier, and an unused object, based on the cumulative value of the negative natural logarithm of the sigmoid function value corresponding to each triple and the reference norm corresponding to the user's feature matrix and the object feature matrix; wherein the sigmoid function value corresponding to the triple is the output value obtained by inputting the difference between the willingness value of the used object corresponding to the corresponding user identifier and the willingness value of the unused object corresponding to the user identifier into the sigmoid function in the loss function; the user's feature matrix is a matrix composed of the features of each user; the object feature matrix is a matrix composed of the features of each object; and the reference norm is positively correlated with the norm of the feature matrix.
[0049] In one embodiment, the device for recommending objects further includes: a feature set updating module for updating the object features and user features in the feature set according to an update cycle and based on the used objects and unused objects corresponding to each user identifier in each update cycle.
[0050] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0051] Obtaining, from the feature set that maximizes the cumulative value of the relative willingness value, the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object; the relative willingness value is the difference between the willingness value of any user identifier corresponding to a used object and the willingness value of the user identifier corresponding to an unused object, wherein the willingness value is positively correlated with the user's features corresponding to the corresponding user identifier and with the object features of the corresponding object;
[0052] For each candidate recommendation object, determining a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user;
[0053] According to the predicted recommendation result, a target recommended object is screened out from the candidate recommended objects, and the target recommended object is recommended based on the target user identifier.
[0054] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0055] Obtaining, from the feature set that maximizes the cumulative value of the relative willingness value, the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object; the relative willingness value is the difference between the willingness value of any user identifier corresponding to a used object and the willingness value of the user identifier corresponding to an unused object, wherein the willingness value is positively correlated with the user's features corresponding to the corresponding user identifier and with the object features of the corresponding object;
[0056] For each candidate recommendation object, determining a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user;
[0057] According to the predicted recommendation result, a target recommended object is screened out from the candidate recommended objects, and the target recommended object is recommended based on the target user identifier.
[0058] The above-mentioned method, apparatus, computer equipment and storage medium for recommending objects obtain the characteristics of the target user corresponding to the target user identifier and the object characteristics corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness value; the relative willingness value is the difference between the willingness value of any user identifier corresponding to a used object and the willingness value of the user identifier corresponding to an unused object, and the willingness value is positively correlated with the characteristics of the user corresponding to the corresponding user identifier, and is positively correlated with the object characteristics of the corresponding object, so that the feature expression of the characteristics of the target user and the object characteristics is more precise, and then for each candidate recommendation object, at least based on the corresponding object characteristics and the characteristics of the target user, the predicted recommendation result corresponding to each candidate recommendation object is accurately obtained; according to the predicted recommendation result, the target recommendation object is screened out from the candidate recommendation objects, and the target recommendation object is recommended based on the target user identifier, thereby achieving accurate recommendation of the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A diagram of an application environment for a method of recommending an object in one embodiment;
[0060] Figure 2 A flowchart of a method for recommending an object in one embodiment;
[0061] Figure 3 Schematic diagram of the structure of a multi-layer perceptron in one embodiment;
[0062] Figure 4 A schematic diagram of a page for entering a sub-application access page in one embodiment;
[0063] Figure 5 A schematic diagram of a sub-application access page in another embodiment;
[0064] Figure 6 A flowchart of a method for recommending an object in another embodiment
[0065] Figure 7 A flowchart of a method for recommending an object in another embodiment;
[0066] Figure 8 A structural block diagram of functional modules corresponding to a method for recommending an object in an embodiment;
[0067] Figure 9 is a schematic diagram of a data processing flow for predicting each candidate object in one embodiment;
[0068] Figure 10 A schematic diagram of a page showing recommended mini-programs in one embodiment;
[0069] Figure 11A structural block diagram of an apparatus for recommending an object in one embodiment;
[0070] Figure 12 is a diagram of the internal structure of a computer device in one embodiment;
[0071] Figure 13 FIG. 1 is a diagram showing the internal structure of an input and output device in one embodiment. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0073] The solutions provided in the embodiments of this application may involve technologies such as artificial intelligence (AI) and machine learning (ML). Artificial intelligence (AI) refers to the theories, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to perceive, reason, and make decisions. Machine learning is a multidisciplinary interdisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of AI and the fundamental way to make computers intelligent. Its applications span all areas of AI. Based on technologies such as artificial intelligence and machine learning, it is possible to obtain the characteristics of the target user corresponding to the target user ID and the object characteristics corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness value; the relative willingness value is the difference between the willingness value of any user ID corresponding to a used object and the willingness value of the user ID corresponding to an unused object. The willingness value is positively correlated with the characteristics of the user corresponding to the corresponding user ID, and is positively correlated with the object characteristics of the corresponding object, so that the feature expression of the target user's characteristics and the object characteristics is more precise, and then for each candidate recommendation object, at least based on the corresponding object characteristics and the characteristics of the target user, the predicted recommendation result corresponding to each candidate recommendation object is accurately obtained; according to the predicted recommendation result, the target recommendation object is screened out from the candidate recommendation objects, and the target recommendation object is recommended based on the target user ID, thereby achieving accurate recommendation of the object.
[0074] The method for recommending objects provided in this application can be applied to Figure 1 In the application environment shown. In the application environment, a computer device, such as a server 104 or a terminal 102, is provided. The method for recommending objects can be applied to the server 104 or the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. Taking the method for recommending objects as applicable to the server 104 as an example, the server 104 obtains the characteristics of the target user corresponding to the target user identifier and the object characteristics corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness value; the relative willingness value is the difference between the willingness value of any user identifier corresponding to a used object and the willingness value of the user identifier corresponding to an unused object, and the willingness value is positively correlated with the characteristics of the user corresponding to the corresponding user identifier and the object characteristics of the corresponding object; the server 104 determines, for each candidate recommendation object, a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user; the server 104 filters out the target recommendation object from the candidate recommendation objects according to the predicted recommendation result, and recommends the target recommendation object to the terminal 102 where the target user identifier is located. The terminal 102 may receive the recommendation information of the target recommended object and automatically display the target recommended object, or display the target recommended object based on user operation, such as Figure 1 As shown, the target recommendation object can be a small program for running in the application. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, portable wearable devices and vehicle terminals, and the server 104 can be implemented as an independent server or a server cluster composed of multiple servers.
[0075] In one embodiment, Figure 2 As shown, a method for recommending objects is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps:
[0076] Step 202 : From the feature set that maximizes the cumulative value of the relative willingness value, obtain the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object.
[0077] Among them, the relative willingness value is the difference between the willingness value of any user ID corresponding to a used object and the willingness value of the user ID corresponding to an unused object. The willingness value is used to describe the user's willingness to use an object. The stronger the user's willingness to use an object, the higher the corresponding willingness value. The lower the user's willingness to use an object, the lower the corresponding willingness value. The willingness value is positively correlated with the characteristics of the user corresponding to the corresponding user ID, and positively correlated with the object characteristics of the corresponding object. For example, taking the example of an object that can be used by the user as a mini-program that can be run in the operating environment of the application, based on the user characteristics of user u and the mini-program characteristics of mini-program i obtained from the feature set that maximizes the cumulative value of the relative willingness value, if user u frequently uses mini-program i, the dot product of the user characteristics of user u and the object characteristics of mini-program i, that is, the willingness value, is larger, which means that user u frequently uses mini-program i. On the contrary, if u rarely uses or has never used mini program i, the corresponding dot product result, that is, the willingness value, will be smaller. Correspondingly, the difference in willingness values between the mini programs used by the user and the mini programs not used by the user, that is, the relative willingness value will also be larger, thereby ensuring that the user features and object features obtained from the feature set that maximizes the cumulative value of the relative willingness value can accurately represent the user's willingness to use the object.
[0078] The feature set includes user features corresponding to each user ID and object features corresponding to each object. A user ID represents the user's login identity. Different users have different IDs, and the same user may have different user IDs when logged in using different accounts. User features are a characterization of object usage based on the user ID. An object is an application available to a user. Specifically, an object can be a sub-application that can run within the application's runtime environment. An object ID is a characterization of how an object is being used.
[0079] The user features and object features in the feature set can be obtained by performing association analysis and feature optimization on all users and all objects. All users refer to the set consisting of each user who can use any object, and all objects refer to the set consisting of objects that can be used by users. Performing association analysis on all users and all objects refers to the process of analyzing each user in the full set of users and each object in the full set of objects based on whether any user has usage behavior on any object. Feature optimization refers to the process of optimizing based on randomly initialized initial features. It should be noted that the user identifiers and object identifiers in the feature set are obtained through feature optimization based on the randomly initialized user features and object features, with the goal of maximizing the cumulative value of the relative willingness value, and are not directly obtained based on the data of each user using the object. Furthermore, the feature set can specifically be the features of the users corresponding to all user identifiers and the object features corresponding to all objects, so as to ensure the accuracy of the calculated cumulative value of the relative willingness value, thereby improving the accuracy of the features of the users corresponding to the user identifiers and the object features corresponding to the objects.
[0080] The target user ID refers to the ID corresponding to the user for whom object recommendations are to be made. The computer device can identify the corresponding user ID through user interaction to determine the target user ID, or it can determine the target user ID based on configured trigger conditions and user information. For example, when a user performs an interactive operation, the computer device determines the target user ID by responding to the user's interactive operation. For another example, when a terminal meets the configured trigger conditions, the target user ID is determined based on the user information of the user logged in at the terminal. Through user ID matching, the characteristics of the target user corresponding to the target user ID can be retrieved from the feature set.
[0081] The candidate recommended objects refer to objects in the selectable range of the target recommended objects recommended to the user, and can specifically be all objects available to the user, including objects used by the user and objects not used by the user.
[0082] Specifically, the computer device obtains the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness values. In a specific application, based on the target user identifier corresponding to the currently logged-in user, the computer device obtains the target user's features corresponding to the target user identifier from the feature set that maximizes the cumulative value of the relative willingness values, and obtains the object features corresponding to each candidate object from the feature set.
[0083] Step 204 : For each candidate recommendation object, a predicted recommendation result corresponding to each candidate recommendation object is determined based on at least the corresponding object characteristics and the characteristics of the target user.
[0084] Candidate recommendation objects refer to optional recommendation objects recommended to the user corresponding to the target user identifier. Specifically, the objects corresponding to each object feature in the feature set can be candidate recommendation objects. The computer device performs predictions on the combination of the object features corresponding to each candidate recommendation object and the user features corresponding to the target user identifier. The prediction process can be: performing multi-layer perception mapping processing based on at least the corresponding object features and the target user features to determine the predicted recommendation results corresponding to each candidate recommendation object. Furthermore, the prediction process can also perform multi-layer perception mapping processing based on the features of the user corresponding to the target user identifier, the scene pattern features, and the object features corresponding to the candidate recommendation object. Among them, the scene pattern features refer to the characterization representation of the scene pattern data matching the target user identifier. The scene pattern data can be collected in real time or obtained from pre-stored data. For example, the real-time collection can be changing information such as time and place, and the pre-stored data can be periodically changing information, such as the user's usage of the object.
[0085] The mapping process of multi-layer perception refers to the process of mapping data based on multiple dimensions to a single data. Specifically, the mapping process of multi-layer perception can be implemented by a multi-layer perceptron (also known as an artificial neural network model). Figure 3 As shown in the figure, a multilayer perceptron includes multiple hidden layers in addition to the input and output layers. The layers of the multilayer perceptron are fully connected. Specifically, the bottom layer of the multilayer perceptron is the input layer, the middle layer is the hidden layer, and the last layer is the output layer. The neurons in the hidden layer are fully connected to the input layer. Assume that the input layer is represented by vector X. Figure 3 X1, X2, ...X in n Represent the output of n input units in the input layer, and the output of the hidden layer is represented by vector m. Figure 3 m1, m2, ...m in i Represent the output of the i neurons in the hidden layer respectively. The output m of the hidden layer can be represented by f (W1X+b1), where W1 is the connection coefficient between the input layer and the hidden layer, b1 is the bias from the input layer to the hidden layer, and the function f can be the commonly used sigmoid function or tanh (hyperbolic tangent function). Among them, the sigmoid function can be used to represent the output of the hidden layer neurons. The value range of the sigmoid function is (0,1), which can map a real number to the interval (0,1) for binary classification. Its expression is: sigmoid (x) = 1 / (1+e -x). The tanh function is the ratio of the hyperbolic sine function (sinh) to the hyperbolic cosine function (cosh), which can map a real number to the interval (-1,1). Its expression is: tanh (x) = sinh (x) / cosh (x) = (e x -e -x ) / ( e x +e -x ). The hidden layer to the output layer is a multi-category logistic regression, also known as softmax regression. The output of the output layer is: softmax(W2m+b2), where m represents the output of the hidden layer f(W1X+b1), W2 is the connection coefficient between the hidden layer and the output layer, and b2 is the bias from the hidden layer to the output layer. The mapping process of multi-layer perception is essentially to use at least the user's features and object features as the input data of the multi-layer perceptron, and perform mapping processing based on the parameters of each layer in the multi-layer perceptron. The output result is the predicted recommendation result for the candidate recommendation object in the corresponding scene mode.
[0086] The parameters of each layer in the multilayer perceptron include the connection weights and biases between the layers, including W1, b1, W2, b2, etc. The parameters of each layer in the multilayer perceptron can be determined through model training. The specific training process includes: first randomly initializing all parameters of the multilayer perceptron, then iteratively training, continuously calculating gradients and updating parameters until the training end condition is met. The training end condition can be at least one of the following conditions: accuracy meets accuracy requirements, error meets error requirements, or the number of iterations meets number requirements.
[0087] The predicted recommendation result can be a recommendation probability or a recommendation level determined based on the recommendation probability. For example, the recommendation probabilities of five candidate recommendation objects are 0.5, 0.6, 0.7, 0.75, and 0.9, respectively. For another example, the recommendation probability of an object is 0.8 or higher and the recommendation probability of an object is less than 0.8, respectively, which corresponds to the recommended and non-recommended levels.
[0088] Step 206 : According to the predicted recommendation result, a target recommended object is screened from the candidate recommended objects, and the target recommended object is recommended based on the target user identifier.
[0089] The target recommended object is an object recommended to a target user corresponding to the target user identifier so that the target user can use it. The computer device selects the target recommended object whose predicted recommendation result meets the recommendation requirement from the candidate recommended objects based on the predicted recommendation result of each candidate recommended object.
[0090] Among them, it can be the recommendation probability or the recommendation level determined based on the recommendation probability. Taking the predicted recommendation result as the recommendation probability as an example, the target recommendation object that meets the recommendation requirements can be the candidate recommendation object with a recommendation probability greater than the preset probability, or it can be the candidate recommendation object that meets the recommendation quantity selected from the sorting results after sorting by recommendation probability. For example, the recommendation probabilities of the five candidate recommendation objects are 0.5, 0.6, 0.7, 0.75, and 0.9 respectively. If the recommendation requirement is that the recommendation probability is greater than 0.8, the target recommendation object is the candidate recommendation object with a recommendation probability of 0.9. If the recommendation requirement is the top two candidate recommendation objects with larger recommendation probabilities, the target recommendation object is the candidate recommendation objects with recommendation probabilities of 0.85 and 0.9.
[0091] Recommending a target recommended object based on a target user identifier may be pushing the recommendation information corresponding to the target recommended object to a terminal corresponding to the target user identifier so that the terminal can perform further processing, such as displaying the target recommended object or preloading the target recommended object, etc. By intuitively displaying the recommended target recommended object or increasing the loading speed of the object, the user's experience of using the object is improved.
[0092] The above-mentioned method of recommending objects obtains the characteristics of the target user corresponding to the target user identifier and the object characteristics corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness value; the relative willingness value is the difference between the willingness value of the used object corresponding to any user identifier and the willingness value of the unused object corresponding to the user identifier, and the willingness value is positively correlated with the characteristics of the user corresponding to the corresponding user identifier, and is positively correlated with the object characteristics of the corresponding object, so that the feature expression of the target user's characteristics and the object characteristics is more precise, and then for each candidate recommendation object, at least based on the corresponding object characteristics and the characteristics of the target user, the predicted recommendation result corresponding to each candidate recommendation object is accurately obtained; according to the predicted recommendation result, the target recommendation object is screened out from the candidate recommendation objects, and the target recommendation object is recommended based on the target user identifier, thereby achieving accurate recommendation of the object.
[0093] In one embodiment, the method for recommending an object further includes: acquiring target scene pattern data that matches the target user identifier, and determining a prediction model corresponding to the target scene pattern data.
[0094] The scene mode data is used to describe the scene mode corresponding to the target user identifier. Scene mode data is a detailed description of the scene mode. The scene mode represents the user's current scene and can correspond to user information in one or at least two data dimensions. The specific dimensions and number of dimensions can be selected and set based on the data dimensions to be considered when recommending objects.
[0095] A prediction model refers to a neural network model that predicts and recommends based on input data. Specifically, a prediction model can be a neural network model built based on target scene pattern data, mapping multiple input datasets to a single output dataset. For example, a multi-layer perception model is used to perform multi-layer perception mapping on the model's input data, thereby outputting prediction and recommendation results. In one application example, a corresponding multi-layer perception model is constructed based on specific feature data.
[0096] Furthermore, for each candidate recommendation object, the predicted recommendation result corresponding to each candidate recommendation object is determined based on at least the corresponding object characteristics and the characteristics of the target user, including: for each candidate recommendation object, the corresponding object characteristics and the characteristics of the target user are input into the prediction model to obtain the predicted recommendation result corresponding to each candidate recommendation object.
[0097] Specifically, the computer device obtains the target scene pattern data that matches the target user identifier, and determines the prediction model corresponding to the target scene pattern data based on the correspondence between the scene pattern data and the prediction model. For each candidate recommendation object, the computer device performs prediction processing on the corresponding object features and the target user features based on the prediction model corresponding to the target scene pattern data, and determines the predicted recommendation result corresponding to each candidate recommendation object.
[0098] In this embodiment, the computer device predicts and processes the corresponding object features and target user features for each candidate recommendation object based on the prediction model corresponding to the target scene pattern data, and can accurately obtain the predicted recommendation results of each candidate recommendation object under the scene pattern in combination with the scene pattern. According to the predicted recommendation results, the target recommendation object is filtered out from the candidate recommendation objects, and the target recommendation object is recommended based on the target user identifier, which can achieve accurate screening and recommendation of objects that match the scene pattern.
[0099] In one embodiment, the method for recommending an object further includes:
[0100] Obtain the target scene pattern data that matches the target user identifier, determine the multi-layer perception parameters corresponding to the target scene pattern data, and for each candidate recommendation object, perform multi-layer perception mapping processing on the corresponding object features and the target user features based on the multi-layer perception parameters to obtain the predicted recommendation results corresponding to each candidate recommendation object.
[0101] The multi-layer perception parameters are parameters required for the multi-layer perception mapping process. Specifically, the computer device performs a multi-layer perception mapping process on the corresponding object features and the target user features for each candidate recommendation object, based at least on the multi-layer perception parameters, to determine the predicted recommendation result corresponding to each candidate recommendation object. The multi-layer perception parameters can be constructed based on specific feature data. For example, the multi-layer perception parameters can be parameters in the multi-layer perception model.
[0102] Different scene mode data may correspond to different multi-layer perception parameters, and the scene mode data and the multi-layer perception parameters may be in a one-to-one correspondence. After the target scene mode data is determined, the multi-layer perception parameters corresponding to the target scene mode data may be determined based on the correspondence between the scene mode data and the multi-layer perception parameters.
[0103] In this embodiment, the computer device performs multi-layer perception mapping processing on the corresponding object features and the target user features for each candidate recommendation object based on the multi-layer perception parameters corresponding to the target scene mode data. It can accurately obtain the predicted recommendation results of each candidate recommendation object under the scene mode in combination with the multi-layer perception parameters corresponding to the scene mode, filter out the target recommendation object from the candidate recommendation objects according to the predicted recommendation results, and recommend the target recommendation object based on the target user identifier, thereby realizing accurate screening and recommendation of objects that match the scene mode.
[0104] Furthermore, the method for recommending objects also includes: obtaining target scene pattern data that matches the target user identifier, and searching for a target multi-layer perception model corresponding to the target scene pattern data from candidate multi-layer perception models constructed based on the scene pattern data; for each candidate recommendation object, determining the predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object features and the features of the target user, including: for each candidate recommendation object, inputting the corresponding object features and the features of the target user into the target multi-layer perception model, performing multi-layer perception mapping processing based on the target multi-layer perception model, and determining the predicted recommendation result corresponding to each candidate recommendation object.
[0105] Among them, the multi-layer perception model is a feedforward artificial neural network model that maps multiple input data sets to a single output data set. The multi-layer perception model can be constructed based on specific feature data. In a specific application, the computer device inputs the feature vector corresponding to the scene mode data into the model function based on the scene mode data corresponding to each scene mode, and obtains the multi-layer perception model corresponding to the scene mode data. Among them, the independent variable of the model function is the input feature vector, and the dependent variable is the multi-layer perception model. For example, the feature vector corresponding to the scene mode data is constructed as a discrete vector e, then based on the model function, the discrete vector e is input and a neural network MLP (Multilayer Perceptron) is output, that is, MLP=f(e).
[0106] The target multi-layer perception model is constructed based on the feature data corresponding to the target scene pattern data and is used to perform multi-layer perception mapping processing on the input data. Based on the input object features and target user features, the target multi-layer perception model performs multi-layer perception mapping processing based on the multi-layer perception parameters in the model, and obtains the predicted recommendation results for the candidate recommendation objects corresponding to the object features.
[0107] Specifically, the computer device obtains the target scene pattern data that matches the target user identifier, searches for the target multi-layer perception model corresponding to the target scene pattern data from the candidate multi-layer perception models constructed based on the scene pattern data, uses the user's features and object features as input data of the multi-layer perceptron constructed based on the scene pattern features, performs mapping processing based on the multi-layer perception parameters of each layer in the multi-layer perceptron, and the output result obtained is the predicted recommendation result for the candidate recommendation object in the corresponding scene pattern.
[0108] In this embodiment, the computer device performs multi-layer perception mapping processing on the input corresponding object features and target user features for each candidate recommendation object based on the multi-layer perception model corresponding to the target scene pattern data. It can perform multi-layer perception mapping processing in combination with the scene pattern to accurately obtain the predicted recommendation results of each candidate recommendation object under the scene pattern. According to the predicted recommendation results, the target recommendation object is screened out from the candidate recommendation objects, and the target recommendation object is recommended based on the target user identifier, which can achieve accurate screening and recommendation of objects that match the scene pattern.
[0109] In one embodiment, the method for recommending objects also includes: arranging and combining the candidate scene mode data corresponding to each scene mode dimension to obtain multiple groups of scene mode data; for each group of scene mode data, extracting corresponding scene mode features to build a model to obtain a candidate multi-layer perception model corresponding to each group of scene mode data.
[0110] Among them, the scene mode dimension is a pre-planned data dimension associated with the scene model. The number of scene dimensions can be one or more than two. The specific number of scene mode dimensions can be set according to the needs of the actual application scenario. Each scene mode dimension can have one or more candidate scene mode data. For example, the time dimension divided by seven days of the week can correspond to 7 candidate time data, and divided by 24 hours of a day can be divided into 24 candidate time data. For another example, the candidate data corresponding to the geographical attribute dimension can be set according to the actual scene needs, such as business districts, hospitals, subway stations, airports, railway stations and other geographical attributes. By arranging and combining the candidate scene mode data of different dimensions, multiple groups of scene mode data can be obtained. For each group of scene mode data, a corresponding discrete vector can be constructed, and the corresponding neural network MLP can be obtained based on the discrete vector.
[0111] Specifically, the computer device obtains the candidate scene mode data corresponding to each scene mode dimension, arranges and combines the candidate scene mode data according to the scene mode dimension, and obtains a group of scene mode data corresponding to each combination result; the computer device extracts the corresponding scene mode features for each group of scene mode data to build a model, and obtains a candidate multi-layer perception model corresponding to each group of scene mode data.
[0112] In this embodiment, by arranging and combining the candidate scene mode data according to the scene mode dimensions, multiple multi-layer perception models corresponding to the scene mode data can be obtained based on the combination of the scene mode dimensions. Multi-layer perception mapping processing can be performed in combination with the multi-dimensional scene mode to accurately obtain the predicted recommendation results of each candidate recommendation object under the scene mode.
[0113] In one embodiment, for each set of scene pattern data, corresponding scene pattern features are extracted for model construction to obtain a candidate multi-layer perception model corresponding to each set of scene pattern data, including: for each set of scene pattern data, corresponding scene pattern features are extracted for model construction to obtain an initial multi-layer perception model corresponding to each set of scene pattern data; based on the predicted recommendation results and actual results of each sample object corresponding to the corresponding scene pattern data, the corresponding loss value is calculated, the error is back-propagated based on the loss value, the initial multi-layer perception parameters of the initial multi-layer perception model are optimized, and the candidate multi-layer perception model corresponding to each set of scene pattern data is obtained.
[0114] The initial multi-layer perception model refers to a multi-layer perception model directly constructed based on a set of scene pattern data. The initial multi-layer perception model can be optimized through parameter optimization to obtain a multi-layer perception model with more accurate prediction results. A sample object refers to an object that has both predicted recommendation results and actual results. The process for obtaining the predicted recommendation results is the same as that in the aforementioned embodiments and will not be further described. Actual results include both cases where the user has used the object and where the user has not used the object.
[0115] Specifically, the computer device extracts the corresponding scene pattern features for each set of scene pattern data to build a model, and obtains an initial multi-layer perception model corresponding to each set of scene pattern data; calculates the corresponding loss value based on the predicted recommendation results and actual results of each sample object corresponding to the corresponding scene pattern data, performs error backpropagation based on the loss value, optimizes the initial multi-layer perception parameters of the initial multi-layer perception model, and obtains a candidate multi-layer perception model corresponding to each set of scene pattern data. In an application example, by and the true value (The value is 0 or 1, indicating that it is not actually used or actually used, respectively) Compared with the above, the loss value is calculated as follows After obtaining the loss value, the error is back-propagated to obtain the predicted value The parameters in the MLP model f(e) are optimized to obtain the multi-layer perception model corresponding to the scene mode data.
[0116] In this embodiment, by calculating the loss value corresponding to the predicted recommendation result and the actual result and performing error back propagation, the multi-layer perception parameters in the initial multi-layer perception model can be optimized to improve the prediction accuracy of the multi-layer perception model.
[0117] In one embodiment, the target scene mode data includes a regional attribute corresponding to the target user identifier and a status time corresponding to the regional attribute; obtaining the target scene mode data matching the target user identifier includes: obtaining the geographic location information collected by the terminal corresponding to the target user identifier when responding to user interaction operations; obtaining the corresponding status time based on the geographic location information, and determining the regional attributes of the region corresponding to the geographic location information.
[0118] The target scene mode data may be at least one of the user's POI (point of interest) information and time, wherein the POI information may be a specific geographical location or regional attributes, and the time information may be the day of the week, the time, etc.
[0119] Region refers to the division of geographical areas, and regional attributes are used to describe the common characteristics of the divided geographical areas. For example, regions can be divided based on the functions they can achieve, such as business districts, hospitals, subway stations, airports, or train stations, or they can be divided based on administrative divisions, such as Beijing, Shanghai, or Guangzhou. Regional attributes can be characteristics of a single specified dimension, such as functional attributes, or multi-dimensional attributes, such as the Guangzhou subway station. Furthermore, they can be refined to the specific unit that implements the function. For example, the First Hospital of City A, the City Center Shopping Mall of City B, etc.
[0120] The state time corresponding to the geographical attribute refers to the time corresponding to the user's current state, obtained during the process of obtaining the geographical attribute. In an embodiment, if the computer device is a terminal, the state time may be the system time obtained when the terminal collects the geographical location information. If the computer device is a server, the state time may be the time information carried when the terminal transmits the acquired geographical location information to the server, the system time obtained when the server receives the geographical location information, or the time corresponding to when the server obtains the geographical attribute based on the geographical location information.
[0121] Geographic location information represents the user's current location and changes as the user moves. User interaction refers to interactions between the user and the terminal. User interaction is an action initiated by the user. The terminal collects geographic location information in response to user interaction. This allows for precise timing to collect geographic location information, enabling the terminal to collect geographic location information when needed, thus avoiding unnecessary waste of data processing resources.
[0122] Specifically, the computer device obtains geographic location information collected by the terminal corresponding to the target user identifier when responding to user interaction operations. The server obtains the corresponding state time based on the geographic location information and determines the regional attributes of the region corresponding to the geographic location information.
[0123] In this embodiment, by using the regional attributes corresponding to the target user identifier and the state time corresponding to the regional attributes as the target scene mode data, the user's current scene can be considered from two dimensions of time and region. Based on the prediction model corresponding to the user's current scene, the user's current predicted recommendation results for each candidate recommended object can be accurately predicted, and then the objects that match the user's current scene and are most likely to be used are recommended to the user, thereby realizing preloading or recommendation display of objects, providing convenience for users to obtain and use objects.
[0124] In one embodiment, the target recommendation object includes a target recommendation sub-application for running in the running environment of the parent application. Obtaining geographic location information collected by the terminal corresponding to the target user identifier in response to a user interaction operation includes: when the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page, obtaining the geographic location information collected by the terminal; recommending the target recommendation object based on the target user identifier includes: pushing the recommendation information of the target recommendation sub-application to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommendation sub-application and displaying the target recommendation sub-application on the sub-application access page.
[0125] Among them, sub-application refers to a program that runs in the operating environment of the parent application and can be used without downloading and installing. The parent application is a program that runs on the terminal by downloading and installing the application package. The sub-application access page refers to the display page including the target recommended sub-application that is entered directly through operations in the parent application, such as scrolling down the page, searching for sub-applications, or triggering an icon. The sub-application access page can be as follows: Figure 4 In practical applications, such as Figure 5 As shown, to facilitate user selection, the sub-application access page can display not only recommended sub-applications, but also recently used sub-applications and user-defined sub-applications (my sub-applications).
[0126] The user can access the sub-application access page from a parent application running on the terminal by performing a preset interactive operation. In one specific application, the parent application accesses the sub-application access page in response to a user's pull-down operation. When the terminal detects the pull-down operation on the parent application page, it collects the geographical location information of the terminal's current location. In another specific application, the main page of the parent application running may include a sub-application access page. When entering the main page of the parent application, the sub-application access page is entered.
[0127] Preloading refers to the process of loading some key content before all data is loaded to reduce waiting time. This is to avoid the situation where the page is blank for a long time due to excessive content.
[0128] In a specific embodiment, the method for recommending sub-applications includes: when the parent application run by the terminal corresponding to the target user identifier enters the sub-application access page, the computer device obtains scene mode data that matches the target user identifier and is used to describe the scene mode corresponding to the target user identifier, extracts scene mode features from the scene mode data, and performs multi-layer perception mapping processing on each candidate recommended sub-application based on the characteristics of the user corresponding to the target user identifier, the scene mode features, and the sub-application features corresponding to the candidate recommended sub-application to obtain the predicted recommendation results of each candidate recommended sub-application under the scene mode, and pushes the recommendation information of the target recommended sub-application to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommended sub-application and displaying the target recommended sub-application on the sub-application access page.
[0129] The above-mentioned method of recommending objects allows for accurate recommendations for sub-applications running within the parent application's runtime environment. Specifically, taking mini-programs as an example, which are sub-applications running within the runtime environment of a parent application such as WeChat, compared to traditional mini-program display methods, there are three approaches: the first one involves product managers arranging mini-programs in a fixed order (e.g., the order in which the mini-programs were developed); the second one involves users placing the mini-programs they use most frequently in the frequently used menu; and the third one involves pinning the mini-programs they've recently used to the top of the user menu. Each of these approaches has limitations. For example, with the first approach, due to the large number of mini-programs, it can be difficult for users to find the mini-programs they need if they are sorted in a fixed order. The second approach allows users to adjust the order of mini-programs based on their usage habits, but this method is limited to commonly used mini-programs and cannot meet sudden or recurring mini-program needs due to business trips, travel, food delivery, shopping, or short videos. For the third method, since users may use mini-programs periodically, at specific locations, and in a specific way, saving only the most recently used mini-programs cannot fundamentally improve the user experience. As a result, when applied to actual use, more complex operations or on-site scanning are still required to open the mini-programs that users need on the terminal, such as scanning codes in the subway, scanning epidemic prevention codes at the airport, etc., which brings many changes in usage.
[0130] In this embodiment, by obtaining scene mode data for describing the scene mode corresponding to the target user identifier when the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page, the timing of obtaining the scene mode data is limited to avoid wasting data processing resources of the terminal. The computer device obtains the scene mode features extracted from the scene mode data to accurately obtain the scene mode features that match the target user identifier. For each candidate recommended sub-application, based on the multi-layer perception model corresponding to the scene mode data, multi-layer perception mapping processing is performed on the features of the user corresponding to the target user identifier and the sub-application features corresponding to the candidate recommended sub-application, and the predicted recommendation results of each candidate recommended sub-application under the scene mode are accurately obtained. According to the predicted recommendation results, the target recommended sub-application is screened out from the candidate recommended sub-applications, and the target recommended sub-application is recommended based on the target user identifier, thereby enabling accurate screening and recommendation of sub-applications that match the scene mode.
[0131] In one embodiment, Figure 6 As shown, the method for recommending an object includes steps 602 to 612.
[0132] Step 602 : Randomly initialize the feature set to obtain the initial user feature corresponding to each user identifier and the initial object feature corresponding to each object.
[0133] Step 604 : For each user ID, based on the corresponding initial user characteristics and the initial object characteristics corresponding to the corresponding used objects and unused objects, obtain the willingness value corresponding to the used objects and the willingness value corresponding to the unused objects for each user ID.
[0134] Step 606 , feature optimization is performed on the initial user features and the initial object features until the cumulative difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object is maximized.
[0135] Step 608 : Acquire the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness value.
[0136] Step 610 : For each candidate recommendation object, determine a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object features and the target user's features.
[0137] Step 612: According to the predicted recommendation result, a target recommended object is screened from the candidate recommended objects, and the target recommended object is recommended based on the target user identifier.
[0138] Among them, the feature set is a set consisting of the features of all users and the features of all objects. Each user feature corresponds to a user identifier, and each object feature corresponds to an object. Random initialization refers to the random feature initialization processing of the features of all users and all objects in the feature set. In a specific application, the random initialization obeys the normal distribution to constrain the feature values of the initial user features and the initial object features obtained after the random initialization process, thereby ensuring the rationality of the random initialization. In one embodiment, the random initialization obeys a normal distribution with "0" as the center and 0.5 as the standard deviation, thereby ensuring that the distribution of the initial user features and the initial object features is in a reasonable range.
[0139] The willingness value for a used object associated with a user ID can be the result of a dot product of the user's corresponding features and the object features of the used object. The willingness value for an unused object associated with a user ID can be the result of a dot product of the user's corresponding features and the object features of an unused object. For each used object and each unused object associated with the same user ID, the user's willingness value for the object can be calculated using the user's features and the object's features. Feature calculation can be performed by vector dot product or the sum of corresponding matrix element products.
[0140] Specifically, the computer device obtains a willingness value for each user identifier corresponding to a used object and a willingness value for each unused object based on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used and unused objects. An initial cumulative value is obtained by accumulating the difference between the willingness value for each user identifier corresponding to the used object and the willingness value for each user identifier corresponding to the unused object. Feature optimization is performed on the initial user characteristics and the initial object characteristics, thereby changing the willingness value for each user identifier corresponding to the used object and the willingness value for each unused object until the cumulative difference between the willingness value for each user identifier corresponding to the used object and the willingness value for each user identifier corresponding to the unused object is maximized.
[0141] In this embodiment, the user features and object features in the feature set are randomly initialized, and the obtained initial user features and initial object features are optimized until the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object is maximized, thereby ensuring that the obtained user features and object features achieve relative willingness maximization, so that the use willingness of each user for each object can be accurately described based on the user features and object features, so as to improve the accuracy of the predicted recommendation results and achieve accurate and reliable object recommendation.
[0142] In one embodiment, the method for recommending objects also includes: obtaining object usage record data corresponding to each user identifier, and determining the used objects corresponding to each user identifier; for each user identifier, removing the used objects corresponding to the corresponding user identifier from the full object set to obtain unused objects corresponding to each user identifier.
[0143] Furthermore, for each user identifier, based on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object and the unused object, the willingness value of each user identifier corresponding to the used object and the willingness value corresponding to the unused object are obtained, including: for each user identifier, performing vector dot multiplication processing on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object to obtain the willingness value of each user identifier corresponding to the used object, and performing vector dot multiplication processing on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding unused object to obtain the willingness value of each user identifier corresponding to the unused object.
[0144] Among them, object usage record data refers to data used to record the usage of objects by each user. Based on the object usage record data, all objects can be divided into a set of used objects and a set of unused objects. For example, in the object usage record data, objects used by the user are recorded as 1, and objects not used by the user are recorded as 0. By dividing all objects according to 1 and 0, a set of used objects and a set of unused objects corresponding to the user identifier are obtained. For another example, based on the object usage record data, the objects used by the user are removed from the set of all objects to obtain a set of objects not used by the user. The number of feature dimensions of user features and object features is the same, and both can be represented by N (N is a natural number)-dimensional vectors. Vector dot product refers to the calculation process of multiplying two vectors according to their corresponding elements and then adding them together.
[0145] Specifically, the computer device determines the used objects and unused objects corresponding to each user ID based on the object usage record data corresponding to each user ID stored in the terminal; based on the features of the initial user and the initial object features with the same number of feature dimensions obtained by random initialization, for each user ID, the features of the corresponding initial user are vector-multiplied with the initial object features corresponding to the corresponding used objects to obtain the willingness value of each user ID corresponding to the used objects, and the features of the corresponding initial user are vector-multiplied with the initial object features corresponding to the corresponding unused objects to obtain the willingness value of each user ID corresponding to the unused objects.
[0146] In this embodiment, the object usage record data corresponding to each user ID can be used to quickly and conveniently obtain the used objects and unused objects corresponding to each user ID. The initial user features and initial object features with the same number of feature dimensions obtained based on random initialization are processed through vector dot multiplication, which can simplify the data processing process and quickly obtain the willingness value of each user ID corresponding to the used object and the willingness value corresponding to the unused object.
[0147] In one embodiment, optimizing the initial user features and the initial object features to maximize the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object includes: optimizing the initial user features and the initial object features based on a called loss function to minimize the function value of the loss function, wherein the function value of the loss function is negatively correlated with the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object;
[0148] From the feature set that maximizes the cumulative value of the relative willingness value, the features of the target user corresponding to the target user identifier and the object features corresponding to each candidate object are obtained, including: from the feature set that minimizes the function value of the loss function, the features of the target user corresponding to the target user identifier and the object features corresponding to each candidate object are obtained.
[0149] The loss function maps the value of a random event or its related random variables to a non-negative real number to represent the "risk" or "loss" of the random event. The loss function can express the cumulative difference between the willingness value of each user ID corresponding to a used object and the willingness value of the user ID corresponding to an unused object. The loss function's value is negatively correlated with the cumulative difference, meaning that the larger the cumulative value, the smaller the loss function's value. In other words, maximizing the cumulative value relative to the willingness value minimizes the loss function's value.
[0150] It can be understood that if the function value of the loss function is positively correlated with the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object, then the feature optimization of the initial user's features and the initial object features is performed to maximize the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object, which includes: based on the called loss function, the feature optimization of the initial user's features and the initial object features is performed to maximize the function value of the loss function.
[0151] Specifically, the computer device optimizes the features of the initial user and the initial object based on the called loss function to minimize the function value of the loss function. The function value of the loss function is negatively correlated with the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object. From the feature set that minimizes the function value of the loss function, the features of the target user corresponding to the target user identifier and the object features corresponding to each candidate object are obtained.
[0152] In this embodiment, feature optimization is performed on the initial user features and the initial object features based on the loss function. Based on the functional characteristics of the loss function, the optimized user features and the optimized object features can be quickly solved, thereby improving the optimization processing efficiency.
[0153] In one embodiment, based on the called loss function, feature optimization is performed on the initial user features and the initial object features to minimize the function value of the loss function, including:
[0154] The loss function is called, and the partial derivative of the loss function is obtained based on the initial user features and the initial object features. Based on the partial derivative, the features of the initial user features and the initial object features are optimized to minimize the function value of the loss function.
[0155] The partial derivative of a multivariable function is its derivative with respect to one variable while holding the other variables constant. Partial derivatives reflect the rate of change of the function along the positive direction of the coordinate axis. By taking the partial derivatives of the loss function based on the initial user and object features, we obtain the partial derivatives corresponding to the initial user and object features, respectively. By setting the partial derivatives to 0, we optimize the initial user and object features, thereby obtaining the user and object features that minimize the loss function.
[0156] In this embodiment, by taking partial derivatives of the loss function, the optimization results of the initial user features and the initial object features can be quickly solved, thereby improving the processing efficiency of optimizing the initial user features and the initial object features.
[0157] In one embodiment, the method for recommending objects also includes: for each triple consisting of a user identifier, a used object corresponding to the user identifier, and an unused object, the function value of the loss function is accumulated based on the cumulative value of the negative natural logarithm of the sigmoid function value corresponding to each triple and the reference norm corresponding to the user's feature matrix and the object's feature matrix.
[0158] Among them, the sigmoid function value corresponding to the triplet is the output value obtained by inputting the difference between the willingness value of the corresponding user ID corresponding to the used object and the willingness value of the user ID corresponding to the unused object into the sigmoid function in the loss function; the user feature matrix is the matrix composed of the features of each user; the object feature matrix is the matrix composed of the features of each object; and the reference norm is the product of the norm of the feature matrix and the reference coefficient.
[0159] Specifically, the loss function can be defined as follows
[0160]
[0161]
[0162] in, is the vector representation of applet i, is the vector representation of applet i, is the vector representation of user u, mini program i is the mini program that the user has used, and mini program j is the mini program that the user has not used. refers to the sigmoid function, and It refers to the Frobenius norm of the user matrix U, which is composed of user features, and the object matrix I, which is composed of object features. The Frobenius norm is the result obtained by taking the square root of the sum of the squares of the elements in the matrix. is the reference coefficient of the Frobenius norm, which is used to constrain the object matrix and the user matrix. The specific value range can be 10 -3 ~10 -6 , preferably 10 -5 . U and I are optimized by taking the partial derivative of the loss function, and finally the final user matrix U and object matrix I are obtained by minimizing the loss function.
[0163] In this embodiment, the computer device obtains the function value of the loss function by accumulating the negative natural logarithm of the sigmoid function value corresponding to each triple consisting of a user identifier, a used object corresponding to the user identifier, and an unused object, and accumulating the differences based on the triples. This can avoid data omissions in the calculation of the cumulative value of the differences and improve the accuracy of the cumulative results.
[0164] In one embodiment, the object recommendation method further includes: updating the object features and user features in the feature set according to the update cycle and based on the used objects and unused objects corresponding to each user identifier in each update cycle.
[0165] The update period refers to the period for the feature set, and the update period can be set according to actual application needs, for example, setting the update period to one month or one week. Specifically, when the computer device detects that the time difference between the current time and the last update time reaches the update period, it obtains the used and unused objects corresponding to each user identifier within the update period. Based on the used and unused objects corresponding to each user identifier within each update period, the object features and user features in the feature set are updated, ensuring that the object features and user features in the feature set have excellent timeliness and can accurately reflect the object usage of each user during the time period, thereby facilitating accurate recommendation of corresponding objects to the user.
[0166] In one embodiment, Figure 7 As shown, a method for recommending an object is provided, which specifically includes the following steps:
[0167] Step 702 : randomly initialize the feature set according to the update period to obtain the initial user feature corresponding to each user identifier and the initial object feature corresponding to each object.
[0168] Step 704: Obtain object usage record data corresponding to each user ID and determine the used objects corresponding to each user ID. For each user ID, remove the used objects corresponding to the corresponding user ID from the full object set to obtain unused objects corresponding to each user ID.
[0169] Step 706: For each user ID, perform vector dot multiplication on the features of the corresponding initial user, the initial object features corresponding to the corresponding used object, and the initial object features corresponding to the corresponding unused object, to obtain the willingness value of each user ID corresponding to the used object and the willingness value corresponding to the unused object.
[0170] Step 708: For each triple consisting of a user ID, a used object corresponding to the user ID, and an unused object, the difference between the willingness value of the corresponding user ID corresponding to the used object and the willingness value of the user ID corresponding to the unused object is input into the sigmoid function in the loss function.
[0171] Step 710 , based on the cumulative value of the negative natural logarithm of the sigmoid function value corresponding to each triple and the reference norm corresponding to the user's feature matrix and the object's feature matrix, the function value of the loss function is accumulated.
[0172] Step 712: Partially derivative the loss function based on the initial user's features and the initial object's features to obtain partial derivatives. Based on the partial derivatives, feature optimization is performed on the initial user's features and the initial object's features to minimize the function value of the loss function.
[0173] Step 714 : Acquire the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object from the feature set that minimizes the function value of the loss function.
[0174] Step 716 , permuting and combining the candidate scene mode data corresponding to the state time dimension and the regional attribute dimension to obtain multiple groups of scene mode data.
[0175] Step 718: For each set of scene pattern data, extract the corresponding scene pattern features to build a model, and obtain an initial multi-layer perception model corresponding to each set of scene pattern data.
[0176] Step 720, calculate the corresponding loss value based on the predicted recommendation result and the actual result of each sample object corresponding to the corresponding scene mode data, perform error backpropagation based on the loss value, optimize the initial multi-layer perception parameters of the initial multi-layer perception model, and obtain the candidate multi-layer perception model corresponding to each set of scene mode data.
[0177] Step 722: When the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page, the geographic location information collected by the terminal is obtained, the corresponding status time is obtained based on the geographic location information, and the regional attributes of the region corresponding to the geographic location information are determined.
[0178] Step 724: Search the candidate multi-layer perception models for a target multi-layer perception model that matches the state time and geographical attributes.
[0179] In step 726, for each candidate recommendation object, the corresponding object features and target user features are input into the target multi-layer perception model, and multi-layer perception mapping processing is performed based on the target multi-layer perception model to determine the predicted recommendation result corresponding to each candidate recommendation object.
[0180] Step 728: According to the predicted recommendation results, the target recommendation object is filtered out from the candidate recommendation objects, and the recommendation information of the target recommendation sub-application is pushed to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommendation sub-application and displaying the target recommendation sub-application on the sub-application access page.
[0181] The present application also provides an application scenario, which applies the above-mentioned method of recommending objects. Specifically, the method of recommending objects can be applied to small program service provision platforms such as Tencent Docs, WeChat, QQ, and Tencent Cloud. Taking the small program running in WeChat as an example, with the launch of small programs, it has greatly facilitated citizens' daily official business, travel, shopping, epidemic prevention and control, and other aspects of business handling and daily life. However, WeChat's small programs still only have a fixed order or are recently used or are frequently added by users themselves. Therefore, in actual use, more complicated operations or on-site scanning are still required to select the required small program. Such as: scanning the code in the subway, scanning the epidemic prevention code at the airport, etc., which brings more changes in use. The method of recommending objects provided in this application can solve the above problems and realize accurate recommendation of small programs based on actual application scenarios. The application of the method of recommending objects in this application scenario is as follows:
[0182] like Figure 8 As shown, the object recommendation method provided by this application can be implemented based on the user-mini program relationship modeling module, the application scenario modeling module, the scenario-based user-mini program modeling retraining module, and the mini program recommendation module. The processing process of each module is as follows:
[0183] Module 1: User-Mini Program Relationship Modeling Module
[0184] The user-mini-program relationship modeling module models the user-mini-program usage behavior. That is, a representation vector is constructed for each user and mini-program. Assuming there are N users, then The vector representation of user u, there are also M applets, It represents the vector representation of the i-th mini-program. The physical meaning of the user mini-program vector representation after modeling this module is that if user u frequently uses mini-program i, then the dot product of the user u vector and the mini-program i vector is A larger value indicates that user u frequently uses mini program i. On the contrary, if u rarely uses mini program i, the corresponding dot product result should be as small as possible.
[0185] In this application, the concept of relative willingness is proposed. Due to the particularity of the use of mini-programs, the fact that users have not used a mini-program does not mean that the users will not use it. Rather, it means that relatively speaking, the user does not currently have a strong demand to use the mini-program, or in other words, the user's current willingness to use the mini-program is not outstanding, that is, it is lower than the willingness to use other mini-programs. Based on this, the user's mini-program behavior is modeled in the following form in the following way, which is called relative willingness. Specifically, for a user u, two mini-programs i and j are extracted, where mini-program i is a mini-program that the user has used, and mini-program j is a mini-program that the user has not used.
[0186] Relative willingness can be expressed as follows:
[0187]
[0188] This formula means that the model's predicted willingness to use a Mini Program they want to use minus the model's predicted willingness to use a Mini Program they haven't used is the relative willingness. Maximizing relative willingness can improve the accuracy of model predictions.
[0189] Get the dataset as follows:
[0190]
[0191] in, Refers to the set of mini programs that user u has actually used, and the corresponding It refers to removing the set of mini-programs that users have actually used from the entire set of mini-programs.
[0192] The process of building a model is as follows:
[0193] As above, the relationship between the user and the mini-program is calculated by calculating the dot product of the vectors of the user and the mini-program. Therefore, the user is modeled as a matrix ,Similarly, the applet is modeled as The dimension of U is N*D, where D is the dimension of the vector representation, and the dimension of I is M*D.
[0194] Therefore, all users' mini program prediction results can be To make predictions, U and I are first randomly initialized, and then optimized through loss functions and optimization algorithms.
[0195] The loss function is defined as follows:
[0196]
[0197] in refers to the sigmoid function, and It refers to the Frobenius norm of the matrices U and I. U and I are optimized by taking the partial derivative of the loss function. Ultimately, by minimizing the loss function, we obtain the final user matrix U and mini-program representation matrix I.
[0198] Module 2: Scene Mode Modeling Module
[0199] The scene mode modeling module is used to express the user's scene in a characterized form, such as point of interest (POI) information and time characteristics. This information is discrete, such as the day of the week, the current time, and the current plot's attributes (such as business districts, hospitals, subway stations, airports, and train stations). This information is discrete. Therefore, a neural network is output from this discrete information, and this neural network is used to make predictions based on the user embedding vector and mini-program embedding vector mentioned above. Typically, discrete information is constructed as a discrete vector e, which is input into a preset model function, outputting a neural network MLP. That is, MLP = f(e).
[0200] Module 3: Recommendation Algorithm Module
[0201] like Figure 9 As shown in the figure, whenever a triplet of user u, scene e, and mini-program i is obtained, the information of scene e is first input through the neural network production function to generate an MLP network f(e), and then the user's characteristics and mini-program characteristics are input into the neural network to obtain the predicted relationship value between the user and the mini-program.
[0202]
[0203] Module 4: Modeling and Prediction Module
[0204] By calculating the above formula Afterwards, we compare the true value (The value is 0 or 1, indicating that it is not actually used or actually used, respectively) Compared with the above, the loss is calculated as follows , after obtaining the loss value, we optimize the parameters in f(e) through error back propagation.
[0205] The feature set in Module 1 consists of embedding vectors for all users and mini-programs across the entire network, which are trained and stored monthly. When a user makes a request, the MLP built based on f(e) takes the user and mini-program vectors as input, generates predictions for each mini-program, ranks the predictions, and returns the top-ranked mini-programs for recommendation to the user.
[0206] Taking the application of this method to WeChat as an example, Figure 10 As shown in the middle left picture, when the user scrolls down the mini program interface, the user's corresponding current status data is obtained based on Figure 9 The data processing flow shown in the figure obtains the recommendation results for each candidate mini program. Then the mini programs in the candidate set are sorted and filtered to obtain the recommended mini programs, and the recommended mini programs are displayed on the user terminal. The display page is as follows Figure 10 As shown in the middle right picture.
[0207] It should be understood that although Figure 2 、 Figure 6 、 Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2 、 Figure 6 、 Figure 7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0208] In one embodiment, Figure 11 As shown, a device 1100 for recommending objects is provided. The device can be implemented as a software module or a hardware module, or a combination of both to form a part of a computer device. The device specifically includes: a feature acquisition module 1102, a recommendation result prediction module 1104, and an object recommendation module 1106, wherein:
[0209] The feature acquisition module 1102 is used to obtain the features of the target user corresponding to the target user identifier and the object features corresponding to each candidate object from the feature set that maximizes the cumulative value of the relative willingness value; the relative willingness value is the difference between the willingness value of an arbitrary user identifier corresponding to a used object and the willingness value of the user identifier corresponding to an unused object, and the willingness value is positively correlated with the features of the user corresponding to the corresponding user identifier, and is positively correlated with the object features of the corresponding object.
[0210] The recommendation result prediction module 1104 is configured to determine, for each candidate recommendation object, a predicted recommendation result corresponding to the candidate recommendation object based at least on the corresponding object features and the target user's features.
[0211] The object recommendation module 1106 is configured to filter out a target recommended object from the candidate recommended objects according to the predicted recommendation result, and recommend the target recommended object based on the target user identifier.
[0212] In one embodiment, the device for recommending objects further comprises a model determination module;
[0213] The model determination module is used to obtain target scene mode data matching the target user identifier and determine a prediction model corresponding to the target scene mode data;
[0214] The recommendation result prediction module is further used to input the corresponding object features and the target user features into the prediction model for each candidate recommendation object to obtain the predicted recommendation result corresponding to each candidate recommendation object.
[0215] In one embodiment, the device for recommending objects further includes a data acquisition module and a model search module;
[0216] The data acquisition module is used to acquire target scene mode data that matches the target user identifier;
[0217] The model search module is used to search for a target multi-layer perception model that matches the target scene pattern data from candidate multi-layer perception models constructed based on the scene pattern data;
[0218] The recommendation result prediction module is also used to input the corresponding object features and the target user features into the target multi-layer perception model for each candidate recommendation object, perform multi-layer perception mapping processing based on the target multi-layer perception model, and determine the predicted recommendation result corresponding to each candidate recommendation object.
[0219] In one embodiment, the device for recommending objects further includes a data arrangement and combination module and a multi-layer perception model construction module:
[0220] The data permutation and combination module is used to permutate and combine the candidate scene mode data corresponding to each scene mode dimension to obtain multiple groups of scene mode data;
[0221] The multi-layer perception model construction module is used to extract corresponding scene pattern features for each set of scene pattern data to construct a model, and obtain a candidate multi-layer perception model corresponding to each set of scene pattern data.
[0222] In one embodiment, the multi-layer perception model building module includes an initial model building module and a model optimization module;
[0223] The initial model building module is used to extract corresponding scene pattern features for each set of scene pattern data to build a model, thereby obtaining an initial multi-layer perception model corresponding to each set of scene pattern data;
[0224] The model optimization module is used to calculate the corresponding loss value based on the predicted recommendation results and actual results of each sample object corresponding to the corresponding scene pattern data, perform error backpropagation based on the loss value, optimize the initial multi-layer perception parameters of the initial multi-layer perception model, and obtain a candidate multi-layer perception model corresponding to each set of scene pattern data.
[0225] In one embodiment, the target scene mode data includes a region attribute corresponding to the target user identifier and a state time corresponding to the region attribute;
[0226] The data acquisition module includes a geographic location information acquisition module, a regional attribute and state time determination module;
[0227] The geographic location information acquisition module is used to acquire the geographic location information collected by the terminal corresponding to the target user identifier when responding to the user interaction operation;
[0228] The region attribute and status time determination module is used to obtain the corresponding status time based on the geographical location information and determine the region attribute of the region corresponding to the geographical location information.
[0229] In one embodiment, the target recommendation object includes a target recommendation sub-application for running in a running environment of a parent application;
[0230] The geographic location information acquisition module is further configured to acquire the geographic location information collected by the terminal when the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page;
[0231] The object recommendation module is also used to push the recommendation information of the target recommendation sub-application to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommendation sub-application and displaying the target recommendation sub-application on the sub-application access page.
[0232] In one embodiment, the device for recommending objects further includes a feature initialization module, a willingness value determination module, and a feature optimization module;
[0233] The feature initialization module is used to randomly initialize the feature set to obtain the initial user feature corresponding to each user identifier and the initial object feature corresponding to each object;
[0234] The willingness value determination module is configured to obtain, for each user identifier, a willingness value corresponding to a used object and a willingness value corresponding to an unused object based on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object and the unused object;
[0235] The feature optimization module is used to optimize the features of the initial user and the initial object features until the cumulative value of the difference between the willingness value of each user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object is maximized.
[0236] In one embodiment, the willingness value determination module includes an object classification module and a willingness value calculation module;
[0237] The object classification module is used to obtain object usage record data corresponding to each user identifier and determine the used objects corresponding to each user identifier; for each user identifier, remove the used objects corresponding to the corresponding user identifier from the full object set to obtain unused objects corresponding to each user identifier;
[0238] The willingness value calculation module is used to perform vector dot multiplication processing on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object for each user identifier to obtain the willingness value of each user identifier corresponding to the used object, and to perform vector dot multiplication processing on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding unused object to obtain the willingness value of each user identifier corresponding to the unused object.
[0239] In one embodiment, the feature optimization module is further configured to perform feature optimization on the initial user features and the initial object features based on the invoked loss function, so as to minimize a function value of the loss function, wherein the function value of the loss function is negatively correlated with a cumulative value of a difference between a willingness value of each user identifier corresponding to a used object and a willingness value of the user identifier corresponding to an unused object;
[0240] The feature acquisition module is further configured to acquire the target user's features corresponding to the target user identifier and the object features corresponding to each candidate object from the feature set that minimizes the function value of the loss function.
[0241] In one embodiment, the feature optimization module includes a partial derivative processing module and an initial feature optimization module;
[0242] The partial derivative processing module is used to call the loss function, calculate the partial derivative of the loss function based on the initial user characteristics and the initial object characteristics, and obtain the partial derivative;
[0243] The initial feature optimization module is used to perform feature optimization on the initial user features and the initial object features based on the partial derivatives, so as to minimize the function value of the loss function.
[0244] In one embodiment, the device for recommending objects also includes a function value calculation module of a loss function, which is used to accumulate the function value of the loss function for each triple consisting of a user identifier, a used object corresponding to the user identifier, and an unused object, based on the cumulative value of the negative natural logarithm of the sigmoid function value corresponding to each triple and the reference norm corresponding to the user's feature matrix and the object feature matrix; wherein the sigmoid function value corresponding to the triple is the output value obtained by inputting the difference between the willingness value of the corresponding user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object into the sigmoid function in the loss function; the user's feature matrix is a matrix composed of the features of each user; the object feature matrix is a matrix composed of the features of each object; and the reference norm is positively correlated with the norm of the feature matrix.
[0245] In one embodiment, the device for recommending objects further includes: a feature set updating module for updating object features and user features in the feature set according to an update cycle and based on used objects and unused objects corresponding to each user identifier in each update cycle.
[0246] For specific embodiments of the device for recommending objects, please refer to the embodiments of the method for recommending objects described above and will not be repeated here. Each module in the device for recommending objects can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to each of the modules.
[0247] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 12 As shown. The computer device includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store feature data in a feature set that is updated periodically and a multi-layer perception model constructed based on each scene model. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for recommending an object is implemented.
[0248] In another embodiment, a computer device is provided. The computer device may be an input / output device, and its internal structure may be as shown in FIG. Figure 13 As shown. The input / output device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the input / output device is used to provide computing and control capabilities. The memory of the input / output device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the input / output device is used to communicate with an external terminal via wired or wireless communication. Wireless communication can be achieved via Wi-Fi, a carrier network, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a method for recommending an object. The display screen of the input / output device can be a liquid crystal display or an electronic ink display. The input device of the input / output device can be a touch layer covering the display screen, or keys, a trackball, or a touchpad provided on the input / output device housing, or an external keyboard, touchpad, or mouse.
[0249] Those skilled in the art will understand that Figure 12 and Figure 13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0250] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0251] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0252] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of each of the above-described method embodiments.
[0253] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0254] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0255] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for recommending an object, characterized in that: The method comprises: For each user identifier, based on the corresponding initial user characteristics and the initial object characteristics corresponding to the corresponding used objects and unused objects, obtain the willingness value corresponding to the used objects and the willingness value corresponding to the unused objects for each user identifier; Based on the invoked loss function, feature optimization is performed on the initial user features and the initial object features to minimize a function value of the loss function, wherein the function value of the loss function is negatively correlated with a cumulative value of a difference between a willingness value corresponding to a used object for each user identifier and a willingness value corresponding to an unused object for the user identifier; Obtaining, from a feature set that minimizes the function value of the loss function, features of the target user corresponding to the target user identifier and object features corresponding to each candidate object; the willingness value is positively correlated with the features of the user corresponding to the corresponding user identifier and with the object features of the corresponding object; For each candidate recommendation object, determining a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user; According to the predicted recommendation result, a target recommended object is screened out from the candidate recommended objects, and the target recommended object is recommended based on the target user identifier.
2. The method according to claim 1, characterized in that The method further comprises: Acquire target scene mode data that matches the target user identifier, and determine a prediction model corresponding to the target scene mode data; The step of determining, for each candidate recommendation object, a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user, includes: For each candidate recommendation object, the corresponding object features and the target user features are input into the prediction model to obtain a prediction recommendation result corresponding to each candidate recommendation object.
3. The method according to claim 1, characterized in that The method further comprises: Obtain target scene pattern data that matches the target user identifier, and search for a target multi-layer perception model that matches the target scene pattern data from candidate multi-layer perception models constructed based on the scene pattern data; The step of determining, for each candidate recommendation object, a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user, includes: For each candidate recommendation object, the corresponding object features and the target user features are input into the target multi-layer perception model, and multi-layer perception mapping processing is performed based on the target multi-layer perception model to determine the predicted recommendation results corresponding to each candidate recommendation object.
4. The method according to claim 3, characterized in that The method further comprises: Arrange and combine the candidate scene mode data corresponding to each scene mode dimension to obtain multiple groups of scene mode data; For each set of scene pattern data, the corresponding scene pattern features are extracted to build a model, and a candidate multi-layer perception model corresponding to each set of scene pattern data is obtained.
5. The method according to claim 4, characterized in that For each set of scene mode data, extracting corresponding scene mode features to build a model, and obtaining a candidate multi-layer perception model corresponding to each set of scene mode data, includes: For each set of scene mode data, the corresponding scene mode features are extracted to build a model, and an initial multi-layer perception model corresponding to each set of scene mode data is obtained; Based on the predicted recommendation results and actual results of each sample object corresponding to the corresponding scene mode data, the corresponding loss value is calculated, and error backpropagation is performed based on the loss value to optimize the initial multi-layer perception parameters of the initial multi-layer perception model to obtain a candidate multi-layer perception model corresponding to each set of scene mode data.
6. The method according to any one of claims 2 to 5, characterized in that The target scene mode data includes a regional attribute corresponding to the target user identifier and a state time corresponding to the regional attribute; The acquiring target scene mode data matching the target user identifier includes: Obtaining geographic location information collected by the terminal corresponding to the target user identifier when responding to a user interaction operation; A corresponding state time is obtained based on the geographic location information, and a regional attribute of a region corresponding to the geographic location information is determined.
7. The method according to claim 6, characterized in that The target recommendation object includes a target recommendation sub-application for running in the running environment of the parent application; The acquiring of geographic location information collected by the terminal corresponding to the target user identifier when responding to a user interaction operation includes: When the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page, obtaining the geographic location information collected by the terminal; The recommending the target recommendation object based on the target user identifier includes: The recommendation information of the target recommended sub-application is pushed to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommended sub-application and displaying the target recommended sub-application on the sub-application access page.
8. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtain object usage record data corresponding to each user ID and determine the used objects corresponding to each user ID; For each user ID, the used objects corresponding to the corresponding user ID are removed from the full object set to obtain unused objects corresponding to each user ID.
9. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The feature set is randomly initialized to obtain the initial user features corresponding to each user identifier and the initial object features corresponding to each object.
10. The method according to claim 1, characterized in that The feature optimization of the initial user features and the initial object features based on the called loss function to minimize the function value of the loss function includes: Calling a loss function, and calculating a partial derivative of the loss function based on the initial user feature and the initial object feature to obtain a partial derivative; Based on the partial derivatives, feature optimization is performed on the initial user features and the initial object features to minimize the function value of the loss function.
11. The method according to claim 1, characterized in that The method further comprises: For each triple consisting of a user identifier, a used object corresponding to the user identifier, and an unused object, the function value of the loss function is accumulated based on the cumulative value of the negative natural logarithm of the sigmoid function value corresponding to each triple and the reference norm corresponding to the user's feature matrix and the object's feature matrix; Among them, the sigmoid function value corresponding to the triplet is the output value obtained by inputting the difference between the willingness value of the corresponding user identifier corresponding to the used object and the willingness value of the user identifier corresponding to the unused object into the sigmoid function in the loss function; the user feature matrix is a matrix composed of the features of each user; the object feature matrix is a matrix composed of the features of each object; the reference norm is positively correlated with the norm of the feature matrix.
12. A device for recommending an object, characterized in that: The device comprises: an acquisition module configured to obtain, for each user identifier, a willingness value corresponding to a used object and a willingness value corresponding to an unused object based on the characteristics of the corresponding initial user and the initial object characteristics corresponding to the corresponding used object and the unused object; an optimization module, configured to perform feature optimization on the initial user features and the initial object features based on the invoked loss function, so as to minimize a function value of the loss function, wherein the function value of the loss function is negatively correlated with a cumulative value of a difference between a willingness value corresponding to a used object for each user identifier and a willingness value corresponding to an unused object for the user identifier; a feature acquisition module, configured to acquire, from a feature set that minimizes the function value of the loss function, features of the target user corresponding to the target user identifier and object features corresponding to each candidate object; wherein the willingness value is positively correlated with the features of the user corresponding to the corresponding user identifier and with the object features of the corresponding object; A recommendation result prediction module is used to determine, for each candidate recommendation object, a predicted recommendation result corresponding to each candidate recommendation object based at least on the corresponding object characteristics and the characteristics of the target user; The object recommendation module is used to filter out a target recommended object from the candidate recommended objects according to the predicted recommendation result, and recommend the target recommended object based on the target user identifier.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.
14. The computer device according to claim 13, wherein: The computer device further comprises: A scene data acquisition module is used to acquire target scene mode data that matches the target user identifier; A model determination module, configured to determine a prediction model corresponding to the target scene pattern data; The recommendation result prediction module is further configured to input the corresponding object features and the target user features into the prediction model for each candidate recommendation object, and obtain a predicted recommendation result corresponding to each candidate recommendation object.
15. The computer device according to claim 13, wherein: The computer device further comprises: A scene data acquisition module is used to acquire target scene mode data that matches the target user identifier; A model search module is used to search for a target multi-layer perception model that matches the target scene pattern data from candidate multi-layer perception models constructed based on the scene pattern data; The recommendation result prediction module is also used to input the corresponding object features and the target user features into the target multi-layer perception model for each candidate recommendation object, perform multi-layer perception mapping processing based on the target multi-layer perception model, and determine the predicted recommendation results corresponding to each candidate recommendation object.
16. The computer device according to claim 15, wherein: The computer device further comprises: A data permutation and combination module is used to permutate and combine the candidate scene mode data corresponding to each scene mode dimension to obtain multiple groups of scene mode data; The multi-layer perception model construction module is used to extract the corresponding scene pattern features for each set of scene pattern data to construct a model, and obtain a candidate multi-layer perception model corresponding to each set of scene pattern data.
17. The computer device according to claim 16, wherein: The multi-layer perception model building module includes: The initial model building module is used to extract the corresponding scene pattern features for each set of scene pattern data to build a model, and obtain an initial multi-layer perception model corresponding to each set of scene pattern data; The model optimization module is used to calculate the corresponding loss value based on the predicted recommendation results and actual results of each sample object corresponding to the corresponding scene pattern data, perform error backpropagation based on the loss value, optimize the initial multi-layer perception parameters of the initial multi-layer perception model, and obtain a candidate multi-layer perception model corresponding to each set of scene pattern data.
18. The computer device according to any one of claims 14 to 17, characterized in that The target scene mode data includes a regional attribute corresponding to the target user identifier and a state time corresponding to the regional attribute; The scene data acquisition module includes: A geographic location information acquisition module, configured to acquire geographic location information collected by the terminal corresponding to the target user identifier when responding to a user interaction operation; The region attribute and status time determination module is used to obtain the corresponding status time based on the geographical location information and determine the region attribute of the region corresponding to the geographical location information.
19. The computer device according to claim 18, wherein: The target recommendation object includes a target recommendation sub-application for running in the running environment of the parent application; The geographic location information acquisition module is further configured to acquire the geographic location information collected by the terminal when the parent application running on the terminal corresponding to the target user identifier enters the sub-application access page; The object recommendation module is also used to push the recommendation information of the target recommendation sub-application to the terminal corresponding to the target user identifier, so that the terminal performs at least one of preloading the target recommendation sub-application and displaying the target recommendation sub-application on the sub-application access page.
20. The computer device according to any one of claims 13 to 17, characterized in that The computer device further comprises: A usage record acquisition module is used to obtain object usage record data corresponding to each user ID; The object classification module is used to determine the used objects corresponding to each user identifier; for each user identifier, remove the used objects corresponding to the corresponding user identifier from the full object set to obtain unused objects corresponding to each user identifier.
21. The computer device according to any one of claims 13 to 17, characterized in that The computer device further comprises: The feature initialization module is used to randomly initialize the feature set to obtain the initial user feature corresponding to each user identifier and the initial object feature corresponding to each object.
22. The computer device according to claim 13, wherein: The computer device further comprises: A partial derivative processing module, configured to call a loss function, calculate a partial derivative of the loss function based on the initial user's features and the initial object's features, and obtain a partial derivative; An initial feature optimization module is used to perform feature optimization on the initial user features and the initial object features based on the partial derivatives so as to minimize the function value of the loss function.
23. The computer device according to claim 13, wherein: The computer device further comprises: A loss function value calculation module is used to accumulate the function value of the loss function for each triple consisting of a user identifier, a used object corresponding to the user identifier, and an unused object, based on the cumulative value of the negative natural logarithm of the sigmoid function value corresponding to each triple and the reference norm corresponding to the user's feature matrix and the object feature matrix. The sigmoid function value corresponding to the triple is the output value obtained by inputting the difference between the willingness value of the used object corresponding to the corresponding user identifier and the willingness value of the unused object corresponding to the user identifier into the sigmoid function in the loss function. The user's feature matrix is a matrix composed of the features of each user; the object feature matrix is a matrix composed of the features of each object; and the reference norm is positively correlated with the norm of the feature matrix.
24. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
25. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Interest label generation method and device, computer equipment and storage medium
CN110377821A
Click rate prediction method, recommendation method, click rate prediction model, click rate prediction device and equipment
CN111046294A