Restaurant recommendation and model training method and device, computer equipment and storage medium

By constructing restaurant pairs and using historical interactions to record data, the data sparsity problem in restaurant recommendation model is solved, and the accuracy and personalization level of the model is improved.

CN120086439APending Publication Date: 2025-06-03SHANGHAI JIDOU TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510159075.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The existing restaurant recommendation model training method has data sparsity problems, resulting in insufficient accuracy of the model.

Method used

By determining interactive restaurants and non-interactive restaurants based on the historical interaction records of the target user and each restaurant, each restaurant pair is constructed, and the characteristic data of each restaurant is obtained from the database, and input it into the restaurant recommendation model to predict user preferences and calculate paired logic losses, and adjust model parameters.

Benefits of technology

Improve the accuracy and personalization of the model, solve the problem of data sparseness, and enable the model to better understand the relationships between restaurants and user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086439A_ABST
    Figure CN120086439A_ABST
Patent Text Reader

Abstract

The invention discloses a restaurant recommendation and model training method and apparatus, a computer device and a storage medium. The method comprises the steps of determining an interactive restaurant and a non-interactive restaurant of a target user according to historical interaction records of the target user and each restaurant; constructing restaurant pairs based on the interactive restaurants and the non-interactive restaurants; obtaining feature data of each restaurant in each restaurant pair from a database storing feature data of each restaurant; inputting the feature data of each restaurant in each restaurant pair into a restaurant recommendation model to predict the user preference of each restaurant in each restaurant pair; according to the user favorite degree of each restaurant in each restaurant pair, pairwise logic loss of each restaurant pair is calculated; summing the paired logic loss of each restaurant pair to obtain training loss, and adjusting network parameters in the restaurant recommendation model according to the training loss. Through the technical scheme of the embodiment of the invention, the accuracy of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of intelligent recommendation, and in particular, to a restaurant recommendation and model training method, device, computer device, and storage medium. Background Art

[0002] With the popularization of the Internet and mobile devices, the catering industry is undergoing an unprecedented digital transformation. In this process, the restaurant recommendation model has become a key tool to help users quickly locate satisfactory dining places.

[0003] However, the existing restaurant recommendation model training methods mainly recommend similar restaurants to users by analyzing the attribute features of restaurants (such as dish types, prices, geographical locations, etc.). Although this method can provide personalized recommendations to a certain extent, it has the problem of data sparsity, resulting in insufficient accuracy of the model.

[0004] Therefore, there is an urgent need to propose a new method to solve the above problems. Summary of the Invention

[0005] The present invention provides a restaurant recommendation and model training method, device, computer device, and storage medium, which improves the accuracy of the model.

[0006] In a first aspect, an embodiment of the present invention provides a method for training a restaurant recommendation model, the method comprising:

[0007] Determining the interaction restaurants and non-interaction restaurants of the target user according to the historical interaction records of the target user and each restaurant;

[0008] Constructing each pair of restaurants based on the interaction restaurants and the non-interaction restaurants;

[0009] Obtaining the feature data of each restaurant in each pair of restaurants from the database storing the feature data of each restaurant;

[0010] Inputting the feature data of each restaurant in each pair of restaurants into the restaurant recommendation model to predict the user preference degree of each restaurant in each pair of restaurants;

[0011] Calculating the pairwise logistic loss of each pair of restaurants according to the user preference degree of each restaurant in each pair of restaurants;

[0012] Summing up the pairwise logistic losses of each pair of restaurants to obtain a training loss, and adjusting the network parameters in the restaurant recommendation model according to the training loss.

[0013] The restaurant recommendation model training method provided by the present invention first determines the interactive restaurants and non-interactive restaurants of the target user based on the historical interaction records between the target user and each restaurant, providing a data basis for constructing each pair of restaurants later. Then, each pair of restaurants is constructed based on the interactive restaurants and non-interactive restaurants, which not only provides more extensive training data for the restaurant recommendation model, improves the data utilization rate, but also enables the model to no longer be limited to the characteristics of a single restaurant when predicting the user's preference for a restaurant, but comprehensively considers the complex relationships between restaurants, thereby helping the model better understand the relationships between restaurants and further improving the accuracy of the model. After that, the characteristic data of each restaurant in each pair of restaurants is obtained from the database storing the characteristic data of each restaurant, providing a more rich and comprehensive data set for the training of the restaurant recommendation model later. This not only solves the problem of data sparsity, but also enables the model to access more diverse restaurant characteristic information, thereby promoting the model's in-depth understanding of user preferences and restaurant attributes, and further enhancing the accuracy and personalization level of the recommendation. Then, the characteristic data of each restaurant in each pair of restaurants is input into the restaurant recommendation model to predict the user preference for each restaurant in each pair of restaurants, providing a data basis for calculating the pairwise logistic loss of each pair of restaurants later. Then, the pairwise logistic loss of each pair of restaurants is calculated according to the user preference for each restaurant in each pair of restaurants, enabling the model to more effectively learn the preference differences of users for different restaurants during training, avoid falling into local optimal solutions, and improve the accuracy of the model. Finally, the pairwise logistic losses of each pair of restaurants are summed to obtain the training loss, and the network parameters in the restaurant recommendation model are adjusted according to the training loss, enabling the model to more accurately capture the preference differences of users for restaurants, thereby enhancing the accuracy and personalization degree of the model. Therefore, the present invention not only improves the accuracy of the model, but also solves the problem of data sparsity existing in the prior art.

[0014] In a second aspect, an embodiment of the present invention further provides a restaurant recommendation method, which includes:

[0015] Obtain the real-time location of the target user, and determine each optional restaurant according to the real-time location and a preset screening distance;

[0016] Obtain the characteristic data of each of the optional restaurants from the database storing the characteristic data of each restaurant, input the characteristic data of each of the optional restaurants into the restaurant recommendation model obtained by using the restaurant recommendation model training method according to any embodiment of the present invention for processing, and obtain the user preference for each of the optional restaurants;

[0017] Sort the user preferences for each of the optional restaurants to obtain the sorting result of each of the optional restaurants;

[0018] Recommend restaurants for the target user based on the sorting result.

