POI recommendation device, method, electronic device and readable storage medium
By grouping and weight adjustment of users and combining with the training of deep neural network models, the problems of user group preferences and data imbalance in the existing POI recommendation system are solved, and recommendation accuracy and fairness are improved.
Patent Information
- Application Number
- CN202411765210.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing POI recommendation system fails to fully consider the diversified preferences of different user groups, resulting in the recommendation results being unable to meet the needs of all user groups, and there is a problem of data imbalance, which affects the model's prediction accuracy for groups with smaller data volumes.
The user is divided into different groups through the user's behavioral characteristics and social attributes, and the initial weight is assigned to each user group. The deep neural network model is used for training. The model is optimized through the objective function to consider the impact of data volume on the verification loss of each user group, and the user group weight is adjusted according to the loss value of the verification set to ensure Pareto utility.
It improves recommendation accuracy, enhances the fairness of the model to different user groups, optimizes the training process, solves the problem of data imbalance, and ensures the fairness of the model output to each group.
Smart Images

Figure CN119248984B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a POI recommendation device, method, electronic device and readable storage medium. Background Art
[0002] POI (Point of Interest) recommendation technology essentially uses the user's historical check-in and other multimodal information (such as location attributes and friend networks) to recommend the next set of POIs suitable for the user. A lot of early work focused on traditional machine learning techniques, relying on manually formulated feature patterns. In recent years, the application of deep learning technology in the field of POI recommendation has increased, and more and more work has begun to use deep neural network models to improve the accuracy of POI tasks. Among them, deep learning methods (such as convolutional neural networks (CNN) or recurrent neural networks (RNN)) have many advantages in automatic feature extraction, reducing the difficulty of designing manually formulated features. Some recent studies have enriched the semantic geospatial information of the model through graph embedding technology, further improving the performance of the recommendation model.
[0003] Existing systems may not fully consider the diverse preferences of different user groups (such as different ages, genders, and occupations), resulting in recommendation results that may not meet the needs of all user groups. For example, different users have different habits and preferences. For example, young people usually like to go to shopping malls on weekends, and some like to go out for midnight snacks. Older people may like to go to the garden in the afternoon and almost never go out at midnight. Similar phenomena also exist among people of different genders and occupations. In order to meet different preferences, people with similar factors need to be grouped together. The POI recommendation system should give different recommendations to different groups of people. At the same time, some groups account for a small proportion in the data set, so the trajectory data generated by them is also relatively small, so there is a data imbalance problem in the data set.
[0004] Group fairness refers to whether the output of the model is fair to each group. In existing systems, if the goals of multiple groups are considered at the same time, it is impossible to express them well with a unified objective function, or simply add multiple objective functions together. Instead, some constraints need to be imposed on the objective functions of different groups. In recent years, some methods have also considered incorporating Pareto into the group fairness problem, taking overall satisfaction, group fairness, and social welfare as multi-optimization objectives, that is, by checking whether adding new recommended items will exceed the optimal value of the current multi-objective function to continuously search for the Pareto frontier until convergence; but the application and effect of these methods in POI recommendation systems have not yet been clarified. Therefore, the existing system has not paid attention to the problem of data imbalance between different groups in the data set, which will cause the model to predict the group with a smaller amount of data inaccurately relative to the group with a larger amount of data. Summary of the invention
[0005] The main technical problem solved by the present invention is to provide a POI recommendation device, method, electronic device and readable storage medium, which effectively solve the problems of data imbalance, group preference diversity and group fairness in the existing POI recommendation system, and achieve the technical effects of improving recommendation accuracy, enhancing fairness and optimizing the training process.
[0006] In order to solve the above technical problems, a technical solution adopted by the present invention is: to provide a POI recommendation device, the device comprising: a user grouping module, used to group users so as to divide users into different user groups; a configuration module, used to assign initial weights to each user group and initialize model parameters; a model training module, used to train the deep neural network model using the objective function to obtain a training set loss function; a validation set loss calculation module, used to calculate the validation set loss value based on the training set loss function obtained by training the deep neural network model by the model training module; a user group weight adjustment module, used to adjust the weights of each user group according to a predetermined weight update rule based on the validation set loss value calculated by the validation set loss calculation module; wherein the weight update rule is: if the validation set loss value of the user group is not less than the validation set loss function value of the user group with the worst learning of the best model obtained in the historical iteration, then the weight value of the group is increased; a validation set loss judgment module, used to judge whether the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value of the historical optimal model on all user groups. The configuration module is also used to: when the validation set loss judgment module determines that the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, and when better results are achieved in at least one user group, update the historical optimal model parameters, record the loss value of the current model as a new benchmark, and reset the model parameters at the same time; and when the validation set loss judgment module determines that the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, adjust the model parameters to reduce the adjustment range of the user group weights; the model training module is also used to determine whether the model has converged; the configuration module is also used to: when it is confirmed that the model has converged, call the parameters of the historical optimal model and configure the parameters of the historical optimal model for the model to use the model to predict the user's POI; and when it is confirmed that the model has not converged, call the parameters of the historical optimal model and configure the parameters of the historical optimal model for the model, so that the model training module continues to train the current model using the objective function until the model converges.
[0007] The user grouping module is used to divide users into different groups according to their behavioral characteristics and social attributes to form different user groups; wherein the behavioral characteristics and social attributes of users include the number of check-ins and the number of friends.
[0008] Wherein, the objective function is defined by formula (2), μ g is the weight of user group g, l g (h) represents the training set loss of user group g under model parameter h;
[0009] Formula (2)
[0010] The predetermined weight update rule is defined by formula (3), and α and K are model parameters:
[0011] Formula (3).
[0012] To solve the above technical problems, another technical solution adopted by the present invention is: to provide a POI recommendation method, the method comprising: grouping users to divide the users into different user groups; and assigning initial weights to each user group, and initializing model parameters; using the objective function, training the deep neural network model to obtain a training set loss function; calculating the loss value of the validation set based on the training set loss function obtained by training the deep neural network model; according to the calculated validation set loss value, adjusting the weights of each user group according to a predetermined weight update rule; wherein the weight update rule is: if the validation set loss value of the user group g is not less than the validation set loss function value of the user group with the worst learning of the best model obtained in the historical iteration, then increasing the weight value of the group; judging whether the validation set loss value vector obtained in the current iteration is not greater than the historical best model loss value vector on all user groups. The validation set loss value vector of the type; when the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, and when better results are achieved in at least one user group, the historical optimal model parameters are updated, the loss value of the current model is recorded as a new benchmark, and the model parameters are reset at the same time; when the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, the model parameters are adjusted to reduce the adjustment range of the user group weights; when it is determined that the model has converged, the parameters of the historical optimal model are called, and the parameters of the historical optimal model are configured for the model to use the model to predict the user's POI; when it is determined that the model has not converged, the parameters of the historical optimal model are called, and the parameters of the historical optimal model are configured for the model, and the current model is continuously trained using the objective function until the model converges.
[0013] The users are grouped to be divided into different user groups, specifically: the users are divided into different groups according to the user's behavioral characteristics and social attributes to form different user groups; wherein the user's behavioral characteristics and social attributes include the number of check-ins and the number of friends.
[0014] Wherein, the objective function is defined by formula (2), μ g is the weight of user group g, l g (h) represents the training set loss of user group g under model parameter h;
[0015] Formula (2)
[0016] The predetermined weight update rule is defined by formula (3), and α and K are model parameters:
[0017] Formula (3).
[0018] To solve the above technical problem, another technical solution adopted by the present invention is: to provide an electronic device, including: a processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor executes the computer instructions, the electronic device executes the steps of the POI recommendation method as described above.
[0019] To solve the above technical problem, another technical solution adopted by the present invention is: providing a readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the steps of the POI recommendation method as described above.
[0020] The present invention provides a POI recommendation device, method, electronic device and readable storage medium, which divide users into different groups according to their behavioral characteristics and social attributes, for example, grouping them according to the number of check-ins and the number of friends to form different user groups, and assigning initial weights to each user group, taking into account the diverse preferences of different user groups, so that the recommendation results can better meet the needs of different user groups, solve the data imbalance problem of different groups in the data set, and improve the prediction accuracy of the model for groups with smaller data volumes; use a deep neural network model, and perform multi-epoch training through an objective function, consider the impact of the data volume on the verification loss of each user group, and optimize group fairness; according to the verification set loss value, use a strategy similar to the MiniMax algorithm to adjust the weight of each user group to ensure Pareto utility; judge whether the verification set loss value vector of the current iteration is better than the historical optimal model to approach the Pareto optimal; thereby, through weight adjustment and Pareto optimization, ensure the fairness of the model output to each group, and avoid the problem that a single objective function cannot balance the goals of multiple groups. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a functional structure diagram of a POI recommendation device in an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of updating a group weight algorithm in an embodiment of the present invention;
[0023] Figure 3 is a flowchart of a POI recommendation method in an embodiment of the present invention;
[0024] Figure 4 It is a schematic diagram of the hardware structure of an electronic device in an embodiment of the present invention.
[0025] The reference numerals in the above drawings are described as follows:
[0026] 10. Recommendation device; 11. User grouping module; 12. Configuration module; 13. Model training module; 14. Validation set loss calculation module; 15. User group weight adjustment module; 16. Validation set loss judgment module; DETAILED DESCRIPTION
[0027] In order to explain the technical content, structural features, achieved objectives and effects of the present invention in detail, the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0028] See also Figure 1, is a functional module diagram of a POI recommendation device in an embodiment of the present invention. The recommendation device 10 includes: a user grouping module 11, a configuration module 12, a model training module 13, a validation set loss calculation module 14, a user group weight adjustment module 15, and a validation set loss judgment module 16.
[0029] The user grouping module 11 is used to group users so as to divide the users into different user groups. Specifically, the user grouping module 11 divides the users into different groups according to the user's behavior characteristics and social attributes so as to form different user groups.
[0030] In this embodiment, the user's behavioral characteristics and social attributes include the number of check-ins and the number of friends.
[0031] Because different users have different trajectory movement preferences, for example, young people usually like to go to shopping malls on weekends, while the elderly may prefer to go to parks; for users with families, they may go to the supermarket after get off work, while single users are more likely to go to restaurants with friends after get off work. Therefore, users of different ages, living habits and social behaviors tend to visit different types of POIs. The purpose of user grouping is to capture the trajectory movement preferences of different user groups.
[0032] Foursquare is a location-based service and social networking company that allows users to "check in" to their location and share this information with friends. Users can discover new places such as restaurants, cafes, stores, etc. through Foursquare and view other people's recommendations and reviews. In addition, Foursquare also provides some business analysis tools to help businesses understand customer behavior and preferences.
[0033] Gowalla is a location-based social networking service that allows users to share their location by "checking in" at specific places.
[0034] The POI recommendation method in the embodiment of the present invention collects relevant data on user behavior characteristics and social attributes using the existing data sets Foursquare and gowalla. In the data sets Foursquare and gowalla, due to information limitations, users are grouped by the number of friends and the number of historical check-ins. Generally speaking, users with many friends or a large number of check-ins prefer to use social networking and are more likely to go to places with social attributes. Considering the significance of grouping to reality and the distribution of data sets, the grouping strategy adopted is: users are divided into different groups according to the number of check-ins and the number of friends; for example, users with a check-in number between 100 and 200 are in one group (most users meet this condition), users between 200 and 400 are in another group (there are still many users in this range, and this group includes users who are more likely to go out and love socializing than the previous group), and those with more than 400 are in one group (few people have so many check-in records, representing a very small number). The number of friends also adopts a similar division strategy, and finally 9 groups of user groups are obtained.
[0035] The configuration module 12 is used to assign an initial weight to each user group and initialize model parameters.
[0036] Specifically, the configuration module 12 assigns an equal initial weight to each user group. The sum of the weights of all user groups is 1, as described in formula (1), ensuring that the overall importance of each user group in model training is balanced. Figure 2 As shown, each user group is assigned an equal initial weight, represented by the equal size of the user icons.
[0037] Formula (1)
[0038] As described in formula (1), g For user groups, | G | is the total number of user groups, μ is the weight, μ g For user groups g The weight of .
[0039] The initial equal distribution of weights reflects the system's neutral attitude towards all user groups in the early stages of model training, without favoring any particular group. The restriction on the sum of weights ensures the normalization of weight distribution, which is crucial for subsequent model optimization and loss function balance.
[0040] The model parameters are hyperparameters α and K, which are used to adjust the weights of user groups (described in detail in subsequent steps), specifically:
[0041] α (learning rate): used to control the magnitude of weight updates to prevent weight updates from being too fast or too slow.
[0042] K (control parameter): In MiniMax or other optimization algorithms, K is used to balance the weight updates of different user groups to ensure fairness among groups. The initial value of K is usually set to 1 to provide a benchmark for subsequent weight updates.
[0043] The model training module 13 is used to train the deep neural network model using the objective function.
[0044] The objective function is defined by formula (2):
[0045] Formula (2)
[0046] μ g is the weight of user group g, l g (h) represents the training set loss of user group g under the model parameter h.
[0047] Loss function l g (h) quantifies the difference between the model prediction and the actual observation, which is the objective that the model optimization process attempts to minimize.
[0048] Specifically, formula (2) defines the optimization objective of the model parameter h, i.e., minimizing the sum of weighted losses. Using the objective function, the deep neural network is trained for multiple epochs, and the optimal parameters are selected to minimize the overall loss. At the same time, the impact of the data volume on the verification loss of each user group is considered to achieve the optimization objective of group fairness. Among them, user groups with a small amount of data may lead to insufficient model learning due to insufficient sample diversity, which is reflected in higher verification losses. Figure 2 As shown in the figure, user group 1 (group 1) has the largest amount of data, so its training loss loss 1 is the smallest; user group 3 (group 3) has the smallest amount of data, so its training loss loss 3 is the largest.
[0049] In this way, the objective function optimizes the model to minimize the overall weighted loss rather than the loss of a single group by combining the loss and corresponding weight of each user group g. Through training for multiple epochs, the model can fully learn the data features while avoiding overfitting. During the training process, the model parameters that perform best on the validation set are selected to ensure the generalization ability of the model. User group weight μ gIt plays a role in adjusting the impact of losses of different groups in the objective function, so that the model training not only focuses on the group with large data volume, but also considers the group with small data volume. By minimizing weighted losses, the model training process takes into account group fairness and tries to balance the prediction performance of different groups. During the training process, the model parameter h is continuously updated to adapt to the minimization requirements of the overall objective function.
[0050] The validation set loss calculation module 14 is used to calculate the validation set loss value based on the optimal model parameters obtained by training the deep neural network model by the model training module 13.
[0051] like Figure 2 As shown in Figure 2, step 2 shows the loss of the model on the validation set after training, where the loss values of different groups vary depending on the amount of data.
[0052] Since the amount of data for different groups may be different, the validation loss of the model on each group may be different, which helps to identify which groups need further optimization. The loss value of the validation set reflects the performance of the model on new data and is an important indicator for evaluating the generalization ability of the model. A low loss value indicates that the model has good generalization ability. By comparing the validation set loss values of different groups, the prediction performance of the model for different user groups can be evaluated.
[0053] The user group weight adjustment module 15 is used to adjust the weight of each user group according to the validation set loss value calculated by the validation set loss calculation module 14 and in accordance with a predetermined weight update rule.
[0054] The predetermined weight update rule is defined by formula (3):
[0055] Formula (3)
[0056] Specifically, the formula (3) indicates that: if the validation set loss value of user group g is not less than the validation set loss function value of the user group with the worst learning of the best model obtained in the historical iteration The weight of the group is increased. According to the performance of the model on the validation set, the weight of the user group is updated by adjusting α and K to optimize the prediction performance of the model, while taking into account the preferences and fairness of different user groups. Indicates that each element corresponds to a user group. If the validation set loss value of the group is not less than the validation set loss function value of the worst learning user group in the historical optimal model, the element is 1, otherwise it is 0. Represents the sum of the absolute values of all elements in the vector. Represents the validation set loss value of the g-th user group under the current model parameter μ. It represents the validation set loss function value of the user group with the worst learning in the historical optimal model. Used to compare the validation set loss value of the g-th user group under the current model parameters The validation set loss function value of the user group with the worst learning in the historical optimal model .
[0057] It should be noted that after adjusting the weight value according to formula (3), the updated weight vector μ must meet the normalization condition, that is, the sum of all weights is equal to 1 (formula (2)) to maintain the balance of weights of each group in model training.
[0058] In this way, the weight of the user group with higher validation set loss value is increased through formula (3). By adjusting the weight, the model will pay more attention to the group that was previously predicted inaccurately in subsequent training to achieve group fairness.
[0059] In this implementation, the weight update strategy refers to the MiniMax algorithm to ensure that the updated weight configuration meets the Pareto utility and does not reduce the prediction accuracy of any group. Each iteration selects the group with the worst learning effect, and strengthens the learning of this group in the next iteration, while ensuring that the prediction accuracy of other groups is not lost.
[0060] like Figure 2 As shown, the user group weight adjustment module 15 adjusts the weight of each user group according to the validation set loss value calculated by the validation set loss calculation module 14 according to the predetermined weight update rule, corresponding to Figure 2 Step 3 in shows the weight update process. Figure 2 As shown in step 3 of , the weights of groups with small loss values need to be lowered, and the weights of groups with large loss values need to be increased to ensure that in the next iteration the model can pay more attention to the previously inaccurately predicted group information.
[0061] Weight updating is a dynamic adjustment process that optimizes weight distribution based on the validation set loss value of each group. Groups with higher loss values will receive higher weights, prompting the model to achieve better performance on these groups. The weight update strategy focuses on the fairness of the model to different groups and avoids the model being biased towards groups with larger data volumes. Through continuous iteration, the model gradually optimizes the prediction accuracy for all user groups, especially those that performed poorly in the initial training. Through weight updating, the system can gradually identify and adjust those user groups that may be underestimated in the initial state, thereby improving the model's generalization ability for all groups.
[0062] The validation set loss judgment module 15 is used to judge whether the validation set loss value vector obtained in the current iteration is not greater than the loss value of the historical optimal model in all user groups.
[0063] It should be noted that in order to make the model close to Pareto optimality, the algorithm will determine in each iteration whether the validation set loss value vector obtained by the model is better than the result of the best historical model, that is, the validation set loss judgment module 15 determines whether the validation set loss value of each user group is not greater than the validation set loss value of each group corresponding to the best historical model.
[0064] Check whether the loss value vector of the current model is no greater than the loss value of the best historical model on all user groups, that is, whether there is a Pareto advantage, and decide whether to save the model parameters or continue iterative optimization based on this. Pay special attention to the validation set loss value of the group with the worst model prediction, and compare it with the historical minimum value. Pareto optimality means that in multi-objective optimization, the state of a certain goal cannot be improved by sacrificing other goals. In this step, this means that the loss of the current model on all user groups is no worse than the best historical model.
[0065] The validation set loss value of the group with the worst prediction by the model is less than the minimum value of the validation set loss value of all historical models, or there is no trained model in history: When comparing the current model with all historical trained models, even if the current model does not perform as well as the best historical model on some user groups, as long as its loss value on all user groups is not worse than the historical model, and it has a better loss value on at least one user group, then the current model is considered to have a Pareto advantage. Among all user groups, if the loss value of the current model on the group of users with the worst performance is less than the minimum loss value of all historical models on the same user group, then the performance of the current model on this part of users is improved. If this is the first training, or no model has reached a comparable level before, then the current model can be considered improved even if its performance on all user groups is not very good, because it is the first attempt.
[0066] If the loss value vector obtained in the current iteration is at least as good as (not greater than) the best historical model in each group, the current model is considered to have Pareto advantage.
[0067] By comparing the loss values of the worst group, the algorithm ensures that model improvements cover all groups, especially those that originally had poor prediction performance.
[0068] The configuration module 12 is further used for:
[0069] When the validation set loss judgment module 16 determines that the validation set loss value vector obtained in the current iteration is not greater than the loss value of the historical optimal model in all user groups, and a better result is achieved in at least one user group, the historical optimal model parameters are updated, and the loss value of the current model is recorded as a new benchmark, and the hyperparameter K used in the iteration process is reset; and
[0070] When the validation set loss judgment module 16 determines that the validation set loss value vector obtained in the current iteration is not greater than the loss value of the historical optimal model in all user groups, the value of the hyperparameter K is increased to reduce the adjustment range of the user group weight.
[0071] When the validation set loss value of the model on all user groups is no greater than the historical best model, and a lower loss value is achieved on at least one user group, it means that the current model has surpassed all previous models in overall performance. Therefore, the parameters of the current model need to be saved as the new "historical best model". In multi-objective optimization, it is hoped that the model will perform well on all objectives. Therefore, when the current model achieves better results on at least one objective, the loss value in the historical record needs to be updated to reflect the improvement of this iteration.
[0072] In the iterative optimization process, the hyperparameter K may be used to balance the weights between different objectives or control the complexity of the model. When the model reaches a new optimal state, resetting K allows the model to start the next iteration from a new starting point, which helps explore a wider parameter space and avoid falling into a local optimum.
[0073] Saving the current model parameters is to facilitate use in future training or as a basis for model deployment, which ensures that the optimal state of the model can be reproduced and utilized.
[0074] The hyperparameter K is usually used to control the weight balance between different objectives or user groups. By adjusting the value of K, the performance of the model on different user groups can be affected, making it more inclined to optimize the overall performance or the performance of a specific group. If the validation set loss result of the model is not better than the historical optimal model in the current iteration, it means that the current weight setting and model parameters may not reach the ideal balance point. Therefore, the hyperparameter K needs to be adjusted to change the direction of model training.
[0075] Increasing the value of hyperparameter K will reduce the adjustment range of user group weights in formula (3), which is equivalent to reducing the optimization intensity for a specific user group in model training, giving the model more opportunities to explore the optimization space of other user groups. By adjusting the hyperparameter K, the algorithm can encourage the model to find better solutions globally, rather than just achieving good performance on certain specific user groups. This helps avoid overfitting to a specific data subset and improves the generalization ability of the model.
[0076] The model training module 13 is also used to determine whether the model has converged.
[0077] When it is confirmed that the model has converged, the configuration module 12 calls the parameters of the historical optimal model and configures the parameters of the historical optimal model for the model to predict the user's POI using the model.
[0078] When it is confirmed that the model has not converged, the configuration module 12 calls the parameters of the historical optimal model and configures the parameters of the historical optimal model for the model, so that the model training module 13 continues to train the current model using the objective function, and repeats the calculation of the validation set loss value, the adjustment of the user group weight, and the judgment of the validation set loss value until the model converges.
[0079] In optimization algorithms, convergence means that the performance of the model no longer improves significantly after a series of iterations. This usually means that the model has approached or reached the optimal state, and further iterations may not bring about performance improvements. The goal of the algorithm is to approach Pareto optimality, that is, to find a balance in multi-objective optimization so that no objective can be improved by sacrificing other objectives. Convergence means that the algorithm has approached this equilibrium state as closely as possible.
[0080] In order to approach Pareto optimality, the algorithm needs to continuously iterate and adjust the weights of the user groups until the model converges. In this embodiment, the convergence criterion is: if the performance of the model does not exceed the historical optimal model in more than 10 consecutive iterations, the model is considered to have converged.
[0081] The purpose of setting an upper limit on the number of iterations is to prevent the algorithm from getting stuck in an infinite loop and to ensure that the algorithm can complete in a reasonable amount of time. At the same time, this also helps prevent overfitting, that is, the model performs well on the training data but performs poorly on new data.
[0082] In the following, a POI recommendation device in an embodiment of the present invention is described by way of example in combination with a specific application scenario to implement intelligent and personalized software installation recommendations according to the software installation environment in the user's computer.
[0083] The user grouping module 11 groups users into different groups according to the types of software installed by the users, the frequency of use, and the behavioral characteristics of the users (such as the operating system, hardware configuration, etc.). Specifically, the user grouping module 11 can use the installation logs and usage data in the user's computer to identify the user's behavior patterns and preferences through algorithms, and then group them.
[0084] The configuration module 12 assigns initial weights to each user group and initializes the parameters of the recommendation model. Specifically, the configuration module 12 assigns weights according to the characteristics of the user groups to ensure that the importance of different groups in the recommendation system is balanced. At the same time, the model parameters, such as the parameters of the recommendation algorithm, are set to adjust the relevance of the recommendations.
[0085] The model training module 13 uses the objective function to train the recommendation model to minimize the overall loss and optimize group fairness. Specifically, the model training module 13 collects user feedback on the recommended software (such as installation, usage frequency, rating, etc.), trains the model to identify user preferences, and optimizes the recommendation algorithm.
[0086] The validation set loss calculation module 14 calculates the validation set loss value to evaluate the recommendation effect of the model on different user groups. For example, a portion of user data is used as a validation set to calculate the recommendation effect of the model to ensure the accuracy and fairness of the recommendation system.
[0087] The user group weight adjustment module 15 adjusts the weight of each user group according to the validation set loss value to optimize the recommendation effect. If the recommendation effect of a certain group is not good, the weight of the group is increased so that the model pays more attention to the needs of the group in the next round of training.
[0088] The validation set loss judgment module 16 judges whether the recommendation effect of the current model is better than the historical optimal model. Specifically, the validation set loss judgment module 16 compares the validation set loss of the current model with the historical optimal model, and updates the historical optimal model if the current model performs better.
[0089] The model training module 13 adjusts the hyperparameters to control the weight adjustment range when the model has not converged. If the model has not improved significantly in consecutive iterations, the hyperparameter values are increased and the weight adjustment range is reduced to promote model convergence.
[0090] Finally, the device 10 can calculate the correlation value between the non-installed software and the software installed by the user according to the user's behavior characteristics and the installed software, and then recommend the software according to the correlation value.
[0091] In this way, the system can not only provide personalized software recommendations, but also ensure the fairness and accuracy of the recommendation results, thereby improving user satisfaction and software installation rate.
[0092] As described above, the POI recommendation device 10 in the embodiment of the present invention has the following technical effects:
[0093] (1) Users are divided into different groups based on their behavioral characteristics and social attributes. For example, users are grouped according to the number of check-ins and the number of friends to form different user groups. An initial weight is assigned to each user group. The diverse preferences of different user groups are taken into account, so that the recommendation results can better meet the needs of different user groups, solve the data imbalance problem of different groups in the data set, and improve the prediction accuracy of the model for groups with smaller data volumes.
[0094] (2) Using a deep neural network model and performing multi-epoch training through an objective function, we consider the impact of data volume on the verification loss of each user group and optimize group fairness;
[0095] (3) According to the validation set loss value, a strategy similar to the MiniMax algorithm is used to adjust the weights of each user group to ensure Pareto utility; determine whether the validation set loss value vector of the current iteration is better than the historical optimal model to approach Pareto optimality; thus, through weight adjustment and Pareto optimization, the fairness of the model output to each group is ensured, avoiding the problem that a single objective function cannot balance the objectives of multiple groups.
[0096] See also Figure 3 , is a flow chart of a POI recommendation method in an embodiment of the present invention. The method is applied to a POI recommendation device 10 as described above. The method includes:
[0097] Step S20, grouping users to divide them into different user groups; assigning initial weights to each user group, and initializing model parameters.
[0098] Specifically, users are divided into different groups according to their behavioral characteristics and social attributes to form different user groups.
[0099] In this embodiment, the user's behavioral characteristics and social attributes include the number of check-ins and the number of friends.
[0100] Furthermore, the sum of the weights of all user groups is 1, as described in formula (1), ensuring that the overall importance of each group is balanced in model training.
[0101] Formula (1)
[0102] As described in formula (1), g is the user group, |G| is the total number of user groups, μ is the weight, and μ g is the weight of user group g.
[0103] The model parameters are hyperparameters α and K, which are used to adjust the weights of user groups (described in detail in subsequent steps), specifically:
[0104] α (learning rate): used to control the magnitude of weight updates to prevent weight updates from being too fast or too slow.
[0105] K (control parameter): In MiniMax or other optimization algorithms, K is used to balance the weight updates of different user groups to ensure fairness among groups. The initial value of K is usually set to 1 to provide a benchmark for subsequent weight updates.
[0106] Step S21, using the objective function to train the deep neural network model.
[0107] The objective function is defined by formula (2):
[0108] Formula (2)
[0109] μ g is the weight of user group g, l g (h) represents the training set loss of user group g under the model parameter h.
[0110] Step S22, based on the optimal model parameters obtained by training the deep neural network model, calculate the loss value of the validation set.
[0111] Step S23, according to the calculated validation set loss value, the weight of each user group is adjusted according to a predetermined weight update rule.
[0112] The predetermined weight update rule is defined by formula (3):
[0113] Formula (3)
[0114] Specifically, the formula (3) indicates that: if the validation set loss value of the user group g is not less than the validation set loss function value of the user group with the worst learning of the best model obtained in the historical iteration Then increase the weight of this group. Indicates that each element corresponds to a user group. If the validation set loss value of the group is not less than the validation set loss function value of the worst learning user group in the historical optimal model, the element is 1, otherwise it is 0. Represents the sum of the absolute values of all elements in the vector. Represents the validation set loss value of the g-th user group under the current model parameter μ. It represents the validation set loss function value of the user group with the worst learning in the historical optimal model. Used to compare the validation set loss value of the g-th user group under the current model parameters The validation set loss function value of the user group with the worst learning in the historical optimal model .
[0115] It should be noted that after adjusting the weight value according to formula (3), the updated weight vector μ must meet the normalization condition, that is, the sum of all weights is equal to 1 (formula (2)) to maintain the balance of weights of each group in model training.
[0116] Step S24, determine whether the validation set loss value vector obtained in the current iteration is not greater than the loss value of the historical best model in all user groups. If so, proceed to step S25; otherwise, proceed to step S26.
[0117] Specifically, in order to make the model close to Pareto optimality, the algorithm will determine in each iteration whether the validation set loss value vector obtained by the model is better than the result of the best historical model, that is, whether the validation set loss value of each user group is not greater than the validation set loss value of each group corresponding to the best historical model.
[0118] In order to approach Pareto optimality, the algorithm will perform this judgment after each iteration, that is, whether the validation set loss value of each user group is not greater than the validation set loss value of each group corresponding to the best historical model. If the validation set loss value of each user group obtained in this iteration is not greater than the validation set loss value of each group corresponding to the best historical model, or this iteration is the first time, then go to step S25; otherwise, go to step S26.
[0119] Step S25: When the performance of the current model on all user groups is better than or equal to the historical best model, and when better results are achieved on at least one user group, update the historical best model parameters, record the loss value of the current model as a new benchmark, and reset the hyperparameter K used in the iteration process. Then, proceed to step S27.
[0120] When the validation set loss value of the model on all user groups is no greater than the historical best model, and a lower loss value is achieved on at least one user group, it means that the current model has surpassed all previous models in overall performance. Therefore, the parameters of the current model need to be saved as the new "historical best model". In multi-objective optimization, it is hoped that the model will perform well on all objectives. Therefore, when the current model achieves better results on at least one objective, the loss value in the historical record needs to be updated to reflect the improvement of this iteration.
[0121] In the iterative optimization process, the hyperparameter K may be used to balance the weights between different objectives or control the complexity of the model. When the model reaches a new optimal state, resetting K allows the model to start the next iteration from a new starting point, which helps explore a wider parameter space and avoid falling into a local optimum.
[0122] Saving the current model parameters is to facilitate use in future training or as a basis for model deployment, which ensures that the optimal state of the model can be reproduced and utilized.
[0123] Step S26: When the current model fails to surpass the historical optimal model, the value of the hyperparameter K is increased to reduce the adjustment range of the user group weight. Then, the process proceeds to step S27.
[0124] The hyperparameter K is usually used to control the weight balance between different objectives or user groups. By adjusting the value of K, the performance of the model on different user groups can be affected, making it more inclined to optimize the overall performance or the performance of a specific group. If the validation set loss result of the model is not better than the historical optimal model in the current iteration, it means that the current weight setting and model parameters may not reach the ideal balance point. Therefore, the hyperparameter K needs to be adjusted to change the direction of model training.
[0125] Increasing the value of hyperparameter K will reduce the adjustment range of user group weights in formula (3), which is equivalent to reducing the optimization intensity for a specific user group in model training, giving the model more opportunities to explore the optimization space of other user groups. By adjusting the hyperparameter K, the algorithm can encourage the model to find better solutions globally, rather than just achieving good performance on certain specific user groups. This helps avoid overfitting to a specific data subset and improves the generalization ability of the model.
[0126] Step S26 is part of the iterative optimization process. By continuously adjusting the value of K, the algorithm can gradually approach the optimal solution in multiple rounds of iterations. Each iteration is an exploration of the model performance. In this way, the algorithm can more comprehensively evaluate the performance of the model under different parameter settings. The adjustment of the hyperparameter K can be regarded as a strategy to guide the direction of model training. This strategy needs to be dynamically adjusted according to the performance of the model on the validation set to ensure that the model can achieve good performance on all user groups.
[0127] Step S27, determine whether the model has converged; if so, the process ends; otherwise, return to step S21.
[0128] Among them, it is determined whether the model has reached a convergence state by failing to achieve performance improvement through multiple consecutive iterations.
[0129] In optimization algorithms, convergence means that the performance of the model no longer improves significantly after a series of iterations. This usually means that the model has approached or reached the optimal state, and further iterations may not bring about performance improvements. The goal of the algorithm is to approach Pareto optimality, that is, to find a balance in multi-objective optimization so that no objective can be improved by sacrificing other objectives. Convergence means that the algorithm has approached this equilibrium state as closely as possible.
[0130] In this embodiment, the convergence criterion is that if the performance of the model does not exceed the historical optimal model in more than 10 consecutive iterations, then the model is considered to have converged. If the model converges, the algorithm will return the parameters of the historical optimal model and end the iteration process. These parameters will be used for subsequent user POI location prediction. If the model does not converge, the algorithm will continue to use the historical optimal model for the next iteration and repeat the previous steps until the model converges.
[0131] The purpose of setting an upper limit on the number of iterations is to prevent the algorithm from getting stuck in an infinite loop and to ensure that the algorithm can complete in a reasonable amount of time. At the same time, this also helps prevent overfitting, that is, the model performs well on the training data but performs poorly on new data.
[0132] The advantages and beneficial effects of a POI recommendation device 10 have been described above and will not be repeated here. Moreover, since a POI recommendation method is applied to a POI recommendation device, the POI recommendation method has the same advantages and beneficial effects.
[0133] One embodiment of the present invention further provides a readable storage medium, in which a computer program is stored. The computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the steps of any one of the POI recommendation methods described above.
[0134] One embodiment of the present invention further provides an electronic device, including: a processor and a memory, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor executes the computer instructions, the electronic device executes the steps of any one of the POI recommendation methods described above.
[0135] See also Figure 4 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention.
[0136] The electronic device 3 includes a processor 31, an input device 32, an output device 33, and a memory 34. The processor 31, the input device 32, the output device 33, and the memory 34 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present invention. It should be understood that in various embodiments of the present invention, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0137] The processor 31 may be one or more central processing units (CPUs). When the processor 31 is a CPU, the CPU may be a single-core CPU or a multi-core CPU. Optionally, the processor 31 may be a processor group consisting of multiple CPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor 31 may also be other types of processors, etc., which are not limited in the embodiments of the present invention.
[0138] The memory 34 can be used to store computer program instructions and various computer program codes including program codes for executing the scheme of the present invention. Optionally, the memory includes at least a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM), which is used for related instructions and data.
[0139] The input device 32 is used to input data and / or signals, and the output device 33 is used to output data and / or signals. The output device 33 and the input device 32 may be independent devices or an integrated device.
[0140] It is understandable that in the embodiment of the present invention, the memory 34 can be used not only to store relevant instructions, and the embodiment of the present invention does not limit the specific data stored in the memory.
[0141] Understandably, Figure 4 Only a simplified design of an electronic device is shown. In practical applications, the electronic device may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all POI recommendation devices that can implement the embodiments of the present invention are within the protection scope of the present invention.
[0142] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical or other forms.
[0143] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0144] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of the present invention can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a management server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: read-only memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0146] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A POI recommendation device, characterized in that: The device comprises: A user grouping module is used to group users so as to divide them into different user groups; Configuration module, used to assign initial weights to each user group and initialize model parameters; A model training module is used to train the deep neural network model using the objective function to obtain a training set loss function; A validation set loss calculation module, used to calculate a validation set loss value based on the training set loss function obtained by the model training module; A user group weight adjustment module, used to adjust the weight of each user group according to the validation set loss value calculated by the validation set loss calculation module and in accordance with a predetermined weight update rule; wherein the weight update rule is: when the validation set loss value of a user group is not less than the average loss value, the weight of the user group is increased; The validation set loss judgment module is used to judge whether the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups; The configuration module is also used for: When the validation set loss judgment module determines that the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, and a better result is achieved in at least one user group, the historical optimal model parameters are updated, the loss value of the current model is recorded as a new benchmark, and the model parameters are reset; and When the validation set loss judgment module determines that the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, adjusting the model parameters to reduce the adjustment range of the user group weights; The model training module is also used to determine whether the model has converged; The configuration module is also used for: When it is confirmed that the model has converged, calling the parameters of the historical optimal model and configuring the parameters of the historical optimal model for the model to predict the user's POI using the deep neural network model; and When it is confirmed that the model has not converged, the parameters of the historical optimal model are called, and the parameters of the historical optimal model are configured for the model, so that the model training module continues to train the current model using the objective function until the model converges.
2. The POI recommendation device according to claim 1, characterized in that: The user grouping module is used to divide users into different groups according to their behavioral characteristics and social attributes to form different user groups; wherein the behavioral characteristics and social attributes of users include the number of sign-ins and the number of friends.
3. The POI recommendation device according to claim 2, characterized in that: The objective function is defined by formula (2), where g represents the user group, |G| is the total number of user groups, and μ g represents the weight of user group g, l g (h) represents the training set loss value of user group g under model parameter h; Formula(2).
4. The POI recommendation device according to claim 3, characterized in that: The predetermined weight update rule is defined by formula (3), where α and K represent model parameters, Indicates the validation set loss value of the user group with the worst learning in the historical optimal model; Indicates that each element corresponds to a user group. When the validation set loss value of the group is not less than the validation set loss value of the worst learning user group in the historical optimal model, the element is 1, otherwise it is 0; Represents the validation set loss value of the g-th user group under the current model parameter μ: Formula(3).
5. A POI recommendation method, characterized in that: The method comprises: Group users to classify them into different user groups; assign initial weights to each user group, and initialize model parameters; Using the objective function, the deep neural network model is trained to obtain the training set loss function; Calculate the validation set loss value based on the training set loss function obtained by training the deep neural network model; According to the calculated validation set loss value, the weight of each user group is adjusted according to a predetermined weight update rule; wherein the weight update rule is: if the validation set loss value of the user group g is not less than the validation set loss function value of the user group with the worst best model learning obtained in the historical iteration, then the weight value of the group is increased; Determine whether the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical best model in all user groups; when the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical best model in all user groups, and when better results are obtained in at least one user group, update the historical best model parameters, record the loss value of the current model as a new benchmark, and reset the model parameters at the same time; When the validation set loss value vector obtained in the current iteration is not greater than the validation set loss value vector of the historical optimal model in all user groups, adjusting the model parameters to reduce the adjustment range of the user group weights; When determining that the model has converged, calling the parameters of the historical optimal model, and configuring the parameters of the historical optimal model for the model, so as to predict the user's POI using the deep neural network model; When it is determined that the model has not converged, the parameters of the historical optimal model are called, and the parameters of the historical optimal model are configured for the model, and the current model is continuously trained using the objective function until the model converges.
6. The POI recommendation method according to claim 5, characterized in that: Grouping users to divide them into different user groups, specifically: dividing users into different groups according to their behavioral characteristics and social attributes to form different user groups; wherein the behavioral characteristics and social attributes of users include the number of check-ins and the number of friends.
7. The POI recommendation method according to claim 6, characterized in that: The objective function is defined by formula (2), μ g is the weight of user group g, l g (h) represents the training set loss value of user group g under model parameter h; Formula(2).
8. The POI recommendation method according to claim 7, characterized in that: The predetermined weight update rule is defined by formula (3), where α and K are model parameters, Indicates the validation set loss value of the user group with the worst learning in the historical optimal model; Indicates that each element corresponds to a user group. When the validation set loss value of the group is not less than the validation set loss value of the worst learning user group in the historical optimal model, the element is 1, otherwise it is 0; Represents the validation set loss value of the g-th user group under the current model parameter μ: Formula(3).
9. An electronic device, comprising: A processor and a memory, wherein the memory is used to store computer program codes, the computer program codes include computer instructions, and when the processor executes the computer instructions, the electronic device executes the steps of the POI recommendation method as described in any one of claims 5 to 8.
10. A readable storage medium having a computer program stored therein, characterized in that: The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the steps of the POI recommendation method as described in any one of claims 5 to 8.
Citation Information
Patent Citations
Robot aviation equipment drilling process optimization method based on particle swarm optimization and deep learning
CN117332517A
Next interest point recommendation method based on interest point feature grouping and storage medium
CN118606564A