[0019] The restaurant recommendation method provided by the present invention first obtains the real-time location of the target user, and determines each optional restaurant according to the real-time location and a preset screening distance, which not only effectively reduces the subsequent calculation burden, but also improves the accuracy of subsequent recommendations, thereby enhancing the user experience. Then, it obtains the feature data of each optional restaurant from the database storing the feature data of each restaurant, inputs the feature data of each optional restaurant into the restaurant recommendation model for processing, and obtains the user preference degree of each optional restaurant, improving the accuracy of determining the user preference degree. Then, it sorts the user preference degrees of each optional restaurant to obtain the sorting result of each optional restaurant, providing a data basis for recommending restaurants to the target user later. Finally, it recommends restaurants to the target user based on the sorting result, improving the accuracy of the recommendation and thus enhancing the user satisfaction.

[0020] In a third aspect, an embodiment of the present invention further provides a restaurant recommendation model training device, which includes:

[0021] A determination module, configured to determine the interactive restaurants and non-interactive restaurants of the target user according to the historical interaction records between the target user and each restaurant;

[0022] A construction module, configured to construct each pair of restaurants based on the interactive restaurants and the non-interactive restaurants;

[0023] An acquisition module, configured to obtain the feature data of each restaurant in each pair of restaurants from the database storing the feature data of each restaurant;

[0024] A prediction module, configured to input the feature data of each restaurant in each pair of restaurants into the restaurant recommendation model to predict the user preference degree of each restaurant in each pair of restaurants;

[0025] A calculation module, configured to calculate the pairwise logistic loss of each pair of restaurants according to the user preference degree of each restaurant in each pair of restaurants, and sum the pairwise logistic losses of each pair of restaurants to obtain a training loss;

[0026] An optimization module, configured to adjust the network parameters in the restaurant recommendation model according to the training loss.

[0027] In a fourth aspect, an embodiment of the present invention further provides a restaurant recommendation device, which includes:

[0028] A screening module, configured to obtain the real-time location of the target user, and determine each optional restaurant according to the real-time location and a preset screening distance;

[0029] A popularity calculation module, configured to obtain the feature data of each of the optional restaurants from a database storing the feature data of each restaurant, input the feature data of each of the optional restaurants into the restaurant recommendation model obtained by using the restaurant recommendation model training method according to any embodiment of the present invention for processing, and obtain the user popularity of each of the optional restaurants;

[0030] A sorting module, configured to sort the user popularity of each of the optional restaurants to obtain a sorting result of each of the optional restaurants;

[0031] A recommendation module, configured to recommend restaurants for the target user based on the sorting result.

[0032] In a fifth aspect, an embodiment of the present invention further provides a computer device, which includes:

[0033] At least one processor; and a memory communicatively connected to the at least one processor;

[0034] Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the restaurant recommendation model training method according to any embodiment of the present invention, or execute the restaurant recommendation method according to any embodiment of the present invention.

[0035] In a sixth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the restaurant recommendation model training method according to any embodiment of the present invention, or execute the restaurant recommendation method according to any embodiment of the present invention when executed by a computer processor.

[0036] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium. Among them, the computer-readable storage medium may be packaged together with the processor of the restaurant recommendation model training device and the restaurant recommendation device, or may be separately packaged from the processor of the restaurant recommendation model training device and the restaurant recommendation device, and the present application does not make any limitation in this regard.

[0037] The description of the third aspect in this application may refer to the detailed description of the first aspect; and, for the beneficial effects described in the third aspect, reference may be made to the analysis of the beneficial effects of the first aspect, and details are not described herein again.

[0038] The description of the fourth aspect in this application may refer to the detailed description of the second aspect; and, for the beneficial effects described in the fourth aspect, reference may be made to the analysis of the beneficial effects of the second aspect, and details are not described herein again.

[0039] For the descriptions of the fifth and sixth aspects in this application, reference can be made to the detailed descriptions of the first and second aspects; moreover, for the beneficial effects described in the fifth and sixth aspects, reference can be made to the analysis of the beneficial effects of the first and second aspects, and thus will not be elaborated here.

[0040] In this application, the names of the above-mentioned restaurant recommendation model training device and restaurant recommendation device do not constitute a limitation on the device or functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those of this application and fall within the scope of the claims of this application and their equivalent technologies.

[0041] These aspects or other aspects of this application will be made more concise and understandable in the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0043] Figure 1 It is a flowchart of a method for training a restaurant recommendation model provided by an embodiment of the present invention;

[0044] Figure 2 It is a flowchart of another method for training a restaurant recommendation model provided by an embodiment of the present invention;

[0045] Figure 3 It is a flowchart of a method for restaurant recommendation provided by an embodiment of the present invention;

[0046] Figure 4 It is a schematic structural diagram of a restaurant recommendation model training device provided by an embodiment of the present invention;

[0047] Figure 5 It is a schematic structural diagram of a restaurant recommendation device provided by an embodiment of the present invention;

[0048] Figure 6 It is a schematic structural diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0049] The following will further elaborate on the present invention in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention and not to limit the present invention. Additionally, it should be noted that for the sake of convenience of description, only parts related to the present invention rather than all structures are shown in the drawings.

[0050] As used herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, both A and B exist simultaneously, and B exists alone.

[0051] Terms such as "first" and "second" in the specification and drawings of this application are used to distinguish different objects or different treatments of the same object, rather than to describe a specific order of the objects.

[0052] In addition, the terms "comprising" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes other steps or units not listed, or optionally also includes other steps or units inherent to these processes, methods, products, or devices.

[0053] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc. In addition, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.

[0054] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0055] In the description of this application, unless otherwise specified, the meaning of "a plurality" refers to two or more.

[0056] Figure 1 This is a flowchart of a method for training a restaurant recommendation model provided for an embodiment of the present invention. This embodiment is applicable to situations where the accuracy of the restaurant recommendation model needs to be improved. This method can be executed by a restaurant recommendation model training device, and the restaurant recommendation model training device can be implemented in a hardware / software manner. The device can be integrated in a computer device, for example, it can be installed in a computer, and the embodiments of the present invention do not limit this. As Figure 1As shown in the figure, it specifically includes the following steps:

[0057] Step 110: Determine the interactive restaurants and non-interactive restaurants of the target user according to the historical interaction records of the target user and each restaurant.

[0058] Specifically, the target user refers to the user who needs restaurant recommendations. The historical interaction record refers to the interaction data of the target user with each restaurant in the past, such as reservation, queuing, navigation, click, etc. The interactive restaurant refers to the restaurant with which the target user has had an interaction behavior in the historical interaction record. The non-interactive restaurant refers to the restaurant with which the target user has not had an interaction behavior in the historical interaction record.

[0059] In the specific implementation, first, based on a preset time period (such as the past year), extract the historical interaction records of the target user and each restaurant from the database storing the relevant data of the target user. Then, screen out the restaurants with which the target user has had an interaction behavior from the historical interaction records, and determine these restaurants as interactive restaurants. Finally, exclude the restaurants that have been determined as interactive restaurants from all restaurants, and determine the remaining restaurants as non-interactive restaurants.

[0060] In this embodiment, by determining the interactive restaurants and non-interactive restaurants of the target user, it provides a data basis for constructing each pair of restaurants later.

[0061] Step 120: Construct each pair of restaurants based on the interactive restaurants and non-interactive restaurants.

[0062] Specifically, a pair of restaurants refers to a pair composed of two restaurants (such as an interactive restaurant and a non-interactive restaurant).

[0063] In the specific implementation, after obtaining the interactive restaurants and non-interactive restaurants of the target user, each pair of restaurants can be constructed based on the interactive restaurants and non-interactive restaurants. For example, the pair of restaurants can be an interactive restaurant - non-interactive restaurant.

[0064] In this embodiment, by constructing pairs of restaurants, it not only provides more extensive training data for the restaurant recommendation model, improves the data utilization rate, but also enables the model to no longer be limited to the characteristics of a single restaurant when predicting the user's preference for restaurants, but comprehensively consider the complex relationships between restaurants, thereby helping the model better understand the relationships between restaurants and further improving the accuracy of the model.

[0065] Step 130: Obtain the feature data of each restaurant in each pair of restaurants from the database storing the feature data of each restaurant.

[0066] Specifically, the restaurant feature data includes static features (such as the price, geographical location, business hours, dish type, user rating, etc. of the restaurant) and dynamic features (such as the interaction data between the user and the restaurant).

[0067] In specific implementation, the feature data of each restaurant in each pair of restaurants can be obtained from the database storing the feature data of each restaurant, providing a more abundant and comprehensive dataset for the subsequent training of the restaurant recommendation model. This not only solves the problem of data sparsity but also enables the model to access more diverse restaurant feature information, thereby promoting the model's in-depth understanding of user preferences and restaurant attributes, and further improving the accuracy and personalization level of recommendations.

[0068] Step 140: Input the feature data of each restaurant in each pair of restaurants into the restaurant recommendation model to predict the user preference degree of each restaurant in each pair of restaurants.

[0069] Specifically, the restaurant recommendation model refers to a model constructed based on machine learning or deep learning techniques, used to predict the preference degree of a target user for each restaurant to achieve restaurant recommendations. The user preference degree refers to a quantitative index of the degree of preference of a user for a certain restaurant obtained by the restaurant recommendation model. The higher the value, the more likely the user is to like the restaurant.

[0070] In specific implementation, after obtaining the feature data of each restaurant in each pair of restaurants, the static features and dynamic features of each restaurant in each pair of restaurants can be concatenated first to obtain the fused features of each restaurant in each pair of restaurants, and then the multi-layer perceptron in the restaurant recommendation model can be used to process the fused features of each restaurant in each pair of restaurants to obtain the user preference degree of each restaurant in each pair of restaurants.

[0071] In this embodiment, by predicting the user preference degree of each restaurant in each pair of restaurants, a data basis is provided for calculating the pairwise logistic loss of each pair of restaurants later.

[0072] Step 150: Calculate the pairwise logistic loss of each pair of restaurants according to the user preference degree of each restaurant in each pair of restaurants.

[0073] Specifically, the pairwise logistic loss refers to a loss value calculated based on the user preference degrees of the two restaurants in a pair of restaurants.

[0074] In specific implementation, after obtaining the user preference degree of each restaurant in each pair of restaurants, the pairwise logistic loss of each pair of restaurants can be calculated according to the user preference degree of each restaurant in each pair of restaurants. The specific calculation formula is as follows:

[0075]

[0076] where loss is the pairwise logistic loss, s i is the user preference degree of one restaurant in a pair of restaurants, and s j is the user preference degree of the other restaurant in a pair of restaurants.

[0077] In this embodiment, the pairwise logistic loss calculated through the above steps takes into account the relative relationship between restaurants, enabling the model to more effectively learn the preference differences of users for different restaurants during training, avoiding falling into local optimal solutions, and improving the accuracy of the model.

[0078] Step 160: Sum the pairwise logistic losses of each pair of restaurants to obtain a training loss, and adjust the network parameters in the restaurant recommendation model according to the training loss.

[0079] Specifically, the training loss refers to the sum of the pairwise logistic losses of all pairs of restaurants during the model training process, which is used to evaluate the current state of the model and guide the update of the model parameters. The network parameters refer to the numerical parameters that need to be learned and adjusted in the restaurant recommendation model.

[0080] In a specific implementation, after obtaining the user preference degrees for each restaurant in each pair of restaurants, first accumulate the pairwise logistic losses of each pair of restaurants to obtain a training loss. Then, the backpropagation algorithm and gradient descent can be used to adjust the network parameters in the restaurant recommendation model according to the training loss.

[0081] In this embodiment, by optimizing the training loss, the model can more accurately capture the preference differences of users for restaurants, thereby improving the accuracy and personalization degree of the model.

[0082] In the embodiments of the present invention, first, based on the historical interaction records of the target user and each restaurant, the interaction restaurants and non-interaction restaurants of the target user are determined, providing a data basis for constructing each pair of restaurants later. Then, based on the interaction restaurants and non-interaction restaurants, each pair of restaurants is constructed. This not only provides a wider range of training data for the restaurant recommendation model, improving the data utilization rate, but also enables the model to no longer be limited to the characteristics of a single restaurant when predicting the user's preference for a restaurant. Instead, it comprehensively considers the complex relationships between restaurants, thereby helping the model better understand the relationships between restaurants and further improving the accuracy of the model. After that, the characteristic data of each restaurant in each pair of restaurants is obtained from the database storing the characteristic data of each restaurant, providing a more abundant and comprehensive data set for the training of the restaurant recommendation model later. This not only solves the problem of data sparsity, but also enables the model to access more diverse restaurant characteristic information, thereby promoting the model's in-depth understanding of user preferences and restaurant attributes, and further enhancing the accuracy and personalization level of the recommendation. Next, the characteristic data of each restaurant in each pair of restaurants is input into the restaurant recommendation model to predict the user preference for each restaurant in each pair of restaurants, providing a data basis for calculating the pairwise logistic loss of each pair of restaurants later. Then, according to the user preference for each restaurant in each pair of restaurants, the pairwise logistic loss of each pair of restaurants is calculated, enabling the model to more effectively learn the preference differences of users for different restaurants during training, avoiding falling into local optimal solutions, and improving the accuracy of the model. Finally, the pairwise logistic losses of each pair of restaurants are summed to obtain the training loss, and the network parameters in the restaurant recommendation model are adjusted according to the training loss, enabling the model to more accurately capture the preference differences of users for restaurants, thereby enhancing the accuracy and personalization degree of the model. Therefore, the present invention not only improves the accuracy of the model, but also solves the problem of data sparsity existing in the prior art.

[0083] Figure 2 FIG. 4 is a flowchart of another method for training a restaurant recommendation model provided by an embodiment of the present invention. This embodiment is a specific implementation based on the above embodiment. In this embodiment, the method may further include:

[0084] Step 210: Determine the interaction restaurants and non-interaction restaurants of the target user based on the historical interaction records of the target user and each restaurant.

[0085] Step 211: Construct each pair of restaurants based on the interaction restaurants and non-interaction restaurants.

[0086] Specifically, each pair of restaurants includes at least one of an interaction restaurant and a non-interaction restaurant, an interaction restaurant and an interaction restaurant, and a non-interaction restaurant and a non-interaction restaurant.

[0087] Step 212: Obtain the characteristic data of each restaurant in each pair of restaurants from the database storing the characteristic data of each restaurant.

[0088] Optionally, the restaurant recommendation model includes a first preference determination module and a second preference determination module.

[0089] Step 213: Use the first preference determination module to process the dynamic features of each restaurant in each pair of restaurants, and obtain the first user preference for each restaurant in each pair of restaurants.

[0090] Specifically, the first preference determination module refers to a functional module in the restaurant recommendation model, which is used to calculate the first user preference for a restaurant according to the dynamic features of the restaurant. The dynamic features refer to the user's behavior data, such as: the user's reservation behavior, queuing behavior, navigation behavior, click behavior, etc. The first user preference refers to a quantitative index of the degree of the user's preference for a certain restaurant obtained according to the dynamic features of the restaurant.

[0091] In a specific implementation, a recurrent neural network in the restaurant recommendation model can be used to extract the dynamic features of each restaurant in each pair of restaurants to obtain the target dynamic features of each restaurant in each pair of restaurants, and then input the target dynamic features of each restaurant in each pair of restaurants into an activation function (such as sigmoid) to obtain the first preference for each restaurant in each pair of restaurants. Among them, the first preference determination module includes a recurrent neural network.

[0092] Furthermore, step 213 can specifically include: for the current restaurant, extract the user behavior type and the corresponding behavior timestamp from the dynamic features of the current restaurant; query in the correspondence table of user behavior types and behavior weights based on the user behavior type of the current restaurant to obtain the behavior weight of the dynamic features of the current restaurant; calculate the difference between the behavior timestamp and the current timestamp to obtain the behavior lag duration of the dynamic features of the current restaurant; calculate the time weight of the dynamic features of the current restaurant based on the behavior lag duration and the preset time decay rate; obtain the first user preference of the current restaurant according to the product of the time weight and the behavior weight of the dynamic features of the current restaurant.

[0093] Specifically, the user behavior type refers to the category of behaviors generated during the user's interaction with the restaurant, such as: reservation, queuing, navigation, click, etc. The behavior timestamp refers to the specific time point when the user performs a certain behavior. The behavior weight refers to the weight value preset according to different user behavior types. For example, the behavior weight of reservation is 5, the behavior weight of queuing is 4, the behavior weight of navigation is 3, and the behavior weight of click is 1. The behavior lag duration refers to the time difference between the user behavior timestamp and the current timestamp. The preset time decay rate refers to the time decay rate set in advance according to the actual situation or requirements. The time weight refers to the weight value calculated based on the behavior lag duration and the preset time decay rate, which reflects the influence degree of the time factor on the user preference.

[0094] In a specific implementation, for the current restaurant, first extract the user behavior types and corresponding behavior timestamps of the current restaurant from the dynamic features of the current restaurant, and then query in the correspondence table of user behavior types and behavior weights based on the user behavior types of the current restaurant to obtain the behavior weights of the dynamic features of the current restaurant. Then calculate the difference between the behavior timestamp and the current timestamp to obtain the behavior lag duration of the dynamic features of the current restaurant. Next, calculate the time weight of the dynamic features of the current restaurant based on the behavior lag duration and the preset time decay rate. The specific calculation formula is: d = e -AT , where T is the behavior lag duration, A is the preset time decay rate, and d is the time weight. Finally, obtain the first user preference degree of the current restaurant according to the product of the time weight and the behavior weight of the dynamic features of the current restaurant. For example: If the current restaurant includes behavior X and behavior Y, the behavior weight of behavior X is d1 and the time weight is t1, and the behavior weight of behavior Y is d2 and the time weight is t2, then the first user preference degree of the current restaurant is d1×t1 + d2×t2.

[0095] In this embodiment, through the above steps, the model can more accurately capture the preference changes of users for restaurants, thereby improving the accuracy of the determined first user preference degree, and further improving the accuracy of the subsequent determined user preference degree.

[0096] Step 214: Use the second preference degree determination module to process the static features of each restaurant in each pair of restaurants to obtain the second user preference degree of each restaurant in each pair of restaurants.

[0097] Specifically, the second preference degree determination module refers to a functional module in the restaurant recommendation model for calculating the first preference degree of users for restaurants according to the static features of the restaurants. Static features refer to data that does not change over time or changes very little over time, such as: the cuisine type of the restaurant, geographical location, decoration style, per capita consumption, user preferences, etc. The second user preference degree refers to a quantitative index of the degree of preference of users for a certain restaurant obtained according to the static features of the restaurant.

[0098] In a specific implementation, a fully connected neural network can be used to process the static features of each restaurant in each pair of restaurants to obtain the target static features of each restaurant in each pair of restaurants, and then input the target static features of each restaurant in each pair of restaurants into the output layer to obtain the second user preference degree of each restaurant in each pair of restaurants. Among them, the second preference degree determination module includes a fully connected neural network.

[0099] Optionally, the second preference degree determination module includes a fully connected layer network, a self-attention network, and a deep and cross network.

[0100] Further, step 214 may specifically include: for the current restaurant, using a fully connected layer network to perform non-linear processing on the static features of the current restaurant to obtain intermediate features of the current restaurant; using a self-attention network to perform feature weighting processing on the intermediate features of the current restaurant to obtain weighted features of the current restaurant; using a deep and cross network to perform feature fusion and interaction processing on the weighted features of the current restaurant to obtain the second user preference degree of the current restaurant.

[0101] Specifically, the intermediate features refer to the results obtained after the fully connected layer network performs non-linear processing on the restaurant static features. The weighted features refer to the results obtained after the self-attention network performs feature weighting processing on the intermediate features.

[0102] In specific implementation, for the current restaurant, first, use a fully connected layer network to perform non-linear processing on the static features of the current restaurant to obtain intermediate features of the current restaurant. The specific calculation formula is: h 1 = ReLU(W 1 ×x static +b 1 ), where h 1 is the intermediate feature, W 1 is the weight matrix, x static is the static feature, b 1 is the bias term, and ReLU is the activation function. Then, use a self-attention network to perform feature weighting processing on the intermediate features of the current restaurant to obtain weighted features of the current restaurant. The specific calculation formula is: h 2 = α × V, where h 2 is the weighted feature, α is the attention weight, α = softmax(Q × K T / d k 1 / 2 ), softmax is the activation function, d k is the feature dimension, Q is the query vector, Q = W Q ×h 1 , K is the key vector, K = W K ×h 1 , V is the value vector, V = W V ×h 1 , and W Q , W K , W V are parameter matrices. Finally, use a deep and cross network to perform feature fusion and interaction processing on the weighted features of the current restaurant to obtain the second user preference degree of the current restaurant. The specific calculation formula is: y = W 3 × ReLU(W 2 ×(h2⊙h1)+b 2 )+b 3 , where y is the second user preference degree, and W3 , W 2 is the weight matrix, ⊙ is the element-wise multiplication, and b 2 , b 3 is the bias term.

[0103] In this embodiment, by combining the fully connected layer network, the self-attention network, and the deep and cross network, the model can learn more complex feature representations and relationship patterns, thereby showing stronger generalization ability when processing data of different restaurants and improving the accuracy of the determined second user preference.

[0104] Step 215: Sum the first user preference and the second user preference of each restaurant in each pair of restaurants to obtain the user preference of each restaurant in each pair of restaurants.

[0105] In a specific implementation, for the current restaurant, the user preference of the current restaurant = the first user preference of the current restaurant + the second user preference of the current restaurant.

[0106] Step 216: Calculate the pairwise logistic loss of each pair of restaurants according to the user preference of each restaurant in each pair of restaurants.

[0107] Step 217: Calculate the product of the pairwise logistic loss of each pair of restaurants and the preset weight of each pair of restaurants to obtain the weighted loss of each pair of restaurants.

[0108] Specifically, the preset weight refers to the weight of the pair of restaurants set in advance according to the actual situation or requirements. The weighted loss refers to the result obtained by multiplying the pairwise logistic loss of each pair of restaurants by the preset weight of that pair of restaurants.

[0109] In a specific implementation, for the current pair of restaurants, the weighted loss of the current pair of restaurants = the preset weight of the current pair of restaurants × the pairwise logistic loss of the current pair of restaurants.

[0110] In this embodiment, by calculating the weighted loss of each pair of restaurants, the accuracy of the subsequent determined training loss is improved, which helps to optimize the performance of the restaurant recommendation model.

[0111] Step 218: Sum the weighted losses of each pair of restaurants to obtain the training loss.

[0112] Specifically, after obtaining the weighted losses of each pair of restaurants, the weighted losses of each pair of restaurants can be accumulated to obtain the training loss, providing a data basis for subsequent adjustment of the network parameters in the restaurant recommendation model.

[0113] Step 219: Adjust the network parameters in the restaurant recommendation model according to the training loss.

[0114] Therefore, in the technical solution of the present invention, first, the interactive restaurants and non-interactive restaurants of the target user are determined according to the historical interaction records of the target user and each restaurant, providing a data basis for constructing each pair of restaurants later. Then, each pair of restaurants is constructed based on the interactive restaurants and non-interactive restaurants, which not only provides a wider range of training data for the restaurant recommendation model, improves the data utilization rate, but also enables the model to no longer be limited to the characteristics of a single restaurant when predicting the user's preference for a restaurant, but comprehensively considers the complex relationships between restaurants, thereby helping the model better understand the relationships between restaurants and further improving the accuracy of the model. After that, the characteristic data of each restaurant in each pair of restaurants is obtained from the database storing the characteristic data of each restaurant, providing a more abundant and comprehensive data set for the training of the restaurant recommendation model later, not only solving the problem of data sparsity, but also enabling the model to access more diverse restaurant characteristic information, thereby promoting the model's in-depth understanding of user preferences and restaurant attributes, and further improving the accuracy and personalization level of the recommendation. Next, the dynamic characteristics of each restaurant in each pair of restaurants are processed by the first preference determination module to obtain the first user preference of each restaurant in each pair of restaurants, and the static characteristics of each restaurant in each pair of restaurants are processed by the second preference determination module to obtain the second user preference of each restaurant in each pair of restaurants. Then, the first user preference and the second user preference of each restaurant in each pair of restaurants are summed to obtain the user preference of each restaurant in each pair of restaurants, improving the accuracy of the determined user preference. Then, the pairwise logistic loss of each pair of restaurants is calculated according to the user preference of each restaurant in each pair of restaurants, enabling the model to more effectively learn the preference differences of users for different restaurants during training, avoiding falling into local optimal solutions, and improving the accuracy of the model. Next, the product of the pairwise logistic loss of each pair of restaurants and the preset weight of each pair of restaurants is calculated to obtain the weighted loss of each pair of restaurants, improving the accuracy of the subsequent determined training loss, and thus helping to optimize the performance of the restaurant recommendation model. After that, the weighted losses of each pair of restaurants are summed to obtain the training loss, providing a data basis for adjusting the network parameters in the restaurant recommendation model later. Finally, the network parameters in the restaurant recommendation model are adjusted according to the training loss, enabling the model to more accurately capture the preference differences of users for restaurants, thereby improving the accuracy and personalization degree of the model. Therefore, the present invention not only improves the accuracy of the model, but also solves the problem of data sparsity existing in the prior art.

[0115] Figure 3 The flowchart of a restaurant recommendation method provided by an embodiment of the present invention. The restaurant recommendation model mentioned in this embodiment is a restaurant recommendation model trained by using the restaurant recommendation model training method mentioned in the above embodiment. As Figure 3 shown, the method includes:

[0116] Step 310: Obtain the real-time location of the target user, and determine each optional restaurant according to the real-time location and the preset screening distance.

[0117] Specifically, the real-time location refers to the geographical location where the target user is currently located. The preset screening distance refers to a distance range set in advance according to the actual situation or requirements. For example, the preset screening distance is 5 kilometers. The optional restaurants refer to the restaurants located within this distance range screened according to the real-time location of the target user and the preset screening distance.

[0118] In specific implementation, the global positioning system function of the terminal device (such as a mobile phone, a tablet computer, etc.) used by the target user or the in-vehicle software installed on the in-vehicle computer can be utilized to obtain the real-time location of the target user. After that, each optional restaurant that meets the distance requirement can be screened from the database storing restaurants according to the real-time location and the preset screening distance.

[0119] In this embodiment, by obtaining the real-time location of the target user and determining each optional restaurant according to the real-time location and the preset screening distance, not only the subsequent calculation burden is effectively reduced, but also the accuracy of the subsequent recommendation is improved, thereby enhancing the user experience.

[0120] Step 320: Obtain the feature data of each optional restaurant from the database storing the feature data of each restaurant, and input the feature data of each optional restaurant into the restaurant recommendation model for processing to obtain the user preference degree of each optional restaurant.

[0121] Specifically, the feature data of the optional restaurant includes static features (such as the price of the restaurant, geographical location, business hours, dish types, user preferences, etc.) and dynamic features (such as the interaction data between the user and the restaurant).

[0122] In specific implementation, after obtaining each optional restaurant, the feature data of each optional restaurant can be obtained from the database storing the feature data of each restaurant first. Then, the feature data of each optional restaurant is input into the restaurant recommendation model, and the restaurant recommendation model calculates and outputs the user preference degree of each optional restaurant according to the input feature data.

[0123] Step 330: Sort the user preference degrees of each optional restaurant to obtain the sorting result of each optional restaurant.

[0124] Specifically, the sorting result refers to the result obtained by sorting each optional restaurant according to the user preference degree.

[0125] In specific implementation, the user preference degrees of each optional restaurant can be sorted according to the sorting rule from high to low to obtain the sorting result of each optional restaurant, providing a data basis for recommending restaurants to the target user later.

[0126] Step 340: Recommend restaurants for the target user based on the sorting result.

[0127] In specific implementation, after obtaining the sorting result, the restaurants ranked higher can be extracted according to a preset quantity (such as the top 10). Then, the extracted restaurants are presented to the target user in the sorted order.

[0128] In the embodiment of the present invention, first, the real-time location of the target user is obtained, and each optional restaurant is determined according to the real-time location and a preset screening distance, which not only effectively reduces the subsequent calculation burden, but also improves the accuracy of subsequent recommendations, thereby enhancing the user experience. Then, the feature data of each optional restaurant is obtained from the database storing the feature data of each restaurant, and the feature data of each optional restaurant is input into the restaurant recommendation model for processing to obtain the user preference degree of each optional restaurant, improving the accuracy of determining the user preference degree. Then, the user preference degrees of each optional restaurant are sorted to obtain the sorting result of each optional restaurant, providing a data basis for recommending restaurants to the target user later. Finally, restaurants are recommended for the target user based on the sorting result, improving the accuracy of the recommendation and thus enhancing the user satisfaction.

[0129] Figure 4 FIG. is a schematic structural diagram of a restaurant recommendation model training device provided by an embodiment of the present invention. This device and the restaurant recommendation model training method of the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the restaurant recommendation model training device, reference can be made to the embodiments of the above restaurant recommendation model training method. As Figure 4 shown, the device includes:

[0130] A determination module 410, configured to determine the interactive restaurants and non-interactive restaurants of the target user according to the historical interaction records of the target user and each restaurant;

[0131] A construction module 420, configured to construct each pair of restaurants based on the interactive restaurants and the non-interactive restaurants;

[0132] An acquisition module 430, configured to obtain the feature data of each restaurant in each pair of restaurants from the database storing the feature data of each restaurant;

[0133] A prediction module 440, configured to input the feature data of each restaurant in each pair of restaurants into the restaurant recommendation model to predict the user preference degree of each restaurant in each pair of restaurants;

[0134] A calculation module 450, configured to calculate the pairwise logical loss of each pair of restaurants according to the user preference degree of each restaurant in each pair of restaurants, and sum the pairwise logical losses of each pair of restaurants to obtain the training loss;

[0135] An optimization module 460 is configured to adjust network parameters in the restaurant recommendation model according to the training loss.

[0136] Based on the above embodiments, the feature data of each restaurant includes static features and dynamic features. The restaurant recommendation model includes a first preference determination module and a second preference determination module. The prediction module 440 is specifically configured to: use the first preference determination module to process the dynamic features of each restaurant in each pair of restaurants to obtain the first user preference for each restaurant in each pair of restaurants; use the second preference determination module to process the static features of each restaurant in each pair of restaurants to obtain the second user preference for each restaurant in each pair of restaurants; sum the first user preference and the second user preference for each restaurant in each pair of restaurants to obtain the user preference for each restaurant in each pair of restaurants.

[0137] Based on the above embodiments, the prediction module 440 uses the first preference determination module to process the dynamic features of each restaurant in each pair of restaurants to obtain the first user preference for each restaurant in each pair of restaurants, including: for the current restaurant, extracting the user behavior type and the corresponding behavior timestamp from the dynamic features of the current restaurant; querying in the correspondence table of user behavior types and behavior weights based on the user behavior type of the current restaurant to obtain the behavior weight of the dynamic features of the current restaurant; calculating the difference between the behavior timestamp and the current timestamp to obtain the behavior lag duration of the dynamic features of the current restaurant; calculating the time weight of the dynamic features of the current restaurant based on the behavior lag duration and the preset time decay rate; obtaining the first user preference for the current restaurant according to the product of the time weight and the behavior weight of the dynamic features of the current restaurant.

[0138] Based on the above embodiments, the second preference determination module includes a fully connected layer network, a self-attention network, and a deep and cross network. The prediction module 440 uses the second preference determination module to process the static features of each restaurant in each pair of restaurants to obtain the second user preference for each restaurant in each pair of restaurants, including: for the current restaurant, performing non-linear processing on the static features of the current restaurant using the fully connected layer network to obtain the intermediate features of the current restaurant; performing feature weighting processing on the intermediate features of the current restaurant using the self-attention network to obtain the weighted features of the current restaurant; performing feature fusion and interaction processing on the weighted features of the current restaurant using the deep and cross network to obtain the second user preference for the current restaurant.

[0139] Based on the above embodiments, the calculation module 450 sums up the pairwise logical losses of the respective restaurant pairs to obtain a training loss, including: calculating the product of the pairwise logical losses of the respective restaurant pairs and the preset weights of the respective restaurant pairs to obtain the weighted losses of the respective restaurant pairs; summing up the weighted losses of the respective restaurant pairs to obtain the training loss.

[0140] Based on the above embodiments, the respective restaurant pairs include at least one of an interactive restaurant and a non-interactive restaurant, an interactive restaurant and an interactive restaurant, and a non-interactive restaurant and a non-interactive restaurant.

[0141] The restaurant recommendation model training device provided by the embodiments of the present invention can execute the restaurant recommendation model training method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0142] It should be noted that in the embodiments of the above restaurant recommendation model training device, the respective units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the respective functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.

[0143] Figure 5 The accompanying drawing is a schematic structural diagram of a restaurant recommendation device provided by an embodiment of the present invention. This device and the restaurant recommendation methods of the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiments of the restaurant recommendation device, reference can be made to the embodiments of the above restaurant recommendation methods. As Figure 5 shown, the device includes:

[0144] A screening module 510, configured to obtain the real-time location of a target user, and determine each optional restaurant according to the real-time location and a preset screening distance;

[0145] A preference calculation module 520, configured to obtain the feature data of each optional restaurant from a database storing the feature data of each restaurant, input the feature data of each optional restaurant into the restaurant recommendation model obtained by using the restaurant recommendation model training method described in any embodiment of the present invention for processing, and obtain the user preference for each optional restaurant;

[0146] A sorting module 530, configured to sort the user preferences of each optional restaurant to obtain a sorting result of each optional restaurant;

[0147] A recommendation module 540, configured to recommend restaurants for the target user based on the sorting result.

[0148] The restaurant recommendation device provided by the embodiments of the present invention can execute the restaurant recommendation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0149] It should be noted that in the embodiments of the above-mentioned restaurant recommendation device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.

[0150] Figure 6 It is a schematic structural diagram of a computer device provided by an embodiment of the present invention. Figure 6 It shows a block diagram of an exemplary computer device 6 suitable for implementing the embodiments of the present invention. Figure 6 The displayed computer device 6 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.

[0151] Such as Figure 6 As shown, the computer device 6 is presented in the form of a general-purpose computing electronic device. The components of the computer device 6 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0152] The bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the multiple bus structures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0153] The computer device 6 typically includes a variety of computer system-readable media. These media can be any available media accessible by the computer device 6, including volatile and non-volatile media, removable and non-removable media.

[0154] The system memory 28 may include computer system-readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 6 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 can be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, commonly referred to as a "hard disk drive"). Although Figure 6Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical medium) can be provided. In these cases, each drive can be connected to the bus 18 through one or more data medium interfaces. The system memory 28 can include at least one program product having a set (such as at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0155] A program / utility 40 having a set (at least one) of program modules 42 can be stored, for example, in the system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 42 generally perform the functions and / or methods in the embodiments described in the present invention.

[0156] The computer device 6 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and can also communicate with one or more devices that enable a user to interact with the computer device 6, and / or communicate with any device that enables the computer device 6 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 22. Moreover, the computer device 6 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 20. As Figure 6 shown, the network adapter 20 communicates with other modules of the computer device 6 through the bus 18. It should be understood that although Figure 6 not shown in the figure, other hardware and / or software modules can be used in combination with the computer device 6, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0157] The processing unit 16 executes various functional applications and page displays by running the programs stored in the system memory 28, such as implementing the restaurant recommendation model training method provided by the embodiments of the present invention, or implementing the restaurant recommendation method provided by any embodiment of the present invention.

[0158] Of course, those skilled in the art can understand that the processor can also implement the technical solutions of the restaurant recommendation model training method or the restaurant recommendation method provided by any embodiment of the present invention.

[0159] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements, for example, the restaurant recommendation model training method or the restaurant recommendation method provided by the embodiment of the present invention.

[0160] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.

[0161] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0162] The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0163] Computer program code for performing the operations of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0164] Those of ordinary skill in the art should understand that the above-mentioned modules or steps of the present invention can be implemented using a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Optionally, they can be implemented using program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0165] In addition, in the technical solution of the present invention, the acquisition, storage, use, processing, etc. of data all comply with the relevant provisions of national laws and regulations.

[0166] Note that the above is only the preferred embodiment of the present invention and the applied technical principle. Those skilled in the art will understand that the present invention is not limited to the specific embodiments here. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, it can also include more other equivalent embodiments, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A restaurant recommendation model training method, characterized in that: include: Determine interactive restaurants and non-interactive restaurants for the target user according to historical interaction records between the target user and each restaurant; Building each restaurant pair based on the interactive restaurant and the non-interactive restaurant; Acquire characteristic data of each restaurant in each restaurant pair from a database storing characteristic data of each restaurant; Inputting the characteristic data of each restaurant in each restaurant pair into a restaurant recommendation model to predict the user preference of each restaurant in each restaurant pair; Calculating the pairwise logistic loss of each restaurant pair according to the user preference of each restaurant in each restaurant pair; The pairwise logistic losses of the restaurant pairs are summed to obtain a training loss, and the network parameters in the restaurant recommendation model are adjusted according to the training loss.

2. The restaurant recommendation model training method according to claim 1, characterized in that: The feature data of each restaurant includes static features and dynamic features, and the restaurant recommendation model includes a first likeability determination module and a second likeability determination module. The feature data of each restaurant in each restaurant pair is input into the restaurant recommendation model to predict the user likeability of each restaurant in each restaurant pair, including: Using the first preference determination module to process the dynamic features of each restaurant in each restaurant pair to obtain a first user preference of each restaurant in each restaurant pair; Using the second preference determination module to process the static features of each restaurant in each restaurant pair to obtain a second user preference of each restaurant in each restaurant pair; The first user preference and the second user preference of each restaurant in each restaurant pair are summed to obtain the user preference of each restaurant in each restaurant pair.

3. The restaurant recommendation model training method according to claim 2, characterized in that: Using the first preference determination module to process the dynamic features of each restaurant in each restaurant pair to obtain a first user preference of each restaurant in each restaurant pair includes: For the current restaurant, extract the user behavior type and the corresponding behavior timestamp of the current restaurant from the dynamic features of the current restaurant; Based on the user behavior type of the current restaurant, query in a correspondence table between user behavior type and behavior weight to obtain the behavior weight of the dynamic feature of the current restaurant; Calculate the difference between the behavior timestamp and the current timestamp to obtain the behavior lag time of the dynamic feature of the current restaurant; Calculate the time weight of the dynamic feature of the current restaurant based on the behavior lag time and a preset time decay rate; The first user preference of the current restaurant is obtained according to the product of the time weight and the behavior weight of the dynamic feature of the current restaurant.

4. The restaurant recommendation model training method according to claim 2, characterized in that: The second likeability determination module includes a fully connected layer network, a self-attention network, and a deep and cross network. The second likeability determination module is used to process the static features of each restaurant in each restaurant pair to obtain the second user likeability of each restaurant in each restaurant pair, including: For the current restaurant, use the fully connected layer network to perform nonlinear processing on the static features of the current restaurant to obtain the intermediate features of the current restaurant; Using the self-attention network to perform feature weighting processing on the intermediate features of the current restaurant to obtain weighted features of the current restaurant; The deep and cross network is used to perform feature fusion and interactive processing on the weighted features of the current restaurant to obtain a second user preference of the current restaurant.

5. The restaurant recommendation model training method according to claim 1, characterized in that: The pairwise logistic losses of the restaurant pairs are summed to obtain the training loss, which includes: Calculate the product of the pairwise logistic loss of each restaurant pair and the preset weight of each restaurant pair to obtain the weighted loss of each restaurant pair; The weighted losses of the restaurant pairs are summed to obtain the training loss.

6. The restaurant recommendation model training method according to claim 1, characterized in that: The restaurant pairs include at least one of an interactive restaurant and a non-interactive restaurant, an interactive restaurant and an interactive restaurant, and a non-interactive restaurant and a non-interactive restaurant.

7. A restaurant recommendation method, characterized in that: include: Obtaining the real-time location of the target user, and determining each optional restaurant according to the real-time location and a preset screening distance; Acquire the characteristic data of each optional restaurant from a database storing the characteristic data of each restaurant, input the characteristic data of each optional restaurant into the restaurant recommendation model obtained by the restaurant recommendation model training method according to any one of claims 1 to 6, and obtain the user preference of each optional restaurant; Sorting the user preferences of the optional restaurants to obtain a ranking result of the optional restaurants; Recommending restaurants to the target user based on the ranking results.

8. A restaurant recommendation model training device, characterized in that: include: A determination module, used to determine the interactive restaurants and non-interactive restaurants of the target user according to the historical interaction records between the target user and each restaurant; A construction module, configured to construct restaurant pairs based on the interactive restaurants and the non-interactive restaurants; An acquisition module, used for acquiring the characteristic data of each restaurant in each restaurant pair from a database storing the characteristic data of each restaurant; A prediction module, used for inputting the characteristic data of each restaurant in each restaurant pair into a restaurant recommendation model to predict the user preference of each restaurant in each restaurant pair; A calculation module, used for calculating the pairwise logical loss of each restaurant pair according to the user preference of each restaurant in each restaurant pair, and summing the pairwise logical losses of each restaurant pair to obtain a training loss; An optimization module is used to adjust network parameters in the restaurant recommendation model according to the training loss.

9. A computer device, characterized in that: The computer device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; In which, the memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the restaurant recommendation model training method described in any one of claims 1-6, or execute the restaurant recommendation method described in claim 7.

10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions, when executed by a computer processor, are used to execute the restaurant recommendation model training method described in any one of claims 1 to 6, or to execute the restaurant recommendation method described in claim 7.

Citation Information

Cited By

  • Method for determining object preference, model training method and device, equipment and medium

    CN121072597A